Skip to main content

alarm_mute_rules

Creates, updates, deletes, gets or lists an alarm_mute_rules resource.

Overview

Namealarm_mute_rules
TypeResource
Idaws.cloudwatch.alarm_mute_rules

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
alarm_mute_rule_arnstringThe Amazon Resource Name (ARN) of the alarm mute rule.
descriptionstringThe description of the alarm mute rule.
expire_datestring (date-time)The date and time when the mute rule expires and is no longer evaluated.
last_updated_timestampstring (date-time)The date and time when the mute rule was last updated.
mute_targetsobjectSpecifies which alarms this rule applies to.
mute_typestringIndicates whether the mute rule is one-time or recurring. Valid values are ONE_TIME or RECURRING.
namestringThe name of the alarm mute rule.
ruleobjectThe configuration that defines when and how long alarms are muted.
start_datestring (date-time)The date and time when the mute rule becomes active. If not set, the rule is active immediately.
statusstringThe current status of the alarm mute rule. Valid values are SCHEDULED, ACTIVE, or EXPIRED. (SCHEDULED, ACTIVE, EXPIRED)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_alarm_mute_ruleselectregionRetrieves 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.
list_alarm_mute_rulesselectregionLists 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.
put_alarm_mute_rulereplaceregionCreates or updates an alarm mute rule. Alarm mute rules automatically mute alarm actions during predefined time windows. When a mute rule is active, targeted alarms continue to evaluate metrics and transition between states, but their configured actions (such as Amazon SNS notifications or Auto Scaling actions) are muted. You can create mute rules with recurring schedules using cron expressions or one-time mute windows using at expressions. Each mute rule can target up to 100 specific alarms by name. If you specify a rule name that already exists, this operation updates the existing rule with the new configuration. Permissions To create or update a mute rule, you must have the cloudwatch:PutAlarmMuteRule permission on two types of resources: the alarm mute rule resource itself, and each alarm that the rule targets. For example, If you want to allow a user to create mute rules that target only specific alarms named "WebServerCPUAlarm" and "DatabaseConnectionAlarm", you would create an IAM policy with one statement granting cloudwatch:PutAlarmMuteRule on the alarm mute rule resource (arn:aws:cloudwatch:[REGION]:123456789012:alarm-mute-rule:*), and another statement granting cloudwatch:PutAlarmMuteRule on the targeted alarm resources (arn:aws:cloudwatch:[REGION]:123456789012:alarm:WebServerCPUAlarm and arn:aws:cloudwatch:[REGION]:123456789012:alarm:DatabaseConnectionAlarm). You can also use IAM policy conditions to allow targeting alarms based on resource tags. For example, you can restrict users to create/update mute rules to only target alarms that have a specific tag key-value pair, such as Team=TeamA.
delete_alarm_mute_ruledeleteregionDeletes a specific alarm mute rule. When you delete a mute rule, any alarms that are currently being muted by that rule are immediately unmuted. If those alarms are in an ALARM state, their configured actions will trigger. This operation is idempotent. If you delete a mute rule that does not exist, the operation succeeds without returning an error. Permissions To delete a mute rule, you need the cloudwatch:DeleteAlarmMuteRule permission on the alarm mute rule resource.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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.

SELECT
alarm_mute_rule_arn,
description,
expire_date,
last_updated_timestamp,
mute_targets,
mute_type,
name,
rule,
start_date,
status
FROM aws.cloudwatch.alarm_mute_rules
WHERE region = '{{ region }}' -- required
;

REPLACE examples

Creates or updates an alarm mute rule. Alarm mute rules automatically mute alarm actions during predefined time windows. When a mute rule is active, targeted alarms continue to evaluate metrics and transition between states, but their configured actions (such as Amazon SNS notifications or Auto Scaling actions) are muted. You can create mute rules with recurring schedules using cron expressions or one-time mute windows using at expressions. Each mute rule can target up to 100 specific alarms by name. If you specify a rule name that already exists, this operation updates the existing rule with the new configuration. Permissions To create or update a mute rule, you must have the cloudwatch:PutAlarmMuteRule permission on two types of resources: the alarm mute rule resource itself, and each alarm that the rule targets. For example, If you want to allow a user to create mute rules that target only specific alarms named "WebServerCPUAlarm" and "DatabaseConnectionAlarm", you would create an IAM policy with one statement granting cloudwatch:PutAlarmMuteRule on the alarm mute rule resource (arn:aws:cloudwatch:[REGION]:123456789012:alarm-mute-rule:*), and another statement granting cloudwatch:PutAlarmMuteRule on the targeted alarm resources (arn:aws:cloudwatch:[REGION]:123456789012:alarm:WebServerCPUAlarm and arn:aws:cloudwatch:[REGION]:123456789012:alarm:DatabaseConnectionAlarm). You can also use IAM policy conditions to allow targeting alarms based on resource tags. For example, you can restrict users to create/update mute rules to only target alarms that have a specific tag key-value pair, such as Team=TeamA.

REPLACE aws.cloudwatch.alarm_mute_rules
SET
Name = '{{ Name }}',
Description = '{{ Description }}',
Rule = '{{ Rule }}',
MuteTargets = '{{ MuteTargets }}',
Tags = '{{ Tags }}',
StartDate = '{{ StartDate }}',
ExpireDate = '{{ ExpireDate }}'
WHERE
region = '{{ region }}' --required;

DELETE examples

Deletes a specific alarm mute rule. When you delete a mute rule, any alarms that are currently being muted by that rule are immediately unmuted. If those alarms are in an ALARM state, their configured actions will trigger. This operation is idempotent. If you delete a mute rule that does not exist, the operation succeeds without returning an error. Permissions To delete a mute rule, you need the cloudwatch:DeleteAlarmMuteRule permission on the alarm mute rule resource.

DELETE FROM aws.cloudwatch.alarm_mute_rules
WHERE region = '{{ region }}' --required
;