CloudWatch / Client / list_alarm_mute_rules

list_alarm_mute_rules

CloudWatch.Client.list_alarm_mute_rules(**kwargs)

Lists alarm mute rules in your Amazon Web Services account and region.

You can filter the results by alarm name to find all mute rules targeting a specific alarm, or by status to find rules that are scheduled, active, or expired.

This operation supports pagination for accounts with many mute rules. Use the MaxRecords and NextToken parameters to retrieve results in multiple calls.

Permissions

To list mute rules, you need the cloudwatch:ListAlarmMuteRules permission.

See also: AWS API Documentation

Request Syntax

response = client.list_alarm_mute_rules(
    AlarmName='string',
    Statuses=[
        'SCHEDULED'|'ACTIVE'|'EXPIRED',
    ],
    MaxRecords=123,
    NextToken='string'
)
Parameters:
  • AlarmName (string) – Filter results to show only mute rules that target the specified alarm name.

  • Statuses (list) –

    Filter results to show only mute rules with the specified statuses. Valid values are SCHEDULED, ACTIVE, or EXPIRED.

    • (string) –

  • MaxRecords (integer) – The maximum number of mute rules to return in one call. The default is 50.

  • NextToken (string) – The token returned from a previous call to indicate where to continue retrieving results.

Return type:

dict

Returns:

Response Syntax

{
    'AlarmMuteRuleSummaries': [
        {
            'AlarmMuteRuleArn': 'string',
            'ExpireDate': datetime(2015, 1, 1),
            'Status': 'SCHEDULED'|'ACTIVE'|'EXPIRED',
            'MuteType': 'string',
            'LastUpdatedTimestamp': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • AlarmMuteRuleSummaries (list) –

      A list of alarm mute rule summaries.

      • (dict) –

        Summary information about an alarm mute rule, including its name, status, and configuration details.

        • AlarmMuteRuleArn (string) –

          The Amazon Resource Name (ARN) of the alarm mute rule.

        • ExpireDate (datetime) –

          The date and time when the mute rule expires and is no longer evaluated. This field is only present if an expiration date was configured.

        • Status (string) –

          The current status of the alarm mute rule. Valid values are SCHEDULED, ACTIVE, or EXPIRED.

        • MuteType (string) –

          Indicates whether the mute rule is one-time or recurring. Valid values are ONE_TIME or RECURRING.

        • LastUpdatedTimestamp (datetime) –

          The date and time when the mute rule was last updated.

    • NextToken (string) –

      The token to use when requesting the next set of results. If this field is absent, there are no more results to retrieve.

Exceptions

  • CloudWatch.Client.exceptions.InvalidNextToken

  • CloudWatch.Client.exceptions.ResourceNotFoundException