alarm_mute_rules
Creates, updates, deletes, gets or lists an alarm_mute_rules resource.
Overview
| Name | alarm_mute_rules |
| Type | Resource |
| Id | aws.cloudwatch.alarm_mute_rules |
Fields
The following fields are returned by SELECT queries:
- get_alarm_mute_rule
- list_alarm_mute_rules
| Name | Datatype | Description |
|---|---|---|
alarm_mute_rule_arn | string | The Amazon Resource Name (ARN) of the alarm mute rule. |
description | string | The description of the alarm mute rule. |
expire_date | string (date-time) | The date and time when the mute rule expires and is no longer evaluated. |
last_updated_timestamp | string (date-time) | The date and time when the mute rule was last updated. |
mute_targets | object | Specifies which alarms this rule applies to. |
mute_type | string | Indicates whether the mute rule is one-time or recurring. Valid values are ONE_TIME or RECURRING. |
name | string | The name of the alarm mute rule. |
rule | object | The configuration that defines when and how long alarms are muted. |
start_date | string (date-time) | The date and time when the mute rule becomes active. If not set, the rule is active immediately. |
status | string | The current status of the alarm mute rule. Valid values are SCHEDULED, ACTIVE, or EXPIRED. (SCHEDULED, ACTIVE, EXPIRED) |
| Name | Datatype | Description |
|---|---|---|
alarm_mute_rule_arn | string | The Amazon Resource Name (ARN) of the alarm mute rule. |
expire_date | string (date-time) | 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. |
last_updated_timestamp | string (date-time) | The date and time when the mute rule was last updated. |
mute_type | string | Indicates whether the mute rule is one-time or recurring. Valid values are ONE_TIME or RECURRING. |
status | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_alarm_mute_rule | select | region | 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. | |
list_alarm_mute_rules | select | region | 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. | |
put_alarm_mute_rule | replace | region | 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. | |
delete_alarm_mute_rule | delete | region | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_alarm_mute_rule
- list_alarm_mute_rules
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
;
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.
SELECT
alarm_mute_rule_arn,
expire_date,
last_updated_timestamp,
mute_type,
status
FROM aws.cloudwatch.alarm_mute_rules
WHERE region = '{{ region }}' -- required
;
REPLACE examples
- put_alarm_mute_rule
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
- delete_alarm_mute_rule
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
;