AWS SDK for C++  1.8.53
AWS SDK for C++
Public Member Functions | Protected Member Functions | List of all members
Aws::CloudWatch::Model::PutMetricAlarmRequest Class Reference

#include <PutMetricAlarmRequest.h>

+ Inheritance diagram for Aws::CloudWatch::Model::PutMetricAlarmRequest:

Public Member Functions

 PutMetricAlarmRequest ()
 
virtual const char * GetServiceRequestName () const override
 
Aws::String SerializePayload () const override
 
const Aws::StringGetAlarmName () const
 
bool AlarmNameHasBeenSet () const
 
void SetAlarmName (const Aws::String &value)
 
void SetAlarmName (Aws::String &&value)
 
void SetAlarmName (const char *value)
 
PutMetricAlarmRequestWithAlarmName (const Aws::String &value)
 
PutMetricAlarmRequestWithAlarmName (Aws::String &&value)
 
PutMetricAlarmRequestWithAlarmName (const char *value)
 
const Aws::StringGetAlarmDescription () const
 
bool AlarmDescriptionHasBeenSet () const
 
void SetAlarmDescription (const Aws::String &value)
 
void SetAlarmDescription (Aws::String &&value)
 
void SetAlarmDescription (const char *value)
 
PutMetricAlarmRequestWithAlarmDescription (const Aws::String &value)
 
PutMetricAlarmRequestWithAlarmDescription (Aws::String &&value)
 
PutMetricAlarmRequestWithAlarmDescription (const char *value)
 
bool GetActionsEnabled () const
 
bool ActionsEnabledHasBeenSet () const
 
void SetActionsEnabled (bool value)
 
PutMetricAlarmRequestWithActionsEnabled (bool value)
 
const Aws::Vector< Aws::String > & GetOKActions () const
 
bool OKActionsHasBeenSet () const
 
void SetOKActions (const Aws::Vector< Aws::String > &value)
 
void SetOKActions (Aws::Vector< Aws::String > &&value)
 
PutMetricAlarmRequestWithOKActions (const Aws::Vector< Aws::String > &value)
 
PutMetricAlarmRequestWithOKActions (Aws::Vector< Aws::String > &&value)
 
PutMetricAlarmRequestAddOKActions (const Aws::String &value)
 
PutMetricAlarmRequestAddOKActions (Aws::String &&value)
 
PutMetricAlarmRequestAddOKActions (const char *value)
 
const Aws::Vector< Aws::String > & GetAlarmActions () const
 
bool AlarmActionsHasBeenSet () const
 
void SetAlarmActions (const Aws::Vector< Aws::String > &value)
 
void SetAlarmActions (Aws::Vector< Aws::String > &&value)
 
PutMetricAlarmRequestWithAlarmActions (const Aws::Vector< Aws::String > &value)
 
PutMetricAlarmRequestWithAlarmActions (Aws::Vector< Aws::String > &&value)
 
PutMetricAlarmRequestAddAlarmActions (const Aws::String &value)
 
PutMetricAlarmRequestAddAlarmActions (Aws::String &&value)
 
PutMetricAlarmRequestAddAlarmActions (const char *value)
 
const Aws::Vector< Aws::String > & GetInsufficientDataActions () const
 
bool InsufficientDataActionsHasBeenSet () const
 
void SetInsufficientDataActions (const Aws::Vector< Aws::String > &value)
 
void SetInsufficientDataActions (Aws::Vector< Aws::String > &&value)
 
PutMetricAlarmRequestWithInsufficientDataActions (const Aws::Vector< Aws::String > &value)
 
PutMetricAlarmRequestWithInsufficientDataActions (Aws::Vector< Aws::String > &&value)
 
PutMetricAlarmRequestAddInsufficientDataActions (const Aws::String &value)
 
PutMetricAlarmRequestAddInsufficientDataActions (Aws::String &&value)
 
PutMetricAlarmRequestAddInsufficientDataActions (const char *value)
 
const Aws::StringGetMetricName () const
 
bool MetricNameHasBeenSet () const
 
void SetMetricName (const Aws::String &value)
 
void SetMetricName (Aws::String &&value)
 
void SetMetricName (const char *value)
 
PutMetricAlarmRequestWithMetricName (const Aws::String &value)
 
PutMetricAlarmRequestWithMetricName (Aws::String &&value)
 
PutMetricAlarmRequestWithMetricName (const char *value)
 
const Aws::StringGetNamespace () const
 
bool NamespaceHasBeenSet () const
 
void SetNamespace (const Aws::String &value)
 
void SetNamespace (Aws::String &&value)
 
void SetNamespace (const char *value)
 
PutMetricAlarmRequestWithNamespace (const Aws::String &value)
 
PutMetricAlarmRequestWithNamespace (Aws::String &&value)
 
PutMetricAlarmRequestWithNamespace (const char *value)
 
const StatisticGetStatistic () const
 
bool StatisticHasBeenSet () const
 
void SetStatistic (const Statistic &value)
 
void SetStatistic (Statistic &&value)
 
PutMetricAlarmRequestWithStatistic (const Statistic &value)
 
PutMetricAlarmRequestWithStatistic (Statistic &&value)
 
const Aws::StringGetExtendedStatistic () const
 
bool ExtendedStatisticHasBeenSet () const
 
void SetExtendedStatistic (const Aws::String &value)
 
void SetExtendedStatistic (Aws::String &&value)
 
void SetExtendedStatistic (const char *value)
 
PutMetricAlarmRequestWithExtendedStatistic (const Aws::String &value)
 
PutMetricAlarmRequestWithExtendedStatistic (Aws::String &&value)
 
PutMetricAlarmRequestWithExtendedStatistic (const char *value)
 
const Aws::Vector< Dimension > & GetDimensions () const
 
bool DimensionsHasBeenSet () const
 
void SetDimensions (const Aws::Vector< Dimension > &value)
 
void SetDimensions (Aws::Vector< Dimension > &&value)
 
PutMetricAlarmRequestWithDimensions (const Aws::Vector< Dimension > &value)
 
PutMetricAlarmRequestWithDimensions (Aws::Vector< Dimension > &&value)
 
PutMetricAlarmRequestAddDimensions (const Dimension &value)
 
PutMetricAlarmRequestAddDimensions (Dimension &&value)
 
int GetPeriod () const
 
bool PeriodHasBeenSet () const
 
void SetPeriod (int value)
 
PutMetricAlarmRequestWithPeriod (int value)
 
const StandardUnitGetUnit () const
 
bool UnitHasBeenSet () const
 
void SetUnit (const StandardUnit &value)
 
void SetUnit (StandardUnit &&value)
 
PutMetricAlarmRequestWithUnit (const StandardUnit &value)
 
PutMetricAlarmRequestWithUnit (StandardUnit &&value)
 
int GetEvaluationPeriods () const
 
bool EvaluationPeriodsHasBeenSet () const
 
void SetEvaluationPeriods (int value)
 
PutMetricAlarmRequestWithEvaluationPeriods (int value)
 
int GetDatapointsToAlarm () const
 
bool DatapointsToAlarmHasBeenSet () const
 
void SetDatapointsToAlarm (int value)
 
PutMetricAlarmRequestWithDatapointsToAlarm (int value)
 
double GetThreshold () const
 
bool ThresholdHasBeenSet () const
 
void SetThreshold (double value)
 
PutMetricAlarmRequestWithThreshold (double value)
 
const ComparisonOperatorGetComparisonOperator () const
 
bool ComparisonOperatorHasBeenSet () const
 
void SetComparisonOperator (const ComparisonOperator &value)
 
void SetComparisonOperator (ComparisonOperator &&value)
 
PutMetricAlarmRequestWithComparisonOperator (const ComparisonOperator &value)
 
PutMetricAlarmRequestWithComparisonOperator (ComparisonOperator &&value)
 
const Aws::StringGetTreatMissingData () const
 
bool TreatMissingDataHasBeenSet () const
 
void SetTreatMissingData (const Aws::String &value)
 
void SetTreatMissingData (Aws::String &&value)
 
void SetTreatMissingData (const char *value)
 
PutMetricAlarmRequestWithTreatMissingData (const Aws::String &value)
 
PutMetricAlarmRequestWithTreatMissingData (Aws::String &&value)
 
PutMetricAlarmRequestWithTreatMissingData (const char *value)
 
const Aws::StringGetEvaluateLowSampleCountPercentile () const
 
bool EvaluateLowSampleCountPercentileHasBeenSet () const
 
void SetEvaluateLowSampleCountPercentile (const Aws::String &value)
 
void SetEvaluateLowSampleCountPercentile (Aws::String &&value)
 
void SetEvaluateLowSampleCountPercentile (const char *value)
 
PutMetricAlarmRequestWithEvaluateLowSampleCountPercentile (const Aws::String &value)
 
PutMetricAlarmRequestWithEvaluateLowSampleCountPercentile (Aws::String &&value)
 
PutMetricAlarmRequestWithEvaluateLowSampleCountPercentile (const char *value)
 
const Aws::Vector< MetricDataQuery > & GetMetrics () const
 
bool MetricsHasBeenSet () const
 
void SetMetrics (const Aws::Vector< MetricDataQuery > &value)
 
void SetMetrics (Aws::Vector< MetricDataQuery > &&value)
 
PutMetricAlarmRequestWithMetrics (const Aws::Vector< MetricDataQuery > &value)
 
PutMetricAlarmRequestWithMetrics (Aws::Vector< MetricDataQuery > &&value)
 
PutMetricAlarmRequestAddMetrics (const MetricDataQuery &value)
 
