Skip to content

MetricAlarm

Source code in docs_src/capo_cloudwatch/types/metric_alarm.py
class MetricAlarm(TypedDict, closed=True):
    alarm_name: NotRequired["capo_cloudwatch.types.alarm_name.AlarmName"]
    """<p>The name of the alarm.</p>"""
    alarm_arn: NotRequired["capo_cloudwatch.types.alarm_arn.AlarmArn"]
    """<p>The Amazon Resource Name (ARN) of the alarm.</p>"""
    alarm_description: NotRequired[
        "capo_cloudwatch.types.alarm_description.AlarmDescription"
    ]
    """<p>The description of the alarm.</p>"""
    alarm_configuration_updated_timestamp: NotRequired[
        "capo_cloudwatch.types.timestamp.Timestamp"
    ]
    """<p>The time stamp of the last update to the alarm configuration.</p>"""
    actions_enabled: NotRequired["capo_cloudwatch.types.actions_enabled.ActionsEnabled"]
    """<p>Indicates whether actions should be executed during any changes to the alarm state.</p>"""
    ok_actions: NotRequired["capo_cloudwatch.types.resource_list.ResourceList"]
    """<p>The actions to execute when this alarm transitions to the <code>OK</code> state from any other state. Each action is specified as an Amazon Resource Name (ARN).</p>"""
    alarm_actions: NotRequired["capo_cloudwatch.types.resource_list.ResourceList"]
    """<p>The actions to execute when this alarm transitions to the <code>ALARM</code> state from any other state. Each action is specified as an Amazon Resource Name (ARN).</p>"""
    insufficient_data_actions: NotRequired[
        "capo_cloudwatch.types.resource_list.ResourceList"
    ]
    """<p>The actions to execute when this alarm transitions to the <code>INSUFFICIENT_DATA</code> state from any other state. Each action is specified as an Amazon Resource Name (ARN).</p>"""
    state_value: NotRequired["capo_cloudwatch.types.state_value.StateValue"]
    """<p>The state value for the alarm.</p>"""
    state_reason: NotRequired["capo_cloudwatch.types.state_reason.StateReason"]
    """<p>An explanation for the alarm state, in text format.</p>"""
    state_reason_data: NotRequired[
        "capo_cloudwatch.types.state_reason_data.StateReasonData"
    ]
    """<p>An explanation for the alarm state, in JSON format.</p>"""
    state_updated_timestamp: NotRequired["capo_cloudwatch.types.timestamp.Timestamp"]
    """<p>The time stamp of the last update to the value of either the <code>StateValue</code> or <code>EvaluationState</code> parameters.</p>"""
    metric_name: NotRequired["capo_cloudwatch.types.metric_name.MetricName"]
    """<p>The name of the metric associated with the alarm, if this is an alarm based on a single metric.</p>"""
    namespace: NotRequired["capo_cloudwatch.types.namespace.Namespace"]
    """<p>The namespace of the metric associated with the alarm.</p>"""
    statistic: NotRequired["capo_cloudwatch.types.statistic.Statistic"]
    """<p>The statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use <code>ExtendedStatistic</code>.</p>"""
    extended_statistic: NotRequired[
        "capo_cloudwatch.types.extended_statistic.ExtendedStatistic"
    ]
    """<p>The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.</p>"""
    dimensions: NotRequired["capo_cloudwatch.types.dimensions.Dimensions"]
    """<p>The dimensions for the metric associated with the alarm.</p>"""
    period: NotRequired["capo_cloudwatch.types.period.Period"]
    """<p>The period, in seconds, over which the statistic is applied.</p>"""
    unit: NotRequired["capo_cloudwatch.types.standard_unit.StandardUnit"]
    """<p>The unit of the metric associated with the alarm.</p>"""
    evaluation_periods: NotRequired[
        "capo_cloudwatch.types.evaluation_periods.EvaluationPeriods"
    ]
    """<p>The number of periods over which data is compared to the specified threshold.</p>"""
    datapoints_to_alarm: NotRequired[
        "capo_cloudwatch.types.datapoints_to_alarm.DatapointsToAlarm"
    ]
    """<p>The number of data points that must be breaching to trigger the alarm.</p>"""
    threshold: NotRequired["capo_cloudwatch.types.threshold.Threshold"]
    """<p>The value to compare with the specified statistic.</p>"""
    comparison_operator: NotRequired[
        "capo_cloudwatch.types.comparison_operator.ComparisonOperator"
    ]
    """<p>The arithmetic operation to use when comparing the specified statistic and threshold. The specified statistic value is used as the first operand.</p>"""
    treat_missing_data: NotRequired[
        "capo_cloudwatch.types.treat_missing_data.TreatMissingData"
    ]
    """<p>Sets how this alarm is to handle missing data points. The valid values are <code>breaching</code>, <code>notBreaching</code>, <code>ignore</code>, and <code>missing</code>. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html#alarms-and-missing-data">Configuring how CloudWatch alarms treat missing data</a>.</p> <p>If this parameter is omitted, the default behavior of <code>missing</code> is used.</p> <note> <p>This parameter is not applicable to PromQL alarms.</p> </note>"""
    evaluate_low_sample_count_percentile: NotRequired[
        "capo_cloudwatch.types.evaluate_low_sample_count_percentile.EvaluateLowSampleCountPercentile"
    ]
    """<p>Used only for alarms based on percentiles. If <code>ignore</code>, the alarm state does not change during periods with too few data points to be statistically significant. If <code>evaluate</code> or this parameter is not used, the alarm is always evaluated and possibly changes state no matter how many data points are available.</p>"""
    metrics: NotRequired["capo_cloudwatch.types.metric_data_queries.MetricDataQueries"]
    """<p>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 <code>ReturnData</code> set to true.</p>"""
    threshold_metric_id: NotRequired["capo_cloudwatch.types.metric_id.MetricId"]
    """<p>In an alarm based on an anomaly detection model, this is the ID of the <code>ANOMALY_DETECTION_BAND</code> function used as the threshold for the alarm.</p>"""
    evaluation_state: NotRequired[
        "capo_cloudwatch.types.evaluation_state.EvaluationState"
    ]
    """<p>If the value of this field is <code>PARTIAL_DATA</code>, it indicates that not all the available data was able to be retrieved due to quota limitations. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Create_Metrics_Insights_Alarm.html">Create alarms on Metrics Insights queries</a>.</p> <p>If the value of this field is <code>EVALUATION_ERROR</code>, it indicates configuration errors in alarm setup that require review and correction. Refer to StateReason field of the alarm for more details.</p> <p>If the value of this field is <code>EVALUATION_FAILURE</code>, it indicates temporary CloudWatch issues. We recommend manual monitoring until the issue is resolved </p>"""
    state_transitioned_timestamp: NotRequired[
        "capo_cloudwatch.types.timestamp.Timestamp"
    ]
    """<p>The date and time that the alarm's <code>StateValue</code> most recently changed.</p>"""
    evaluation_window: NotRequired[
        "capo_cloudwatch.types.evaluation_window.EvaluationWindow"
    ]
    """<p>The evaluation window that the alarm uses to select the range of metric data that it evaluates. This is either a sliding window or a wall clock window. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/alarm-evaluation-window.html">Alarm evaluation windows</a> in the <i>CloudWatch User Guide</i>.</p>"""
    warm_up_configuration: NotRequired[
        "capo_cloudwatch.types.warm_up_configuration.WarmUpConfiguration"
    ]
    """<p>The warm-up configuration for the alarm. A warm-up period delays alarm evaluation after you create or update the alarm. During the warm-up period, the alarm stays in <code>INSUFFICIENT_DATA</code> and does not perform alarm actions.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/alarm-warm-up.html">Alarm warm-up periods</a> in the <i>Amazon CloudWatch User Guide</i>.</p>"""
    evaluation_criteria: NotRequired[
        "capo_cloudwatch.types.evaluation_criteria.EvaluationCriteria"
    ]
    """<p>The evaluation criteria for the alarm.</p>"""
    evaluation_interval: NotRequired[
        "capo_cloudwatch.types.evaluation_interval.EvaluationInterval"
    ]
    """<p>The frequency, in seconds, at which the alarm is evaluated.</p>"""

