Retrieves details for a specific alarm mute rule.
This operation returns complete information about the mute rule, including its configuration, status, targeted alarms, and metadata.
The returned status indicates the current state of the mute rule:
-
SCHEDULED: The mute rule is configured and will become active in the future
-
ACTIVE: The mute rule is currently muting alarm actions
-
EXPIRED: The mute rule has passed its expiration date and will no longer become active
Permissions
To retrieve details for a mute rule, you need the cloudwatch:GetAlarmMuteRule permission on the alarm mute rule resource.
Parameters:
-
alarm_mute_rule_name
(Optional[Name], default:
None
)
–
The name of the alarm mute rule to retrieve.
Raises:
Source code in docs_src/capo_cloudwatch/_services/cloud_watch.py
| def get_alarm_mute_rule(
self,
*,
config_overrides: Optional[CloudWatchClientConfig] = None,
alarm_mute_rule_name: Optional["capo_cloudwatch.types.name.Name"] = None,
) -> "capo_cloudwatch.types.get_alarm_mute_rule_output.GetAlarmMuteRuleOutput":
"""<p>Retrieves details for a specific alarm mute rule.</p> <p>This operation returns complete information about the mute rule, including its configuration, status, targeted alarms, and metadata.</p> <p>The returned status indicates the current state of the mute rule:</p> <ul> <li> <p> <b>SCHEDULED</b>: The mute rule is configured and will become active in the future</p> </li> <li> <p> <b>ACTIVE</b>: The mute rule is currently muting alarm actions</p> </li> <li> <p> <b>EXPIRED</b>: The mute rule has passed its expiration date and will no longer become active</p> </li> </ul> <p> <b>Permissions</b> </p> <p>To retrieve details for a mute rule, you need the <code>cloudwatch:GetAlarmMuteRule</code> permission on the alarm mute rule resource.</p>
Args:
alarm_mute_rule_name: <p>The name of the alarm mute rule to retrieve.</p>
Raises:
capo_cloudwatch.errors.resource_not_found_exception.ResourceNotFoundException: <p>The named resource does not exist.</p>
capo_cloudwatch.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_cloudwatch.types.get_alarm_mute_rule_input.GetAlarmMuteRuleInput]",
) -> OperationResponse[
"capo_cloudwatch.types.get_alarm_mute_rule_output.GetAlarmMuteRuleOutput"
]:
import capo_cloudwatch._operations.granite_service_version20100801.get_alarm_mute_rule
output, http_response = (
capo_cloudwatch._operations.granite_service_version20100801.get_alarm_mute_rule.get_alarm_mute_rule(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetAlarmMuteRule")
)
input_: capo_cloudwatch.types.get_alarm_mute_rule_input.GetAlarmMuteRuleInput = {}
if alarm_mute_rule_name is not None:
input_["alarm_mute_rule_name"] = alarm_mute_rule_name
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|