Data Source schema for AWS::CloudWatch::Alarm
id
(String) Uniquely identifies the resource.actions_enabled
(Boolean) Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.alarm_actions
(List of String) The list of actions to execute when this alarm transitions into an ALARM state from any other state. Specify each action as an Amazon Resource Name (ARN). For more information about creating alarms and the actions that you can specify, see PutMetricAlarm in the API Reference.alarm_description
(String) The description of the alarm.alarm_name
(String) The name of the alarm. If you don't specify a name, CFN generates a unique physical ID and uses that ID for the alarm name.
If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.arn
(String)comparison_operator
(String) The arithmetic operation to use when comparing the specified statistic and threshold. The specified statistic value is used as the first operand.datapoints_to_alarm
(Number) The number of datapoints that must be breaching to trigger the alarm. This is used only if you are setting an "M out of N" alarm. In that case, this value is the M, and the value that you set for EvaluationPeriods
is the N value. For more information, see Evaluating an Alarm in the User Guide.
If you omit this parameter, CW uses the same value here that you set for EvaluationPeriods
, and the alarm goes to alarm state if that many consecutive periods are breaching.dimensions
(Attributes List) The dimensions for the metric associated with the alarm. For an alarm based on a math expression, you can't specify Dimensions
. Instead, you use Metrics
. (see below for nested schema)evaluate_low_sample_count_percentile
(String) Used only for alarms based on percentiles. If ignore
, the alarm state does not change during periods with too few data points to be statistically significant. If evaluate
or this parameter is not used, the alarm is always evaluated and possibly changes state no matter how many data points are available.evaluation_periods
(Number) The number of periods over which data is compared to the specified threshold. If you are setting an alarm that requires that a number of consecutive data points be breaching to trigger the alarm, this value specifies that number. If you are setting an "M out of N" alarm, this value is the N, and DatapointsToAlarm
is the M.
For more information, see Evaluating an Alarm in the User Guide.extended_statistic
(String) The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
For an alarm based on a metric, you must specify either Statistic
or ExtendedStatistic
but not both.
For an alarm based on a math expression, you can't specify ExtendedStatistic
. Instead, you use Metrics
.insufficient_data_actions
(List of String) The actions to execute when this alarm transitions to the INSUFFICIENT_DATA
state from any other state. Each action is specified as an Amazon Resource Name (ARN).metric_name
(String) The name of the metric associated with the alarm. This is required for an alarm based on a metric. For an alarm based on a math expression, you use Metrics
instead and you can't specify MetricName
.metrics
(Attributes List) An array that enables you to create an alarm based on the result of a metric math expression. Each item in the array either retrieves a metric or performs a math expression.
If you specify the Metrics
parameter, you cannot specify MetricName
, Dimensions
, Period
, Namespace
, Statistic
, ExtendedStatistic
, or Unit
. (see below for nested schema)namespace
(String) The namespace of the metric associated with the alarm. This is required for an alarm based on a metric. For an alarm based on a math expression, you can't specify Namespace
and you use Metrics
instead.
For a list of namespaces for metrics from AWS services, see Services That Publish Metrics.ok_actions
(List of String) The actions to execute when this alarm transitions to the OK
state from any other state. Each action is specified as an Amazon Resource Name (ARN).period
(Number) The period, in seconds, over which the statistic is applied. This is required for an alarm based on a metric. Valid values are 10, 30, 60, and any multiple of 60.
For an alarm based on a math expression, you can't specify Period
, and instead you use the Metrics
parameter.
Minimum: 10statistic
(String) The statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use ExtendedStatistic
.
For an alarm based on a metric, you must specify either Statistic
or ExtendedStatistic
but not both.
For an alarm based on a math expression, you can't specify Statistic
. Instead, you use Metrics
.tags
(Attributes List) (see below for nested schema)threshold
(Number) The value to compare with the specified statistic.threshold_metric_id
(String) In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND
function used as the threshold for the alarm.treat_missing_data
(String) Sets how this alarm is to handle missing data points. Valid values are breaching
, notBreaching
, ignore
, and missing
. For more information, see Configuring How Alarms Treat Missing Data in the Amazon User Guide.
If you omit this parameter, the default behavior of missing
is used.unit
(String) The unit of the metric associated with the alarm. Specify this only if you are creating an alarm based on a single metric. Do not specify this if you are specifying a Metrics
array.
You can specify the following values: Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, or None.dimensions
Read-Only:
name
(String) The name of the dimension, from 1?255 characters in length. This dimension name must have been included when the metric was published.value
(String) The value for the dimension, from 1?255 characters in length.metrics
Read-Only:
account_id
(String) The ID of the account where the metrics are located, if this is a cross-account alarm.expression
(String) The math expression to be performed on the returned data, if this object is performing a math expression. This expression can use the Id
of the other metrics to refer to those metrics, and can also use the Id
of other expressions to use the result of those expressions. For more information about metric math expressions, see Metric Math Syntax and Functions in the User Guide.
Within each MetricDataQuery object, you must specify either Expression
or MetricStat
but not both.id
(String) A short name used to tie this object to the results in the response. This name must be unique within a single call to GetMetricData
. If you are performing math expressions on this set of data, this name represents that data and can serve as a variable in the mathematical expression. The valid characters are letters, numbers, and underscore. The first character must be a lowercase letter.label
(String) A human-readable label for this metric or expression. This is especially useful if this is an expression, so that you know what the value represents. If the metric or expression is shown in a CW dashboard widget, the label is shown. If Label
is omitted, CW generates a default.metric_stat
(Attributes) The metric to be returned, along with statistics, period, and units. Use this parameter only if this object is retrieving a metric and not performing a math expression on returned data.
Within one MetricDataQuery object, you must specify either Expression
or MetricStat
but not both. (see below for nested schema)period
(Number) The granularity, in seconds, of the returned data points. For metrics with regular resolution, a period can be as short as one minute (60 seconds) and must be a multiple of 60. For high-resolution metrics that are collected at intervals of less than one minute, the period can be 1, 5, 10, 30, 60, or any multiple of 60. High-resolution metrics are those metrics stored by a PutMetricData
operation that includes a StorageResolution of 1 second
.return_data
(Boolean) This option indicates whether to return the timestamps and raw data values of this metric.
When you create an alarm based on a metric math expression, specify True
for this value for only the one math expression that the alarm is based on. You must specify False
for ReturnData
for all the other metrics and expressions used in the alarm.
This field is required.metrics.metric_stat
Read-Only:
metric
(Attributes) The metric to return, including the metric name, namespace, and dimensions. (see below for nested schema)period
(Number) The granularity, in seconds, of the returned data points. For metrics with regular resolution, a period can be as short as one minute (60 seconds) and must be a multiple of 60. For high-resolution metrics that are collected at intervals of less than one minute, the period can be 1, 5, 10, 30, 60, or any multiple of 60. High-resolution metrics are those metrics stored by a PutMetricData
call that includes a StorageResolution
of 1 second.
If the StartTime
parameter specifies a time stamp that is greater than 3 hours ago, you must specify the period as follows or no data points in that time range is returned:
stat
(String) The statistic to return. It can include any CW statistic or extended statistic. For a list of valid values, see the table in Statistics in the User Guide.unit
(String) The unit to use for the returned data points.
Valid values are: Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, or None.metrics.metric_stat.metric
Read-Only:
dimensions
(Attributes List) The metric dimensions that you want to be used for the metric that the alarm will watch. (see below for nested schema)metric_name
(String) The name of the metric that you want the alarm to watch. This is a required field.namespace
(String) The namespace of the metric that the alarm will watch.metrics.metric_stat.metric.dimensions
Read-Only:
name
(String) The name of the dimension, from 1?255 characters in length. This dimension name must have been included when the metric was published.value
(String) The value for the dimension, from 1?255 characters in length.tags
Read-Only:
key
(String) A unique identifier for the tag. The combination of tag keys and values can help you organize and categorize your resources.value
(String) The value for the specified tag key.