/** * 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 namespace Aws { namespace Lightsail { namespace Model { /** */ class PutAlarmRequest : public LightsailRequest { public: AWS_LIGHTSAIL_API PutAlarmRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "PutAlarm"; } AWS_LIGHTSAIL_API Aws::String SerializePayload() const override; AWS_LIGHTSAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The name for the alarm. Specify the name of an existing alarm to update, and * overwrite the previous configuration of the alarm.

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

The name for the alarm. Specify the name of an existing alarm to update, and * overwrite the previous configuration of the alarm.

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

The name for the alarm. Specify the name of an existing alarm to update, and * overwrite the previous configuration of the alarm.

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

The name for the alarm. Specify the name of an existing alarm to update, and * overwrite the previous configuration of the alarm.

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

The name for the alarm. Specify the name of an existing alarm to update, and * overwrite the previous configuration of the alarm.

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

The name for the alarm. Specify the name of an existing alarm to update, and * overwrite the previous configuration of the alarm.

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

The name for the alarm. Specify the name of an existing alarm to update, and * overwrite the previous configuration of the alarm.

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

The name for the alarm. Specify the name of an existing alarm to update, and * overwrite the previous configuration of the alarm.

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

The name of the metric to associate with the alarm.

You can configure * up to two alarms per metric.

The following metrics are available for each * resource type:

  • Instances: * BurstCapacityPercentage, BurstCapacityTime, * CPUUtilization, NetworkIn, NetworkOut, * StatusCheckFailed, StatusCheckFailed_Instance, and * StatusCheckFailed_System.

  • Load balancers: * ClientTLSNegotiationErrorCount, HealthyHostCount, * UnhealthyHostCount, HTTPCode_LB_4XX_Count, * HTTPCode_LB_5XX_Count, HTTPCode_Instance_2XX_Count, * HTTPCode_Instance_3XX_Count, * HTTPCode_Instance_4XX_Count, * HTTPCode_Instance_5XX_Count, InstanceResponseTime, * RejectedConnectionCount, and RequestCount.

  • *
  • Relational databases: CPUUtilization, * DatabaseConnections, DiskQueueDepth, * FreeStorageSpace, NetworkReceiveThroughput, and * NetworkTransmitThroughput.

For more information * about these metrics, see Metrics * available in Lightsail.

