AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
The details about a metric alarm.
Namespace: Amazon.CloudWatch.Model
Assembly: AWSSDK.CloudWatch.dll
Version: 3.x.y.z
public class MetricAlarm
The MetricAlarm type exposes the following members
Name | Description | |
---|---|---|
MetricAlarm() |
Name | Type | Description | |
---|---|---|---|
ActionsEnabled | System.Boolean |
Gets and sets the property ActionsEnabled. Indicates whether actions should be executed during any changes to the alarm state. |
|
AlarmActions | System.Collections.Generic.List<System.String> |
Gets and sets the property AlarmActions.
The actions to execute when this alarm transitions to the |
|
AlarmArn | System.String |
Gets and sets the property AlarmArn. The Amazon Resource Name (ARN) of the alarm. |
|
AlarmConfigurationUpdatedTimestamp | System.DateTime |
Gets and sets the property AlarmConfigurationUpdatedTimestamp. The time stamp of the last update to the alarm configuration. |
|
AlarmDescription | System.String |
Gets and sets the property AlarmDescription. The description of the alarm. |
|
AlarmName | System.String |
Gets and sets the property AlarmName. The name of the alarm. |
|
ComparisonOperator | Amazon.CloudWatch.ComparisonOperator |
Gets and sets the property ComparisonOperator. The arithmetic operation to use when comparing the specified statistic and threshold. The specified statistic value is used as the first operand. |
|
DatapointsToAlarm | System.Int32 |
Gets and sets the property DatapointsToAlarm. The number of data points that must be breaching to trigger the alarm. |
|
Dimensions | System.Collections.Generic.List<Amazon.CloudWatch.Model.Dimension> |
Gets and sets the property Dimensions. The dimensions for the metric associated with the alarm. |
|
EvaluateLowSampleCountPercentile | System.String |
Gets and sets the property EvaluateLowSampleCountPercentile.
Used only for alarms based on percentiles. If |
|
EvaluationPeriods | System.Int32 |
Gets and sets the property EvaluationPeriods. The number of periods over which data is compared to the specified threshold. |
|
EvaluationState | Amazon.CloudWatch.EvaluationState |
Gets and sets the property EvaluationState.
If the value of this field is |
|
ExtendedStatistic | System.String |
Gets and sets the property ExtendedStatistic. The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100. |
|
InsufficientDataActions | System.Collections.Generic.List<System.String> |
Gets and sets the property InsufficientDataActions.
The actions to execute when this alarm transitions to the |
|
MetricName | System.String |
Gets and sets the property MetricName. The name of the metric associated with the alarm, if this is an alarm based on a single metric. |
|
Metrics | System.Collections.Generic.List<Amazon.CloudWatch.Model.MetricDataQuery> |
Gets and sets the property Metrics.
An array of MetricDataQuery structures, used in an alarm based on a metric math expression.
Each structure either retrieves a metric or performs a math expression. One item in
the Metrics array is the math expression that the alarm watches. This expression by
designated by having |
|
Namespace | System.String |
Gets and sets the property Namespace. The namespace of the metric associated with the alarm. |
|
OKActions | System.Collections.Generic.List<System.String> |
Gets and sets the property OKActions.
The actions to execute when this alarm transitions to the |
|
Period | System.Int32 |
Gets and sets the property Period. The period, in seconds, over which the statistic is applied. |
|
StateReason | System.String |
Gets and sets the property StateReason. An explanation for the alarm state, in text format. |
|
StateReasonData | System.String |
Gets and sets the property StateReasonData. An explanation for the alarm state, in JSON format. |
|
StateTransitionedTimestamp | System.DateTime |
Gets and sets the property StateTransitionedTimestamp.
The date and time that the alarm's |
|
StateUpdatedTimestamp | System.DateTime |
Gets and sets the property StateUpdatedTimestamp.
The time stamp of the last update to the value of either the |
|
StateValue | Amazon.CloudWatch.StateValue |
Gets and sets the property StateValue. The state value for the alarm. |
|
Statistic | Amazon.CloudWatch.Statistic |
Gets and sets the property Statistic.
The statistic for the metric associated with the alarm, other than percentile. For
percentile statistics, use |
|
Threshold | System.Double |
Gets and sets the property Threshold. The value to compare with the specified statistic. |
|
ThresholdMetricId | System.String |
Gets and sets the property ThresholdMetricId.
In an alarm based on an anomaly detection model, this is the ID of the |
|
TreatMissingData | System.String |
Gets and sets the property TreatMissingData.
Sets how this alarm is to handle missing data points. The valid values are
If this parameter is omitted, the default behavior of |
|
Unit | Amazon.CloudWatch.StandardUnit |
Gets and sets the property Unit. The unit of the metric associated with the alarm. |
This example shows how to get information about an alarm.
var client = new AmazonCloudWatchClient(); var request = new DescribeAlarmsRequest { AlarmNames = new List<string>() { "awseb-e-b36EXAMPLE-stack-CloudwatchAlarmLow-1KAKH4EXAMPLE" }, MaxRecords = 1, StateValue = StateValue.ALARM }; var response = new DescribeAlarmsResponse(); do { response = client.DescribeAlarms(request); foreach (var alarm in response.MetricAlarms) { Console.WriteLine(alarm.AlarmName); Console.WriteLine(alarm.AlarmDescription); Console.WriteLine(alarm.MetricName + " " + alarm.ComparisonOperator + " " + alarm.Threshold); Console.WriteLine(); } request.NextToken = response.NextToken; } while (!string.IsNullOrEmpty(response.NextToken));
.NET Core App:
Supported in: 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5, 4.0, 3.5