AWS CloudWatch · Schema

Amazon CloudWatch Alarm

Schema for an Amazon CloudWatch alarm resource, representing a watch over a single CloudWatch metric or the result of a math expression based on CloudWatch metrics. The alarm triggers actions when the metric or expression value breaches a defined threshold over a specified number of evaluation periods.

AlarmsAwsDashboardsLogsMetricsMonitoringObservability

Properties

Name Type Description
AlarmName string The name of the alarm. This name must be unique within the Region and within the AWS account. The maximum length is 255 characters.
AlarmArn string The Amazon Resource Name (ARN) of the alarm, in the format arn:aws:cloudwatch:region:account-id:alarm:alarm-name.
AlarmDescription string The description for the alarm. Up to 1024 characters.
AlarmConfigurationUpdatedTimestamp string The time stamp of the last update to the alarm configuration, in ISO 8601 format.
ActionsEnabled boolean Indicates whether actions should be executed during any changes to the alarm state. When set to false, the alarm state changes but no actions are executed.
OKActions array The actions to execute when this alarm transitions to the OK state from any other state. Each action is specified as an ARN. A maximum of 5 actions are allowed.
AlarmActions array The actions to execute when this alarm transitions to the ALARM state from any other state. Each action is specified as an ARN. A maximum of 5 actions are allowed.
InsufficientDataActions array The actions to execute when this alarm transitions to the INSUFFICIENT_DATA state from any other state. Each action is specified as an ARN. A maximum of 5 actions are allowed.
StateValue string The current state value for the alarm. OK indicates the metric or expression is within the defined threshold. ALARM indicates the metric or expression is outside of the defined threshold. INSUFFICIENT
StateReason string An explanation for the alarm state, in text format. Provides a human-readable explanation of why the alarm is in its current state.
StateReasonData string An explanation for the alarm state, in JSON format. Contains machine-readable data about the evaluation that led to the current alarm state.
StateUpdatedTimestamp string The time stamp of the last update to the alarm's StateValue or StateReasonData, in ISO 8601 format.
StateTransitionedTimestamp string The date and time that the alarm's StateValue most recently changed, in ISO 8601 format.
MetricName string The name of the metric associated with the alarm, if this is a single-metric alarm.
Namespace string The namespace of the metric associated with the alarm. Namespaces that begin with AWS/ are reserved for AWS services.
Statistic string The statistic for the metric specified in MetricName, other than percentile.
ExtendedStatistic string The percentile statistic for the metric specified in MetricName. Specify a value between p0.0 and p100.
Dimensions array The dimensions for the metric specified in MetricName. A maximum of 30 dimensions are allowed per metric.
Period integer The length, in seconds, used each time the metric specified in MetricName is evaluated. Valid values are 10, 30, and any multiple of 60. For high-resolution metrics, the period can be 10 or 30 seconds
Unit string The unit of measure for the statistic. If you do not specify Unit, CloudWatch retrieves all unit types that have been published for the metric.
EvaluationPeriods integer The number of periods over which data is compared to the specified threshold. An alarm is triggered only if enough periods breach the threshold according to DatapointsToAlarm.
DatapointsToAlarm integer The number of data points that must be breaching to trigger the alarm. This is used only if you are setting an M out of N alarm. The value must be less than or equal to EvaluationPeriods.
Threshold number The value against which the specified statistic is compared. This value is used with ComparisonOperator to determine if the alarm should transition to the ALARM state.
ComparisonOperator string The arithmetic operation to use when comparing the specified statistic and threshold. The specified statistic value is used as the first operand. The anomaly-detection-specific operators are used with
TreatMissingData string Sets how this alarm is to handle missing data points. breaching treats missing data as breaching the threshold. notBreaching treats missing data as being within the threshold. ignore maintains the cur
EvaluateLowSampleCountPercentile string Used only for alarms based on percentile statistics. If ignore, the alarm state does not change during periods with too few data points to be statistically significant.
Metrics array An array of MetricDataQuery structures indicating the metrics to be returned and the math expressions to perform. Used for metric math expression-based alarms.
ThresholdMetricId string If this is an alarm based on an anomaly detection model, make this value match the ID of the ANOMALY_DETECTION_BAND function.
Tags array A list of key-value pairs to associate with the alarm. You can associate as many as 50 tags with an alarm.
View JSON Schema on GitHub