Skip to content

get_alarm_mute_rule async

get_alarm_mute_rule(
    *,
    config_overrides: Optional[AsyncCloudWatchClientConfig] = None,
    alarm_mute_rule_name: Optional[Name] = None,
) -> GetAlarmMuteRuleOutput

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/async_cloud_watch.py
async def get_alarm_mute_rule(
    self,
    *,
    config_overrides: Optional[AsyncCloudWatchClientConfig] = 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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudwatch.types.get_alarm_mute_rule_input.GetAlarmMuteRuleInput]",
    ) -> AsyncOperationResponse[
        "capo_cloudwatch.types.get_alarm_mute_rule_output.GetAlarmMuteRuleOutput"
    ]:
        import capo_cloudwatch._operations.granite_service_version20100801.get_alarm_mute_rule

        (
            output,
            http_response,
        ) = await capo_cloudwatch._operations.granite_service_version20100801.get_alarm_mute_rule.async_get_alarm_mute_rule(
            req.options, req.input
        )
        return AsyncOperationResponse(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 = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output