/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace CloudWatch { namespace Model { /** *

The details about a metric alarm.

See Also:

AWS * API Reference

*/ class MetricAlarm { public: AWS_CLOUDWATCH_API MetricAlarm(); AWS_CLOUDWATCH_API MetricAlarm(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_CLOUDWATCH_API MetricAlarm& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_CLOUDWATCH_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_CLOUDWATCH_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The name of the alarm.

*/ inline const Aws::String& GetAlarmName() const{ return m_alarmName; } /** *

The name of the alarm.

*/ inline bool AlarmNameHasBeenSet() const { return m_alarmNameHasBeenSet; } /** *

The name of the alarm.

*/ inline void SetAlarmName(const Aws::String& value) { m_alarmNameHasBeenSet = true; m_alarmName = value; } /** *

The name of the alarm.

*/ inline void SetAlarmName(Aws::String&& value) { m_alarmNameHasBeenSet = true; m_alarmName = std::move(value); } /** *

The name of the alarm.

*/ inline void SetAlarmName(const char* value) { m_alarmNameHasBeenSet = true; m_alarmName.assign(value); } /** *

The name of the alarm.

*/ inline MetricAlarm& WithAlarmName(const Aws::String& value) { SetAlarmName(value); return *this;} /** *

The name of the alarm.

*/ inline MetricAlarm& WithAlarmName(Aws::String&& value) { SetAlarmName(std::move(value)); return *this;} /** *

The name of the alarm.

*/ inline MetricAlarm& WithAlarmName(const char* value) { SetAlarmName(value); return *this;} /** *

The Amazon Resource Name (ARN) of the alarm.

*/ inline const Aws::String& GetAlarmArn() const{ return m_alarmArn; } /** *

The Amazon Resource Name (ARN) of the alarm.

*/ inline bool AlarmArnHasBeenSet() const { return m_alarmArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the alarm.

*/ inline void SetAlarmArn(const Aws::String& value) { m_alarmArnHasBeenSet = true; m_alarmArn = value; } /** *

The Amazon Resource Name (ARN) of the alarm.

*/ inline void SetAlarmArn(Aws::String&& value) { m_alarmArnHasBeenSet = true; m_alarmArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the alarm.

*/ inline void SetAlarmArn(const char* value) { m_alarmArnHasBeenSet = true; m_alarmArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the alarm.

*/ inline MetricAlarm& WithAlarmArn(const Aws::String& value) { SetAlarmArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the alarm.

*/ inline MetricAlarm& WithAlarmArn(Aws::String&& value) { SetAlarmArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the alarm.

*/ inline MetricAlarm& WithAlarmArn(const char* value) { SetAlarmArn(value); return *this;} /** *

The description of the alarm.

*/ inline const Aws::String& GetAlarmDescription() const{ return m_alarmDescription; } /** *

The description of the alarm.

*/ inline bool AlarmDescriptionHasBeenSet() const { return m_alarmDescriptionHasBeenSet; } /** *

The description of the alarm.

*/ inline void SetAlarmDescription(const Aws::String& value) { m_alarmDescriptionHasBeenSet = true; m_alarmDescription = value; } /** *

The description of the alarm.

*/ inline void SetAlarmDescription(Aws::String&& value) { m_alarmDescriptionHasBeenSet = true; m_alarmDescription = std::move(value); } /** *

The description of the alarm.

*/ inline void SetAlarmDescription(const char* value) { m_alarmDescriptionHasBeenSet = true; m_alarmDescription.assign(value); } /** *

The description of the alarm.

*/ inline MetricAlarm& WithAlarmDescription(const Aws::String& value) { SetAlarmDescription(value); return *this;} /** *

The description of the alarm.

*/ inline MetricAlarm& WithAlarmDescription(Aws::String&& value) { SetAlarmDescription(std::move(value)); return *this;} /** *

The description of the alarm.

*/ inline MetricAlarm& WithAlarmDescription(const char* value) { SetAlarmDescription(value); return *this;} /** *

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

*/ inline const Aws::Utils::DateTime& GetAlarmConfigurationUpdatedTimestamp() const{ return m_alarmConfigurationUpdatedTimestamp; } /** *

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

*/ inline bool AlarmConfigurationUpdatedTimestampHasBeenSet() const { return m_alarmConfigurationUpdatedTimestampHasBeenSet; } /** *

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

*/ inline void SetAlarmConfigurationUpdatedTimestamp(const Aws::Utils::DateTime& value) { m_alarmConfigurationUpdatedTimestampHasBeenSet = true; m_alarmConfigurationUpdatedTimestamp = value; } /** *

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

*/ inline void SetAlarmConfigurationUpdatedTimestamp(Aws::Utils::DateTime&& value) { m_alarmConfigurationUpdatedTimestampHasBeenSet = true; m_alarmConfigurationUpdatedTimestamp = std::move(value); } /** *

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

*/ inline MetricAlarm& WithAlarmConfigurationUpdatedTimestamp(const Aws::Utils::DateTime& value) { SetAlarmConfigurationUpdatedTimestamp(value); return *this;} /** *

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

*/ inline MetricAlarm& WithAlarmConfigurationUpdatedTimestamp(Aws::Utils::DateTime&& value) { SetAlarmConfigurationUpdatedTimestamp(std::move(value)); return *this;} /** *

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

*/ inline bool GetActionsEnabled() const{ return m_actionsEnabled; } /** *

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

*/ inline bool ActionsEnabledHasBeenSet() const { return m_actionsEnabledHasBeenSet; } /** *

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

*/ inline void SetActionsEnabled(bool value) { m_actionsEnabledHasBeenSet = true; m_actionsEnabled = value; } /** *

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

*/ inline MetricAlarm& WithActionsEnabled(bool value) { SetActionsEnabled(value); return *this;} /** *

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

*/ inline const Aws::Vector& GetOKActions() const{ return m_oKActions; } /** *

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

*/ inline bool OKActionsHasBeenSet() const { return m_oKActionsHasBeenSet; } /** *

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

*/ inline void SetOKActions(const Aws::Vector& value) { m_oKActionsHasBeenSet = true; m_oKActions = value; } /** *

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

*/ inline void SetOKActions(Aws::Vector&& value) { m_oKActionsHasBeenSet = true; m_oKActions = std::move(value); } /** *

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

*/ inline MetricAlarm& WithOKActions(const Aws::Vector& value) { SetOKActions(value); return *this;} /** *

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

*/ inline MetricAlarm& WithOKActions(Aws::Vector&& value) { SetOKActions(std::move(value)); return *this;} /** *

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

*/ inline MetricAlarm& AddOKActions(const Aws::String& value) { m_oKActionsHasBeenSet = true; m_oKActions.push_back(value); return *this; } /** *

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

*/ inline MetricAlarm& AddOKActions(Aws::String&& value) { m_oKActionsHasBeenSet = true; m_oKActions.push_back(std::move(value)); return *this; } /** *

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

*/ inline MetricAlarm& AddOKActions(const char* value) { m_oKActionsHasBeenSet = true; m_oKActions.push_back(value); return *this; } /** *

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

*/ inline const Aws::Vector& GetAlarmActions() const{ return m_alarmActions; } /** *

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

*/ inline bool AlarmActionsHasBeenSet() const { return m_alarmActionsHasBeenSet; } /** *

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

*/ inline void SetAlarmActions(const Aws::Vector& value) { m_alarmActionsHasBeenSet = true; m_alarmActions = value; } /** *

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

*/ inline void SetAlarmActions(Aws::Vector&& value) { m_alarmActionsHasBeenSet = true; m_alarmActions = std::move(value); } /** *

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

*/ inline MetricAlarm& WithAlarmActions(const Aws::Vector& value) { SetAlarmActions(value); return *this;} /** *

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

*/ inline MetricAlarm& WithAlarmActions(Aws::Vector&& value) { SetAlarmActions(std::move(value)); return *this;} /** *

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

*/ inline MetricAlarm& AddAlarmActions(const Aws::String& value) { m_alarmActionsHasBeenSet = true; m_alarmActions.push_back(value); return *this; } /** *

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

*/ inline MetricAlarm& AddAlarmActions(Aws::String&& value) { m_alarmActionsHasBeenSet = true; m_alarmActions.push_back(std::move(value)); return *this; } /** *

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

*/ inline MetricAlarm& AddAlarmActions(const char* value) { m_alarmActionsHasBeenSet = true; m_alarmActions.push_back(value); return *this; } /** *

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

*/ inline const Aws::Vector& GetInsufficientDataActions() const{ return m_insufficientDataActions; } /** *

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

*/ inline bool InsufficientDataActionsHasBeenSet() const { return m_insufficientDataActionsHasBeenSet; } /** *

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

*/ inline void SetInsufficientDataActions(const Aws::Vector& value) { m_insufficientDataActionsHasBeenSet = true; m_insufficientDataActions = value; } /** *

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

*/ inline void SetInsufficientDataActions(Aws::Vector&& value) { m_insufficientDataActionsHasBeenSet = true; m_insufficientDataActions = std::move(value); } /** *

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

*/ inline MetricAlarm& WithInsufficientDataActions(const Aws::Vector& value) { SetInsufficientDataActions(value); return *this;} /** *

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

*/ inline MetricAlarm& WithInsufficientDataActions(Aws::Vector&& value) { SetInsufficientDataActions(std::move(value)); return *this;} /** *

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

*/ inline MetricAlarm& AddInsufficientDataActions(const Aws::String& value) { m_insufficientDataActionsHasBeenSet = true; m_insufficientDataActions.push_back(value); return *this; } /** *

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

*/ inline MetricAlarm& AddInsufficientDataActions(Aws::String&& value) { m_insufficientDataActionsHasBeenSet = true; m_insufficientDataActions.push_back(std::move(value)); return *this; } /** *

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

*/ inline MetricAlarm& AddInsufficientDataActions(const char* value) { m_insufficientDataActionsHasBeenSet = true; m_insufficientDataActions.push_back(value); return *this; } /** *

The state value for the alarm.

*/ inline const StateValue& GetStateValue() const{ return m_stateValue; } /** *

The state value for the alarm.

*/ inline bool StateValueHasBeenSet() const { return m_stateValueHasBeenSet; } /** *

The state value for the alarm.

*/ inline void SetStateValue(const StateValue& value) { m_stateValueHasBeenSet = true; m_stateValue = value; } /** *

The state value for the alarm.

*/ inline void SetStateValue(StateValue&& value) { m_stateValueHasBeenSet = true; m_stateValue = std::move(value); } /** *

The state value for the alarm.

*/ inline MetricAlarm& WithStateValue(const StateValue& value) { SetStateValue(value); return *this;} /** *

The state value for the alarm.

*/ inline MetricAlarm& WithStateValue(StateValue&& value) { SetStateValue(std::move(value)); return *this;} /** *

An explanation for the alarm state, in text format.

*/ inline const Aws::String& GetStateReason() const{ return m_stateReason; } /** *

An explanation for the alarm state, in text format.

*/ inline bool StateReasonHasBeenSet() const { return m_stateReasonHasBeenSet; } /** *

An explanation for the alarm state, in text format.

*/ inline void SetStateReason(const Aws::String& value) { m_stateReasonHasBeenSet = true; m_stateReason = value; } /** *

An explanation for the alarm state, in text format.

*/ inline void SetStateReason(Aws::String&& value) { m_stateReasonHasBeenSet = true; m_stateReason = std::move(value); } /** *

An explanation for the alarm state, in text format.

*/ inline void SetStateReason(const char* value) { m_stateReasonHasBeenSet = true; m_stateReason.assign(value); } /** *

An explanation for the alarm state, in text format.

*/ inline MetricAlarm& WithStateReason(const Aws::String& value) { SetStateReason(value); return *this;} /** *

An explanation for the alarm state, in text format.

*/ inline MetricAlarm& WithStateReason(Aws::String&& value) { SetStateReason(std::move(value)); return *this;} /** *

An explanation for the alarm state, in text format.

*/ inline MetricAlarm& WithStateReason(const char* value) { SetStateReason(value); return *this;} /** *

An explanation for the alarm state, in JSON format.

*/ inline const Aws::String& GetStateReasonData() const{ return m_stateReasonData; } /** *

An explanation for the alarm state, in JSON format.

*/ inline bool StateReasonDataHasBeenSet() const { return m_stateReasonDataHasBeenSet; } /** *

An explanation for the alarm state, in JSON format.

*/ inline void SetStateReasonData(const Aws::String& value) { m_stateReasonDataHasBeenSet = true; m_stateReasonData = value; } /** *

An explanation for the alarm state, in JSON format.

*/ inline void SetStateReasonData(Aws::String&& value) { m_stateReasonDataHasBeenSet = true; m_stateReasonData = std::move(value); } /** *

An explanation for the alarm state, in JSON format.

*/ inline void SetStateReasonData(const char* value) { m_stateReasonDataHasBeenSet = true; m_stateReasonData.assign(value); } /** *

An explanation for the alarm state, in JSON format.

*/ inline MetricAlarm& WithStateReasonData(const Aws::String& value) { SetStateReasonData(value); return *this;} /** *

An explanation for the alarm state, in JSON format.

*/ inline MetricAlarm& WithStateReasonData(Aws::String&& value) { SetStateReasonData(std::move(value)); return *this;} /** *

An explanation for the alarm state, in JSON format.

*/ inline MetricAlarm& WithStateReasonData(const char* value) { SetStateReasonData(value); return *this;} /** *

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

*/ inline const Aws::Utils::DateTime& GetStateUpdatedTimestamp() const{ return m_stateUpdatedTimestamp; } /** *

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

*/ inline bool StateUpdatedTimestampHasBeenSet() const { return m_stateUpdatedTimestampHasBeenSet; } /** *

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

*/ inline void SetStateUpdatedTimestamp(const Aws::Utils::DateTime& value) { m_stateUpdatedTimestampHasBeenSet = true; m_stateUpdatedTimestamp = value; } /** *

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

*/ inline void SetStateUpdatedTimestamp(Aws::Utils::DateTime&& value) { m_stateUpdatedTimestampHasBeenSet = true; m_stateUpdatedTimestamp = std::move(value); } /** *

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

*/ inline MetricAlarm& WithStateUpdatedTimestamp(const Aws::Utils::DateTime& value) { SetStateUpdatedTimestamp(value); return *this;} /** *

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

*/ inline MetricAlarm& WithStateUpdatedTimestamp(Aws::Utils::DateTime&& value) { SetStateUpdatedTimestamp(std::move(value)); return *this;} /** *

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

*/ inline const Aws::String& GetMetricName() const{ return m_metricName; } /** *

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

*/ inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; } /** *

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

*/ inline void SetMetricName(const Aws::String& value) { m_metricNameHasBeenSet = true; m_metricName = value; } /** *

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

*/ inline void SetMetricName(Aws::String&& value) { m_metricNameHasBeenSet = true; m_metricName = std::move(value); } /** *

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

*/ inline void SetMetricName(const char* value) { m_metricNameHasBeenSet = true; m_metricName.assign(value); } /** *

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

*/ inline MetricAlarm& WithMetricName(const Aws::String& value) { SetMetricName(value); return *this;} /** *

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

*/ inline MetricAlarm& WithMetricName(Aws::String&& value) { SetMetricName(std::move(value)); return *this;} /** *

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

*/ inline MetricAlarm& WithMetricName(const char* value) { SetMetricName(value); return *this;} /** *

The namespace of the metric associated with the alarm.

*/ inline const Aws::String& GetNamespace() const{ return m_namespace; } /** *

The namespace of the metric associated with the alarm.

*/ inline bool NamespaceHasBeenSet() const { return m_namespaceHasBeenSet; } /** *

The namespace of the metric associated with the alarm.

*/ inline void SetNamespace(const Aws::String& value) { m_namespaceHasBeenSet = true; m_namespace = value; } /** *

The namespace of the metric associated with the alarm.

*/ inline void SetNamespace(Aws::String&& value) { m_namespaceHasBeenSet = true; m_namespace = std::move(value); } /** *

The namespace of the metric associated with the alarm.

*/ inline void SetNamespace(const char* value) { m_namespaceHasBeenSet = true; m_namespace.assign(value); } /** *

The namespace of the metric associated with the alarm.

*/ inline MetricAlarm& WithNamespace(const Aws::String& value) { SetNamespace(value); return *this;} /** *

The namespace of the metric associated with the alarm.

*/ inline MetricAlarm& WithNamespace(Aws::String&& value) { SetNamespace(std::move(value)); return *this;} /** *

The namespace of the metric associated with the alarm.

*/ inline MetricAlarm& WithNamespace(const char* value) { SetNamespace(value); return *this;} /** *

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

*/ inline const Statistic& GetStatistic() const{ return m_statistic; } /** *

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

*/ inline bool StatisticHasBeenSet() const { return m_statisticHasBeenSet; } /** *

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

*/ inline void SetStatistic(const Statistic& value) { m_statisticHasBeenSet = true; m_statistic = value; } /** *

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

*/ inline void SetStatistic(Statistic&& value) { m_statisticHasBeenSet = true; m_statistic = std::move(value); } /** *

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

*/ inline MetricAlarm& WithStatistic(const Statistic& value) { SetStatistic(value); return *this;} /** *

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

*/ inline MetricAlarm& WithStatistic(Statistic&& value) { SetStatistic(std::move(value)); return *this;} /** *

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

*/ inline const Aws::String& GetExtendedStatistic() const{ return m_extendedStatistic; } /** *

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

*/ inline bool ExtendedStatisticHasBeenSet() const { return m_extendedStatisticHasBeenSet; } /** *

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

*/ inline void SetExtendedStatistic(const Aws::String& value) { m_extendedStatisticHasBeenSet = true; m_extendedStatistic = value; } /** *

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

*/ inline void SetExtendedStatistic(Aws::String&& value) { m_extendedStatisticHasBeenSet = true; m_extendedStatistic = std::move(value); } /** *

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

*/ inline void SetExtendedStatistic(const char* value) { m_extendedStatisticHasBeenSet = true; m_extendedStatistic.assign(value); } /** *

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

*/ inline MetricAlarm& WithExtendedStatistic(const Aws::String& value) { SetExtendedStatistic(value); return *this;} /** *

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

*/ inline MetricAlarm& WithExtendedStatistic(Aws::String&& value) { SetExtendedStatistic(std::move(value)); return *this;} /** *

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

*/ inline MetricAlarm& WithExtendedStatistic(const char* value) { SetExtendedStatistic(value); return *this;} /** *

The dimensions for the metric associated with the alarm.

*/ inline const Aws::Vector& GetDimensions() const{ return m_dimensions; } /** *

The dimensions for the metric associated with the alarm.

*/ inline bool DimensionsHasBeenSet() const { return m_dimensionsHasBeenSet; } /** *

The dimensions for the metric associated with the alarm.

*/ inline void SetDimensions(const Aws::Vector& value) { m_dimensionsHasBeenSet = true; m_dimensions = value; } /** *

The dimensions for the metric associated with the alarm.

*/ inline void SetDimensions(Aws::Vector&& value) { m_dimensionsHasBeenSet = true; m_dimensions = std::move(value); } /** *

The dimensions for the metric associated with the alarm.

*/ inline MetricAlarm& WithDimensions(const Aws::Vector& value) { SetDimensions(value); return *this;} /** *

The dimensions for the metric associated with the alarm.

*/ inline MetricAlarm& WithDimensions(Aws::Vector&& value) { SetDimensions(std::move(value)); return *this;} /** *

The dimensions for the metric associated with the alarm.

*/ inline MetricAlarm& AddDimensions(const Dimension& value) { m_dimensionsHasBeenSet = true; m_dimensions.push_back(value); return *this; } /** *

The dimensions for the metric associated with the alarm.

*/ inline MetricAlarm& AddDimensions(Dimension&& value) { m_dimensionsHasBeenSet = true; m_dimensions.push_back(std::move(value)); return *this; } /** *

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

*/ inline int GetPeriod() const{ return m_period; } /** *

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

*/ inline bool PeriodHasBeenSet() const { return m_periodHasBeenSet; } /** *

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

*/ inline void SetPeriod(int value) { m_periodHasBeenSet = true; m_period = value; } /** *

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

*/ inline MetricAlarm& WithPeriod(int value) { SetPeriod(value); return *this;} /** *

The unit of the metric associated with the alarm.

*/ inline const StandardUnit& GetUnit() const{ return m_unit; } /** *

The unit of the metric associated with the alarm.

*/ inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; } /** *

The unit of the metric associated with the alarm.

*/ inline void SetUnit(const StandardUnit& value) { m_unitHasBeenSet = true; m_unit = value; } /** *

The unit of the metric associated with the alarm.

*/ inline void SetUnit(StandardUnit&& value) { m_unitHasBeenSet = true; m_unit = std::move(value); } /** *

The unit of the metric associated with the alarm.

*/ inline MetricAlarm& WithUnit(const StandardUnit& value) { SetUnit(value); return *this;} /** *

The unit of the metric associated with the alarm.

*/ inline MetricAlarm& WithUnit(StandardUnit&& value) { SetUnit(std::move(value)); return *this;} /** *

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

*/ inline int GetEvaluationPeriods() const{ return m_evaluationPeriods; } /** *

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

*/ inline bool EvaluationPeriodsHasBeenSet() const { return m_evaluationPeriodsHasBeenSet; } /** *

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

*/ inline void SetEvaluationPeriods(int value) { m_evaluationPeriodsHasBeenSet = true; m_evaluationPeriods = value; } /** *

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

*/ inline MetricAlarm& WithEvaluationPeriods(int value) { SetEvaluationPeriods(value); return *this;} /** *

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

*/ inline int GetDatapointsToAlarm() const{ return m_datapointsToAlarm; } /** *

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

*/ inline bool DatapointsToAlarmHasBeenSet() const { return m_datapointsToAlarmHasBeenSet; } /** *

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

*/ inline void SetDatapointsToAlarm(int value) { m_datapointsToAlarmHasBeenSet = true; m_datapointsToAlarm = value; } /** *

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

*/ inline MetricAlarm& WithDatapointsToAlarm(int value) { SetDatapointsToAlarm(value); return *this;} /** *

The value to compare with the specified statistic.

*/ inline double GetThreshold() const{ return m_threshold; } /** *

The value to compare with the specified statistic.

*/ inline bool ThresholdHasBeenSet() const { return m_thresholdHasBeenSet; } /** *

The value to compare with the specified statistic.

*/ inline void SetThreshold(double value) { m_thresholdHasBeenSet = true; m_threshold = value; } /** *

The value to compare with the specified statistic.

*/ inline MetricAlarm& WithThreshold(double value) { SetThreshold(value); return *this;} /** *

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

*/ inline const ComparisonOperator& GetComparisonOperator() const{ return m_comparisonOperator; } /** *

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

*/ inline bool ComparisonOperatorHasBeenSet() const { return m_comparisonOperatorHasBeenSet; } /** *

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

*/ inline void SetComparisonOperator(const ComparisonOperator& value) { m_comparisonOperatorHasBeenSet = true; m_comparisonOperator = value; } /** *

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

*/ inline void SetComparisonOperator(ComparisonOperator&& value) { m_comparisonOperatorHasBeenSet = true; m_comparisonOperator = std::move(value); } /** *

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

*/ inline MetricAlarm& WithComparisonOperator(const ComparisonOperator& value) { SetComparisonOperator(value); return *this;} /** *

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

*/ inline MetricAlarm& WithComparisonOperator(ComparisonOperator&& value) { SetComparisonOperator(std::move(value)); return *this;} /** *

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.

*/ inline const Aws::String& GetTreatMissingData() const{ return m_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.

*/ inline bool TreatMissingDataHasBeenSet() const { return m_treatMissingDataHasBeenSet; } /** *

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.

*/ inline void SetTreatMissingData(const Aws::String& value) { m_treatMissingDataHasBeenSet = true; m_treatMissingData = value; } /** *

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.

*/ inline void SetTreatMissingData(Aws::String&& value) { m_treatMissingDataHasBeenSet = true; m_treatMissingData = std::move(value); } /** *

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.

*/ inline void SetTreatMissingData(const char* value) { m_treatMissingDataHasBeenSet = true; m_treatMissingData.assign(value); } /** *

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.

*/ inline MetricAlarm& WithTreatMissingData(const Aws::String& value) { SetTreatMissingData(value); return *this;} /** *

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.

*/ inline MetricAlarm& WithTreatMissingData(Aws::String&& value) { SetTreatMissingData(std::move(value)); return *this;} /** *

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.

*/ inline MetricAlarm& WithTreatMissingData(const char* value) { SetTreatMissingData(value); return *this;} /** *

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.

*/ inline const Aws::String& GetEvaluateLowSampleCountPercentile() const{ return m_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.

*/ inline bool EvaluateLowSampleCountPercentileHasBeenSet() const { return m_evaluateLowSampleCountPercentileHasBeenSet; } /** *

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.

*/ inline void SetEvaluateLowSampleCountPercentile(const Aws::String& value) { m_evaluateLowSampleCountPercentileHasBeenSet = true; m_evaluateLowSampleCountPercentile = value; } /** *

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.

*/ inline void SetEvaluateLowSampleCountPercentile(Aws::String&& value) { m_evaluateLowSampleCountPercentileHasBeenSet = true; m_evaluateLowSampleCountPercentile = std::move(value); } /** *

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.

*/ inline void SetEvaluateLowSampleCountPercentile(const char* value) { m_evaluateLowSampleCountPercentileHasBeenSet = true; m_evaluateLowSampleCountPercentile.assign(value); } /** *

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.

*/ inline MetricAlarm& WithEvaluateLowSampleCountPercentile(const Aws::String& value) { SetEvaluateLowSampleCountPercentile(value); return *this;} /** *

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.

*/ inline MetricAlarm& WithEvaluateLowSampleCountPercentile(Aws::String&& value) { SetEvaluateLowSampleCountPercentile(std::move(value)); return *this;} /** *

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.

*/ inline MetricAlarm& WithEvaluateLowSampleCountPercentile(const char* value) { SetEvaluateLowSampleCountPercentile(value); return *this;} /** *

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.

*/ inline const Aws::Vector& GetMetrics() const{ return m_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.

*/ inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; } /** *

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.

*/ inline void SetMetrics(const Aws::Vector& value) { m_metricsHasBeenSet = true; m_metrics = value; } /** *

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.

*/ inline void SetMetrics(Aws::Vector&& value) { m_metricsHasBeenSet = true; m_metrics = std::move(value); } /** *

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.

*/ inline MetricAlarm& WithMetrics(const Aws::Vector& value) { SetMetrics(value); return *this;} /** *

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.

*/ inline MetricAlarm& WithMetrics(Aws::Vector&& value) { SetMetrics(std::move(value)); return *this;} /** *

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.

*/ inline MetricAlarm& AddMetrics(const MetricDataQuery& value) { m_metricsHasBeenSet = true; m_metrics.push_back(value); return *this; } /** *

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.

*/ inline MetricAlarm& AddMetrics(MetricDataQuery&& value) { m_metricsHasBeenSet = true; m_metrics.push_back(std::move(value)); return *this; } /** *

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.

*/ inline const Aws::String& GetThresholdMetricId() const{ return m_thresholdMetricId; } /** *

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.

*/ inline bool ThresholdMetricIdHasBeenSet() const { return m_thresholdMetricIdHasBeenSet; } /** *

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.

*/ inline void SetThresholdMetricId(const Aws::String& value) { m_thresholdMetricIdHasBeenSet = true; m_thresholdMetricId = value; } /** *

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.

*/ inline void SetThresholdMetricId(Aws::String&& value) { m_thresholdMetricIdHasBeenSet = true; m_thresholdMetricId = std::move(value); } /** *

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.

*/ inline void SetThresholdMetricId(const char* value) { m_thresholdMetricIdHasBeenSet = true; m_thresholdMetricId.assign(value); } /** *

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.

*/ inline MetricAlarm& WithThresholdMetricId(const Aws::String& value) { SetThresholdMetricId(value); return *this;} /** *

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.

*/ inline MetricAlarm& WithThresholdMetricId(Aws::String&& value) { SetThresholdMetricId(std::move(value)); return *this;} /** *

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.

*/ inline MetricAlarm& WithThresholdMetricId(const char* value) { SetThresholdMetricId(value); return *this;} /** *

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.

*/ inline const EvaluationState& GetEvaluationState() const{ return m_evaluationState; } /** *

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.

*/ inline bool EvaluationStateHasBeenSet() const { return m_evaluationStateHasBeenSet; } /** *

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.

*/ inline void SetEvaluationState(const EvaluationState& value) { m_evaluationStateHasBeenSet = true; m_evaluationState = value; } /** *

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.

*/ inline void SetEvaluationState(EvaluationState&& value) { m_evaluationStateHasBeenSet = true; m_evaluationState = std::move(value); } /** *

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.

*/ inline MetricAlarm& WithEvaluationState(const EvaluationState& value) { SetEvaluationState(value); return *this;} /** *

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.

*/ inline MetricAlarm& WithEvaluationState(EvaluationState&& value) { SetEvaluationState(std::move(value)); return *this;} /** *

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

*/ inline const Aws::Utils::DateTime& GetStateTransitionedTimestamp() const{ return m_stateTransitionedTimestamp; } /** *

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

*/ inline bool StateTransitionedTimestampHasBeenSet() const { return m_stateTransitionedTimestampHasBeenSet; } /** *

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

*/ inline void SetStateTransitionedTimestamp(const Aws::Utils::DateTime& value) { m_stateTransitionedTimestampHasBeenSet = true; m_stateTransitionedTimestamp = value; } /** *

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

*/ inline void SetStateTransitionedTimestamp(Aws::Utils::DateTime&& value) { m_stateTransitionedTimestampHasBeenSet = true; m_stateTransitionedTimestamp = std::move(value); } /** *

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

*/ inline MetricAlarm& WithStateTransitionedTimestamp(const Aws::Utils::DateTime& value) { SetStateTransitionedTimestamp(value); return *this;} /** *

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

*/ inline MetricAlarm& WithStateTransitionedTimestamp(Aws::Utils::DateTime&& value) { SetStateTransitionedTimestamp(std::move(value)); return *this;} private: Aws::String m_alarmName; bool m_alarmNameHasBeenSet = false; Aws::String m_alarmArn; bool m_alarmArnHasBeenSet = false; Aws::String m_alarmDescription; bool m_alarmDescriptionHasBeenSet = false; Aws::Utils::DateTime m_alarmConfigurationUpdatedTimestamp; bool m_alarmConfigurationUpdatedTimestampHasBeenSet = false; bool m_actionsEnabled; bool m_actionsEnabledHasBeenSet = false; Aws::Vector m_oKActions; bool m_oKActionsHasBeenSet = false; Aws::Vector m_alarmActions; bool m_alarmActionsHasBeenSet = false; Aws::Vector m_insufficientDataActions; bool m_insufficientDataActionsHasBeenSet = false; StateValue m_stateValue; bool m_stateValueHasBeenSet = false; Aws::String m_stateReason; bool m_stateReasonHasBeenSet = false; Aws::String m_stateReasonData; bool m_stateReasonDataHasBeenSet = false; Aws::Utils::DateTime m_stateUpdatedTimestamp; bool m_stateUpdatedTimestampHasBeenSet = false; Aws::String m_metricName; bool m_metricNameHasBeenSet = false; Aws::String m_namespace; bool m_namespaceHasBeenSet = false; Statistic m_statistic; bool m_statisticHasBeenSet = false; Aws::String m_extendedStatistic; bool m_extendedStatisticHasBeenSet = false; Aws::Vector m_dimensions; bool m_dimensionsHasBeenSet = false; int m_period; bool m_periodHasBeenSet = false; StandardUnit m_unit; bool m_unitHasBeenSet = false; int m_evaluationPeriods; bool m_evaluationPeriodsHasBeenSet = false; int m_datapointsToAlarm; bool m_datapointsToAlarmHasBeenSet = false; double m_threshold; bool m_thresholdHasBeenSet = false; ComparisonOperator m_comparisonOperator; bool m_comparisonOperatorHasBeenSet = false; Aws::String m_treatMissingData; bool m_treatMissingDataHasBeenSet = false; Aws::String m_evaluateLowSampleCountPercentile; bool m_evaluateLowSampleCountPercentileHasBeenSet = false; Aws::Vector m_metrics; bool m_metricsHasBeenSet = false; Aws::String m_thresholdMetricId; bool m_thresholdMetricIdHasBeenSet = false; EvaluationState m_evaluationState; bool m_evaluationStateHasBeenSet = false; Aws::Utils::DateTime m_stateTransitionedTimestamp; bool m_stateTransitionedTimestampHasBeenSet = false; }; } // namespace Model } // namespace CloudWatch } // namespace Aws