*/ inline const MetricName& GetMetricName() const{ return m_metricName; } /** *

The name of the metric to associate with the alarm.

You can configure * up to two alarms per metric.

The following metrics are available for each * resource type:

  • Instances: * BurstCapacityPercentage, BurstCapacityTime, * CPUUtilization, NetworkIn, NetworkOut, * StatusCheckFailed, StatusCheckFailed_Instance, and * StatusCheckFailed_System.

  • Load balancers: * ClientTLSNegotiationErrorCount, HealthyHostCount, * UnhealthyHostCount, HTTPCode_LB_4XX_Count, * HTTPCode_LB_5XX_Count, HTTPCode_Instance_2XX_Count, * HTTPCode_Instance_3XX_Count, * HTTPCode_Instance_4XX_Count, * HTTPCode_Instance_5XX_Count, InstanceResponseTime, * RejectedConnectionCount, and RequestCount.

  • *
  • Relational databases: CPUUtilization, * DatabaseConnections, DiskQueueDepth, * FreeStorageSpace, NetworkReceiveThroughput, and * NetworkTransmitThroughput.

For more information * about these metrics, see Metrics * available in Lightsail.

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

The name of the metric to associate with the alarm.

You can configure * up to two alarms per metric.

The following metrics are available for each * resource type:

  • Instances: * BurstCapacityPercentage, BurstCapacityTime, * CPUUtilization, NetworkIn, NetworkOut, * StatusCheckFailed, StatusCheckFailed_Instance, and * StatusCheckFailed_System.

  • Load balancers: * ClientTLSNegotiationErrorCount, HealthyHostCount, * UnhealthyHostCount, HTTPCode_LB_4XX_Count, * HTTPCode_LB_5XX_Count, HTTPCode_Instance_2XX_Count, * HTTPCode_Instance_3XX_Count, * HTTPCode_Instance_4XX_Count, * HTTPCode_Instance_5XX_Count, InstanceResponseTime, * RejectedConnectionCount, and RequestCount.

  • *
  • Relational databases: CPUUtilization, * DatabaseConnections, DiskQueueDepth, * FreeStorageSpace, NetworkReceiveThroughput, and * NetworkTransmitThroughput.

For more information * about these metrics, see Metrics * available in Lightsail.

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

The name of the metric to associate with the alarm.

You can configure * up to two alarms per metric.

The following metrics are available for each * resource type:

  • Instances: * BurstCapacityPercentage, BurstCapacityTime, * CPUUtilization, NetworkIn, NetworkOut, * StatusCheckFailed, StatusCheckFailed_Instance, and * StatusCheckFailed_System.

  • Load balancers: * ClientTLSNegotiationErrorCount, HealthyHostCount, * UnhealthyHostCount, HTTPCode_LB_4XX_Count, * HTTPCode_LB_5XX_Count, HTTPCode_Instance_2XX_Count, * HTTPCode_Instance_3XX_Count, * HTTPCode_Instance_4XX_Count, * HTTPCode_Instance_5XX_Count, InstanceResponseTime, * RejectedConnectionCount, and RequestCount.

  • *
  • Relational databases: CPUUtilization, * DatabaseConnections, DiskQueueDepth, * FreeStorageSpace, NetworkReceiveThroughput, and * NetworkTransmitThroughput.

For more information * about these metrics, see Metrics * available in Lightsail.

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

The name of the metric to associate with the alarm.

You can configure * up to two alarms per metric.

The following metrics are available for each * resource type:

  • Instances: * BurstCapacityPercentage, BurstCapacityTime, * CPUUtilization, NetworkIn, NetworkOut, * StatusCheckFailed, StatusCheckFailed_Instance, and * StatusCheckFailed_System.

  • Load balancers: * ClientTLSNegotiationErrorCount, HealthyHostCount, * UnhealthyHostCount, HTTPCode_LB_4XX_Count, * HTTPCode_LB_5XX_Count, HTTPCode_Instance_2XX_Count, * HTTPCode_Instance_3XX_Count, * HTTPCode_Instance_4XX_Count, * HTTPCode_Instance_5XX_Count, InstanceResponseTime, * RejectedConnectionCount, and RequestCount.

  • *
  • Relational databases: CPUUtilization, * DatabaseConnections, DiskQueueDepth, * FreeStorageSpace, NetworkReceiveThroughput, and * NetworkTransmitThroughput.

For more information * about these metrics, see Metrics * available in Lightsail.

*/ inline PutAlarmRequest& WithMetricName(const MetricName& value) { SetMetricName(value); return *this;} /** *

The name of the metric to associate with the alarm.

You can configure * up to two alarms per metric.

The following metrics are available for each * resource type:

  • Instances: * BurstCapacityPercentage, BurstCapacityTime, * CPUUtilization, NetworkIn, NetworkOut, * StatusCheckFailed, StatusCheckFailed_Instance, and * StatusCheckFailed_System.

  • Load balancers: * ClientTLSNegotiationErrorCount, HealthyHostCount, * UnhealthyHostCount, HTTPCode_LB_4XX_Count, * HTTPCode_LB_5XX_Count, HTTPCode_Instance_2XX_Count, * HTTPCode_Instance_3XX_Count, * HTTPCode_Instance_4XX_Count, * HTTPCode_Instance_5XX_Count, InstanceResponseTime, * RejectedConnectionCount, and RequestCount.

  • *
  • Relational databases: CPUUtilization, * DatabaseConnections, DiskQueueDepth, * FreeStorageSpace, NetworkReceiveThroughput, and * NetworkTransmitThroughput.

For more information * about these metrics, see Metrics * available in Lightsail.

*/ inline PutAlarmRequest& WithMetricName(MetricName&& value) { SetMetricName(std::move(value)); return *this;} /** *

The name of the Lightsail resource that will be monitored.

Instances, * load balancers, and relational databases are the only Lightsail resources that * can currently be monitored by alarms.

*/ inline const Aws::String& GetMonitoredResourceName() const{ return m_monitoredResourceName; } /** *

The name of the Lightsail resource that will be monitored.

Instances, * load balancers, and relational databases are the only Lightsail resources that * can currently be monitored by alarms.

*/ inline bool MonitoredResourceNameHasBeenSet() const { return m_monitoredResourceNameHasBeenSet; } /** *

The name of the Lightsail resource that will be monitored.

Instances, * load balancers, and relational databases are the only Lightsail resources that * can currently be monitored by alarms.

*/ inline void SetMonitoredResourceName(const Aws::String& value) { m_monitoredResourceNameHasBeenSet = true; m_monitoredResourceName = value; } /** *

The name of the Lightsail resource that will be monitored.

Instances, * load balancers, and relational databases are the only Lightsail resources that * can currently be monitored by alarms.

*/ inline void SetMonitoredResourceName(Aws::String&& value) { m_monitoredResourceNameHasBeenSet = true; m_monitoredResourceName = std::move(value); } /** *

The name of the Lightsail resource that will be monitored.

Instances, * load balancers, and relational databases are the only Lightsail resources that * can currently be monitored by alarms.

*/ inline void SetMonitoredResourceName(const char* value) { m_monitoredResourceNameHasBeenSet = true; m_monitoredResourceName.assign(value); } /** *

The name of the Lightsail resource that will be monitored.

Instances, * load balancers, and relational databases are the only Lightsail resources that * can currently be monitored by alarms.

*/ inline PutAlarmRequest& WithMonitoredResourceName(const Aws::String& value) { SetMonitoredResourceName(value); return *this;} /** *

The name of the Lightsail resource that will be monitored.

Instances, * load balancers, and relational databases are the only Lightsail resources that * can currently be monitored by alarms.

*/ inline PutAlarmRequest& WithMonitoredResourceName(Aws::String&& value) { SetMonitoredResourceName(std::move(value)); return *this;} /** *

The name of the Lightsail resource that will be monitored.

Instances, * load balancers, and relational databases are the only Lightsail resources that * can currently be monitored by alarms.

*/ inline PutAlarmRequest& WithMonitoredResourceName(const char* value) { SetMonitoredResourceName(value); return *this;} /** *

The arithmetic operation to use when comparing the specified statistic to the * 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 to the * 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 to the * 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 to the * 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 to the * threshold. The specified statistic value is used as the first operand.

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

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

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

The value against which the specified statistic is compared.

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

The value against which the specified statistic is compared.

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

The value against which the specified statistic is compared.

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

The value against which the specified statistic is compared.

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

The number of most recent periods over which data is compared to the * specified threshold. If you are setting an "M out of N" alarm, this value * (evaluationPeriods) is the N.

If you are setting an alarm * that requires that a number of consecutive data points be breaching to trigger * the alarm, this value specifies the rolling period of time in which data points * are evaluated.

Each evaluation period is five minutes long. For example, * specify an evaluation period of 24 to evaluate a metric over a rolling period of * two hours.

You can specify a minimum valuation period of 1 (5 minutes), * and a maximum evaluation period of 288 (24 hours).

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

The number of most recent periods over which data is compared to the * specified threshold. If you are setting an "M out of N" alarm, this value * (evaluationPeriods) is the N.

If you are setting an alarm * that requires that a number of consecutive data points be breaching to trigger * the alarm, this value specifies the rolling period of time in which data points * are evaluated.

Each evaluation period is five minutes long. For example, * specify an evaluation period of 24 to evaluate a metric over a rolling period of * two hours.

You can specify a minimum valuation period of 1 (5 minutes), * and a maximum evaluation period of 288 (24 hours).

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

The number of most recent periods over which data is compared to the * specified threshold. If you are setting an "M out of N" alarm, this value * (evaluationPeriods) is the N.

If you are setting an alarm * that requires that a number of consecutive data points be breaching to trigger * the alarm, this value specifies the rolling period of time in which data points * are evaluated.

Each evaluation period is five minutes long. For example, * specify an evaluation period of 24 to evaluate a metric over a rolling period of * two hours.

You can specify a minimum valuation period of 1 (5 minutes), * and a maximum evaluation period of 288 (24 hours).

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

The number of most recent periods over which data is compared to the * specified threshold. If you are setting an "M out of N" alarm, this value * (evaluationPeriods) is the N.

If you are setting an alarm * that requires that a number of consecutive data points be breaching to trigger * the alarm, this value specifies the rolling period of time in which data points * are evaluated.

Each evaluation period is five minutes long. For example, * specify an evaluation period of 24 to evaluate a metric over a rolling period of * two hours.

You can specify a minimum valuation period of 1 (5 minutes), * and a maximum evaluation period of 288 (24 hours).

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

The number of data points that must be not within the specified threshold to * trigger the alarm. If you are setting an "M out of N" alarm, this value * (datapointsToAlarm) is the M.

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

The number of data points that must be not within the specified threshold to * trigger the alarm. If you are setting an "M out of N" alarm, this value * (datapointsToAlarm) is the M.

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

The number of data points that must be not within the specified threshold to * trigger the alarm. If you are setting an "M out of N" alarm, this value * (datapointsToAlarm) is the M.

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

The number of data points that must be not within the specified threshold to * trigger the alarm. If you are setting an "M out of N" alarm, this value * (datapointsToAlarm) is the M.

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

Sets how this alarm will handle 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.

If treatMissingData is not specified, * the default behavior of missing is used.

*/ inline const TreatMissingData& GetTreatMissingData() const{ return m_treatMissingData; } /** *

Sets how this alarm will handle 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.

If treatMissingData is not specified, * the default behavior of missing is used.

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

Sets how this alarm will handle 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.

If treatMissingData is not specified, * the default behavior of missing is used.

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

Sets how this alarm will handle 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.

If treatMissingData is not specified, * the default behavior of missing is used.

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

Sets how this alarm will handle 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.

If treatMissingData is not specified, * the default behavior of missing is used.

*/ inline PutAlarmRequest& WithTreatMissingData(const TreatMissingData& value) { SetTreatMissingData(value); return *this;} /** *

Sets how this alarm will handle 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.

If treatMissingData is not specified, * the default behavior of missing is used.

*/ inline PutAlarmRequest& WithTreatMissingData(TreatMissingData&& value) { SetTreatMissingData(std::move(value)); return *this;} /** *

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

A notification is sent via * the specified contact protocol if notifications are enabled for the alarm, and * when the alarm is triggered.

A notification is not sent if a contact * protocol is not specified, if the specified contact protocol is not configured * in the Amazon Web Services Region, or if notifications are not enabled for the * alarm using the notificationEnabled paramater.

Use the * CreateContactMethod action to configure a contact protocol in an * Amazon Web Services Region.

*/ inline const Aws::Vector& GetContactProtocols() const{ return m_contactProtocols; } /** *

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

A notification is sent via * the specified contact protocol if notifications are enabled for the alarm, and * when the alarm is triggered.

A notification is not sent if a contact * protocol is not specified, if the specified contact protocol is not configured * in the Amazon Web Services Region, or if notifications are not enabled for the * alarm using the notificationEnabled paramater.

Use the * CreateContactMethod action to configure a contact protocol in an * Amazon Web Services Region.

*/ inline bool ContactProtocolsHasBeenSet() const { return m_contactProtocolsHasBeenSet; } /** *

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

A notification is sent via * the specified contact protocol if notifications are enabled for the alarm, and * when the alarm is triggered.

A notification is not sent if a contact * protocol is not specified, if the specified contact protocol is not configured * in the Amazon Web Services Region, or if notifications are not enabled for the * alarm using the notificationEnabled paramater.

Use the * CreateContactMethod action to configure a contact protocol in an * Amazon Web Services Region.

*/ inline void SetContactProtocols(const Aws::Vector& value) { m_contactProtocolsHasBeenSet = true; m_contactProtocols = value; } /** *

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

A notification is sent via * the specified contact protocol if notifications are enabled for the alarm, and * when the alarm is triggered.

A notification is not sent if a contact * protocol is not specified, if the specified contact protocol is not configured * in the Amazon Web Services Region, or if notifications are not enabled for the * alarm using the notificationEnabled paramater.

Use the * CreateContactMethod action to configure a contact protocol in an * Amazon Web Services Region.

*/ inline void SetContactProtocols(Aws::Vector&& value) { m_contactProtocolsHasBeenSet = true; m_contactProtocols = std::move(value); } /** *

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

A notification is sent via * the specified contact protocol if notifications are enabled for the alarm, and * when the alarm is triggered.

A notification is not sent if a contact * protocol is not specified, if the specified contact protocol is not configured * in the Amazon Web Services Region, or if notifications are not enabled for the * alarm using the notificationEnabled paramater.

Use the * CreateContactMethod action to configure a contact protocol in an * Amazon Web Services Region.

*/ inline PutAlarmRequest& WithContactProtocols(const Aws::Vector& value) { SetContactProtocols(value); return *this;} /** *

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

A notification is sent via * the specified contact protocol if notifications are enabled for the alarm, and * when the alarm is triggered.

A notification is not sent if a contact * protocol is not specified, if the specified contact protocol is not configured * in the Amazon Web Services Region, or if notifications are not enabled for the * alarm using the notificationEnabled paramater.

Use the * CreateContactMethod action to configure a contact protocol in an * Amazon Web Services Region.

*/ inline PutAlarmRequest& WithContactProtocols(Aws::Vector&& value) { SetContactProtocols(std::move(value)); return *this;} /** *

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

A notification is sent via * the specified contact protocol if notifications are enabled for the alarm, and * when the alarm is triggered.

A notification is not sent if a contact * protocol is not specified, if the specified contact protocol is not configured * in the Amazon Web Services Region, or if notifications are not enabled for the * alarm using the notificationEnabled paramater.

Use the * CreateContactMethod action to configure a contact protocol in an * Amazon Web Services Region.

*/ inline PutAlarmRequest& AddContactProtocols(const ContactProtocol& value) { m_contactProtocolsHasBeenSet = true; m_contactProtocols.push_back(value); return *this; } /** *

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

A notification is sent via * the specified contact protocol if notifications are enabled for the alarm, and * when the alarm is triggered.

A notification is not sent if a contact * protocol is not specified, if the specified contact protocol is not configured * in the Amazon Web Services Region, or if notifications are not enabled for the * alarm using the notificationEnabled paramater.

Use the * CreateContactMethod action to configure a contact protocol in an * Amazon Web Services Region.

*/ inline PutAlarmRequest& AddContactProtocols(ContactProtocol&& value) { m_contactProtocolsHasBeenSet = true; m_contactProtocols.push_back(std::move(value)); return *this; } /** *

The alarm states that trigger a notification.

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.

When you specify a notification trigger, the * ALARM state must be specified. The INSUFFICIENT_DATA * and OK states can be specified in addition to the * ALARM state.

  • If you specify OK as an * alarm trigger, a notification is sent when the alarm switches from an * ALARM or INSUFFICIENT_DATA alarm state to an * OK state. This can be thought of as an all clear alarm * notification.

  • If you specify INSUFFICIENT_DATA as * the alarm trigger, a notification is sent when the alarm switches from an * OK or ALARM alarm state to an * INSUFFICIENT_DATA state.

The notification * trigger defaults to ALARM if you don't specify this parameter.

*/ inline const Aws::Vector& GetNotificationTriggers() const{ return m_notificationTriggers; } /** *

The alarm states that trigger a notification.

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.

When you specify a notification trigger, the * ALARM state must be specified. The INSUFFICIENT_DATA * and OK states can be specified in addition to the * ALARM state.

  • If you specify OK as an * alarm trigger, a notification is sent when the alarm switches from an * ALARM or INSUFFICIENT_DATA alarm state to an * OK state. This can be thought of as an all clear alarm * notification.

  • If you specify INSUFFICIENT_DATA as * the alarm trigger, a notification is sent when the alarm switches from an * OK or ALARM alarm state to an * INSUFFICIENT_DATA state.

The notification * trigger defaults to ALARM if you don't specify this parameter.

*/ inline bool NotificationTriggersHasBeenSet() const { return m_notificationTriggersHasBeenSet; } /** *

The alarm states that trigger a notification.

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.

When you specify a notification trigger, the * ALARM state must be specified. The INSUFFICIENT_DATA * and OK states can be specified in addition to the * ALARM state.

  • If you specify OK as an * alarm trigger, a notification is sent when the alarm switches from an * ALARM or INSUFFICIENT_DATA alarm state to an * OK state. This can be thought of as an all clear alarm * notification.

  • If you specify INSUFFICIENT_DATA as * the alarm trigger, a notification is sent when the alarm switches from an * OK or ALARM alarm state to an * INSUFFICIENT_DATA state.

The notification * trigger defaults to ALARM if you don't specify this parameter.

*/ inline void SetNotificationTriggers(const Aws::Vector& value) { m_notificationTriggersHasBeenSet = true; m_notificationTriggers = value; } /** *

The alarm states that trigger a notification.

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.

When you specify a notification trigger, the * ALARM state must be specified. The INSUFFICIENT_DATA * and OK states can be specified in addition to the * ALARM state.

  • If you specify OK as an * alarm trigger, a notification is sent when the alarm switches from an * ALARM or INSUFFICIENT_DATA alarm state to an * OK state. This can be thought of as an all clear alarm * notification.

  • If you specify INSUFFICIENT_DATA as * the alarm trigger, a notification is sent when the alarm switches from an * OK or ALARM alarm state to an * INSUFFICIENT_DATA state.

The notification * trigger defaults to ALARM if you don't specify this parameter.

*/ inline void SetNotificationTriggers(Aws::Vector&& value) { m_notificationTriggersHasBeenSet = true; m_notificationTriggers = std::move(value); } /** *

The alarm states that trigger a notification.

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.

When you specify a notification trigger, the * ALARM state must be specified. The INSUFFICIENT_DATA * and OK states can be specified in addition to the * ALARM state.

  • If you specify OK as an * alarm trigger, a notification is sent when the alarm switches from an * ALARM or INSUFFICIENT_DATA alarm state to an * OK state. This can be thought of as an all clear alarm * notification.

  • If you specify INSUFFICIENT_DATA as * the alarm trigger, a notification is sent when the alarm switches from an * OK or ALARM alarm state to an * INSUFFICIENT_DATA state.

The notification * trigger defaults to ALARM if you don't specify this parameter.

*/ inline PutAlarmRequest& WithNotificationTriggers(const Aws::Vector& value) { SetNotificationTriggers(value); return *this;} /** *

The alarm states that trigger a notification.

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.

When you specify a notification trigger, the * ALARM state must be specified. The INSUFFICIENT_DATA * and OK states can be specified in addition to the * ALARM state.

  • If you specify OK as an * alarm trigger, a notification is sent when the alarm switches from an * ALARM or INSUFFICIENT_DATA alarm state to an * OK state. This can be thought of as an all clear alarm * notification.

  • If you specify INSUFFICIENT_DATA as * the alarm trigger, a notification is sent when the alarm switches from an * OK or ALARM alarm state to an * INSUFFICIENT_DATA state.

The notification * trigger defaults to ALARM if you don't specify this parameter.

*/ inline PutAlarmRequest& WithNotificationTriggers(Aws::Vector&& value) { SetNotificationTriggers(std::move(value)); return *this;} /** *

The alarm states that trigger a notification.

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.

When you specify a notification trigger, the * ALARM state must be specified. The INSUFFICIENT_DATA * and OK states can be specified in addition to the * ALARM state.

  • If you specify OK as an * alarm trigger, a notification is sent when the alarm switches from an * ALARM or INSUFFICIENT_DATA alarm state to an * OK state. This can be thought of as an all clear alarm * notification.

  • If you specify INSUFFICIENT_DATA as * the alarm trigger, a notification is sent when the alarm switches from an * OK or ALARM alarm state to an * INSUFFICIENT_DATA state.

The notification * trigger defaults to ALARM if you don't specify this parameter.

*/ inline PutAlarmRequest& AddNotificationTriggers(const AlarmState& value) { m_notificationTriggersHasBeenSet = true; m_notificationTriggers.push_back(value); return *this; } /** *

The alarm states that trigger a notification.

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.

When you specify a notification trigger, the * ALARM state must be specified. The INSUFFICIENT_DATA * and OK states can be specified in addition to the * ALARM state.

  • If you specify OK as an * alarm trigger, a notification is sent when the alarm switches from an * ALARM or INSUFFICIENT_DATA alarm state to an * OK state. This can be thought of as an all clear alarm * notification.

  • If you specify INSUFFICIENT_DATA as * the alarm trigger, a notification is sent when the alarm switches from an * OK or ALARM alarm state to an * INSUFFICIENT_DATA state.

The notification * trigger defaults to ALARM if you don't specify this parameter.

*/ inline PutAlarmRequest& AddNotificationTriggers(AlarmState&& value) { m_notificationTriggersHasBeenSet = true; m_notificationTriggers.push_back(std::move(value)); return *this; } /** *

Indicates whether the alarm is enabled.

Notifications are enabled by * default if you don't specify this parameter.

*/ inline bool GetNotificationEnabled() const{ return m_notificationEnabled; } /** *

Indicates whether the alarm is enabled.

Notifications are enabled by * default if you don't specify this parameter.

*/ inline bool NotificationEnabledHasBeenSet() const { return m_notificationEnabledHasBeenSet; } /** *

Indicates whether the alarm is enabled.

Notifications are enabled by * default if you don't specify this parameter.

*/ inline void SetNotificationEnabled(bool value) { m_notificationEnabledHasBeenSet = true; m_notificationEnabled = value; } /** *

Indicates whether the alarm is enabled.

Notifications are enabled by * default if you don't specify this parameter.

*/ inline PutAlarmRequest& WithNotificationEnabled(bool value) { SetNotificationEnabled(value); return *this;} private: Aws::String m_alarmName; bool m_alarmNameHasBeenSet = false; MetricName m_metricName; bool m_metricNameHasBeenSet = false; Aws::String m_monitoredResourceName; bool m_monitoredResourceNameHasBeenSet = false; ComparisonOperator m_comparisonOperator; bool m_comparisonOperatorHasBeenSet = false; double m_threshold; bool m_thresholdHasBeenSet = false; int m_evaluationPeriods; bool m_evaluationPeriodsHasBeenSet = false; int m_datapointsToAlarm; bool m_datapointsToAlarmHasBeenSet = false; TreatMissingData m_treatMissingData; bool m_treatMissingDataHasBeenSet = false; Aws::Vector m_contactProtocols; bool m_contactProtocolsHasBeenSet = false; Aws::Vector m_notificationTriggers; bool m_notificationTriggersHasBeenSet = false; bool m_notificationEnabled; bool m_notificationEnabledHasBeenSet = false; }; } // namespace Model } // namespace Lightsail } // namespace Aws