PutMetricAlarmRequestAddMetrics (MetricDataQuery &&value)
 
const Aws::Vector< Tag > & GetTags () const
 
bool TagsHasBeenSet () const
 
void SetTags (const Aws::Vector< Tag > &value)
 
void SetTags (Aws::Vector< Tag > &&value)
 
PutMetricAlarmRequestWithTags (const Aws::Vector< Tag > &value)
 
PutMetricAlarmRequestWithTags (Aws::Vector< Tag > &&value)
 
PutMetricAlarmRequestAddTags (const Tag &value)
 
PutMetricAlarmRequestAddTags (Tag &&value)
 
const Aws::StringGetThresholdMetricId () const
 
bool ThresholdMetricIdHasBeenSet () const
 
void SetThresholdMetricId (const Aws::String &value)
 
void SetThresholdMetricId (Aws::String &&value)
 
void SetThresholdMetricId (const char *value)
 
PutMetricAlarmRequestWithThresholdMetricId (const Aws::String &value)
 
PutMetricAlarmRequestWithThresholdMetricId (Aws::String &&value)
 
PutMetricAlarmRequestWithThresholdMetricId (const char *value)
 
- Public Member Functions inherited from Aws::CloudWatch::CloudWatchRequest
virtual ~CloudWatchRequest ()
 
void AddParametersToRequest (Aws::Http::HttpRequest &httpRequest) const
 
Aws::Http::HeaderValueCollection GetHeaders () const override
 
- Public Member Functions inherited from Aws::AmazonSerializableWebServiceRequest
 AmazonSerializableWebServiceRequest ()
 
virtual ~AmazonSerializableWebServiceRequest ()
 
std::shared_ptr< Aws::IOStreamGetBody () const override
 
- Public Member Functions inherited from Aws::AmazonWebServiceRequest
 AmazonWebServiceRequest ()
 
virtual ~AmazonWebServiceRequest ()=default
 
virtual void AddQueryStringParameters (Aws::Http::URI &uri) const
 
virtual void PutToPresignedUrl (Aws::Http::URI &uri) const
 
virtual bool IsStreaming () const
 
virtual bool IsEventStreamRequest () const
 
virtual bool SignBody () const
 
virtual bool IsChunked () const
 
virtual void SetRequestSignedHandler (const RequestSignedHandler &handler)
 
virtual const RequestSignedHandlerGetRequestSignedHandler () const
 
const Aws::IOStreamFactoryGetResponseStreamFactory () const
 
void SetResponseStreamFactory (const Aws::IOStreamFactory &factory)
 
virtual void SetDataReceivedEventHandler (const Aws::Http::DataReceivedEventHandler &dataReceivedEventHandler)
 
virtual void SetDataSentEventHandler (const Aws::Http::DataSentEventHandler &dataSentEventHandler)
 
virtual void SetContinueRequestHandler (const Aws::Http::ContinueRequestHandler &continueRequestHandler)
 
virtual void SetDataReceivedEventHandler (Aws::Http::DataReceivedEventHandler &&dataReceivedEventHandler)
 
virtual void SetDataSentEventHandler (Aws::Http::DataSentEventHandler &&dataSentEventHandler)
 
virtual void SetContinueRequestHandler (Aws::Http::ContinueRequestHandler &&continueRequestHandler)
 
virtual void SetRequestRetryHandler (const RequestRetryHandler &handler)
 
virtual void SetRequestRetryHandler (RequestRetryHandler &&handler)
 
virtual const Aws::Http::DataReceivedEventHandlerGetDataReceivedEventHandler () const
 
virtual const Aws::Http::DataSentEventHandlerGetDataSentEventHandler () const
 
virtual const Aws::Http::ContinueRequestHandlerGetContinueRequestHandler () const
 
virtual const RequestRetryHandlerGetRequestRetryHandler () const
 
virtual bool ShouldComputeContentMd5 () const
 

Protected Member Functions

void DumpBodyToUrl (Aws::Http::URI &uri) const override
 
- Protected Member Functions inherited from Aws::CloudWatch::CloudWatchRequest
virtual Aws::Http::HeaderValueCollection GetRequestSpecificHeaders () const
 

Detailed Description

Definition at line 28 of file PutMetricAlarmRequest.h.

Constructor & Destructor Documentation

◆ PutMetricAlarmRequest()

Aws::CloudWatch::Model::PutMetricAlarmRequest::PutMetricAlarmRequest ( )

Member Function Documentation

◆ ActionsEnabledHasBeenSet()

bool Aws::CloudWatch::Model::PutMetricAlarmRequest::ActionsEnabledHasBeenSet ( ) const
inline

Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.

Definition at line 138 of file PutMetricAlarmRequest.h.

