/* * Copyright 2010-2019 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. */ package com.amazonaws.services.cloudwatch.model; import java.io.Serializable; /** *
* The MetricAlarm data type represents an alarm. You can use * PutMetricAlarm to create or update an alarm. *
*/ public class MetricAlarm implements Serializable { /** ** The name of the alarm. *
*
* Constraints:
* Length: 1 - 255
*/
private String alarmName;
/**
*
* The Amazon Resource Name (ARN) of the alarm. *
*
* Constraints:
* Length: 1 - 1600
*/
private String alarmArn;
/**
*
* The description for the alarm. *
*
* Constraints:
* Length: 0 - 1024
*/
private String alarmDescription;
/**
*
* The time stamp of the last update to the alarm configuration. *
*/ private java.util.Date alarmConfigurationUpdatedTimestamp; /** ** Indicates whether actions should be executed during any changes to the * alarm's state. *
*/ private Boolean actionsEnabled; /** *
* 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 Name (ARN).
*
* 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 Name (ARN).
*
* 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 Name (ARN).
*
UnknownActions
.* The state value for the alarm. *
*
* Constraints:
* Allowed Values: OK, ALARM, INSUFFICIENT_DATA
*/
private String stateValue;
/**
*
* A human-readable explanation for the alarm's state. *
*
* Constraints:
* Length: 0 - 1023
*/
private String stateReason;
/**
*
* An explanation for the alarm's state in machine-readable JSON format *
*
* Constraints:
* Length: 0 - 4000
*/
private String stateReasonData;
/**
*
* The time stamp of the last update to the alarm's state. *
*/ private java.util.Date stateUpdatedTimestamp; /** ** The name of the alarm's metric. *
*
* Constraints:
* Length: 1 - 255
*/
private String metricName;
/**
*
* The namespace of alarm's associated metric. *
*
* Constraints:
* Length: 1 - 255
* Pattern: [^:].*
*/
private String namespace;
/**
*
* The statistic to apply to the alarm's associated metric. *
*
* Constraints:
* Allowed Values: SampleCount, Average, Sum, Minimum, Maximum
*/
private String statistic;
/**
*
* The list of dimensions associated with the alarm's associated metric. *
*/ private java.util.List* The period in seconds over which the statistic is applied. *
*
* Constraints:
* Range: 60 -
*/
private Integer period;
/**
*
* 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
*/
private String unit;
/**
*
* The number of periods over which data is compared to the specified * threshold. *
*
* Constraints:
* Range: 1 -
*/
private Integer evaluationPeriods;
/**
*
* The value against which the specified statistic is compared. *
*/ private Double threshold; /** *
* 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
*/
private String comparisonOperator;
/**
*
* The name of the alarm. *
*
* Constraints:
* Length: 1 - 255
*
* @return
* The name of the alarm. *
*/ public String getAlarmName() { return alarmName; } /** ** The name of the alarm. *
*
* Constraints:
* Length: 1 - 255
*
* @param alarmName
* The name of the alarm. *
*/ public void setAlarmName(String alarmName) { this.alarmName = alarmName; } /** ** The name of the alarm. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 255
*
* @param alarmName
* The name of the alarm. *
* @return A reference to this updated object so that method calls can be * chained together. */ public MetricAlarm withAlarmName(String alarmName) { this.alarmName = alarmName; return this; } /** ** The Amazon Resource Name (ARN) of the alarm. *
*
* Constraints:
* Length: 1 - 1600
*
* @return
* The Amazon Resource Name (ARN) of the alarm. *
*/ public String getAlarmArn() { return alarmArn; } /** ** The Amazon Resource Name (ARN) of the alarm. *
*
* Constraints:
* Length: 1 - 1600
*
* @param alarmArn
* The Amazon Resource Name (ARN) of the alarm. *
*/ public void setAlarmArn(String alarmArn) { this.alarmArn = alarmArn; } /** ** The Amazon Resource Name (ARN) of the alarm. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 1600
*
* @param alarmArn
* The Amazon Resource Name (ARN) of the alarm. *
* @return A reference to this updated object so that method calls can be * chained together. */ public MetricAlarm withAlarmArn(String alarmArn) { this.alarmArn = alarmArn; return this; } /** ** The description for the alarm. *
*
* Constraints:
* Length: 0 - 1024
*
* @return
* The description for the alarm. *
*/ public String getAlarmDescription() { return alarmDescription; } /** ** The description for the alarm. *
*
* Constraints:
* Length: 0 - 1024
*
* @param alarmDescription
* The description for the alarm. *
*/ public void setAlarmDescription(String alarmDescription) { this.alarmDescription = alarmDescription; } /** ** The description for the alarm. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 0 - 1024
*
* @param alarmDescription
* The description for the alarm. *
* @return A reference to this updated object so that method calls can be * chained together. */ public MetricAlarm withAlarmDescription(String alarmDescription) { this.alarmDescription = alarmDescription; return this; } /** ** The time stamp of the last update to the alarm configuration. *
* * @return* The time stamp of the last update to the alarm configuration. *
*/ public java.util.Date getAlarmConfigurationUpdatedTimestamp() { return alarmConfigurationUpdatedTimestamp; } /** ** The time stamp of the last update to the alarm configuration. *
* * @param alarmConfigurationUpdatedTimestamp* The time stamp of the last update to the alarm configuration. *
*/ public void setAlarmConfigurationUpdatedTimestamp( java.util.Date alarmConfigurationUpdatedTimestamp) { this.alarmConfigurationUpdatedTimestamp = alarmConfigurationUpdatedTimestamp; } /** ** The time stamp of the last update to the alarm configuration. *
** Returns a reference to this object so that method calls can be chained * together. * * @param alarmConfigurationUpdatedTimestamp
* The time stamp of the last update to the alarm configuration. *
* @return A reference to this updated object so that method calls can be * chained together. */ public MetricAlarm withAlarmConfigurationUpdatedTimestamp( java.util.Date alarmConfigurationUpdatedTimestamp) { this.alarmConfigurationUpdatedTimestamp = alarmConfigurationUpdatedTimestamp; return this; } /** ** Indicates whether actions should be executed during any changes to the * alarm's state. *
* * @return* Indicates whether actions should be executed during any changes * to the alarm's state. *
*/ public Boolean isActionsEnabled() { return actionsEnabled; } /** ** Indicates whether actions should be executed during any changes to the * alarm's state. *
* * @return* Indicates whether actions should be executed during any changes * to the alarm's state. *
*/ public Boolean getActionsEnabled() { return actionsEnabled; } /** ** Indicates whether actions should be executed during any changes to the * alarm's state. *
* * @param actionsEnabled* Indicates whether actions should be executed during any * changes to the alarm's state. *
*/ public void setActionsEnabled(Boolean actionsEnabled) { this.actionsEnabled = actionsEnabled; } /** ** Indicates whether actions should be executed during any changes to the * alarm's state. *
** Returns a reference to this object so that method calls can be chained * together. * * @param actionsEnabled
* Indicates whether actions should be executed during any * changes to the alarm's state. *
* @return A reference to this updated object so that method calls can be * chained together. */ public MetricAlarm withActionsEnabled(Boolean actionsEnabled) { this.actionsEnabled = actionsEnabled; return this; } /** *
* 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 Name (ARN).
*
* 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 Name (ARN).
*
* 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 Name (ARN).
*
* 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 Name (ARN).
*
* 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 Name (ARN).
*
* Returns a reference to this object so that method calls can be chained * together. * * @param 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 Name (ARN).
*
* 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 Name (ARN).
*
* Returns a reference to this object so that method calls can be chained * together. * * @param 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 Name (ARN).
*
* 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 Name (ARN).
*
* 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 Name (ARN).
*
* 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 Name (ARN).
*
* 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 Name (ARN).
*
* 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 Name (ARN).
*
* Returns a reference to this object so that method calls can be chained * together. * * @param 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 Name (ARN).
*
* 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 Name (ARN).
*
* Returns a reference to this object so that method calls can be chained * together. * * @param 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 Name (ARN).
*
* 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 Name (ARN).
*
UnknownActions
.
* 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 Name (ARN).
*
UnknownActions
.
* 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 Name (ARN).
*
UnknownActions
.
* 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 Name
* (ARN).
*
UnknownActions
.
* 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 Name (ARN).
*
UnknownActions
.* Returns a reference to this object so that method calls can be chained * together. * * @param 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 Name
* (ARN).
*
UnknownActions
.
* 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 Name (ARN).
*
UnknownActions
.* Returns a reference to this object so that method calls can be chained * together. * * @param 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 Name
* (ARN).
*
UnknownActions
.* The state value for the alarm. *
*
* Constraints:
* Allowed Values: OK, ALARM, INSUFFICIENT_DATA
*
* @return
* The state value for the alarm. *
* @see StateValue */ public String getStateValue() { return stateValue; } /** ** The state value for the alarm. *
*
* Constraints:
* Allowed Values: OK, ALARM, INSUFFICIENT_DATA
*
* @param stateValue
* The state value for the alarm. *
* @see StateValue */ public void setStateValue(String stateValue) { this.stateValue = stateValue; } /** ** The state value for the alarm. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: OK, ALARM, INSUFFICIENT_DATA
*
* @param stateValue
* The state value for the alarm. *
* @return A reference to this updated object so that method calls can be * chained together. * @see StateValue */ public MetricAlarm withStateValue(String stateValue) { this.stateValue = stateValue; return this; } /** ** The state value for the alarm. *
*
* Constraints:
* Allowed Values: OK, ALARM, INSUFFICIENT_DATA
*
* @param stateValue
* The state value for the alarm. *
* @see StateValue */ public void setStateValue(StateValue stateValue) { this.stateValue = stateValue.toString(); } /** ** The state value for the alarm. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: OK, ALARM, INSUFFICIENT_DATA
*
* @param stateValue
* The state value for the alarm. *
* @return A reference to this updated object so that method calls can be * chained together. * @see StateValue */ public MetricAlarm withStateValue(StateValue stateValue) { this.stateValue = stateValue.toString(); return this; } /** ** A human-readable explanation for the alarm's state. *
*
* Constraints:
* Length: 0 - 1023
*
* @return
* A human-readable explanation for the alarm's state. *
*/ public String getStateReason() { return stateReason; } /** ** A human-readable explanation for the alarm's state. *
*
* Constraints:
* Length: 0 - 1023
*
* @param stateReason
* A human-readable explanation for the alarm's state. *
*/ public void setStateReason(String stateReason) { this.stateReason = stateReason; } /** ** A human-readable explanation for the alarm's state. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 0 - 1023
*
* @param stateReason
* A human-readable explanation for the alarm's state. *
* @return A reference to this updated object so that method calls can be * chained together. */ public MetricAlarm withStateReason(String stateReason) { this.stateReason = stateReason; return this; } /** ** An explanation for the alarm's state in machine-readable JSON format *
*
* Constraints:
* Length: 0 - 4000
*
* @return
* An explanation for the alarm's state in machine-readable JSON * format *
*/ public String getStateReasonData() { return stateReasonData; } /** ** An explanation for the alarm's state in machine-readable JSON format *
*
* Constraints:
* Length: 0 - 4000
*
* @param stateReasonData
* An explanation for the alarm's state in machine-readable JSON * format *
*/ public void setStateReasonData(String stateReasonData) { this.stateReasonData = stateReasonData; } /** ** An explanation for the alarm's state in machine-readable JSON format *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 0 - 4000
*
* @param stateReasonData
* An explanation for the alarm's state in machine-readable JSON * format *
* @return A reference to this updated object so that method calls can be * chained together. */ public MetricAlarm withStateReasonData(String stateReasonData) { this.stateReasonData = stateReasonData; return this; } /** ** The time stamp of the last update to the alarm's state. *
* * @return* The time stamp of the last update to the alarm's state. *
*/ public java.util.Date getStateUpdatedTimestamp() { return stateUpdatedTimestamp; } /** ** The time stamp of the last update to the alarm's state. *
* * @param stateUpdatedTimestamp* The time stamp of the last update to the alarm's state. *
*/ public void setStateUpdatedTimestamp(java.util.Date stateUpdatedTimestamp) { this.stateUpdatedTimestamp = stateUpdatedTimestamp; } /** ** The time stamp of the last update to the alarm's state. *
** Returns a reference to this object so that method calls can be chained * together. * * @param stateUpdatedTimestamp
* The time stamp of the last update to the alarm's state. *
* @return A reference to this updated object so that method calls can be * chained together. */ public MetricAlarm withStateUpdatedTimestamp(java.util.Date stateUpdatedTimestamp) { this.stateUpdatedTimestamp = stateUpdatedTimestamp; return this; } /** ** The name of the alarm's metric. *
*
* Constraints:
* Length: 1 - 255
*
* @return
* The name of the alarm's metric. *
*/ public String getMetricName() { return metricName; } /** ** The name of the alarm's metric. *
*
* Constraints:
* Length: 1 - 255
*
* @param metricName
* The name of the alarm's metric. *
*/ public void setMetricName(String metricName) { this.metricName = metricName; } /** ** The name of the alarm's metric. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 255
*
* @param metricName
* The name of the alarm's metric. *
* @return A reference to this updated object so that method calls can be * chained together. */ public MetricAlarm withMetricName(String metricName) { this.metricName = metricName; return this; } /** ** The namespace of alarm's associated metric. *
*
* Constraints:
* Length: 1 - 255
* Pattern: [^:].*
*
* @return
* The namespace of alarm's associated metric. *
*/ public String getNamespace() { return namespace; } /** ** The namespace of alarm's associated metric. *
*
* Constraints:
* Length: 1 - 255
* Pattern: [^:].*
*
* @param namespace
* The namespace of alarm's associated metric. *
*/ public void setNamespace(String namespace) { this.namespace = namespace; } /** ** The namespace of alarm's associated metric. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 255
* Pattern: [^:].*
*
* @param namespace
* The namespace of alarm's associated metric. *
* @return A reference to this updated object so that method calls can be * chained together. */ public MetricAlarm withNamespace(String namespace) { this.namespace = namespace; return this; } /** ** The statistic to apply to the alarm's associated metric. *
*
* Constraints:
* Allowed Values: SampleCount, Average, Sum, Minimum, Maximum
*
* @return
* The statistic to apply to the alarm's associated metric. *
* @see Statistic */ public String getStatistic() { return statistic; } /** ** The statistic to apply to the alarm's associated metric. *
*
* Constraints:
* Allowed Values: SampleCount, Average, Sum, Minimum, Maximum
*
* @param statistic
* The statistic to apply to the alarm's associated metric. *
* @see Statistic */ public void setStatistic(String statistic) { this.statistic = statistic; } /** ** The statistic to apply to the alarm's associated metric. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: SampleCount, Average, Sum, Minimum, Maximum
*
* @param statistic
* The statistic to apply to the alarm's associated metric. *
* @return A reference to this updated object so that method calls can be * chained together. * @see Statistic */ public MetricAlarm withStatistic(String statistic) { this.statistic = statistic; return this; } /** ** The statistic to apply to the alarm's associated metric. *
*
* Constraints:
* Allowed Values: SampleCount, Average, Sum, Minimum, Maximum
*
* @param statistic
* The statistic to apply to the alarm's associated metric. *
* @see Statistic */ public void setStatistic(Statistic statistic) { this.statistic = statistic.toString(); } /** ** The statistic to apply to the alarm's associated metric. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: SampleCount, Average, Sum, Minimum, Maximum
*
* @param statistic
* The statistic to apply to the alarm's associated metric. *
* @return A reference to this updated object so that method calls can be * chained together. * @see Statistic */ public MetricAlarm withStatistic(Statistic statistic) { this.statistic = statistic.toString(); return this; } /** ** The list of dimensions associated with the alarm's associated metric. *
* * @return* The list of dimensions associated with the alarm's associated * metric. *
*/ public java.util.List* The list of dimensions associated with the alarm's associated metric. *
* * @param dimensions* The list of dimensions associated with the alarm's associated * metric. *
*/ public void setDimensions(java.util.Collection* The list of dimensions associated with the alarm's associated metric. *
** Returns a reference to this object so that method calls can be chained * together. * * @param dimensions
* The list of dimensions associated with the alarm's associated * metric. *
* @return A reference to this updated object so that method calls can be * chained together. */ public MetricAlarm withDimensions(Dimension... dimensions) { if (getDimensions() == null) { this.dimensions = new java.util.ArrayList* The list of dimensions associated with the alarm's associated metric. *
** Returns a reference to this object so that method calls can be chained * together. * * @param dimensions
* The list of dimensions associated with the alarm's associated * metric. *
* @return A reference to this updated object so that method calls can be * chained together. */ public MetricAlarm withDimensions(java.util.Collection* The period in seconds over which the statistic is applied. *
*
* Constraints:
* Range: 60 -
*
* @return
* The period in seconds over which the statistic is applied. *
*/ public Integer getPeriod() { return period; } /** ** The period in seconds over which the statistic is applied. *
*
* Constraints:
* Range: 60 -
*
* @param period
* The period in seconds over which the statistic is applied. *
*/ public void setPeriod(Integer period) { this.period = period; } /** ** The period in seconds over which the statistic is applied. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Range: 60 -
*
* @param period
* The period in seconds over which the statistic is applied. *
* @return A reference to this updated object so that method calls can be * chained together. */ public MetricAlarm withPeriod(Integer period) { this.period = period; return this; } /** ** 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
*
* @return
* The unit of the alarm's associated metric. *
* @see StandardUnit */ public String getUnit() { return 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
*
* @param unit
* The unit of the alarm's associated metric. *
* @see StandardUnit */ public void setUnit(String unit) { this.unit = unit; } /** ** The unit of the alarm's associated metric. *
** Returns a reference to this object so that method calls can be chained * together. *
* 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
*
* @param unit
* The unit of the alarm's associated metric. *
* @return A reference to this updated object so that method calls can be * chained together. * @see StandardUnit */ public MetricAlarm withUnit(String unit) { this.unit = unit; return this; } /** ** 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
*
* @param unit
* The unit of the alarm's associated metric. *
* @see StandardUnit */ public void setUnit(StandardUnit unit) { this.unit = unit.toString(); } /** ** The unit of the alarm's associated metric. *
** Returns a reference to this object so that method calls can be chained * together. *
* 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
*
* @param unit
* The unit of the alarm's associated metric. *
* @return A reference to this updated object so that method calls can be * chained together. * @see StandardUnit */ public MetricAlarm withUnit(StandardUnit unit) { this.unit = unit.toString(); return this; } /** ** The number of periods over which data is compared to the specified * threshold. *
*
* Constraints:
* Range: 1 -
*
* @return
* The number of periods over which data is compared to the * specified threshold. *
*/ public Integer getEvaluationPeriods() { return evaluationPeriods; } /** ** The number of periods over which data is compared to the specified * threshold. *
*
* Constraints:
* Range: 1 -
*
* @param evaluationPeriods
* The number of periods over which data is compared to the * specified threshold. *
*/ public void setEvaluationPeriods(Integer evaluationPeriods) { this.evaluationPeriods = evaluationPeriods; } /** ** The number of periods over which data is compared to the specified * threshold. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Range: 1 -
*
* @param evaluationPeriods
* The number of periods over which data is compared to the * specified threshold. *
* @return A reference to this updated object so that method calls can be * chained together. */ public MetricAlarm withEvaluationPeriods(Integer evaluationPeriods) { this.evaluationPeriods = evaluationPeriods; return this; } /** ** The value against which the specified statistic is compared. *
* * @return* The value against which the specified statistic is compared. *
*/ public Double getThreshold() { return threshold; } /** ** The value against which the specified statistic is compared. *
* * @param threshold* The value against which the specified statistic is compared. *
*/ public void setThreshold(Double threshold) { this.threshold = threshold; } /** ** The value against which the specified statistic is compared. *
** Returns a reference to this object so that method calls can be chained * together. * * @param threshold
* The value against which the specified statistic is compared. *
* @return A reference to this updated object so that method calls can be * chained together. */ public MetricAlarm withThreshold(Double threshold) { this.threshold = threshold; return this; } /** *
* 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
*
* @return
* The arithmetic operation to use when comparing the specified
* Statistic
and Threshold
. The specified
* Statistic
value is used as the first operand.
*
* 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
*
* @param comparisonOperator
* The arithmetic operation to use when comparing the specified
* Statistic
and Threshold
. The
* specified Statistic
value is used as the first
* operand.
*
* The arithmetic operation to use when comparing the specified
* Statistic
and Threshold
. The specified
* Statistic
value is used as the first operand.
*
* Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: GreaterThanOrEqualToThreshold,
* GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold
*
* @param comparisonOperator
* The arithmetic operation to use when comparing the specified
* Statistic
and Threshold
. The
* specified Statistic
value is used as the first
* operand.
*
* 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
*
* @param comparisonOperator
* The arithmetic operation to use when comparing the specified
* Statistic
and Threshold
. The
* specified Statistic
value is used as the first
* operand.
*
* The arithmetic operation to use when comparing the specified
* Statistic
and Threshold
. The specified
* Statistic
value is used as the first operand.
*
* Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: GreaterThanOrEqualToThreshold,
* GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold
*
* @param comparisonOperator
* The arithmetic operation to use when comparing the specified
* Statistic
and Threshold
. The
* specified Statistic
value is used as the first
* operand.
*