class Amazonite::CloudWatch::MetricAlarm

Overview

The details about a metric alarm.

Included Modules

Defined in:

cloudwatch/metric_alarm.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(alarm_name : String | Nil = nil, alarm_arn : String | Nil = nil, alarm_description : String | Nil = nil, alarm_configuration_updated_timestamp : Time | Nil = nil, actions_enabled : Bool | Nil = nil, ok_actions : Array(String) | Nil = nil, alarm_actions : Array(String) | Nil = nil, insufficient_data_actions : Array(String) | Nil = nil, state_value : StateValue | Nil = nil, state_reason : String | Nil = nil, state_reason_data : String | Nil = nil, state_updated_timestamp : Time | Nil = nil, metric_name : String | Nil = nil, namespace : String | Nil = nil, statistic : Statistic | Nil = nil, extended_statistic : String | Nil = nil, dimensions : Array(Dimension) | Nil = nil, period : Int32 | Nil = nil, unit : StandardUnit | Nil = nil, evaluation_periods : Int32 | Nil = nil, datapoints_to_alarm : Int32 | Nil = nil, threshold : Float64 | Nil = nil, comparison_operator : ComparisonOperator | Nil = nil, treat_missing_data : String | Nil = nil, evaluate_low_sample_count_percentile : String | Nil = nil, metrics : Array(MetricDataQuery) | Nil = nil, threshold_metric_id : String | Nil = nil, evaluation_state : EvaluationState | Nil = nil, state_transitioned_timestamp : Time | Nil = nil, evaluation_window : EvaluationWindow | Nil = nil, warm_up_configuration : WarmUpConfiguration | Nil = nil, evaluation_criteria : EvaluationCriteria | Nil = nil, evaluation_interval : Int32 | Nil = nil) #

[View source]

Instance Method Detail

def ==(other : self) #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


def actions_enabled : Bool | Nil #

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


[View source]
def actions_enabled=(actions_enabled : Bool | Nil) #

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


[View source]
def alarm_actions : Array(String) | Nil #

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).


[View source]
def alarm_actions=(alarm_actions : Array(String) | Nil) #

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).


[View source]
def alarm_arn : String | Nil #

The Amazon Resource Name (ARN) of the alarm.


[View source]
def alarm_arn=(alarm_arn : String | Nil) #

The Amazon Resource Name (ARN) of the alarm.


[View source]
def alarm_configuration_updated_timestamp : Time | Nil #

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


[View source]
def alarm_configuration_updated_timestamp=(alarm_configuration_updated_timestamp : Time | Nil) #

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


[View source]
def alarm_description : String | Nil #

The description of the alarm.


[View source]
def alarm_description=(alarm_description : String | Nil) #

The description of the alarm.


[View source]
def alarm_name : String | Nil #

The name of the alarm.


[View source]
def alarm_name=(alarm_name : String | Nil) #

The name of the alarm.


[View source]
def comparison_operator : ComparisonOperator | Nil #

The arithmetic operation to use when comparing the specified statistic and threshold. The specified statistic value is used as the first operand.


[View source]
def comparison_operator=(comparison_operator : ComparisonOperator | Nil) #

The arithmetic operation to use when comparing the specified statistic and threshold. The specified statistic value is used as the first operand.


[View source]
def datapoints_to_alarm : Int32 | Nil #

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


[View source]
def datapoints_to_alarm=(datapoints_to_alarm : Int32 | Nil) #

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


[View source]
def dimensions : Array(Dimension) | Nil #

The dimensions for the metric associated with the alarm.


[View source]
def dimensions=(dimensions : Array(Dimension) | Nil) #

The dimensions for the metric associated with the alarm.


[View source]
def evaluate_low_sample_count_percentile : String | Nil #

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.


[View source]
def evaluate_low_sample_count_percentile=(evaluate_low_sample_count_percentile : String | Nil) #

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.


[View source]
def evaluation_criteria : EvaluationCriteria | Nil #

