# Source: https://docs.datadoghq.com/ddsql_reference/data_directory/aws/aws.cloudwatch_metric_alarm.dataset.md

---
title: CloudWatch Alarm
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > DDSQL Reference > Data Directory > CloudWatch Alarm
---

# CloudWatch Alarm

CloudWatch Alarm is an AWS resource that monitors metrics and triggers actions when defined thresholds are met. It can watch a single metric or the result of a math expression, and when conditions are breached, it can send notifications, perform Auto Scaling actions, or stop, start, or terminate instances. This helps automate responses to changes in application performance or system health.

```
aws.cloudwatch_metric_alarm
```

## Fields

| Title                                 | ID   | Type          | Data Type                                                                                                                                                                                                                                                                                                        | Description |
| ------------------------------------- | ---- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| _key                                  | core | string        |
| account_id                            | core | string        |
| actions_enabled                       | core | bool          | Indicates whether actions should be executed during any changes to the alarm state.                                                                                                                                                                                                                              |
| alarm_actions                         | core | array<string> | The actions to execute when this alarm transitions to the ALARM state from any other state. Each action is specified as an Amazon Resource Name (ARN).                                                                                                                                                           |
| alarm_arn                             | core | string        | The Amazon Resource Name (ARN) of the alarm.                                                                                                                                                                                                                                                                     |
| alarm_configuration_updated_timestamp | core | timestamp     | The time stamp of the last update to the alarm configuration.                                                                                                                                                                                                                                                    |
| alarm_description                     | core | string        | The description of the alarm.                                                                                                                                                                                                                                                                                    |
| alarm_name                            | core | string        | The name of the alarm.                                                                                                                                                                                                                                                                                           |
| comparison_operator                   | core | 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                   | core | int64         | The number of data points that must be breaching to trigger the alarm.                                                                                                                                                                                                                                           |
| dimensions                            | core | json          | The dimensions for the metric associated with the alarm.                                                                                                                                                                                                                                                         |
| evaluate_low_sample_count_percentile  | core | 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                    | core | int64         | The number of periods over which data is compared to the specified threshold.                                                                                                                                                                                                                                    |
| evaluation_state                      | core | string        | If the value of this field is PARTIAL_DATA, the alarm is being evaluated based on only partial data. This happens if the query used for the alarm returns more than 10,000 metrics. For more information, see Create alarms on Metrics Insights queries.                                                         |
| extended_statistic                    | core | string        | The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.                                                                                                                                                                                                        |
| insufficient_data_actions             | core | array<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                           | core | string        | The name of the metric associated with the alarm, if this is an alarm based on a single metric.                                                                                                                                                                                                                  |
| metrics                               | core | json          | An array of MetricDataQuery structures, used in an alarm based on a metric math expression. Each structure either retrieves a metric or performs a math expression. One item in the Metrics array is the math expression that the alarm watches. This expression by designated by having ReturnData set to true. |
| namespace                             | core | string        | The namespace of the metric associated with the alarm.                                                                                                                                                                                                                                                           |
| ok_actions                            | core | array<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                                | core | int64         | The period, in seconds, over which the statistic is applied.                                                                                                                                                                                                                                                     |
| state_reason                          | core | string        | An explanation for the alarm state, in text format.                                                                                                                                                                                                                                                              |
| state_reason_data                     | core | string        | An explanation for the alarm state, in JSON format.                                                                                                                                                                                                                                                              |
| state_transitioned_timestamp          | core | timestamp     | The date and time that the alarm's StateValue most recently changed.                                                                                                                                                                                                                                             |
| state_updated_timestamp               | core | timestamp     | The time stamp of the last update to the value of either the StateValue or EvaluationState parameters.                                                                                                                                                                                                           |
| state_value                           | core | string        | The state value for the alarm.                                                                                                                                                                                                                                                                                   |
| statistic                             | core | string        | The statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use ExtendedStatistic.                                                                                                                                                                                 |
| tags                                  | core | hstore_csv    |
| threshold                             | core | float64       | The value to compare with the specified statistic.                                                                                                                                                                                                                                                               |
| threshold_metric_id                   | core | 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                    | core | string        | Sets how this alarm is to handle missing data points. The valid values are breaching, notBreaching, ignore, and missing. For more information, see Configuring how CloudWatch alarms treat missing data. If this parameter is omitted, the default behavior of missing is used.                                  |
| unit                                  | core | string        | The unit of the metric associated with the alarm.                                                                                                                                                                                                                                                                |