AWS SDK for .NET Documentation
PutMetricAlarmRequest Class
AmazonAmazon.CloudWatch.ModelPutMetricAlarmRequest Did this page help you?   Yes   No    Tell us about it...
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.

Declaration Syntax
C#
public class PutMetricAlarmRequest : AmazonWebServiceRequest
Members
All MembersConstructorsMethodsProperties



IconMemberDescription
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) Obsolete.
Sets the ActionsEnabled property

WithAlarmActions(array<String>[]()[][]) Obsolete.
Adds elements to the AlarmActions collection

WithAlarmActions(IEnumerable<(Of <<'(String>)>>)) Obsolete.
Adds elements to the AlarmActions collection

WithAlarmDescription(String) Obsolete.
Sets the AlarmDescription property

WithAlarmName(String) Obsolete.
Sets the AlarmName property

WithComparisonOperator(String) Obsolete.
Sets the ComparisonOperator property

WithDimensions(array<Dimension>[]()[][]) Obsolete.
Adds elements to the Dimensions collection

WithDimensions(IEnumerable<(Of <<'(Dimension>)>>)) Obsolete.
Adds elements to the Dimensions collection

WithEvaluationPeriods(Int32) Obsolete.
Sets the EvaluationPeriods property

WithInsufficientDataActions(array<String>[]()[][]) Obsolete.
Adds elements to the InsufficientDataActions collection

WithInsufficientDataActions(IEnumerable<(Of <<'(String>)>>)) Obsolete.
Adds elements to the InsufficientDataActions collection

WithMetricName(String) Obsolete.
Sets the MetricName property

WithNamespace(String) Obsolete.
Sets the Namespace property

WithOKActions(array<String>[]()[][]) Obsolete.
Adds elements to the OKActions collection

WithOKActions(IEnumerable<(Of <<'(String>)>>)) Obsolete.
Adds elements to the OKActions collection

WithPeriod(Int32) Obsolete.
Sets the Period property

WithStatistic(String) Obsolete.
Sets the Statistic property

WithThreshold(Double) Obsolete.
Sets the Threshold property

WithUnit(String) Obsolete.
Sets the Unit property

Inheritance Hierarchy
Object
AmazonWebServiceRequest
 PutMetricAlarmRequest
See Also

Assembly: AWSSDK (Module: AWSSDK) Version: 1.5.60.0 (1.5.60.0)