actions_enabled instance-attribute

actions_enabled: NotRequired[ActionsEnabled]

Indicates whether actions should be executed during any changes to the alarm state.

alarm_actions instance-attribute

alarm_actions: NotRequired[ResourceList]

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 instance-attribute

alarm_arn: NotRequired[AlarmArn]

The Amazon Resource Name (ARN) of the alarm.

alarm_configuration_updated_timestamp instance-attribute

alarm_configuration_updated_timestamp: NotRequired[Timestamp]

The time stamp of the last update to the alarm configuration.

alarm_description instance-attribute

alarm_description: NotRequired[AlarmDescription]

The description of the alarm.

alarm_name instance-attribute

alarm_name: NotRequired[AlarmName]

The name of the alarm.

comparison_operator instance-attribute

comparison_operator: NotRequired[ComparisonOperator]

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 instance-attribute

datapoints_to_alarm: NotRequired[DatapointsToAlarm]

The number of data points that must be breaching to trigger the alarm.

dimensions instance-attribute

dimensions: NotRequired[Dimensions]

The dimensions for the metric associated with the alarm.

evaluate_low_sample_count_percentile instance-attribute

evaluate_low_sample_count_percentile: NotRequired[EvaluateLowSampleCountPercentile]

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_criteria instance-attribute

