Container for the parameters to the PutMetricAlarm operation.

Creates or updates an alarm and associates it with the specified Amazon CloudWatch metric. Optionally, this operation can associate one or more Amazon Simple Notification Service resources with the alarm.

When this operation creates an alarm, the alarm state is immediately set to INSUFFICIENT_DATA . The alarm is evaluated and its StateValue is set appropriately. Any actions associated with the StateValue is then executed.

NOTE: When updating an existing alarm, its StateValue is left unchanged.

Namespace: Amazon.CloudWatch.Model
Assembly: AWSSDK (in AWSSDK.dll) Version: 1.4.10.0 (1.4.10.0)

Syntax

         
 C#  Visual Basic  Visual C++ 
public class PutMetricAlarmRequest : AmazonWebServiceRequest
Public Class PutMetricAlarmRequest _
	Inherits AmazonWebServiceRequest
public ref class PutMetricAlarmRequest : public AmazonWebServiceRequest

Members

            
 All Members  Constructors   Properties   Methods  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
PutMetricAlarmRequest()()()()
Initializes a new instance of the PutMetricAlarmRequest class
ActionsEnabled
Indicates whether or not actions should be executed during any changes to the alarm's state.
AlarmActions
The list of actions to execute when this alarm transitions into an ALARM state from any other state. Each action is specified as an Amazon Resource Number (ARN). Currently the only action supported is publishing to an Amazon SNS topic or an Amazon Auto Scaling policy.

Constraints:

Length
0 - 5

AlarmDescription
The description for the alarm.

Constraints:

Length
0 - 255

AlarmName
The descriptive name for the alarm. This name must be unique within the user's AWS account

Constraints:

Length
1 - 255

ComparisonOperator
The arithmetic operation to use when comparing the specified Statistic and Threshold. The specified Statistic value is used as the first operand.

Constraints:

Allowed Values
GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold

Dimensions
The dimensions for the alarm's associated metric.

Constraints:

Length
0 - 10

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
EvaluationPeriods
The number of periods over which data is compared to the specified threshold.

Constraints:

Range
1 -

GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
InsufficientDataActions
The list of actions to execute when this alarm transitions into an INSUFFICIENT_DATA state from any other state. Each action is specified as an Amazon Resource Number (ARN). Currently the only action supported is publishing to an Amazon SNS topic or an Amazon Auto Scaling policy.

Constraints:

Length
0 - 5

MetricName
The name for the alarm's associated metric.

Constraints:

Length
1 - 255

Namespace
The namespace for the alarm's associated metric.

Constraints:

Length
1 - 255
Pattern
[^:].*

OKActions
The list of actions to execute when this alarm transitions into an OK state from any other state. Each action is specified as an Amazon Resource Number (ARN). Currently the only action supported is publishing to an Amazon SNS topic or an Amazon Auto Scaling policy.

Constraints:

Length
0 - 5

Period
The period in seconds over which the specified statistic is applied.

Constraints:

Range
60 -

Statistic
The statistic to apply to the alarm's associated metric.

Constraints:

Allowed Values
SampleCount, Average, Sum, Minimum, Maximum

Threshold
The value against which the specified statistic is compared.
ToString()()()()
Returns a String that represents the current Object.
(Inherited from Object.)
Unit
The unit for the alarm's associated metric.

Constraints:

Allowed Values
Seconds, Microseconds, Milliseconds, Bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Bits, Kilobits, Megabits, Gigabits, Terabits, Percent, Count, Bytes/Second, Kilobytes/Second, Megabytes/Second, Gigabytes/Second, Terabytes/Second, Bits/Second, Kilobits/Second, Megabits/Second, Gigabits/Second, Terabits/Second, Count/Second, None

WithActionsEnabled(Boolean)
Sets the ActionsEnabled property
WithAlarmActions(IEnumerable<(Of <<'(String>)>>))
Adds elements to the AlarmActions collection
WithAlarmActions(array<String>[]()[][])
Adds elements to the AlarmActions collection
WithAlarmDescription(String)
Sets the AlarmDescription property
WithAlarmName(String)
Sets the AlarmName property
WithComparisonOperator(String)
Sets the ComparisonOperator property
WithDimensions(array<Dimension>[]()[][])
Adds elements to the Dimensions collection
WithDimensions(IEnumerable<(Of <<'(Dimension>)>>))
Adds elements to the Dimensions collection
WithEvaluationPeriods(Int32)
Sets the EvaluationPeriods property
WithInsufficientDataActions(IEnumerable<(Of <<'(String>)>>))
Adds elements to the InsufficientDataActions collection
WithInsufficientDataActions(array<String>[]()[][])
Adds elements to the InsufficientDataActions collection
WithMetricName(String)
Sets the MetricName property
WithNamespace(String)
Sets the Namespace property
WithOKActions(IEnumerable<(Of <<'(String>)>>))
Adds elements to the OKActions collection
WithOKActions(array<String>[]()[][])
Adds elements to the OKActions collection
WithPeriod(Int32)
Sets the Period property
WithStatistic(String)
Sets the Statistic property
WithThreshold(Double)
Sets the Threshold property
WithUnit(String)
Sets the Unit property

Inheritance Hierarchy

System..::..Object
  Amazon.Runtime..::..AmazonWebServiceRequest
    Amazon.CloudWatch.Model..::..PutMetricAlarmRequest

See Also