AWS SDK for .NET Documentation
MetricAlarm Class
AmazonAmazon.CloudWatch.ModelMetricAlarm Did this page help you?   Yes   No    Tell us about it...

The MetricAlarm data type represents an alarm. You can use PutMetricAlarm to create or update an alarm.

Declaration Syntax
C#
public class MetricAlarm
Members
All MembersConstructorsMethodsProperties



IconMemberDescription
MetricAlarm()()()()
Initializes a new instance of the MetricAlarm class

ActionsEnabled
Indicates whether 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 actions supported are publishing to an Amazon SNS topic and triggering an Auto Scaling policy.

Constraints:

Length
0 - 5


AlarmArn
The Amazon Resource Name (ARN) of the alarm.

Constraints:

Length
1 - 1600


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

AlarmDescription
The description for the alarm.

Constraints:

Length
0 - 255


AlarmName
The name of the alarm.

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 list of dimensions associated with 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 actions supported are publishing to an Amazon SNS topic or triggering an Auto Scaling policy. The current WSDL lists this attribute as UnknownActions.

Constraints:

Length
0 - 5


MetricName
The name of the alarm's metric.

Constraints:

Length
1 - 255


Namespace
The namespace of 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 actions supported are publishing to an Amazon SNS topic and triggering an Auto Scaling policy.

Constraints:

Length
0 - 5


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

Constraints:

Range
60 -


StateReason
A human-readable explanation for the alarm's state.

Constraints:

Length
0 - 1023


StateReasonData
An explanation for the alarm's state in machine-readable JSON format

Constraints:

Length
0 - 4000


StateUpdatedTimestamp
The time stamp of the last update to the alarm's state.

StateValue
The state value for the alarm.

Constraints:

Allowed Values
OK, ALARM, INSUFFICIENT_DATA


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 of 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

WithAlarmArn(String) Obsolete.
Sets the AlarmArn property

WithAlarmConfigurationUpdatedTimestamp(DateTime) Obsolete.
Sets the AlarmConfigurationUpdatedTimestamp property

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

WithStateReason(String) Obsolete.
Sets the StateReason property

WithStateReasonData(String) Obsolete.
Sets the StateReasonData property

WithStateUpdatedTimestamp(DateTime) Obsolete.
Sets the StateUpdatedTimestamp property

WithStateValue(String) Obsolete.
Sets the StateValue 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
MetricAlarm

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