evaluation_criteria: NotRequired[EvaluationCriteria]

The evaluation criteria for the alarm.

evaluation_interval instance-attribute

evaluation_interval: NotRequired[EvaluationInterval]

The frequency, in seconds, at which the alarm is evaluated.

evaluation_periods instance-attribute

evaluation_periods: NotRequired[EvaluationPeriods]

The number of periods over which data is compared to the specified threshold.

evaluation_state instance-attribute

evaluation_state: NotRequired[EvaluationState]

If the value of this field is PARTIAL_DATA, it indicates that not all the available data was able to be retrieved due to quota limitations. For more information, see Create alarms on Metrics Insights queries.

If the value of this field is EVALUATION_ERROR, it indicates configuration errors in alarm setup that require review and correction. Refer to StateReason field of the alarm for more details.

If the value of this field is EVALUATION_FAILURE, it indicates temporary CloudWatch issues. We recommend manual monitoring until the issue is resolved

evaluation_window instance-attribute

evaluation_window: NotRequired[EvaluationWindow]

The evaluation window that the alarm uses to select the range of metric data that it evaluates. This is either a sliding window or a wall clock window. For more information, see Alarm evaluation windows in the CloudWatch User Guide.

extended_statistic instance-attribute

extended_statistic: NotRequired[ExtendedStatistic]

The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.

insufficient_data_actions instance-attribute

insufficient_data_actions: NotRequired[ResourceList]

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 instance-attribute

metric_name: NotRequired[MetricName]

The name of the metric associated with the alarm, if this is an alarm based on a single metric.

metrics instance-attribute

metrics: NotRequired[MetricDataQueries]

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 instance-attribute

namespace: NotRequired[Namespace]

The namespace of the metric associated with the alarm.

ok_actions instance-attribute

ok_actions: NotRequired[ResourceList]

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 instance-attribute

period: NotRequired[Period]

The period, in seconds, over which the statistic is applied.

state_reason instance-attribute

state_reason: NotRequired[StateReason]

An explanation for the alarm state, in text format.

state_reason_data instance-attribute

state_reason_data: NotRequired[StateReasonData]

An explanation for the alarm state, in JSON format.

state_transitioned_timestamp instance-attribute

state_transitioned_timestamp: NotRequired[Timestamp]

The date and time that the alarm's StateValue most recently changed.

state_updated_timestamp instance-attribute

state_updated_timestamp: NotRequired[Timestamp]

The time stamp of the last update to the value of either the StateValue or EvaluationState parameters.

state_value instance-attribute

state_value: NotRequired[StateValue]

The state value for the alarm.

statistic instance-attribute

statistic: NotRequired[Statistic]

The statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use ExtendedStatistic.

threshold instance-attribute

threshold: NotRequired[Threshold]

The value to compare with the specified statistic.

threshold_metric_id instance-attribute

threshold_metric_id: NotRequired[MetricId]

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 instance-attribute

treat_missing_data: NotRequired[TreatMissingData]

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.

This parameter is not applicable to PromQL alarms.

unit instance-attribute

unit: NotRequired[StandardUnit]

The unit of the metric associated with the alarm.

warm_up_configuration instance-attribute

warm_up_configuration: NotRequired[WarmUpConfiguration]

The warm-up configuration for the alarm. A warm-up period delays alarm evaluation after you create or update the alarm. During the warm-up period, the alarm stays in INSUFFICIENT_DATA and does not perform alarm actions.

For more information, see Alarm warm-up periods in the Amazon CloudWatch User Guide.