@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class MetricAlarm extends Object implements Serializable, Cloneable
The details about a metric alarm.
Constructor and Description |
---|
MetricAlarm() |
Modifier and Type | Method and Description |
---|---|
MetricAlarm |
clone() |
boolean |
equals(Object obj) |
Boolean |
getActionsEnabled()
Indicates whether actions should be executed during any changes to the alarm state.
|
List<String> |
getAlarmActions()
The actions to execute when this alarm transitions to the
ALARM state from any other state. |
String |
getAlarmArn()
The Amazon Resource Name (ARN) of the alarm.
|
Date |
getAlarmConfigurationUpdatedTimestamp()
The time stamp of the last update to the alarm configuration.
|
String |
getAlarmDescription()
The description of the alarm.
|
String |
getAlarmName()
The name of the alarm.
|
String |
getComparisonOperator()
The arithmetic operation to use when comparing the specified statistic and threshold.
|
Integer |
getDatapointsToAlarm()
The number of data points that must be breaching to trigger the alarm.
|
List<Dimension> |
getDimensions()
The dimensions for the metric associated with the alarm.
|
String |
getEvaluateLowSampleCountPercentile()
Used only for alarms based on percentiles.
|
Integer |
getEvaluationPeriods()
The number of periods over which data is compared to the specified threshold.
|
String |
getEvaluationState()
If the value of this field is
PARTIAL_DATA , the alarm is being evaluated based on only partial data. |
String |
getExtendedStatistic()
The percentile statistic for the metric associated with the alarm.
|
List<String> |
getInsufficientDataActions()
The actions to execute when this alarm transitions to the
INSUFFICIENT_DATA state from any other
state. |
String |
getMetricName()
The name of the metric associated with the alarm, if this is an alarm based on a single metric.
|
List<MetricDataQuery> |
getMetrics()
An array of MetricDataQuery structures, used in an alarm based on a metric math expression.
|
String |
getNamespace()
The namespace of the metric associated with the alarm.
|
List<String> |
getOKActions()
The actions to execute when this alarm transitions to the
OK state from any other state. |
Integer |
getPeriod()
The period, in seconds, over which the statistic is applied.
|
String |
getStateReason()
An explanation for the alarm state, in text format.
|
String |
getStateReasonData()
An explanation for the alarm state, in JSON format.
|
Date |
getStateTransitionedTimestamp()
The date and time that the alarm's
StateValue most recently changed. |
Date |
getStateUpdatedTimestamp()
The time stamp of the last update to the value of either the
StateValue or
EvaluationState parameters. |
String |
getStateValue()
The state value for the alarm.
|
String |
getStatistic()
The statistic for the metric associated with the alarm, other than percentile.
|
Double |
getThreshold()
The value to compare with the specified statistic.
|
String |
getThresholdMetricId()
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. |
String |
getTreatMissingData()
Sets how this alarm is to handle missing data points.
|
String |
getUnit()
The unit of the metric associated with the alarm.
|
int |
hashCode() |
Boolean |
isActionsEnabled()
Indicates whether actions should be executed during any changes to the alarm state.
|
void |
setActionsEnabled(Boolean actionsEnabled)
Indicates whether actions should be executed during any changes to the alarm state.
|
void |
setAlarmActions(Collection<String> alarmActions)
The actions to execute when this alarm transitions to the
ALARM state from any other state. |
void |
setAlarmArn(String alarmArn)
The Amazon Resource Name (ARN) of the alarm.
|
void |
setAlarmConfigurationUpdatedTimestamp(Date alarmConfigurationUpdatedTimestamp)
The time stamp of the last update to the alarm configuration.
|
void |
setAlarmDescription(String alarmDescription)
The description of the alarm.
|
void |
setAlarmName(String alarmName)
The name of the alarm.
|
void |
setComparisonOperator(ComparisonOperator comparisonOperator)
The arithmetic operation to use when comparing the specified statistic and threshold.
|
void |
setComparisonOperator(String comparisonOperator)
The arithmetic operation to use when comparing the specified statistic and threshold.
|
void |
setDatapointsToAlarm(Integer datapointsToAlarm)
The number of data points that must be breaching to trigger the alarm.
|
void |
setDimensions(Collection<Dimension> dimensions)
The dimensions for the metric associated with the alarm.
|
void |
setEvaluateLowSampleCountPercentile(String evaluateLowSampleCountPercentile)
Used only for alarms based on percentiles.
|
void |
setEvaluationPeriods(Integer evaluationPeriods)
The number of periods over which data is compared to the specified threshold.
|
void |
setEvaluationState(EvaluationState evaluationState)
If the value of this field is
PARTIAL_DATA , the alarm is being evaluated based on only partial data. |
void |
setEvaluationState(String evaluationState)
If the value of this field is
PARTIAL_DATA , the alarm is being evaluated based on only partial data. |
void |
setExtendedStatistic(String extendedStatistic)
The percentile statistic for the metric associated with the alarm.
|
void |
setInsufficientDataActions(Collection<String> insufficientDataActions)
The actions to execute when this alarm transitions to the
INSUFFICIENT_DATA state from any other
state. |
void |
setMetricName(String metricName)
The name of the metric associated with the alarm, if this is an alarm based on a single metric.
|
void |
setMetrics(Collection<MetricDataQuery> metrics)
An array of MetricDataQuery structures, used in an alarm based on a metric math expression.
|
void |
setNamespace(String namespace)
The namespace of the metric associated with the alarm.
|
void |
setOKActions(Collection<String> oKActions)
The actions to execute when this alarm transitions to the
OK state from any other state. |
void |
setPeriod(Integer period)
The period, in seconds, over which the statistic is applied.
|
void |
setStateReason(String stateReason)
An explanation for the alarm state, in text format.
|
void |
setStateReasonData(String stateReasonData)
An explanation for the alarm state, in JSON format.
|
void |
setStateTransitionedTimestamp(Date stateTransitionedTimestamp)
The date and time that the alarm's
StateValue most recently changed. |
void |
setStateUpdatedTimestamp(Date stateUpdatedTimestamp)
The time stamp of the last update to the value of either the
StateValue or
EvaluationState parameters. |
void |
setStateValue(StateValue stateValue)
The state value for the alarm.
|
void |
setStateValue(String stateValue)
The state value for the alarm.
|
void |
setStatistic(Statistic statistic)
The statistic for the metric associated with the alarm, other than percentile.
|
void |
setStatistic(String statistic)
The statistic for the metric associated with the alarm, other than percentile.
|
void |
setThreshold(Double threshold)
The value to compare with the specified statistic.
|
void |
setThresholdMetricId(String 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. |
void |
setTreatMissingData(String treatMissingData)
Sets how this alarm is to handle missing data points.
|
void |
setUnit(StandardUnit unit)
The unit of the metric associated with the alarm.
|
void |
setUnit(String unit)
The unit of the metric associated with the alarm.
|
String |
toString()
Returns a string representation of this object.
|
MetricAlarm |
withActionsEnabled(Boolean actionsEnabled)
Indicates whether actions should be executed during any changes to the alarm state.
|
MetricAlarm |
withAlarmActions(Collection<String> alarmActions)
The actions to execute when this alarm transitions to the
ALARM state from any other state. |
MetricAlarm |
withAlarmActions(String... alarmActions)
The actions to execute when this alarm transitions to the
ALARM state from any other state. |
MetricAlarm |
withAlarmArn(String alarmArn)
The Amazon Resource Name (ARN) of the alarm.
|
MetricAlarm |
withAlarmConfigurationUpdatedTimestamp(Date alarmConfigurationUpdatedTimestamp)
The time stamp of the last update to the alarm configuration.
|
MetricAlarm |
withAlarmDescription(String alarmDescription)
The description of the alarm.
|
MetricAlarm |
withAlarmName(String alarmName)
The name of the alarm.
|
MetricAlarm |
withComparisonOperator(ComparisonOperator comparisonOperator)
The arithmetic operation to use when comparing the specified statistic and threshold.
|
MetricAlarm |
withComparisonOperator(String comparisonOperator)
The arithmetic operation to use when comparing the specified statistic and threshold.
|
MetricAlarm |
withDatapointsToAlarm(Integer datapointsToAlarm)
The number of data points that must be breaching to trigger the alarm.
|
MetricAlarm |
withDimensions(Collection<Dimension> dimensions)
The dimensions for the metric associated with the alarm.
|
MetricAlarm |
withDimensions(Dimension... dimensions)
The dimensions for the metric associated with the alarm.
|
MetricAlarm |
withEvaluateLowSampleCountPercentile(String evaluateLowSampleCountPercentile)
Used only for alarms based on percentiles.
|
MetricAlarm |
withEvaluationPeriods(Integer evaluationPeriods)
The number of periods over which data is compared to the specified threshold.
|
MetricAlarm |
withEvaluationState(EvaluationState evaluationState)
If the value of this field is
PARTIAL_DATA , the alarm is being evaluated based on only partial data. |
MetricAlarm |
withEvaluationState(String evaluationState)
If the value of this field is
PARTIAL_DATA , the alarm is being evaluated based on only partial data. |
MetricAlarm |
withExtendedStatistic(String extendedStatistic)
The percentile statistic for the metric associated with the alarm.
|
MetricAlarm |
withInsufficientDataActions(Collection<String> insufficientDataActions)
The actions to execute when this alarm transitions to the
INSUFFICIENT_DATA state from any other
state. |
MetricAlarm |
withInsufficientDataActions(String... insufficientDataActions)
The actions to execute when this alarm transitions to the
INSUFFICIENT_DATA state from any other
state. |
MetricAlarm |
withMetricName(String metricName)
The name of the metric associated with the alarm, if this is an alarm based on a single metric.
|
MetricAlarm |
withMetrics(Collection<MetricDataQuery> metrics)
An array of MetricDataQuery structures, used in an alarm based on a metric math expression.
|
MetricAlarm |
withMetrics(MetricDataQuery... metrics)
An array of MetricDataQuery structures, used in an alarm based on a metric math expression.
|
MetricAlarm |
withNamespace(String namespace)
The namespace of the metric associated with the alarm.
|
MetricAlarm |
withOKActions(Collection<String> oKActions)
The actions to execute when this alarm transitions to the
OK state from any other state. |
MetricAlarm |
withOKActions(String... oKActions)
The actions to execute when this alarm transitions to the
OK state from any other state. |
MetricAlarm |
withPeriod(Integer period)
The period, in seconds, over which the statistic is applied.
|
MetricAlarm |
withStateReason(String stateReason)
An explanation for the alarm state, in text format.
|
MetricAlarm |
withStateReasonData(String stateReasonData)
An explanation for the alarm state, in JSON format.
|
MetricAlarm |
withStateTransitionedTimestamp(Date stateTransitionedTimestamp)
The date and time that the alarm's
StateValue most recently changed. |
MetricAlarm |
withStateUpdatedTimestamp(Date stateUpdatedTimestamp)
The time stamp of the last update to the value of either the
StateValue or
EvaluationState parameters. |
MetricAlarm |
withStateValue(StateValue stateValue)
The state value for the alarm.
|
MetricAlarm |
withStateValue(String stateValue)
The state value for the alarm.
|
MetricAlarm |
withStatistic(Statistic statistic)
The statistic for the metric associated with the alarm, other than percentile.
|
MetricAlarm |
withStatistic(String statistic)
The statistic for the metric associated with the alarm, other than percentile.
|
MetricAlarm |
withThreshold(Double threshold)
The value to compare with the specified statistic.
|
MetricAlarm |
withThresholdMetricId(String 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. |
MetricAlarm |
withTreatMissingData(String treatMissingData)
Sets how this alarm is to handle missing data points.
|
MetricAlarm |
withUnit(StandardUnit unit)
The unit of the metric associated with the alarm.
|
MetricAlarm |
withUnit(String unit)
The unit of the metric associated with the alarm.
|
public void setAlarmName(String alarmName)
The name of the alarm.
alarmName
- The name of the alarm.public String getAlarmName()
The name of the alarm.
public MetricAlarm withAlarmName(String alarmName)
The name of the alarm.
alarmName
- The name of the alarm.public void setAlarmArn(String alarmArn)
The Amazon Resource Name (ARN) of the alarm.
alarmArn
- The Amazon Resource Name (ARN) of the alarm.public String getAlarmArn()
The Amazon Resource Name (ARN) of the alarm.
public MetricAlarm withAlarmArn(String alarmArn)
The Amazon Resource Name (ARN) of the alarm.
alarmArn
- The Amazon Resource Name (ARN) of the alarm.public void setAlarmDescription(String alarmDescription)
The description of the alarm.
alarmDescription
- The description of the alarm.public String getAlarmDescription()
The description of the alarm.
public MetricAlarm withAlarmDescription(String alarmDescription)
The description of the alarm.
alarmDescription
- The description of the alarm.public void setAlarmConfigurationUpdatedTimestamp(Date alarmConfigurationUpdatedTimestamp)
The time stamp of the last update to the alarm configuration.
alarmConfigurationUpdatedTimestamp
- The time stamp of the last update to the alarm configuration.public Date getAlarmConfigurationUpdatedTimestamp()
The time stamp of the last update to the alarm configuration.
public MetricAlarm withAlarmConfigurationUpdatedTimestamp(Date alarmConfigurationUpdatedTimestamp)
The time stamp of the last update to the alarm configuration.
alarmConfigurationUpdatedTimestamp
- The time stamp of the last update to the alarm configuration.public void setActionsEnabled(Boolean actionsEnabled)
Indicates whether actions should be executed during any changes to the alarm state.
actionsEnabled
- Indicates whether actions should be executed during any changes to the alarm state.public Boolean getActionsEnabled()
Indicates whether actions should be executed during any changes to the alarm state.
public MetricAlarm withActionsEnabled(Boolean actionsEnabled)
Indicates whether actions should be executed during any changes to the alarm state.
actionsEnabled
- Indicates whether actions should be executed during any changes to the alarm state.public Boolean isActionsEnabled()
Indicates whether actions should be executed during any changes to the alarm state.
public List<String> getOKActions()
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).
OK
state from any other state.
Each action is specified as an Amazon Resource Name (ARN).public void setOKActions(Collection<String> 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).
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).public MetricAlarm withOKActions(String... 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).
NOTE: This method appends the values to the existing list (if any). Use
setOKActions(java.util.Collection)
or withOKActions(java.util.Collection)
if you want to
override the existing values.
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).public MetricAlarm withOKActions(Collection<String> 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).
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).public List<String> getAlarmActions()
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).
ALARM
state from any other state.
Each action is specified as an Amazon Resource Name (ARN).public void setAlarmActions(Collection<String> 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).
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).public MetricAlarm withAlarmActions(String... 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).
NOTE: This method appends the values to the existing list (if any). Use
setAlarmActions(java.util.Collection)
or withAlarmActions(java.util.Collection)
if you want to
override the existing values.
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).public MetricAlarm withAlarmActions(Collection<String> 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).
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).public List<String> getInsufficientDataActions()
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).
INSUFFICIENT_DATA
state from any
other state. Each action is specified as an Amazon Resource Name (ARN).public void setInsufficientDataActions(Collection<String> 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).
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).public MetricAlarm withInsufficientDataActions(String... 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).
NOTE: This method appends the values to the existing list (if any). Use
setInsufficientDataActions(java.util.Collection)
or
withInsufficientDataActions(java.util.Collection)
if you want to override the existing values.
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).public MetricAlarm withInsufficientDataActions(Collection<String> 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).
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).public void setStateValue(String stateValue)
The state value for the alarm.
stateValue
- The state value for the alarm.StateValue
public String getStateValue()
The state value for the alarm.
StateValue
public MetricAlarm withStateValue(String stateValue)
The state value for the alarm.
stateValue
- The state value for the alarm.StateValue
public void setStateValue(StateValue stateValue)
The state value for the alarm.
stateValue
- The state value for the alarm.StateValue
public MetricAlarm withStateValue(StateValue stateValue)
The state value for the alarm.
stateValue
- The state value for the alarm.StateValue
public void setStateReason(String stateReason)
An explanation for the alarm state, in text format.
stateReason
- An explanation for the alarm state, in text format.public String getStateReason()
An explanation for the alarm state, in text format.
public MetricAlarm withStateReason(String stateReason)
An explanation for the alarm state, in text format.
stateReason
- An explanation for the alarm state, in text format.public void setStateReasonData(String stateReasonData)
An explanation for the alarm state, in JSON format.
stateReasonData
- An explanation for the alarm state, in JSON format.public String getStateReasonData()
An explanation for the alarm state, in JSON format.
public MetricAlarm withStateReasonData(String stateReasonData)
An explanation for the alarm state, in JSON format.
stateReasonData
- An explanation for the alarm state, in JSON format.public void setStateUpdatedTimestamp(Date stateUpdatedTimestamp)
The time stamp of the last update to the value of either the StateValue
or
EvaluationState
parameters.
stateUpdatedTimestamp
- The time stamp of the last update to the value of either the StateValue
or
EvaluationState
parameters.public Date getStateUpdatedTimestamp()
The time stamp of the last update to the value of either the StateValue
or
EvaluationState
parameters.
StateValue
or
EvaluationState
parameters.public MetricAlarm withStateUpdatedTimestamp(Date stateUpdatedTimestamp)
The time stamp of the last update to the value of either the StateValue
or
EvaluationState
parameters.
stateUpdatedTimestamp
- The time stamp of the last update to the value of either the StateValue
or
EvaluationState
parameters.public void setMetricName(String metricName)
The name of the metric associated with the alarm, if this is an alarm based on a single metric.
metricName
- The name of the metric associated with the alarm, if this is an alarm based on a single metric.public String getMetricName()
The name of the metric associated with the alarm, if this is an alarm based on a single metric.
public MetricAlarm withMetricName(String metricName)
The name of the metric associated with the alarm, if this is an alarm based on a single metric.
metricName
- The name of the metric associated with the alarm, if this is an alarm based on a single metric.public void setNamespace(String namespace)
The namespace of the metric associated with the alarm.
namespace
- The namespace of the metric associated with the alarm.public String getNamespace()
The namespace of the metric associated with the alarm.
public MetricAlarm withNamespace(String namespace)
The namespace of the metric associated with the alarm.
namespace
- The namespace of the metric associated with the alarm.public void setStatistic(String statistic)
The statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use
ExtendedStatistic
.
statistic
- The statistic for the metric associated with the alarm, other than percentile. For percentile statistics,
use ExtendedStatistic
.Statistic
public String getStatistic()
The statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use
ExtendedStatistic
.
ExtendedStatistic
.Statistic
public MetricAlarm withStatistic(String statistic)
The statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use
ExtendedStatistic
.
statistic
- The statistic for the metric associated with the alarm, other than percentile. For percentile statistics,
use ExtendedStatistic
.Statistic
public void setStatistic(Statistic statistic)
The statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use
ExtendedStatistic
.
statistic
- The statistic for the metric associated with the alarm, other than percentile. For percentile statistics,
use ExtendedStatistic
.Statistic
public MetricAlarm withStatistic(Statistic statistic)
The statistic for the metric associated with the alarm, other than percentile. For percentile statistics, use
ExtendedStatistic
.
statistic
- The statistic for the metric associated with the alarm, other than percentile. For percentile statistics,
use ExtendedStatistic
.Statistic
public void setExtendedStatistic(String extendedStatistic)
The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
extendedStatistic
- The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.public String getExtendedStatistic()
The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
public MetricAlarm withExtendedStatistic(String extendedStatistic)
The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.
extendedStatistic
- The percentile statistic for the metric associated with the alarm. Specify a value between p0.0 and p100.public List<Dimension> getDimensions()
The dimensions for the metric associated with the alarm.
public void setDimensions(Collection<Dimension> dimensions)
The dimensions for the metric associated with the alarm.
dimensions
- The dimensions for the metric associated with the alarm.public MetricAlarm withDimensions(Dimension... dimensions)
The dimensions for the metric associated with the alarm.
NOTE: This method appends the values to the existing list (if any). Use
setDimensions(java.util.Collection)
or withDimensions(java.util.Collection)
if you want to
override the existing values.
dimensions
- The dimensions for the metric associated with the alarm.public MetricAlarm withDimensions(Collection<Dimension> dimensions)
The dimensions for the metric associated with the alarm.
dimensions
- The dimensions for the metric associated with the alarm.public void setPeriod(Integer period)
The period, in seconds, over which the statistic is applied.
period
- The period, in seconds, over which the statistic is applied.public Integer getPeriod()
The period, in seconds, over which the statistic is applied.
public MetricAlarm withPeriod(Integer period)
The period, in seconds, over which the statistic is applied.
period
- The period, in seconds, over which the statistic is applied.public void setUnit(String unit)
The unit of the metric associated with the alarm.
unit
- The unit of the metric associated with the alarm.StandardUnit
public String getUnit()
The unit of the metric associated with the alarm.
StandardUnit
public MetricAlarm withUnit(String unit)
The unit of the metric associated with the alarm.
unit
- The unit of the metric associated with the alarm.StandardUnit
public void setUnit(StandardUnit unit)
The unit of the metric associated with the alarm.
unit
- The unit of the metric associated with the alarm.StandardUnit
public MetricAlarm withUnit(StandardUnit unit)
The unit of the metric associated with the alarm.
unit
- The unit of the metric associated with the alarm.StandardUnit
public void setEvaluationPeriods(Integer evaluationPeriods)
The number of periods over which data is compared to the specified threshold.
evaluationPeriods
- The number of periods over which data is compared to the specified threshold.public Integer getEvaluationPeriods()
The number of periods over which data is compared to the specified threshold.
public MetricAlarm withEvaluationPeriods(Integer evaluationPeriods)
The number of periods over which data is compared to the specified threshold.
evaluationPeriods
- The number of periods over which data is compared to the specified threshold.public void setDatapointsToAlarm(Integer datapointsToAlarm)
The number of data points that must be breaching to trigger the alarm.
datapointsToAlarm
- The number of data points that must be breaching to trigger the alarm.public Integer getDatapointsToAlarm()
The number of data points that must be breaching to trigger the alarm.
public MetricAlarm withDatapointsToAlarm(Integer datapointsToAlarm)
The number of data points that must be breaching to trigger the alarm.
datapointsToAlarm
- The number of data points that must be breaching to trigger the alarm.public void setThreshold(Double threshold)
The value to compare with the specified statistic.
threshold
- The value to compare with the specified statistic.public Double getThreshold()
The value to compare with the specified statistic.
public MetricAlarm withThreshold(Double threshold)
The value to compare with the specified statistic.
threshold
- The value to compare with the specified statistic.public void setComparisonOperator(String comparisonOperator)
The arithmetic operation to use when comparing the specified statistic and threshold. The specified statistic value is used as the first operand.
comparisonOperator
- The arithmetic operation to use when comparing the specified statistic and threshold. The specified
statistic value is used as the first operand.ComparisonOperator
public String getComparisonOperator()
The arithmetic operation to use when comparing the specified statistic and threshold. The specified statistic value is used as the first operand.
ComparisonOperator
public MetricAlarm withComparisonOperator(String comparisonOperator)
The arithmetic operation to use when comparing the specified statistic and threshold. The specified statistic value is used as the first operand.
comparisonOperator
- The arithmetic operation to use when comparing the specified statistic and threshold. The specified
statistic value is used as the first operand.ComparisonOperator
public void setComparisonOperator(ComparisonOperator comparisonOperator)
The arithmetic operation to use when comparing the specified statistic and threshold. The specified statistic value is used as the first operand.
comparisonOperator
- The arithmetic operation to use when comparing the specified statistic and threshold. The specified
statistic value is used as the first operand.ComparisonOperator
public MetricAlarm withComparisonOperator(ComparisonOperator comparisonOperator)
The arithmetic operation to use when comparing the specified statistic and threshold. The specified statistic value is used as the first operand.
comparisonOperator
- The arithmetic operation to use when comparing the specified statistic and threshold. The specified
statistic value is used as the first operand.ComparisonOperator
public void setTreatMissingData(String 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.
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.
public String getTreatMissingData()
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.
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.
public MetricAlarm withTreatMissingData(String 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.
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.
public void setEvaluateLowSampleCountPercentile(String 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.
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.public String getEvaluateLowSampleCountPercentile()
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.
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.public MetricAlarm withEvaluateLowSampleCountPercentile(String 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.
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.public List<MetricDataQuery> getMetrics()
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.
ReturnData
set to true.public void setMetrics(Collection<MetricDataQuery> 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.
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 MetricAlarm withMetrics(MetricDataQuery... 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.
NOTE: This method appends the values to the existing list (if any). Use
setMetrics(java.util.Collection)
or withMetrics(java.util.Collection)
if you want to override
the existing values.
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 MetricAlarm withMetrics(Collection<MetricDataQuery> 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.
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 void setThresholdMetricId(String 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.
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.public String getThresholdMetricId()
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.
ANOMALY_DETECTION_BAND
function used as the threshold for the alarm.public MetricAlarm withThresholdMetricId(String 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.
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.public void setEvaluationState(String 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.
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.EvaluationState
public String getEvaluationState()
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.
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.EvaluationState
public MetricAlarm withEvaluationState(String 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.
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.EvaluationState
public void setEvaluationState(EvaluationState 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.
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.EvaluationState
public MetricAlarm withEvaluationState(EvaluationState 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.
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.EvaluationState
public void setStateTransitionedTimestamp(Date stateTransitionedTimestamp)
The date and time that the alarm's StateValue
most recently changed.
stateTransitionedTimestamp
- The date and time that the alarm's StateValue
most recently changed.public Date getStateTransitionedTimestamp()
The date and time that the alarm's StateValue
most recently changed.
StateValue
most recently changed.public MetricAlarm withStateTransitionedTimestamp(Date stateTransitionedTimestamp)
The date and time that the alarm's StateValue
most recently changed.
stateTransitionedTimestamp
- The date and time that the alarm's StateValue
most recently changed.public String toString()
toString
in class Object
Object.toString()
public MetricAlarm clone()