This is the new CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the AWS CloudFormation User Guide.
AWS::CloudWatch::Alert
Resource Type definition for AWS::CloudWatch::Alert. An alert runs a SQL or PromQL query in a CloudWatch Omni space on a fixed interval, compares the result against warning and critical thresholds, and sends notifications to Amazon SNS topics or integrations when its state changes.
Syntax
To declare this entity in your CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::CloudWatch::Alert", "Properties" : { "Description" :String, "Name" :String, "NotificationRules" :[ NotificationRule, ... ], "NotificationsEnabled" :Boolean, "ProfileId" :String, "Rule" :Rule, "SpaceId" :String, "Tags" :[ Tag, ... ]} }
YAML
Type: AWS::CloudWatch::Alert Properties: Description:StringName:StringNotificationRules:- NotificationRuleNotificationsEnabled:BooleanProfileId:StringRule:RuleSpaceId:StringTags:- Tag
Properties
Description-
A description of the alert.
Required: No
Type: String
Maximum:
1024Update requires: No interruption
Name-
The display name of the alert. Names don't need to be unique within a space; the alert is identified by AlertId.
Required: Yes
Type: String
Pattern:
^[a-zA-Z0-9_.@~()-]+$Minimum:
1Maximum:
256Update requires: No interruption
NotificationRules-
The notification rules that determine when and where notifications are sent.
Required: No
Type: Array of NotificationRule
Minimum:
0Maximum:
5Update requires: No interruption
NotificationsEnabled-
Whether the alert sends notifications. When false, the alert is still evaluated and records its state, but sends nothing. Defaults to true.
Required: No
Type: Boolean
Update requires: No interruption
ProfileId-
The ID of the access profile the alert uses to run its query and send notifications.
Required: Yes
Type: String
Pattern:
^[a-zA-Z0-9_-]+$Minimum:
1Maximum:
64Update requires: No interruption
Rule-
Defines the schedule configuration for an alarm mute rule.
The rule contains a schedule that specifies when and how long alarms should be muted. The schedule can be a recurring pattern using cron expressions or a one-time mute window using at expressions.
Required: Yes
Type: Rule
Update requires: No interruption
SpaceId-
The ID of the space to create the alert in. Changing this value replaces the alert.
Required: Yes
Type: String
Pattern:
^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$Update requires: Replacement
-
An array of key-value pairs to apply to this resource.
Required: No
Type: Array of Tag
Maximum:
50Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns a unique identifier for this resource.
For more information about using the Ref function, see Ref.
Fn::GetAtt
The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.
AccountId-
The AWS account ID that owns the alert.
AlertId-
The ID of the alert, assigned by CloudWatch when the alert is created. It doesn't change when the alert is updated, and it is the resource ID in the alert's ARN.
Arn-
The Amazon Resource Name (ARN) of the alert.
CreatedAt-
The time the alert was created, in ISO 8601 format (UTC).
UpdatedAt-
The time the alert was last updated, in ISO 8601 format (UTC).