/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the monitoring-2010-08-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.CloudWatch.Model { /// /// The details about a metric alarm. /// public partial class MetricAlarm { private bool? _actionsEnabled; private List _alarmActions = new List(); private string _alarmArn; private DateTime? _alarmConfigurationUpdatedTimestamp; private string _alarmDescription; private string _alarmName; private ComparisonOperator _comparisonOperator; private int? _datapointsToAlarm; private List _dimensions = new List(); private string _evaluateLowSampleCountPercentile; private int? _evaluationPeriods; private EvaluationState _evaluationState; private string _extendedStatistic; private List _insufficientDataActions = new List(); private string _metricName; private List _metrics = new List(); private string _awsNamespace; private List _okActions = new List(); private int? _period; private string _stateReason; private string _stateReasonData; private DateTime? _stateTransitionedTimestamp; private DateTime? _stateUpdatedTimestamp; private StateValue _stateValue; private Statistic _statistic; private double? _threshold; private string _thresholdMetricId; private string _treatMissingData; private StandardUnit _unit; /// /// Gets and sets the property ActionsEnabled. /// /// Indicates whether actions should be executed during any changes to the alarm state. /// /// public bool ActionsEnabled { get { return this._actionsEnabled.GetValueOrDefault(); } set { this._actionsEnabled = value; } } // Check to see if ActionsEnabled property is set internal bool IsSetActionsEnabled() { return this._actionsEnabled.HasValue; } /// /// Gets and sets the property AlarmActions. /// /// 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). /// /// [AWSProperty(Max=5)] public List AlarmActions { get { return this._alarmActions; } set { this._alarmActions = value; } } // Check to see if AlarmActions property is set internal bool IsSetAlarmActions() { return this._alarmActions != null && this._alarmActions.Count > 0; } /// /// Gets and sets the property AlarmArn. /// /// The Amazon Resource Name (ARN) of the alarm. /// /// [AWSProperty(Min=1, Max=1600)] public string AlarmArn { get { return this._alarmArn; } set { this._alarmArn = value; } } // Check to see if AlarmArn property is set internal bool IsSetAlarmArn() { return this._alarmArn != null; } /// /// Gets and sets the property AlarmConfigurationUpdatedTimestamp. /// /// The time stamp of the last update to the alarm configuration. /// /// public DateTime AlarmConfigurationUpdatedTimestamp { get { return this._alarmConfigurationUpdatedTimestamp.GetValueOrDefault(); } set { this._alarmConfigurationUpdatedTimestamp = value; } } // Check to see if AlarmConfigurationUpdatedTimestamp property is set internal bool IsSetAlarmConfigurationUpdatedTimestamp() { return this._alarmConfigurationUpdatedTimestamp.HasValue; } /// /// Gets and sets the property AlarmDescription. /// /// The description of the alarm. /// /// [AWSProperty(Min=0, Max=1024)] public string AlarmDescription { get { return this._alarmDescription; } set { this._alarmDescription = value; } } // Check to see if AlarmDescription property is set internal bool IsSetAlarmDescription() { return this._alarmDescription != null; } /// /// Gets and sets the property AlarmName. /// /// The name of the alarm. /// /// [AWSProperty(Min=1, Max=255)] public string AlarmName { get { return this._alarmName; } set { this._alarmName = value; } } // Check to see if AlarmName property is set internal bool IsSetAlarmName() { return this._alarmName != null; } /// /// 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. /// /// public ComparisonOperator ComparisonOperator { get { return this._comparisonOperator; } set { this._comparisonOperator = value; } } // Check to see if ComparisonOperator property is set internal bool IsSetComparisonOperator() { return this._comparisonOperator != null; } /// /// Gets and sets the property DatapointsToAlarm. /// /// The number of data points that must be breaching to trigger the alarm. /// /// [AWSProperty(Min=1)] public int DatapointsToAlarm { get { return this._datapointsToAlarm.GetValueOrDefault(); } set { this._datapointsToAlarm = value; } } // Check to see if DatapointsToAlarm property is set internal bool IsSetDatapointsToAlarm() { return this._datapointsToAlarm.HasValue; } /// /// Gets and sets the property Dimensions. /// /// The dimensions for the metric associated with the alarm. /// /// [AWSProperty(Max=30)] public List Dimensions { get { return this._dimensions; } set { this._dimensions = value; } } // Check to see if Dimensions property is set internal bool IsSetDimensions() { return this._dimensions != null && this._dimensions.Count > 0; } /// /// Gets and sets the property EvaluateLowSampleCountPercentile. /// /// Used only for alarms based on percentiles. If ignore, the alarm state /// does not change during periods with too few data points to be statistically significant. /// If evaluate or this parameter is not used, the alarm is always evaluated /// and possibly changes state no matter how many data points are available. /// /// [AWSProperty(Min=1, Max=255)] public string EvaluateLowSampleCountPercentile { get { return this._evaluateLowSampleCountPercentile; } set { this._evaluateLowSampleCountPercentile = value; } } // Check to see if EvaluateLowSampleCountPercentile property is set internal bool IsSetEvaluateLowSampleCountPercentile() { return this._evaluateLowSampleCountPercentile != null; } /// /// Gets and sets the property EvaluationPeriods. /// /// The number of periods over which data is compared to the specified threshold. /// /// [AWSProperty(Min=1)] public int EvaluationPeriods { get { return this._evaluationPeriods.GetValueOrDefault(); } set { this._evaluationPeriods = value; } } // Check to see if EvaluationPeriods property is set internal bool IsSetEvaluationPeriods() { return this._evaluationPeriods.HasValue; } /// /// Gets and sets the property EvaluationState. /// /// If the value of this field is PARTIAL_DATA, the alarm is being evaluated /// based on only partial data. This happens if the query used for the alarm returns more /// than 10,000 metrics. For more information, see Create /// alarms on Metrics Insights queries. /// /// public EvaluationState EvaluationState { get { return this._evaluationState; } set { this._evaluationState = value; } } // Check to see if EvaluationState property is set internal bool IsSetEvaluationState() { return this._evaluationState != null; } /// /// Gets and sets the property ExtendedStatistic. /// /// The percentile statistic for the metric associated with the alarm. Specify a value /// between p0.0 and p100. /// /// public string ExtendedStatistic { get { return this._extendedStatistic; } set { this._extendedStatistic = value; } } // Check to see if ExtendedStatistic property is set internal bool IsSetExtendedStatistic() { return this._extendedStatistic != null; } /// /// Gets and sets the property InsufficientDataActions. /// /// 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). /// /// [AWSProperty(Max=5)] public List InsufficientDataActions { get { return this._insufficientDataActions; } set { this._insufficientDataActions = value; } } // Check to see if InsufficientDataActions property is set internal bool IsSetInsufficientDataActions() { return this._insufficientDataActions != null && this._insufficientDataActions.Count > 0; } /// /// 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. /// /// [AWSProperty(Min=1, Max=255)] public string MetricName { get { return this._metricName; } set { this._metricName = value; } } // Check to see if MetricName property is set internal bool IsSetMetricName() { return this._metricName != null; } /// /// 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 ReturnData set to true. /// /// public List Metrics { get { return this._metrics; } set { this._metrics = value; } } // Check to see if Metrics property is set internal bool IsSetMetrics() { return this._metrics != null && this._metrics.Count > 0; } /// /// Gets and sets the property Namespace. /// /// The namespace of the metric associated with the alarm. /// /// [AWSProperty(Min=1, Max=255)] public string Namespace { get { return this._awsNamespace; } set { this._awsNamespace = value; } } // Check to see if Namespace property is set internal bool IsSetNamespace() { return this._awsNamespace != null; } /// /// Gets and sets the property OKActions. /// /// The actions to execute when this alarm transitions to the OK state from /// any other state. Each action is specified as an Amazon Resource Name (ARN). /// /// [AWSProperty(Max=5)] public List OKActions { get { return this._okActions; } set { this._okActions = value; } } // Check to see if OKActions property is set internal bool IsSetOKActions() { return this._okActions != null && this._okActions.Count > 0; } /// /// Gets and sets the property Period. /// /// The period, in seconds, over which the statistic is applied. /// /// [AWSProperty(Min=1)] public int Period { get { return this._period.GetValueOrDefault(); } set { this._period = value; } } // Check to see if Period property is set internal bool IsSetPeriod() { return this._period.HasValue; } /// /// Gets and sets the property StateReason. /// /// An explanation for the alarm state, in text format. /// /// [AWSProperty(Min=0, Max=1023)] public string StateReason { get { return this._stateReason; } set { this._stateReason = value; } } // Check to see if StateReason property is set internal bool IsSetStateReason() { return this._stateReason != null; } /// /// Gets and sets the property StateReasonData. /// /// An explanation for the alarm state, in JSON format. /// /// [AWSProperty(Min=0, Max=4000)] public string StateReasonData { get { return this._stateReasonData; } set { this._stateReasonData = value; } } // Check to see if StateReasonData property is set internal bool IsSetStateReasonData() { return this._stateReasonData != null; } /// /// Gets and sets the property StateTransitionedTimestamp. /// /// The date and time that the alarm's StateValue most recently changed. /// /// public DateTime StateTransitionedTimestamp { get { return this._stateTransitionedTimestamp.GetValueOrDefault(); } set { this._stateTransitionedTimestamp = value; } } // Check to see if StateTransitionedTimestamp property is set internal bool IsSetStateTransitionedTimestamp() { return this._stateTransitionedTimestamp.HasValue; } /// /// Gets and sets the property StateUpdatedTimestamp. /// /// The time stamp of the last update to the value of either the StateValue /// or EvaluationState parameters. /// /// public DateTime StateUpdatedTimestamp { get { return this._stateUpdatedTimestamp.GetValueOrDefault(); } set { this._stateUpdatedTimestamp = value; } } // Check to see if StateUpdatedTimestamp property is set internal bool IsSetStateUpdatedTimestamp() { return this._stateUpdatedTimestamp.HasValue; } /// /// Gets and sets the property StateValue. /// /// The state value for the alarm. /// /// public StateValue StateValue { get { return this._stateValue; } set { this._stateValue = value; } } // Check to see if StateValue property is set internal bool IsSetStateValue() { return this._stateValue != null; } /// /// Gets and sets the property Statistic. /// /// The statistic for the metric associated with the alarm, other than percentile. For /// percentile statistics, use ExtendedStatistic. /// /// public Statistic Statistic { get { return this._statistic; } set { this._statistic = value; } } // Check to see if Statistic property is set internal bool IsSetStatistic() { return this._statistic != null; } /// /// Gets and sets the property Threshold. /// /// The value to compare with the specified statistic. /// /// public double Threshold { get { return this._threshold.GetValueOrDefault(); } set { this._threshold = value; } } // Check to see if Threshold property is set internal bool IsSetThreshold() { return this._threshold.HasValue; } /// /// Gets and sets the property ThresholdMetricId. /// /// In an alarm based on an anomaly detection model, this is the ID of the ANOMALY_DETECTION_BAND /// function used as the threshold for the alarm. /// /// [AWSProperty(Min=1, Max=255)] public string ThresholdMetricId { get { return this._thresholdMetricId; } set { this._thresholdMetricId = value; } } // Check to see if ThresholdMetricId property is set internal bool IsSetThresholdMetricId() { return this._thresholdMetricId != null; } /// /// Gets and sets the property TreatMissingData. /// /// Sets how this alarm is to handle missing data points. The valid values are breaching, /// notBreaching, ignore, and missing. For more /// information, see Configuring /// how CloudWatch alarms treat missing data. /// /// /// /// If this parameter is omitted, the default behavior of missing is used. /// /// [AWSProperty(Min=1, Max=255)] public string TreatMissingData { get { return this._treatMissingData; } set { this._treatMissingData = value; } } // Check to see if TreatMissingData property is set internal bool IsSetTreatMissingData() { return this._treatMissingData != null; } /// /// Gets and sets the property Unit. /// /// The unit of the metric associated with the alarm. /// /// public StandardUnit Unit { get { return this._unit; } set { this._unit = value; } } // Check to see if Unit property is set internal bool IsSetUnit() { return this._unit != null; } } }