The evaluation criteria for the alarm.


[View source]
def evaluation_criteria=(evaluation_criteria : EvaluationCriteria | Nil) #

The evaluation criteria for the alarm.


[View source]
def evaluation_interval : Int32 | Nil #

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


[View source]
def evaluation_interval=(evaluation_interval : Int32 | Nil) #

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


[View source]
def evaluation_periods : Int32 | Nil #

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


[View source]
def evaluation_periods=(evaluation_periods : Int32 | Nil) #

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


[View source]
def evaluation_state : EvaluationState | Nil #

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


[View source]
def evaluation_state=(evaluation_state : EvaluationState | Nil) #

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


[View source]
def evaluation_window : EvaluationWindow | Nil #

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.


[View source]
def evaluation_window=(evaluation_window : EvaluationWindow | Nil) #

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.


[View source]
def extended_statistic : String | Nil #

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


[View source]
def extended_statistic=(extended_statistic : String | Nil) #

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


[View source]
def hash(hasher) #
Description copied from class Reference

See Object#hash(hasher)


def insufficient_data_actions : Array(String) | Nil #

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).


[View source]
def insufficient_data_actions=(insufficient_data_actions : Array(String) | Nil) #

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).


[View source]
def metric_name : String | Nil #

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


[View source]
def metric_name=(metric_name : String | Nil) #

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


[View source]
def metrics : Array(MetricDataQuery) | Nil #

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.


[View source]
def metrics=(metrics : Array(MetricDataQuery) | Nil) #

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.


[View source]
def namespace : String | Nil #

The namespace of the metric associated with the alarm.


[View source]
def namespace=(namespace : String | Nil) #

The namespace of the metric associated with the alarm.


[View source]
def ok_actions : Array(String) | Nil #

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).


[View source]
def ok_actions=(ok_actions : Array(String) | Nil) #

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).


[View source]
def period : Int32 | Nil #

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


[View source]
def period=(period : Int32 | Nil) #

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


[View source]
def state_reason : String | Nil #

An explanation for the alarm state, in text format.


[View source]
def state_reason=(state_reason : String | Nil) #

An explanation for the alarm state, in text format.


[View source]
def state_reason_data : String | Nil #

An explanation for the alarm state, in JSON format.


[View source]
def state_reason_data=(state_reason_data : String | Nil) #

An explanation for the alarm state, in JSON format.


[View source]
def state_transitioned_timestamp : Time | Nil #

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


[View source]
def state_transitioned_timestamp=(state_transitioned_timestamp : Time | Nil) #

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


[View source]
def state_updated_timestamp : Time | Nil #

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


[View source]
def state_updated_timestamp=(state_updated_timestamp : Time | Nil) #

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


[View source]
def state_value : StateValue | Nil #

The state value for the alarm.


[View source]
def state_value=(state_value : StateValue | Nil) #

The state value for the alarm.


[View source]
def statistic : Statistic | Nil #

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


[View source]
def statistic=(statistic : Statistic | Nil) #

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


[View source]
def threshold : Float64 | Nil #

The value to compare with the specified statistic.


[View source]
def threshold=(threshold : Float64 | Nil) #

The value to compare with the specified statistic.


[View source]
def threshold_metric_id : String | Nil #

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.


[View source]
def threshold_metric_id=(threshold_metric_id : String | Nil) #

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.


[View source]
def treat_missing_data : String | Nil #

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.


[View source]
def treat_missing_data=(treat_missing_data : String | Nil) #

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.


[View source]
def unit : StandardUnit | Nil #

The unit of the metric associated with the alarm.


[View source]
def unit=(unit : StandardUnit | Nil) #

The unit of the metric associated with the alarm.


[View source]
def validate! : Nil #

[View source]
def warm_up_configuration : WarmUpConfiguration | Nil #

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.


[View source]
def warm_up_configuration=(warm_up_configuration : WarmUpConfiguration | Nil) #

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.


[View source]