Skip to content

Alarm

Source code in docs_src/capo_lightsail/types/alarm.py
class Alarm(TypedDict, closed=True):
    name: NotRequired["capo_lightsail.types.resource_name.ResourceName"]
    """<p>The name of the alarm.</p>"""
    arn: NotRequired["capo_lightsail.types.non_empty_string.NonEmptyString"]
    """<p>The Amazon Resource Name (ARN) of the alarm.</p>"""
    created_at: NotRequired["capo_lightsail.types.iso_date.IsoDate"]
    """<p>The timestamp when the alarm was created.</p>"""
    location: NotRequired["capo_lightsail.types.resource_location.ResourceLocation"]
    """<p>An object that lists information about the location of the alarm.</p>"""
    resource_type: NotRequired["capo_lightsail.types.resource_type.ResourceType"]
    """<p>The Lightsail resource type of the alarm.</p>"""
    support_code: NotRequired["capo_lightsail.types.string.string"]
    """<p>The support code. Include this code in your email to support when you have questions about your Lightsail alarm. This code enables our support team to look up your Lightsail information more easily.</p>"""
    monitored_resource_info: NotRequired[
        "capo_lightsail.types.monitored_resource_info.MonitoredResourceInfo"
    ]
    """<p>An object that lists information about the resource monitored by the alarm.</p>"""
    comparison_operator: NotRequired[
        "capo_lightsail.types.comparison_operator.ComparisonOperator"
    ]
    """<p>The arithmetic operation used when comparing the specified statistic and threshold.</p>"""
    evaluation_periods: NotRequired["capo_lightsail.types.integer.integer"]
    """<p>The number of periods over which data is compared to the specified threshold.</p>"""
    period: NotRequired["capo_lightsail.types.metric_period.MetricPeriod"]
    """<p>The period, in seconds, over which the statistic is applied.</p>"""
    threshold: NotRequired["capo_lightsail.types.double.double"]
    """<p>The value against which the specified statistic is compared.</p>"""
    datapoints_to_alarm: NotRequired["capo_lightsail.types.integer.integer"]
    """<p>The number of data points that must not within the specified threshold to trigger the alarm.</p>"""
    treat_missing_data: NotRequired[
        "capo_lightsail.types.treat_missing_data.TreatMissingData"
    ]
    """<p>Specifies how the alarm handles missing data points.</p> <p>An alarm can treat missing data in the following ways:</p> <ul> <li> <p> <code>breaching</code> - Assume the missing data is not within the threshold. Missing data counts towards the number of times the metric is not within the threshold.</p> </li> <li> <p> <code>notBreaching</code> - Assume the missing data is within the threshold. Missing data does not count towards the number of times the metric is not within the threshold.</p> </li> <li> <p> <code>ignore</code> - Ignore the missing data. Maintains the current alarm state.</p> </li> <li> <p> <code>missing</code> - Missing data is treated as missing.</p> </li> </ul>"""
    statistic: NotRequired["capo_lightsail.types.metric_statistic.MetricStatistic"]
    """<p>The statistic for the metric associated with the alarm.</p> <p>The following statistics are available:</p> <ul> <li> <p> <code>Minimum</code> - The lowest value observed during the specified period. Use this value to determine low volumes of activity for your application.</p> </li> <li> <p> <code>Maximum</code> - The highest value observed during the specified period. Use this value to determine high volumes of activity for your application.</p> </li> <li> <p> <code>Sum</code> - All values submitted for the matching metric added together. You can use this statistic to determine the total volume of a metric.</p> </li> <li> <p> <code>Average</code> - The value of Sum / SampleCount during the specified period. By comparing this statistic with the Minimum and Maximum values, you can determine the full scope of a metric and how close the average use is to the Minimum and Maximum values. This comparison helps you to know when to increase or decrease your resources.</p> </li> <li> <p> <code>SampleCount</code> - The count, or number, of data points used for the statistical calculation.</p> </li> </ul>"""
    metric_name: NotRequired["capo_lightsail.types.metric_name.MetricName"]
    """<p>The name of the metric associated with the alarm.</p>"""
    state: NotRequired["capo_lightsail.types.alarm_state.AlarmState"]
    """<p>The current state of the alarm.</p> <p>An alarm has the following possible states:</p> <ul> <li> <p> <code>ALARM</code> - The metric is outside of the defined threshold.</p> </li> <li> <p> <code>INSUFFICIENT_DATA</code> - The alarm has just started, the metric is not available, or not enough data is available for the metric to determine the alarm state.</p> </li> <li> <p> <code>OK</code> - The metric is within the defined threshold.</p> </li> </ul>"""
    unit: NotRequired["capo_lightsail.types.metric_unit.MetricUnit"]
    """<p>The unit of the metric associated with the alarm.</p>"""
    contact_protocols: NotRequired[
        "capo_lightsail.types.contact_protocols_list.ContactProtocolsList"
    ]
    """<p>The contact protocols for the alarm, such as <code>Email</code>, <code>SMS</code> (text messaging), or both.</p>"""
    notification_triggers: NotRequired[
        "capo_lightsail.types.notification_trigger_list.NotificationTriggerList"
    ]
    """<p>The alarm states that trigger a notification.</p>"""
    notification_enabled: NotRequired["capo_lightsail.types.boolean.boolean"]
    """<p>Indicates whether the alarm is enabled.</p>"""
    tags: NotRequired["capo_lightsail.types.tag_list.TagList"]
    """<p>The tag keys and optional values for the resource. For more information about tags in Lightsail, see the <a href="https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-tags">Amazon Lightsail Developer Guide</a>.</p>"""

arn instance-attribute

arn: NotRequired[NonEmptyString]

The Amazon Resource Name (ARN) of the alarm.

comparison_operator instance-attribute

comparison_operator: NotRequired[ComparisonOperator]

The arithmetic operation used when comparing the specified statistic and threshold.

contact_protocols instance-attribute

contact_protocols: NotRequired[ContactProtocolsList]

The contact protocols for the alarm, such as Email, SMS (text messaging), or both.

created_at instance-attribute

created_at: NotRequired[IsoDate]

The timestamp when the alarm was created.

datapoints_to_alarm instance-attribute

datapoints_to_alarm: NotRequired[integer]

The number of data points that must not within the specified threshold to trigger the alarm.

evaluation_periods instance-attribute

evaluation_periods: NotRequired[integer]

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

location instance-attribute

location: NotRequired[ResourceLocation]

An object that lists information about the location of the alarm.

metric_name instance-attribute

metric_name: NotRequired[MetricName]

The name of the metric associated with the alarm.

monitored_resource_info instance-attribute

monitored_resource_info: NotRequired[MonitoredResourceInfo]

An object that lists information about the resource monitored by the alarm.

name instance-attribute

name: NotRequired[ResourceName]

The name of the alarm.

notification_enabled instance-attribute

notification_enabled: NotRequired[boolean]

Indicates whether the alarm is enabled.

notification_triggers instance-attribute

notification_triggers: NotRequired[NotificationTriggerList]

The alarm states that trigger a notification.

period instance-attribute

period: NotRequired[MetricPeriod]

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

resource_type instance-attribute

resource_type: NotRequired[ResourceType]

The Lightsail resource type of the alarm.

state instance-attribute

state: NotRequired[AlarmState]

The current state of the alarm.

An alarm has the following possible states:

  • ALARM - The metric is outside of the defined threshold.

  • INSUFFICIENT_DATA - The alarm has just started, the metric is not available, or not enough data is available for the metric to determine the alarm state.

  • OK - The metric is within the defined threshold.

statistic instance-attribute

statistic: NotRequired[MetricStatistic]

The statistic for the metric associated with the alarm.

The following statistics are available:

  • Minimum - The lowest value observed during the specified period. Use this value to determine low volumes of activity for your application.

  • Maximum - The highest value observed during the specified period. Use this value to determine high volumes of activity for your application.

  • Sum - All values submitted for the matching metric added together. You can use this statistic to determine the total volume of a metric.

  • Average - The value of Sum / SampleCount during the specified period. By comparing this statistic with the Minimum and Maximum values, you can determine the full scope of a metric and how close the average use is to the Minimum and Maximum values. This comparison helps you to know when to increase or decrease your resources.

  • SampleCount - The count, or number, of data points used for the statistical calculation.

support_code instance-attribute

support_code: NotRequired[string]

The support code. Include this code in your email to support when you have questions about your Lightsail alarm. This code enables our support team to look up your Lightsail information more easily.

tags instance-attribute

tags: NotRequired[TagList]

The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.

threshold instance-attribute

threshold: NotRequired[double]

The value against which the specified statistic is compared.

treat_missing_data instance-attribute

treat_missing_data: NotRequired[TreatMissingData]

Specifies how the alarm handles missing data points.

An alarm can treat missing data in the following ways:

  • breaching - Assume the missing data is not within the threshold. Missing data counts towards the number of times the metric is not within the threshold.

  • notBreaching - Assume the missing data is within the threshold. Missing data does not count towards the number of times the metric is not within the threshold.

  • ignore - Ignore the missing data. Maintains the current alarm state.

  • missing - Missing data is treated as missing.

unit instance-attribute

unit: NotRequired[MetricUnit]

The unit of the metric associated with the alarm.