◆ AddAlarmActions() [1/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::AddAlarmActions ( const Aws::String value)
inline

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

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 472 of file PutMetricAlarmRequest.h.

◆ AddAlarmActions() [2/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::AddAlarmActions ( Aws::String &&  value)
inline

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

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 492 of file PutMetricAlarmRequest.h.

◆ AddAlarmActions() [3/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::AddAlarmActions ( const char *  value)
inline

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

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 512 of file PutMetricAlarmRequest.h.

◆ AddDimensions() [1/2]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::AddDimensions ( const Dimension value)
inline

The dimensions for the metric specified in MetricName.

Definition at line 1004 of file PutMetricAlarmRequest.h.

◆ AddDimensions() [2/2]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::AddDimensions ( Dimension &&  value)
inline

The dimensions for the metric specified in MetricName.

Definition at line 1009 of file PutMetricAlarmRequest.h.

◆ AddInsufficientDataActions() [1/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::AddInsufficientDataActions ( const Aws::String value)
inline

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

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): >arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 660 of file PutMetricAlarmRequest.h.

◆ AddInsufficientDataActions() [2/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::AddInsufficientDataActions ( Aws::String &&  value)
inline

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

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): >arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 681 of file PutMetricAlarmRequest.h.

◆ AddInsufficientDataActions() [3/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::AddInsufficientDataActions ( const char *  value)
inline

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

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): >arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 702 of file PutMetricAlarmRequest.h.

◆ AddMetrics() [1/2]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::AddMetrics ( const MetricDataQuery value)
inline

An array of MetricDataQuery structures that enable you to create an alarm based on the result of a metric math expression. For each PutMetricAlarm operation, you must specify either MetricName or a Metrics array.

Each item in the Metrics array either retrieves a metric or performs a math expression.

One item in the Metrics array is the expression that the alarm watches. You designate this expression by setting ReturnValue to true for this object in the array. For more information, see MetricDataQuery.

If you use the Metrics parameter, you cannot include the MetricName, Dimensions, Period, Namespace, Statistic, or ExtendedStatistic parameters of PutMetricAlarm in the same operation. Instead, you retrieve the metrics you are using in your math expression as part of the Metrics array.

Definition at line 1696 of file PutMetricAlarmRequest.h.

◆ AddMetrics() [2/2]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::AddMetrics ( MetricDataQuery &&  value)
inline

An array of MetricDataQuery structures that enable you to create an alarm based on the result of a metric math expression. For each PutMetricAlarm operation, you must specify either MetricName or a Metrics array.

Each item in the Metrics array either retrieves a metric or performs a math expression.

One item in the Metrics array is the expression that the alarm watches. You designate this expression by setting ReturnValue to true for this object in the array. For more information, see MetricDataQuery.

If you use the Metrics parameter, you cannot include the MetricName, Dimensions, Period, Namespace, Statistic, or ExtendedStatistic parameters of PutMetricAlarm in the same operation. Instead, you retrieve the metrics you are using in your math expression as part of the Metrics array.

Definition at line 1716 of file PutMetricAlarmRequest.h.

◆ AddOKActions() [1/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::AddOKActions ( const Aws::String value)
inline

The actions to execute when this alarm transitions to an OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 291 of file PutMetricAlarmRequest.h.

◆ AddOKActions() [2/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::AddOKActions ( Aws::String &&  value)
inline

The actions to execute when this alarm transitions to an OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 311 of file PutMetricAlarmRequest.h.

◆ AddOKActions() [3/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::AddOKActions ( const char *  value)
inline

The actions to execute when this alarm transitions to an OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 331 of file PutMetricAlarmRequest.h.

◆ AddTags() [1/2]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::AddTags ( const Tag value)
inline

A list of key-value pairs to associate with the alarm. You can associate as many as 50 tags with an alarm.

Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.

Definition at line 1773 of file PutMetricAlarmRequest.h.

◆ AddTags() [2/2]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::AddTags ( Tag &&  value)
inline

A list of key-value pairs to associate with the alarm. You can associate as many as 50 tags with an alarm.

Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.

Definition at line 1781 of file PutMetricAlarmRequest.h.

◆ AlarmActionsHasBeenSet()

bool Aws::CloudWatch::Model::PutMetricAlarmRequest::AlarmActionsHasBeenSet ( ) const
inline

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

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 372 of file PutMetricAlarmRequest.h.

◆ AlarmDescriptionHasBeenSet()

bool Aws::CloudWatch::Model::PutMetricAlarmRequest::AlarmDescriptionHasBeenSet ( ) const
inline

The description for the alarm.

Definition at line 95 of file PutMetricAlarmRequest.h.

◆ AlarmNameHasBeenSet()

bool Aws::CloudWatch::Model::PutMetricAlarmRequest::AlarmNameHasBeenSet ( ) const
inline

The name for the alarm. This name must be unique within the Region.

Definition at line 54 of file PutMetricAlarmRequest.h.

◆ ComparisonOperatorHasBeenSet()

bool Aws::CloudWatch::Model::PutMetricAlarmRequest::ComparisonOperatorHasBeenSet ( ) const
inline

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

The values LessThanLowerOrGreaterThanUpperThreshold, LessThanLowerThreshold, and GreaterThanUpperThreshold are used only for alarms based on anomaly detection models.

Definition at line 1333 of file PutMetricAlarmRequest.h.

◆ DatapointsToAlarmHasBeenSet()

bool Aws::CloudWatch::Model::PutMetricAlarmRequest::DatapointsToAlarmHasBeenSet ( ) const
inline

The number of data points that must be breaching to trigger the alarm. This is used only if you are setting an "M out of N" alarm. In that case, this value is the M. For more information, see Evaluating an Alarm in the Amazon CloudWatch User Guide.

Definition at line 1267 of file PutMetricAlarmRequest.h.

◆ DimensionsHasBeenSet()

bool Aws::CloudWatch::Model::PutMetricAlarmRequest::DimensionsHasBeenSet ( ) const
inline

The dimensions for the metric specified in MetricName.

Definition at line 979 of file PutMetricAlarmRequest.h.

◆ DumpBodyToUrl()

void Aws::CloudWatch::Model::PutMetricAlarmRequest::DumpBodyToUrl ( Aws::Http::URI uri) const
overrideprotectedvirtual

Default does nothing. Override this to convert what would otherwise be the payload of the request to a query string format.

Reimplemented from Aws::AmazonWebServiceRequest.

◆ EvaluateLowSampleCountPercentileHasBeenSet()

bool Aws::CloudWatch::Model::PutMetricAlarmRequest::EvaluateLowSampleCountPercentileHasBeenSet ( ) const
inline

Used only for alarms based on percentiles. If you specify ignore, the alarm state does not change during periods with too few data points to be statistically significant. If you specify evaluate or omit this parameter, the alarm is always evaluated and possibly changes state no matter how many data points are available. For more information, see Percentile-Based CloudWatch Alarms and Low Data Samples.

Valid Values: evaluate | ignore

Definition at line 1477 of file PutMetricAlarmRequest.h.

◆ EvaluationPeriodsHasBeenSet()

bool Aws::CloudWatch::Model::PutMetricAlarmRequest::EvaluationPeriodsHasBeenSet ( ) const
inline

The number of periods over which data is compared to the specified threshold. If you are setting an alarm that requires that a number of consecutive data points be breaching to trigger the alarm, this value specifies that number. If you are setting an "M out of N" alarm, this value is the N.

An alarm's total current evaluation period can be no longer than one day, so this number multiplied by Period cannot be more than 86,400 seconds.

Definition at line 1228 of file PutMetricAlarmRequest.h.

◆ ExtendedStatisticHasBeenSet()

bool Aws::CloudWatch::Model::PutMetricAlarmRequest::ExtendedStatisticHasBeenSet ( ) const
inline

The percentile statistic for the metric specified in MetricName. Specify a value between p0.0 and p100. When you call PutMetricAlarm and specify a MetricName, you must specify either Statistic or ExtendedStatistic, but not both.

Definition at line 920 of file PutMetricAlarmRequest.h.

◆ GetActionsEnabled()

bool Aws::CloudWatch::Model::PutMetricAlarmRequest::GetActionsEnabled ( ) const
inline

Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.

Definition at line 132 of file PutMetricAlarmRequest.h.

◆ GetAlarmActions()

const Aws::Vector<Aws::String>& Aws::CloudWatch::Model::PutMetricAlarmRequest::GetAlarmActions ( ) const
inline

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

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 352 of file PutMetricAlarmRequest.h.

◆ GetAlarmDescription()

const Aws::String& Aws::CloudWatch::Model::PutMetricAlarmRequest::GetAlarmDescription ( ) const
inline

The description for the alarm.

Definition at line 90 of file PutMetricAlarmRequest.h.

◆ GetAlarmName()

const Aws::String& Aws::CloudWatch::Model::PutMetricAlarmRequest::GetAlarmName ( ) const
inline

The name for the alarm. This name must be unique within the Region.

Definition at line 49 of file PutMetricAlarmRequest.h.

◆ GetComparisonOperator()

const ComparisonOperator& Aws::CloudWatch::Model::PutMetricAlarmRequest::GetComparisonOperator ( ) const
inline

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

The values LessThanLowerOrGreaterThanUpperThreshold, LessThanLowerThreshold, and GreaterThanUpperThreshold are used only for alarms based on anomaly detection models.

Definition at line 1324 of file PutMetricAlarmRequest.h.

◆ GetDatapointsToAlarm()

int Aws::CloudWatch::Model::PutMetricAlarmRequest::GetDatapointsToAlarm ( ) const
inline

The number of data points that must be breaching to trigger the alarm. This is used only if you are setting an "M out of N" alarm. In that case, this value is the M. For more information, see Evaluating an Alarm in the Amazon CloudWatch User Guide.

Definition at line 1258 of file PutMetricAlarmRequest.h.

◆ GetDimensions()

const Aws::Vector<Dimension>& Aws::CloudWatch::Model::PutMetricAlarmRequest::GetDimensions ( ) const
inline

The dimensions for the metric specified in MetricName.

Definition at line 974 of file PutMetricAlarmRequest.h.

◆ GetEvaluateLowSampleCountPercentile()

const Aws::String& Aws::CloudWatch::Model::PutMetricAlarmRequest::GetEvaluateLowSampleCountPercentile ( ) const
inline

Used only for alarms based on percentiles. If you specify ignore, the alarm state does not change during periods with too few data points to be statistically significant. If you specify evaluate or omit this parameter, the alarm is always evaluated and possibly changes state no matter how many data points are available. For more information, see Percentile-Based CloudWatch Alarms and Low Data Samples.

Valid Values: evaluate | ignore

Definition at line 1464 of file PutMetricAlarmRequest.h.

◆ GetEvaluationPeriods()

int Aws::CloudWatch::Model::PutMetricAlarmRequest::GetEvaluationPeriods ( ) const
inline

The number of periods over which data is compared to the specified threshold. If you are setting an alarm that requires that a number of consecutive data points be breaching to trigger the alarm, this value specifies that number. If you are setting an "M out of N" alarm, this value is the N.

An alarm's total current evaluation period can be no longer than one day, so this number multiplied by Period cannot be more than 86,400 seconds.

Definition at line 1218 of file PutMetricAlarmRequest.h.

◆ GetExtendedStatistic()

const Aws::String& Aws::CloudWatch::Model::PutMetricAlarmRequest::GetExtendedStatistic ( ) const
inline

The percentile statistic for the metric specified in MetricName. Specify a value between p0.0 and p100. When you call PutMetricAlarm and specify a MetricName, you must specify either Statistic or ExtendedStatistic, but not both.

Definition at line 912 of file PutMetricAlarmRequest.h.

◆ GetInsufficientDataActions()

const Aws::Vector<Aws::String>& Aws::CloudWatch::Model::PutMetricAlarmRequest::GetInsufficientDataActions ( ) const
inline

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

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): >arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 534 of file PutMetricAlarmRequest.h.

◆ GetMetricName()

const Aws::String& Aws::CloudWatch::Model::PutMetricAlarmRequest::GetMetricName ( ) const
inline

The name for the metric associated with the alarm. For each PutMetricAlarm operation, you must specify either MetricName or a Metrics array.

If you are creating an alarm based on a math expression, you cannot specify this parameter, or any of the Dimensions, Period, Namespace, Statistic, or ExtendedStatistic parameters. Instead, you specify all this information in the Metrics array.

Definition at line 715 of file PutMetricAlarmRequest.h.

◆ GetMetrics()

const Aws::Vector<MetricDataQuery>& Aws::CloudWatch::Model::PutMetricAlarmRequest::GetMetrics ( ) const
inline

An array of MetricDataQuery structures that enable you to create an alarm based on the result of a metric math expression. For each PutMetricAlarm operation, you must specify either MetricName or a Metrics array.

Each item in the Metrics array either retrieves a metric or performs a math expression.

One item in the Metrics array is the expression that the alarm watches. You designate this expression by setting ReturnValue to true for this object in the array. For more information, see MetricDataQuery.

If you use the Metrics parameter, you cannot include the MetricName, Dimensions, Period, Namespace, Statistic, or ExtendedStatistic parameters of PutMetricAlarm in the same operation. Instead, you retrieve the metrics you are using in your math expression as part of the Metrics array.

Definition at line 1576 of file PutMetricAlarmRequest.h.

◆ GetNamespace()

const Aws::String& Aws::CloudWatch::Model::PutMetricAlarmRequest::GetNamespace ( ) const
inline

The namespace for the metric associated specified in MetricName.

Definition at line 806 of file PutMetricAlarmRequest.h.

◆ GetOKActions()

const Aws::Vector<Aws::String>& Aws::CloudWatch::Model::PutMetricAlarmRequest::GetOKActions ( ) const
inline

The actions to execute when this alarm transitions to an OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 171 of file PutMetricAlarmRequest.h.

◆ GetPeriod()

int Aws::CloudWatch::Model::PutMetricAlarmRequest::GetPeriod ( ) const
inline

The length, in seconds, used each time the metric specified in MetricName is evaluated. Valid values are 10, 30, and any multiple of 60.

Period is required for alarms based on static thresholds. If you are creating an alarm based on a metric math expression, you specify the period for each metric within the objects in the Metrics array.

Be sure to specify 10 or 30 only for metrics that are stored by a PutMetricData call with a StorageResolution of 1. If you specify a period of 10 or 30 for a metric that does not have sub-minute resolution, the alarm still attempts to gather data at the period rate that you specify. In this case, it does not receive data for the attempts that do not correspond to a one-minute data resolution, and the alarm might often lapse into INSUFFICENT_DATA status. Specifying 10 or 30 also sets this alarm as a high-resolution alarm, which has a higher charge than other alarms. For more information about pricing, see Amazon CloudWatch Pricing.

An alarm's total current evaluation period can be no longer than one day, so Period multiplied by EvaluationPeriods cannot be more than 86,400 seconds.

Definition at line 1032 of file PutMetricAlarmRequest.h.

◆ GetServiceRequestName()

virtual const char* Aws::CloudWatch::Model::PutMetricAlarmRequest::GetServiceRequestName ( ) const
inlineoverridevirtual

Implements Aws::AmazonWebServiceRequest.

Definition at line 37 of file PutMetricAlarmRequest.h.

◆ GetStatistic()

const Statistic& Aws::CloudWatch::Model::PutMetricAlarmRequest::GetStatistic ( ) const
inline

The statistic for the metric specified in MetricName, other than percentile. For percentile statistics, use ExtendedStatistic. When you call PutMetricAlarm and specify a MetricName, you must specify either Statistic or ExtendedStatistic, but not both.

Definition at line 858 of file PutMetricAlarmRequest.h.

◆ GetTags()

const Aws::Vector<Tag>& Aws::CloudWatch::Model::PutMetricAlarmRequest::GetTags ( ) const
inline

A list of key-value pairs to associate with the alarm. You can associate as many as 50 tags with an alarm.

Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.

Definition at line 1725 of file PutMetricAlarmRequest.h.

◆ GetThreshold()

double Aws::CloudWatch::Model::PutMetricAlarmRequest::GetThreshold ( ) const
inline

The value against which the specified statistic is compared.

This parameter is required for alarms based on static thresholds, but should not be used for alarms based on anomaly detection models.

Definition at line 1293 of file PutMetricAlarmRequest.h.

◆ GetThresholdMetricId()

const Aws::String& Aws::CloudWatch::Model::PutMetricAlarmRequest::GetThresholdMetricId ( ) const
inline

If this is an alarm based on an anomaly detection model, make this value match the ID of the ANOMALY_DETECTION_BAND function.

For an example of how to use this parameter, see the Anomaly Detection Model Alarm example on this page.

If your alarm uses this parameter, it cannot have Auto Scaling actions.

Definition at line 1791 of file PutMetricAlarmRequest.h.

◆ GetTreatMissingData()

const Aws::String& Aws::CloudWatch::Model::PutMetricAlarmRequest::GetTreatMissingData ( ) const
inline

Sets how this alarm is to handle missing data points. If TreatMissingData is omitted, the default behavior of missing is used. For more information, see Configuring How CloudWatch Alarms Treats Missing Data.

Valid Values: breaching | notBreaching | ignore | missing

Definition at line 1380 of file PutMetricAlarmRequest.h.

◆ GetUnit()

const StandardUnit& Aws::CloudWatch::Model::PutMetricAlarmRequest::GetUnit ( ) const
inline

The unit of measure for the statistic. For example, the units for the Amazon EC2 NetworkIn metric are Bytes because NetworkIn tracks the number of bytes that an instance receives on all network interfaces. You can also specify a unit when you create a custom metric. Units help provide conceptual meaning to your data. Metric data points that specify a unit of measure, such as Percent, are aggregated separately.

If you don't specify Unit, CloudWatch retrieves all unit types that have been published for the metric and attempts to evaluate the alarm. Usually, metrics are published with only one unit, so the alarm works as intended.

However, if the metric is published with multiple types of units and you don't specify a unit, the alarm's behavior is not defined and it behaves predictably.

We recommend omitting Unit so that you don't inadvertently specify an incorrect unit that is not published for this metric. Doing so causes the alarm to be stuck in the INSUFFICIENT DATA state.

Definition at line 1117 of file PutMetricAlarmRequest.h.

◆ InsufficientDataActionsHasBeenSet()

bool Aws::CloudWatch::Model::PutMetricAlarmRequest::InsufficientDataActionsHasBeenSet ( ) const
inline

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

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): >arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 555 of file PutMetricAlarmRequest.h.

◆ MetricNameHasBeenSet()

bool Aws::CloudWatch::Model::PutMetricAlarmRequest::MetricNameHasBeenSet ( ) const
inline

The name for the metric associated with the alarm. For each PutMetricAlarm operation, you must specify either MetricName or a Metrics array.

If you are creating an alarm based on a math expression, you cannot specify this parameter, or any of the Dimensions, Period, Namespace, Statistic, or ExtendedStatistic parameters. Instead, you specify all this information in the Metrics array.

Definition at line 727 of file PutMetricAlarmRequest.h.

◆ MetricsHasBeenSet()

bool Aws::CloudWatch::Model::PutMetricAlarmRequest::MetricsHasBeenSet ( ) const
inline

An array of MetricDataQuery structures that enable you to create an alarm based on the result of a metric math expression. For each PutMetricAlarm operation, you must specify either MetricName or a Metrics array.

Each item in the Metrics array either retrieves a metric or performs a math expression.

One item in the Metrics array is the expression that the alarm watches. You designate this expression by setting ReturnValue to true for this object in the array. For more information, see MetricDataQuery.

If you use the Metrics parameter, you cannot include the MetricName, Dimensions, Period, Namespace, Statistic, or ExtendedStatistic parameters of PutMetricAlarm in the same operation. Instead, you retrieve the metrics you are using in your math expression as part of the Metrics array.

Definition at line 1596 of file PutMetricAlarmRequest.h.

◆ NamespaceHasBeenSet()

bool Aws::CloudWatch::Model::PutMetricAlarmRequest::NamespaceHasBeenSet ( ) const
inline

The namespace for the metric associated specified in MetricName.

Definition at line 812 of file PutMetricAlarmRequest.h.

◆ OKActionsHasBeenSet()

bool Aws::CloudWatch::Model::PutMetricAlarmRequest::OKActionsHasBeenSet ( ) const
inline

The actions to execute when this alarm transitions to an OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 191 of file PutMetricAlarmRequest.h.

◆ PeriodHasBeenSet()

bool Aws::CloudWatch::Model::PutMetricAlarmRequest::PeriodHasBeenSet ( ) const
inline

The length, in seconds, used each time the metric specified in MetricName is evaluated. Valid values are 10, 30, and any multiple of 60.

Period is required for alarms based on static thresholds. If you are creating an alarm based on a metric math expression, you specify the period for each metric within the objects in the Metrics array.

Be sure to specify 10 or 30 only for metrics that are stored by a PutMetricData call with a StorageResolution of 1. If you specify a period of 10 or 30 for a metric that does not have sub-minute resolution, the alarm still attempts to gather data at the period rate that you specify. In this case, it does not receive data for the attempts that do not correspond to a one-minute data resolution, and the alarm might often lapse into INSUFFICENT_DATA status. Specifying 10 or 30 also sets this alarm as a high-resolution alarm, which has a higher charge than other alarms. For more information about pricing, see Amazon CloudWatch Pricing.

An alarm's total current evaluation period can be no longer than one day, so Period multiplied by EvaluationPeriods cannot be more than 86,400 seconds.

Definition at line 1054 of file PutMetricAlarmRequest.h.

◆ SerializePayload()

Aws::String Aws::CloudWatch::Model::PutMetricAlarmRequest::SerializePayload ( ) const
overridevirtual

Convert payload into String.

Implements Aws::AmazonSerializableWebServiceRequest.

◆ SetActionsEnabled()

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetActionsEnabled ( bool  value)
inline

Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.

Definition at line 144 of file PutMetricAlarmRequest.h.

◆ SetAlarmActions() [1/2]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetAlarmActions ( const Aws::Vector< Aws::String > &  value)
inline

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

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 392 of file PutMetricAlarmRequest.h.

◆ SetAlarmActions() [2/2]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetAlarmActions ( Aws::Vector< Aws::String > &&  value)
inline

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

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 412 of file PutMetricAlarmRequest.h.

◆ SetAlarmDescription() [1/3]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetAlarmDescription ( const Aws::String value)
inline

The description for the alarm.

Definition at line 100 of file PutMetricAlarmRequest.h.

◆ SetAlarmDescription() [2/3]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetAlarmDescription ( Aws::String &&  value)
inline

The description for the alarm.

Definition at line 105 of file PutMetricAlarmRequest.h.

◆ SetAlarmDescription() [3/3]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetAlarmDescription ( const char *  value)
inline

The description for the alarm.

Definition at line 110 of file PutMetricAlarmRequest.h.

◆ SetAlarmName() [1/3]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetAlarmName ( const Aws::String value)
inline

The name for the alarm. This name must be unique within the Region.

Definition at line 59 of file PutMetricAlarmRequest.h.

◆ SetAlarmName() [2/3]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetAlarmName ( Aws::String &&  value)
inline

The name for the alarm. This name must be unique within the Region.

Definition at line 64 of file PutMetricAlarmRequest.h.

◆ SetAlarmName() [3/3]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetAlarmName ( const char *  value)
inline

The name for the alarm. This name must be unique within the Region.

Definition at line 69 of file PutMetricAlarmRequest.h.

◆ SetComparisonOperator() [1/2]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetComparisonOperator ( const ComparisonOperator value)
inline

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

The values LessThanLowerOrGreaterThanUpperThreshold, LessThanLowerThreshold, and GreaterThanUpperThreshold are used only for alarms based on anomaly detection models.

Definition at line 1342 of file PutMetricAlarmRequest.h.

◆ SetComparisonOperator() [2/2]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetComparisonOperator ( ComparisonOperator &&  value)
inline

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

The values LessThanLowerOrGreaterThanUpperThreshold, LessThanLowerThreshold, and GreaterThanUpperThreshold are used only for alarms based on anomaly detection models.

Definition at line 1351 of file PutMetricAlarmRequest.h.

◆ SetDatapointsToAlarm()

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetDatapointsToAlarm ( int  value)
inline

The number of data points that must be breaching to trigger the alarm. This is used only if you are setting an "M out of N" alarm. In that case, this value is the M. For more information, see Evaluating an Alarm in the Amazon CloudWatch User Guide.

Definition at line 1276 of file PutMetricAlarmRequest.h.

◆ SetDimensions() [1/2]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetDimensions ( const Aws::Vector< Dimension > &  value)
inline

The dimensions for the metric specified in MetricName.

Definition at line 984 of file PutMetricAlarmRequest.h.

◆ SetDimensions() [2/2]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetDimensions ( Aws::Vector< Dimension > &&  value)
inline

The dimensions for the metric specified in MetricName.

Definition at line 989 of file PutMetricAlarmRequest.h.

◆ SetEvaluateLowSampleCountPercentile() [1/3]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetEvaluateLowSampleCountPercentile ( const Aws::String value)
inline

Used only for alarms based on percentiles. If you specify ignore, the alarm state does not change during periods with too few data points to be statistically significant. If you specify evaluate or omit this parameter, the alarm is always evaluated and possibly changes state no matter how many data points are available. For more information, see Percentile-Based CloudWatch Alarms and Low Data Samples.

Valid Values: evaluate | ignore

Definition at line 1490 of file PutMetricAlarmRequest.h.

◆ SetEvaluateLowSampleCountPercentile() [2/3]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetEvaluateLowSampleCountPercentile ( Aws::String &&  value)
inline

Used only for alarms based on percentiles. If you specify ignore, the alarm state does not change during periods with too few data points to be statistically significant. If you specify evaluate or omit this parameter, the alarm is always evaluated and possibly changes state no matter how many data points are available. For more information, see Percentile-Based CloudWatch Alarms and Low Data Samples.

Valid Values: evaluate | ignore

Definition at line 1503 of file PutMetricAlarmRequest.h.

◆ SetEvaluateLowSampleCountPercentile() [3/3]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetEvaluateLowSampleCountPercentile ( const char *  value)
inline

Used only for alarms based on percentiles. If you specify ignore, the alarm state does not change during periods with too few data points to be statistically significant. If you specify evaluate or omit this parameter, the alarm is always evaluated and possibly changes state no matter how many data points are available. For more information, see Percentile-Based CloudWatch Alarms and Low Data Samples.

Valid Values: evaluate | ignore

Definition at line 1516 of file PutMetricAlarmRequest.h.

◆ SetEvaluationPeriods()

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetEvaluationPeriods ( int  value)
inline

The number of periods over which data is compared to the specified threshold. If you are setting an alarm that requires that a number of consecutive data points be breaching to trigger the alarm, this value specifies that number. If you are setting an "M out of N" alarm, this value is the N.

An alarm's total current evaluation period can be no longer than one day, so this number multiplied by Period cannot be more than 86,400 seconds.

Definition at line 1238 of file PutMetricAlarmRequest.h.

◆ SetExtendedStatistic() [1/3]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetExtendedStatistic ( const Aws::String value)
inline

The percentile statistic for the metric specified in MetricName. Specify a value between p0.0 and p100. When you call PutMetricAlarm and specify a MetricName, you must specify either Statistic or ExtendedStatistic, but not both.

Definition at line 928 of file PutMetricAlarmRequest.h.

◆ SetExtendedStatistic() [2/3]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetExtendedStatistic ( Aws::String &&  value)
inline

The percentile statistic for the metric specified in MetricName. Specify a value between p0.0 and p100. When you call PutMetricAlarm and specify a MetricName, you must specify either Statistic or ExtendedStatistic, but not both.

Definition at line 936 of file PutMetricAlarmRequest.h.

◆ SetExtendedStatistic() [3/3]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetExtendedStatistic ( const char *  value)
inline

The percentile statistic for the metric specified in MetricName. Specify a value between p0.0 and p100. When you call PutMetricAlarm and specify a MetricName, you must specify either Statistic or ExtendedStatistic, but not both.

Definition at line 944 of file PutMetricAlarmRequest.h.

◆ SetInsufficientDataActions() [1/2]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetInsufficientDataActions ( const Aws::Vector< Aws::String > &  value)
inline

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

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): >arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 576 of file PutMetricAlarmRequest.h.

◆ SetInsufficientDataActions() [2/2]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetInsufficientDataActions ( Aws::Vector< Aws::String > &&  value)
inline

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

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): >arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 597 of file PutMetricAlarmRequest.h.

◆ SetMetricName() [1/3]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetMetricName ( const Aws::String value)
inline

The name for the metric associated with the alarm. For each PutMetricAlarm operation, you must specify either MetricName or a Metrics array.

If you are creating an alarm based on a math expression, you cannot specify this parameter, or any of the Dimensions, Period, Namespace, Statistic, or ExtendedStatistic parameters. Instead, you specify all this information in the Metrics array.

Definition at line 739 of file PutMetricAlarmRequest.h.

◆ SetMetricName() [2/3]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetMetricName ( Aws::String &&  value)
inline

The name for the metric associated with the alarm. For each PutMetricAlarm operation, you must specify either MetricName or a Metrics array.

If you are creating an alarm based on a math expression, you cannot specify this parameter, or any of the Dimensions, Period, Namespace, Statistic, or ExtendedStatistic parameters. Instead, you specify all this information in the Metrics array.

Definition at line 751 of file PutMetricAlarmRequest.h.

◆ SetMetricName() [3/3]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetMetricName ( const char *  value)
inline

The name for the metric associated with the alarm. For each PutMetricAlarm operation, you must specify either MetricName or a Metrics array.

If you are creating an alarm based on a math expression, you cannot specify this parameter, or any of the Dimensions, Period, Namespace, Statistic, or ExtendedStatistic parameters. Instead, you specify all this information in the Metrics array.

Definition at line 763 of file PutMetricAlarmRequest.h.

◆ SetMetrics() [1/2]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetMetrics ( const Aws::Vector< MetricDataQuery > &  value)
inline

An array of MetricDataQuery structures that enable you to create an alarm based on the result of a metric math expression. For each PutMetricAlarm operation, you must specify either MetricName or a Metrics array.

Each item in the Metrics array either retrieves a metric or performs a math expression.

One item in the Metrics array is the expression that the alarm watches. You designate this expression by setting ReturnValue to true for this object in the array. For more information, see MetricDataQuery.

If you use the Metrics parameter, you cannot include the MetricName, Dimensions, Period, Namespace, Statistic, or ExtendedStatistic parameters of PutMetricAlarm in the same operation. Instead, you retrieve the metrics you are using in your math expression as part of the Metrics array.

Definition at line 1616 of file PutMetricAlarmRequest.h.

◆ SetMetrics() [2/2]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetMetrics ( Aws::Vector< MetricDataQuery > &&  value)
inline

An array of MetricDataQuery structures that enable you to create an alarm based on the result of a metric math expression. For each PutMetricAlarm operation, you must specify either MetricName or a Metrics array.

Each item in the Metrics array either retrieves a metric or performs a math expression.

One item in the Metrics array is the expression that the alarm watches. You designate this expression by setting ReturnValue to true for this object in the array. For more information, see MetricDataQuery.

If you use the Metrics parameter, you cannot include the MetricName, Dimensions, Period, Namespace, Statistic, or ExtendedStatistic parameters of PutMetricAlarm in the same operation. Instead, you retrieve the metrics you are using in your math expression as part of the Metrics array.

Definition at line 1636 of file PutMetricAlarmRequest.h.

◆ SetNamespace() [1/3]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetNamespace ( const Aws::String value)
inline

The namespace for the metric associated specified in MetricName.

Definition at line 818 of file PutMetricAlarmRequest.h.

◆ SetNamespace() [2/3]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetNamespace ( Aws::String &&  value)
inline

The namespace for the metric associated specified in MetricName.

Definition at line 824 of file PutMetricAlarmRequest.h.

◆ SetNamespace() [3/3]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetNamespace ( const char *  value)
inline

The namespace for the metric associated specified in MetricName.

Definition at line 830 of file PutMetricAlarmRequest.h.

◆ SetOKActions() [1/2]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetOKActions ( const Aws::Vector< Aws::String > &  value)
inline

The actions to execute when this alarm transitions to an OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 211 of file PutMetricAlarmRequest.h.

◆ SetOKActions() [2/2]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetOKActions ( Aws::Vector< Aws::String > &&  value)
inline

The actions to execute when this alarm transitions to an OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 231 of file PutMetricAlarmRequest.h.

◆ SetPeriod()

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetPeriod ( int  value)
inline

The length, in seconds, used each time the metric specified in MetricName is evaluated. Valid values are 10, 30, and any multiple of 60.

Period is required for alarms based on static thresholds. If you are creating an alarm based on a metric math expression, you specify the period for each metric within the objects in the Metrics array.

Be sure to specify 10 or 30 only for metrics that are stored by a PutMetricData call with a StorageResolution of 1. If you specify a period of 10 or 30 for a metric that does not have sub-minute resolution, the alarm still attempts to gather data at the period rate that you specify. In this case, it does not receive data for the attempts that do not correspond to a one-minute data resolution, and the alarm might often lapse into INSUFFICENT_DATA status. Specifying 10 or 30 also sets this alarm as a high-resolution alarm, which has a higher charge than other alarms. For more information about pricing, see Amazon CloudWatch Pricing.

An alarm's total current evaluation period can be no longer than one day, so Period multiplied by EvaluationPeriods cannot be more than 86,400 seconds.

Definition at line 1076 of file PutMetricAlarmRequest.h.

◆ SetStatistic() [1/2]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetStatistic ( const Statistic value)
inline

The statistic for the metric specified in MetricName, other than percentile. For percentile statistics, use ExtendedStatistic. When you call PutMetricAlarm and specify a MetricName, you must specify either Statistic or ExtendedStatistic, but not both.

Definition at line 876 of file PutMetricAlarmRequest.h.

◆ SetStatistic() [2/2]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetStatistic ( Statistic &&  value)
inline

The statistic for the metric specified in MetricName, other than percentile. For percentile statistics, use ExtendedStatistic. When you call PutMetricAlarm and specify a MetricName, you must specify either Statistic or ExtendedStatistic, but not both.

Definition at line 885 of file PutMetricAlarmRequest.h.

◆ SetTags() [1/2]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetTags ( const Aws::Vector< Tag > &  value)
inline

A list of key-value pairs to associate with the alarm. You can associate as many as 50 tags with an alarm.

Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.

Definition at line 1741 of file PutMetricAlarmRequest.h.

◆ SetTags() [2/2]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetTags ( Aws::Vector< Tag > &&  value)
inline

A list of key-value pairs to associate with the alarm. You can associate as many as 50 tags with an alarm.

Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.

Definition at line 1749 of file PutMetricAlarmRequest.h.

◆ SetThreshold()

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetThreshold ( double  value)
inline

The value against which the specified statistic is compared.

This parameter is required for alarms based on static thresholds, but should not be used for alarms based on anomaly detection models.

Definition at line 1307 of file PutMetricAlarmRequest.h.

◆ SetThresholdMetricId() [1/3]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetThresholdMetricId ( const Aws::String value)
inline

If this is an alarm based on an anomaly detection model, make this value match the ID of the ANOMALY_DETECTION_BAND function.

For an example of how to use this parameter, see the Anomaly Detection Model Alarm example on this page.

If your alarm uses this parameter, it cannot have Auto Scaling actions.

Definition at line 1809 of file PutMetricAlarmRequest.h.

◆ SetThresholdMetricId() [2/3]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetThresholdMetricId ( Aws::String &&  value)
inline

If this is an alarm based on an anomaly detection model, make this value match the ID of the ANOMALY_DETECTION_BAND function.

For an example of how to use this parameter, see the Anomaly Detection Model Alarm example on this page.

If your alarm uses this parameter, it cannot have Auto Scaling actions.

Definition at line 1818 of file PutMetricAlarmRequest.h.

◆ SetThresholdMetricId() [3/3]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetThresholdMetricId ( const char *  value)
inline

If this is an alarm based on an anomaly detection model, make this value match the ID of the ANOMALY_DETECTION_BAND function.

For an example of how to use this parameter, see the Anomaly Detection Model Alarm example on this page.

If your alarm uses this parameter, it cannot have Auto Scaling actions.

Definition at line 1827 of file PutMetricAlarmRequest.h.

◆ SetTreatMissingData() [1/3]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetTreatMissingData ( const Aws::String value)
inline

Sets how this alarm is to handle missing data points. If TreatMissingData is omitted, the default behavior of missing is used. For more information, see Configuring How CloudWatch Alarms Treats Missing Data.

Valid Values: breaching | notBreaching | ignore | missing

Definition at line 1400 of file PutMetricAlarmRequest.h.

◆ SetTreatMissingData() [2/3]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetTreatMissingData ( Aws::String &&  value)
inline

Sets how this alarm is to handle missing data points. If TreatMissingData is omitted, the default behavior of missing is used. For more information, see Configuring How CloudWatch Alarms Treats Missing Data.

Valid Values: breaching | notBreaching | ignore | missing

Definition at line 1410 of file PutMetricAlarmRequest.h.

◆ SetTreatMissingData() [3/3]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetTreatMissingData ( const char *  value)
inline

Sets how this alarm is to handle missing data points. If TreatMissingData is omitted, the default behavior of missing is used. For more information, see Configuring How CloudWatch Alarms Treats Missing Data.

Valid Values: breaching | notBreaching | ignore | missing

Definition at line 1420 of file PutMetricAlarmRequest.h.

◆ SetUnit() [1/2]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetUnit ( const StandardUnit value)
inline

The unit of measure for the statistic. For example, the units for the Amazon EC2 NetworkIn metric are Bytes because NetworkIn tracks the number of bytes that an instance receives on all network interfaces. You can also specify a unit when you create a custom metric. Units help provide conceptual meaning to your data. Metric data points that specify a unit of measure, such as Percent, are aggregated separately.

If you don't specify Unit, CloudWatch retrieves all unit types that have been published for the metric and attempts to evaluate the alarm. Usually, metrics are published with only one unit, so the alarm works as intended.

However, if the metric is published with multiple types of units and you don't specify a unit, the alarm's behavior is not defined and it behaves predictably.

We recommend omitting Unit so that you don't inadvertently specify an incorrect unit that is not published for this metric. Doing so causes the alarm to be stuck in the INSUFFICIENT DATA state.

Definition at line 1153 of file PutMetricAlarmRequest.h.

◆ SetUnit() [2/2]

void Aws::CloudWatch::Model::PutMetricAlarmRequest::SetUnit ( StandardUnit &&  value)
inline

The unit of measure for the statistic. For example, the units for the Amazon EC2 NetworkIn metric are Bytes because NetworkIn tracks the number of bytes that an instance receives on all network interfaces. You can also specify a unit when you create a custom metric. Units help provide conceptual meaning to your data. Metric data points that specify a unit of measure, such as Percent, are aggregated separately.

If you don't specify Unit, CloudWatch retrieves all unit types that have been published for the metric and attempts to evaluate the alarm. Usually, metrics are published with only one unit, so the alarm works as intended.

However, if the metric is published with multiple types of units and you don't specify a unit, the alarm's behavior is not defined and it behaves predictably.

We recommend omitting Unit so that you don't inadvertently specify an incorrect unit that is not published for this metric. Doing so causes the alarm to be stuck in the INSUFFICIENT DATA state.

Definition at line 1171 of file PutMetricAlarmRequest.h.

◆ StatisticHasBeenSet()

bool Aws::CloudWatch::Model::PutMetricAlarmRequest::StatisticHasBeenSet ( ) const
inline

The statistic for the metric specified in MetricName, other than percentile. For percentile statistics, use ExtendedStatistic. When you call PutMetricAlarm and specify a MetricName, you must specify either Statistic or ExtendedStatistic, but not both.

Definition at line 867 of file PutMetricAlarmRequest.h.

◆ TagsHasBeenSet()

bool Aws::CloudWatch::Model::PutMetricAlarmRequest::TagsHasBeenSet ( ) const
inline

A list of key-value pairs to associate with the alarm. You can associate as many as 50 tags with an alarm.

Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.

Definition at line 1733 of file PutMetricAlarmRequest.h.

◆ ThresholdHasBeenSet()

bool Aws::CloudWatch::Model::PutMetricAlarmRequest::ThresholdHasBeenSet ( ) const
inline

The value against which the specified statistic is compared.

This parameter is required for alarms based on static thresholds, but should not be used for alarms based on anomaly detection models.

Definition at line 1300 of file PutMetricAlarmRequest.h.

◆ ThresholdMetricIdHasBeenSet()

bool Aws::CloudWatch::Model::PutMetricAlarmRequest::ThresholdMetricIdHasBeenSet ( ) const
inline

If this is an alarm based on an anomaly detection model, make this value match the ID of the ANOMALY_DETECTION_BAND function.

For an example of how to use this parameter, see the Anomaly Detection Model Alarm example on this page.

If your alarm uses this parameter, it cannot have Auto Scaling actions.

Definition at line 1800 of file PutMetricAlarmRequest.h.

◆ TreatMissingDataHasBeenSet()

bool Aws::CloudWatch::Model::PutMetricAlarmRequest::TreatMissingDataHasBeenSet ( ) const
inline

Sets how this alarm is to handle missing data points. If TreatMissingData is omitted, the default behavior of missing is used. For more information, see Configuring How CloudWatch Alarms Treats Missing Data.

Valid Values: breaching | notBreaching | ignore | missing

Definition at line 1390 of file PutMetricAlarmRequest.h.

◆ UnitHasBeenSet()

bool Aws::CloudWatch::Model::PutMetricAlarmRequest::UnitHasBeenSet ( ) const
inline

The unit of measure for the statistic. For example, the units for the Amazon EC2 NetworkIn metric are Bytes because NetworkIn tracks the number of bytes that an instance receives on all network interfaces. You can also specify a unit when you create a custom metric. Units help provide conceptual meaning to your data. Metric data points that specify a unit of measure, such as Percent, are aggregated separately.

If you don't specify Unit, CloudWatch retrieves all unit types that have been published for the metric and attempts to evaluate the alarm. Usually, metrics are published with only one unit, so the alarm works as intended.

However, if the metric is published with multiple types of units and you don't specify a unit, the alarm's behavior is not defined and it behaves predictably.

We recommend omitting Unit so that you don't inadvertently specify an incorrect unit that is not published for this metric. Doing so causes the alarm to be stuck in the INSUFFICIENT DATA state.

Definition at line 1135 of file PutMetricAlarmRequest.h.

◆ WithActionsEnabled()

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithActionsEnabled ( bool  value)
inline

Indicates whether actions should be executed during any changes to the alarm state. The default is TRUE.

Definition at line 150 of file PutMetricAlarmRequest.h.

◆ WithAlarmActions() [1/2]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithAlarmActions ( const Aws::Vector< Aws::String > &  value)
inline

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

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 432 of file PutMetricAlarmRequest.h.

◆ WithAlarmActions() [2/2]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithAlarmActions ( Aws::Vector< Aws::String > &&  value)
inline

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

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 452 of file PutMetricAlarmRequest.h.

◆ WithAlarmDescription() [1/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithAlarmDescription ( const Aws::String value)
inline

The description for the alarm.

Definition at line 115 of file PutMetricAlarmRequest.h.

◆ WithAlarmDescription() [2/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithAlarmDescription ( Aws::String &&  value)
inline

The description for the alarm.

Definition at line 120 of file PutMetricAlarmRequest.h.

◆ WithAlarmDescription() [3/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithAlarmDescription ( const char *  value)
inline

The description for the alarm.

Definition at line 125 of file PutMetricAlarmRequest.h.

◆ WithAlarmName() [1/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithAlarmName ( const Aws::String value)
inline

The name for the alarm. This name must be unique within the Region.

Definition at line 74 of file PutMetricAlarmRequest.h.

◆ WithAlarmName() [2/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithAlarmName ( Aws::String &&  value)
inline

The name for the alarm. This name must be unique within the Region.

Definition at line 79 of file PutMetricAlarmRequest.h.

◆ WithAlarmName() [3/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithAlarmName ( const char *  value)
inline

The name for the alarm. This name must be unique within the Region.

Definition at line 84 of file PutMetricAlarmRequest.h.

◆ WithComparisonOperator() [1/2]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithComparisonOperator ( const ComparisonOperator value)
inline

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

The values LessThanLowerOrGreaterThanUpperThreshold, LessThanLowerThreshold, and GreaterThanUpperThreshold are used only for alarms based on anomaly detection models.

Definition at line 1360 of file PutMetricAlarmRequest.h.

◆ WithComparisonOperator() [2/2]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithComparisonOperator ( ComparisonOperator &&  value)
inline

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

The values LessThanLowerOrGreaterThanUpperThreshold, LessThanLowerThreshold, and GreaterThanUpperThreshold are used only for alarms based on anomaly detection models.

Definition at line 1369 of file PutMetricAlarmRequest.h.

◆ WithDatapointsToAlarm()

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithDatapointsToAlarm ( int  value)
inline

The number of data points that must be breaching to trigger the alarm. This is used only if you are setting an "M out of N" alarm. In that case, this value is the M. For more information, see Evaluating an Alarm in the Amazon CloudWatch User Guide.

Definition at line 1285 of file PutMetricAlarmRequest.h.

◆ WithDimensions() [1/2]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithDimensions ( const Aws::Vector< Dimension > &  value)
inline

The dimensions for the metric specified in MetricName.

Definition at line 994 of file PutMetricAlarmRequest.h.

◆ WithDimensions() [2/2]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithDimensions ( Aws::Vector< Dimension > &&  value)
inline

The dimensions for the metric specified in MetricName.

Definition at line 999 of file PutMetricAlarmRequest.h.

◆ WithEvaluateLowSampleCountPercentile() [1/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithEvaluateLowSampleCountPercentile ( const Aws::String value)
inline

Used only for alarms based on percentiles. If you specify ignore, the alarm state does not change during periods with too few data points to be statistically significant. If you specify evaluate or omit this parameter, the alarm is always evaluated and possibly changes state no matter how many data points are available. For more information, see Percentile-Based CloudWatch Alarms and Low Data Samples.

Valid Values: evaluate | ignore

Definition at line 1529 of file PutMetricAlarmRequest.h.

◆ WithEvaluateLowSampleCountPercentile() [2/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithEvaluateLowSampleCountPercentile ( Aws::String &&  value)
inline

Used only for alarms based on percentiles. If you specify ignore, the alarm state does not change during periods with too few data points to be statistically significant. If you specify evaluate or omit this parameter, the alarm is always evaluated and possibly changes state no matter how many data points are available. For more information, see Percentile-Based CloudWatch Alarms and Low Data Samples.

Valid Values: evaluate | ignore

Definition at line 1542 of file PutMetricAlarmRequest.h.

◆ WithEvaluateLowSampleCountPercentile() [3/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithEvaluateLowSampleCountPercentile ( const char *  value)
inline

Used only for alarms based on percentiles. If you specify ignore, the alarm state does not change during periods with too few data points to be statistically significant. If you specify evaluate or omit this parameter, the alarm is always evaluated and possibly changes state no matter how many data points are available. For more information, see Percentile-Based CloudWatch Alarms and Low Data Samples.

Valid Values: evaluate | ignore

Definition at line 1555 of file PutMetricAlarmRequest.h.

◆ WithEvaluationPeriods()

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithEvaluationPeriods ( int  value)
inline

The number of periods over which data is compared to the specified threshold. If you are setting an alarm that requires that a number of consecutive data points be breaching to trigger the alarm, this value specifies that number. If you are setting an "M out of N" alarm, this value is the N.

An alarm's total current evaluation period can be no longer than one day, so this number multiplied by Period cannot be more than 86,400 seconds.

Definition at line 1248 of file PutMetricAlarmRequest.h.

◆ WithExtendedStatistic() [1/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithExtendedStatistic ( const Aws::String value)
inline

The percentile statistic for the metric specified in MetricName. Specify a value between p0.0 and p100. When you call PutMetricAlarm and specify a MetricName, you must specify either Statistic or ExtendedStatistic, but not both.

Definition at line 952 of file PutMetricAlarmRequest.h.

◆ WithExtendedStatistic() [2/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithExtendedStatistic ( Aws::String &&  value)
inline

The percentile statistic for the metric specified in MetricName. Specify a value between p0.0 and p100. When you call PutMetricAlarm and specify a MetricName, you must specify either Statistic or ExtendedStatistic, but not both.

Definition at line 960 of file PutMetricAlarmRequest.h.

◆ WithExtendedStatistic() [3/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithExtendedStatistic ( const char *  value)
inline

The percentile statistic for the metric specified in MetricName. Specify a value between p0.0 and p100. When you call PutMetricAlarm and specify a MetricName, you must specify either Statistic or ExtendedStatistic, but not both.

Definition at line 968 of file PutMetricAlarmRequest.h.

◆ WithInsufficientDataActions() [1/2]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithInsufficientDataActions ( const Aws::Vector< Aws::String > &  value)
inline

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

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): >arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 618 of file PutMetricAlarmRequest.h.

◆ WithInsufficientDataActions() [2/2]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithInsufficientDataActions ( Aws::Vector< Aws::String > &&  value)
inline

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

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): >arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 639 of file PutMetricAlarmRequest.h.

◆ WithMetricName() [1/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithMetricName ( const Aws::String value)
inline

The name for the metric associated with the alarm. For each PutMetricAlarm operation, you must specify either MetricName or a Metrics array.

If you are creating an alarm based on a math expression, you cannot specify this parameter, or any of the Dimensions, Period, Namespace, Statistic, or ExtendedStatistic parameters. Instead, you specify all this information in the Metrics array.

Definition at line 775 of file PutMetricAlarmRequest.h.

◆ WithMetricName() [2/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithMetricName ( Aws::String &&  value)
inline

The name for the metric associated with the alarm. For each PutMetricAlarm operation, you must specify either MetricName or a Metrics array.

If you are creating an alarm based on a math expression, you cannot specify this parameter, or any of the Dimensions, Period, Namespace, Statistic, or ExtendedStatistic parameters. Instead, you specify all this information in the Metrics array.

Definition at line 787 of file PutMetricAlarmRequest.h.

◆ WithMetricName() [3/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithMetricName ( const char *  value)
inline

The name for the metric associated with the alarm. For each PutMetricAlarm operation, you must specify either MetricName or a Metrics array.

If you are creating an alarm based on a math expression, you cannot specify this parameter, or any of the Dimensions, Period, Namespace, Statistic, or ExtendedStatistic parameters. Instead, you specify all this information in the Metrics array.

Definition at line 799 of file PutMetricAlarmRequest.h.

◆ WithMetrics() [1/2]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithMetrics ( const Aws::Vector< MetricDataQuery > &  value)
inline

An array of MetricDataQuery structures that enable you to create an alarm based on the result of a metric math expression. For each PutMetricAlarm operation, you must specify either MetricName or a Metrics array.

Each item in the Metrics array either retrieves a metric or performs a math expression.

One item in the Metrics array is the expression that the alarm watches. You designate this expression by setting ReturnValue to true for this object in the array. For more information, see MetricDataQuery.

If you use the Metrics parameter, you cannot include the MetricName, Dimensions, Period, Namespace, Statistic, or ExtendedStatistic parameters of PutMetricAlarm in the same operation. Instead, you retrieve the metrics you are using in your math expression as part of the Metrics array.

Definition at line 1656 of file PutMetricAlarmRequest.h.

◆ WithMetrics() [2/2]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithMetrics ( Aws::Vector< MetricDataQuery > &&  value)
inline

An array of MetricDataQuery structures that enable you to create an alarm based on the result of a metric math expression. For each PutMetricAlarm operation, you must specify either MetricName or a Metrics array.

Each item in the Metrics array either retrieves a metric or performs a math expression.

One item in the Metrics array is the expression that the alarm watches. You designate this expression by setting ReturnValue to true for this object in the array. For more information, see MetricDataQuery.

If you use the Metrics parameter, you cannot include the MetricName, Dimensions, Period, Namespace, Statistic, or ExtendedStatistic parameters of PutMetricAlarm in the same operation. Instead, you retrieve the metrics you are using in your math expression as part of the Metrics array.

Definition at line 1676 of file PutMetricAlarmRequest.h.

◆ WithNamespace() [1/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithNamespace ( const Aws::String value)
inline

The namespace for the metric associated specified in MetricName.

Definition at line 836 of file PutMetricAlarmRequest.h.

◆ WithNamespace() [2/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithNamespace ( Aws::String &&  value)
inline

The namespace for the metric associated specified in MetricName.

Definition at line 842 of file PutMetricAlarmRequest.h.

◆ WithNamespace() [3/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithNamespace ( const char *  value)
inline

The namespace for the metric associated specified in MetricName.

Definition at line 848 of file PutMetricAlarmRequest.h.

◆ WithOKActions() [1/2]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithOKActions ( const Aws::Vector< Aws::String > &  value)
inline

The actions to execute when this alarm transitions to an OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 251 of file PutMetricAlarmRequest.h.

◆ WithOKActions() [2/2]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithOKActions ( Aws::Vector< Aws::String > &&  value)
inline

The actions to execute when this alarm transitions to an OK state from any other state. Each action is specified as an Amazon Resource Name (ARN).

Valid Values: arn:aws:automate:region:ec2:stop | arn:aws:automate:region:ec2:terminate | arn:aws:automate:region:ec2:recover | arn:aws:automate:region:ec2:reboot | arn:aws:sns:region:account-id:sns-topic-name | arn:aws:autoscaling:region:account-id:scalingPolicy:policy-id:autoScalingGroupName/group-friendly-name:policyName/policy-friendly-name

Valid Values (for use with IAM roles): arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Stop/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Terminate/1.0 | arn:aws:swf:region:account-id:action/actions/AWS_EC2.InstanceId.Reboot/1.0

Definition at line 271 of file PutMetricAlarmRequest.h.

◆ WithPeriod()

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithPeriod ( int  value)
inline

The length, in seconds, used each time the metric specified in MetricName is evaluated. Valid values are 10, 30, and any multiple of 60.

Period is required for alarms based on static thresholds. If you are creating an alarm based on a metric math expression, you specify the period for each metric within the objects in the Metrics array.

Be sure to specify 10 or 30 only for metrics that are stored by a PutMetricData call with a StorageResolution of 1. If you specify a period of 10 or 30 for a metric that does not have sub-minute resolution, the alarm still attempts to gather data at the period rate that you specify. In this case, it does not receive data for the attempts that do not correspond to a one-minute data resolution, and the alarm might often lapse into INSUFFICENT_DATA status. Specifying 10 or 30 also sets this alarm as a high-resolution alarm, which has a higher charge than other alarms. For more information about pricing, see Amazon CloudWatch Pricing.

An alarm's total current evaluation period can be no longer than one day, so Period multiplied by EvaluationPeriods cannot be more than 86,400 seconds.

Definition at line 1098 of file PutMetricAlarmRequest.h.

◆ WithStatistic() [1/2]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithStatistic ( const Statistic value)
inline

The statistic for the metric specified in MetricName, other than percentile. For percentile statistics, use ExtendedStatistic. When you call PutMetricAlarm and specify a MetricName, you must specify either Statistic or ExtendedStatistic, but not both.

Definition at line 894 of file PutMetricAlarmRequest.h.

◆ WithStatistic() [2/2]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithStatistic ( Statistic &&  value)
inline

The statistic for the metric specified in MetricName, other than percentile. For percentile statistics, use ExtendedStatistic. When you call PutMetricAlarm and specify a MetricName, you must specify either Statistic or ExtendedStatistic, but not both.

Definition at line 903 of file PutMetricAlarmRequest.h.

◆ WithTags() [1/2]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithTags ( const Aws::Vector< Tag > &  value)
inline

A list of key-value pairs to associate with the alarm. You can associate as many as 50 tags with an alarm.

Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.

Definition at line 1757 of file PutMetricAlarmRequest.h.

◆ WithTags() [2/2]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithTags ( Aws::Vector< Tag > &&  value)
inline

A list of key-value pairs to associate with the alarm. You can associate as many as 50 tags with an alarm.

Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.

Definition at line 1765 of file PutMetricAlarmRequest.h.

◆ WithThreshold()

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithThreshold ( double  value)
inline

The value against which the specified statistic is compared.

This parameter is required for alarms based on static thresholds, but should not be used for alarms based on anomaly detection models.

Definition at line 1314 of file PutMetricAlarmRequest.h.

◆ WithThresholdMetricId() [1/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithThresholdMetricId ( const Aws::String value)
inline

If this is an alarm based on an anomaly detection model, make this value match the ID of the ANOMALY_DETECTION_BAND function.

For an example of how to use this parameter, see the Anomaly Detection Model Alarm example on this page.

If your alarm uses this parameter, it cannot have Auto Scaling actions.

Definition at line 1836 of file PutMetricAlarmRequest.h.

◆ WithThresholdMetricId() [2/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithThresholdMetricId ( Aws::String &&  value)
inline

If this is an alarm based on an anomaly detection model, make this value match the ID of the ANOMALY_DETECTION_BAND function.

For an example of how to use this parameter, see the Anomaly Detection Model Alarm example on this page.

If your alarm uses this parameter, it cannot have Auto Scaling actions.

Definition at line 1845 of file PutMetricAlarmRequest.h.

◆ WithThresholdMetricId() [3/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithThresholdMetricId ( const char *  value)
inline

If this is an alarm based on an anomaly detection model, make this value match the ID of the ANOMALY_DETECTION_BAND function.

For an example of how to use this parameter, see the Anomaly Detection Model Alarm example on this page.

If your alarm uses this parameter, it cannot have Auto Scaling actions.

Definition at line 1854 of file PutMetricAlarmRequest.h.

◆ WithTreatMissingData() [1/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithTreatMissingData ( const Aws::String value)
inline

Sets how this alarm is to handle missing data points. If TreatMissingData is omitted, the default behavior of missing is used. For more information, see Configuring How CloudWatch Alarms Treats Missing Data.

Valid Values: breaching | notBreaching | ignore | missing

Definition at line 1430 of file PutMetricAlarmRequest.h.

◆ WithTreatMissingData() [2/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithTreatMissingData ( Aws::String &&  value)
inline

Sets how this alarm is to handle missing data points. If TreatMissingData is omitted, the default behavior of missing is used. For more information, see Configuring How CloudWatch Alarms Treats Missing Data.

Valid Values: breaching | notBreaching | ignore | missing

Definition at line 1440 of file PutMetricAlarmRequest.h.

◆ WithTreatMissingData() [3/3]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithTreatMissingData ( const char *  value)
inline

Sets how this alarm is to handle missing data points. If TreatMissingData is omitted, the default behavior of missing is used. For more information, see Configuring How CloudWatch Alarms Treats Missing Data.

Valid Values: breaching | notBreaching | ignore | missing

Definition at line 1450 of file PutMetricAlarmRequest.h.

◆ WithUnit() [1/2]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithUnit ( const StandardUnit value)
inline

The unit of measure for the statistic. For example, the units for the Amazon EC2 NetworkIn metric are Bytes because NetworkIn tracks the number of bytes that an instance receives on all network interfaces. You can also specify a unit when you create a custom metric. Units help provide conceptual meaning to your data. Metric data points that specify a unit of measure, such as Percent, are aggregated separately.

If you don't specify Unit, CloudWatch retrieves all unit types that have been published for the metric and attempts to evaluate the alarm. Usually, metrics are published with only one unit, so the alarm works as intended.

However, if the metric is published with multiple types of units and you don't specify a unit, the alarm's behavior is not defined and it behaves predictably.

We recommend omitting Unit so that you don't inadvertently specify an incorrect unit that is not published for this metric. Doing so causes the alarm to be stuck in the INSUFFICIENT DATA state.

Definition at line 1189 of file PutMetricAlarmRequest.h.

◆ WithUnit() [2/2]

PutMetricAlarmRequest& Aws::CloudWatch::Model::PutMetricAlarmRequest::WithUnit ( StandardUnit &&  value)
inline

The unit of measure for the statistic. For example, the units for the Amazon EC2 NetworkIn metric are Bytes because NetworkIn tracks the number of bytes that an instance receives on all network interfaces. You can also specify a unit when you create a custom metric. Units help provide conceptual meaning to your data. Metric data points that specify a unit of measure, such as Percent, are aggregated separately.

If you don't specify Unit, CloudWatch retrieves all unit types that have been published for the metric and attempts to evaluate the alarm. Usually, metrics are published with only one unit, so the alarm works as intended.

However, if the metric is published with multiple types of units and you don't specify a unit, the alarm's behavior is not defined and it behaves predictably.

We recommend omitting Unit so that you don't inadvertently specify an incorrect unit that is not published for this metric. Doing so causes the alarm to be stuck in the INSUFFICIENT DATA state.

Definition at line 1207 of file PutMetricAlarmRequest.h.


The documentation for this class was generated from the following file: