CloudWatch

class cloudwatch.alarm

Example:

resources = storage_connector.read_resources(
    service="cloudwatch",
    resource_type="alarm")
for resource in resources:
    resource.load()
    print(resource.urn)
    print(resource.actions_enabled)
    print(resource.alarm_actions)
    print(resource.alarm_arn)
    print(resource.alarm_configuration_updated_timestamp)
    print(resource.alarm_description)
    print(resource.alarm_name)
    print(resource.comparison_operator)
    print(resource.datapoints_to_alarm)
    print(resource.dimensions)
    print(resource.evaluate_low_sample_count_percentile)
    print(resource.evaluation_periods)
    print(resource.extended_statistic)
    print(resource.insufficient_data_actions)
    print(resource.metric_name)
    print(resource.metrics)
    print(resource.namespace)
    print(resource.ok_actions)
    print(resource.period)
    print(resource.state_reason)
    print(resource.state_reason_data)
    print(resource.state_updated_timestamp)
    print(resource.state_value)
    print(resource.statistic)
    print(resource.threshold)
    print(resource.threshold_metric_id)
    print(resource.treat_missing_data)
    print(resource.unit)
actions_enabled

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

alarm_actions

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

The Amazon Resource Name (ARN) of the alarm.

alarm_configuration_updated_timestamp

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

alarm_description

The description of the alarm.

alarm_name

The name of the alarm.

comparison_operator

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

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

dimensions

The dimensions for the metric associated with the alarm.

evaluate_low_sample_count_percentile

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

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

extended_statistic

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

insufficient_data_actions

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

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

metrics

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

The namespace of the metric associated with the alarm.

ok_actions

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

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

state_reason

An explanation for the alarm state, in text format.

state_reason_data

An explanation for the alarm state, in JSON format.

state_updated_timestamp

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

state_value

The state value for the alarm.

statistic

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

threshold

The value to compare with the specified statistic.

threshold_metric_id

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

Sets how this alarm is to handle missing data points. If this parameter is omitted, the default behavior of missing is used.

unit

The unit of the metric associated with the alarm.

class cloudwatch.metric

Example:

resources = storage_connector.read_resources(
    service="cloudwatch",
    resource_type="metric")
for resource in resources:
    resource.load()
    print(resource.urn)
    print(resource.dimensions)
    print(resource.metric_name)
dimensions

The dimensions for the metric.

metric_name

The name of the metric. This is a required field.