public class CloudWatchAlarmConfiguration extends Object implements Serializable, Cloneable
For CLOUDWATCH_METRIC health checks, a complex type that contains information about the CloudWatch alarm that you're associating with the health check.
Constructor and Description |
---|
CloudWatchAlarmConfiguration() |
Modifier and Type | Method and Description |
---|---|
CloudWatchAlarmConfiguration |
clone() |
boolean |
equals(Object obj) |
String |
getComparisonOperator()
The arithmetic operation to use when comparing the specified Statistic
and Threshold.
|
List<Dimension> |
getDimensions()
A list of
Dimension elements for the CloudWatch metric that
is associated with the CloudWatch alarm. |
Integer |
getEvaluationPeriods()
The number of periods over which data is compared to the specified
threshold.
|
String |
getMetricName()
The name of the CloudWatch metric that is associated with the CloudWatch
alarm.
|
String |
getNamespace()
The namespace of the CloudWatch metric that is associated with the
CloudWatch alarm.
|
Integer |
getPeriod()
An integer that represents the period in seconds over which the statistic
is applied.
|
String |
getStatistic()
The statistic to apply to the CloudWatch metric that is associated with
the CloudWatch alarm.
|
Double |
getThreshold()
The value that the metric is compared with to determine the state of the
alarm.
|
int |
hashCode() |
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 |
setDimensions(Collection<Dimension> dimensions)
A list of
Dimension elements for the CloudWatch metric that
is associated with the CloudWatch alarm. |
void |
setEvaluationPeriods(Integer evaluationPeriods)
The number of periods over which data is compared to the specified
threshold.
|
void |
setMetricName(String metricName)
The name of the CloudWatch metric that is associated with the CloudWatch
alarm.
|
void |
setNamespace(String namespace)
The namespace of the CloudWatch metric that is associated with the
CloudWatch alarm.
|
void |
setPeriod(Integer period)
An integer that represents the period in seconds over which the statistic
is applied.
|
void |
setStatistic(Statistic statistic)
The statistic to apply to the CloudWatch metric that is associated with
the CloudWatch alarm.
|
void |
setStatistic(String statistic)
The statistic to apply to the CloudWatch metric that is associated with
the CloudWatch alarm.
|
void |
setThreshold(Double threshold)
The value that the metric is compared with to determine the state of the
alarm.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CloudWatchAlarmConfiguration |
withComparisonOperator(ComparisonOperator comparisonOperator)
The arithmetic operation to use when comparing the specified Statistic
and Threshold.
|
CloudWatchAlarmConfiguration |
withComparisonOperator(String comparisonOperator)
The arithmetic operation to use when comparing the specified Statistic
and Threshold.
|
CloudWatchAlarmConfiguration |
withDimensions(Collection<Dimension> dimensions)
A list of
Dimension elements for the CloudWatch metric that
is associated with the CloudWatch alarm. |
CloudWatchAlarmConfiguration |
withDimensions(Dimension... dimensions)
A list of
Dimension elements for the CloudWatch metric that
is associated with the CloudWatch alarm. |
CloudWatchAlarmConfiguration |
withEvaluationPeriods(Integer evaluationPeriods)
The number of periods over which data is compared to the specified
threshold.
|
CloudWatchAlarmConfiguration |
withMetricName(String metricName)
The name of the CloudWatch metric that is associated with the CloudWatch
alarm.
|
CloudWatchAlarmConfiguration |
withNamespace(String namespace)
The namespace of the CloudWatch metric that is associated with the
CloudWatch alarm.
|
CloudWatchAlarmConfiguration |
withPeriod(Integer period)
An integer that represents the period in seconds over which the statistic
is applied.
|
CloudWatchAlarmConfiguration |
withStatistic(Statistic statistic)
The statistic to apply to the CloudWatch metric that is associated with
the CloudWatch alarm.
|
CloudWatchAlarmConfiguration |
withStatistic(String statistic)
The statistic to apply to the CloudWatch metric that is associated with
the CloudWatch alarm.
|
CloudWatchAlarmConfiguration |
withThreshold(Double threshold)
The value that the metric is compared with to determine the state of the
alarm.
|
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 CloudWatchAlarmConfiguration 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 setThreshold(Double threshold)
The value that the metric is compared with to determine the state of the alarm. For example, if you want the health check to fail if the average TCP connection time is greater than 500 milliseconds for more than 60 seconds, the threshold is 500.
threshold
- The value that the metric is compared with to determine the state
of the alarm. For example, if you want the health check to fail if
the average TCP connection time is greater than 500 milliseconds
for more than 60 seconds, the threshold is 500.public Double getThreshold()
The value that the metric is compared with to determine the state of the alarm. For example, if you want the health check to fail if the average TCP connection time is greater than 500 milliseconds for more than 60 seconds, the threshold is 500.
public CloudWatchAlarmConfiguration withThreshold(Double threshold)
The value that the metric is compared with to determine the state of the alarm. For example, if you want the health check to fail if the average TCP connection time is greater than 500 milliseconds for more than 60 seconds, the threshold is 500.
threshold
- The value that the metric is compared with to determine the state
of the alarm. For example, if you want the health check to fail if
the average TCP connection time is greater than 500 milliseconds
for more than 60 seconds, the threshold is 500.public void setComparisonOperator(String comparisonOperator)
The arithmetic operation to use when comparing the specified Statistic and Threshold.
Valid Values are GreaterThanOrEqualToThreshold
,
GreaterThanThreshold
, LessThanThreshold
and
LessThanOrEqualToThreshold
comparisonOperator
- The arithmetic operation to use when comparing the specified
Statistic and Threshold.
Valid Values are GreaterThanOrEqualToThreshold
,
GreaterThanThreshold
, LessThanThreshold
and LessThanOrEqualToThreshold
ComparisonOperator
public String getComparisonOperator()
The arithmetic operation to use when comparing the specified Statistic and Threshold.
Valid Values are GreaterThanOrEqualToThreshold
,
GreaterThanThreshold
, LessThanThreshold
and
LessThanOrEqualToThreshold
Valid Values are GreaterThanOrEqualToThreshold
,
GreaterThanThreshold
, LessThanThreshold
and LessThanOrEqualToThreshold
ComparisonOperator
public CloudWatchAlarmConfiguration withComparisonOperator(String comparisonOperator)
The arithmetic operation to use when comparing the specified Statistic and Threshold.
Valid Values are GreaterThanOrEqualToThreshold
,
GreaterThanThreshold
, LessThanThreshold
and
LessThanOrEqualToThreshold
comparisonOperator
- The arithmetic operation to use when comparing the specified
Statistic and Threshold.
Valid Values are GreaterThanOrEqualToThreshold
,
GreaterThanThreshold
, LessThanThreshold
and LessThanOrEqualToThreshold
ComparisonOperator
public void setComparisonOperator(ComparisonOperator comparisonOperator)
The arithmetic operation to use when comparing the specified Statistic and Threshold.
Valid Values are GreaterThanOrEqualToThreshold
,
GreaterThanThreshold
, LessThanThreshold
and
LessThanOrEqualToThreshold
comparisonOperator
- The arithmetic operation to use when comparing the specified
Statistic and Threshold.
Valid Values are GreaterThanOrEqualToThreshold
,
GreaterThanThreshold
, LessThanThreshold
and LessThanOrEqualToThreshold
ComparisonOperator
public CloudWatchAlarmConfiguration withComparisonOperator(ComparisonOperator comparisonOperator)
The arithmetic operation to use when comparing the specified Statistic and Threshold.
Valid Values are GreaterThanOrEqualToThreshold
,
GreaterThanThreshold
, LessThanThreshold
and
LessThanOrEqualToThreshold
comparisonOperator
- The arithmetic operation to use when comparing the specified
Statistic and Threshold.
Valid Values are GreaterThanOrEqualToThreshold
,
GreaterThanThreshold
, LessThanThreshold
and LessThanOrEqualToThreshold
ComparisonOperator
public void setPeriod(Integer period)
An integer that represents the period in seconds over which the statistic is applied.
period
- An integer that represents the period in seconds over which the
statistic is applied.public Integer getPeriod()
An integer that represents the period in seconds over which the statistic is applied.
public CloudWatchAlarmConfiguration withPeriod(Integer period)
An integer that represents the period in seconds over which the statistic is applied.
period
- An integer that represents the period in seconds over which the
statistic is applied.public void setMetricName(String metricName)
The name of the CloudWatch metric that is associated with the CloudWatch alarm.
metricName
- The name of the CloudWatch metric that is associated with the
CloudWatch alarm.public String getMetricName()
The name of the CloudWatch metric that is associated with the CloudWatch alarm.
public CloudWatchAlarmConfiguration withMetricName(String metricName)
The name of the CloudWatch metric that is associated with the CloudWatch alarm.
metricName
- The name of the CloudWatch metric that is associated with the
CloudWatch alarm.public void setNamespace(String namespace)
The namespace of the CloudWatch metric that is associated with the CloudWatch alarm.
namespace
- The namespace of the CloudWatch metric that is associated with the
CloudWatch alarm.public String getNamespace()
The namespace of the CloudWatch metric that is associated with the CloudWatch alarm.
public CloudWatchAlarmConfiguration withNamespace(String namespace)
The namespace of the CloudWatch metric that is associated with the CloudWatch alarm.
namespace
- The namespace of the CloudWatch metric that is associated with the
CloudWatch alarm.public void setStatistic(String statistic)
The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.
Valid Values are SampleCount
, Average
,
Sum
, Minimum
and Maximum
statistic
- The statistic to apply to the CloudWatch metric that is associated
with the CloudWatch alarm.
Valid Values are SampleCount
, Average
,
Sum
, Minimum
and Maximum
Statistic
public String getStatistic()
The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.
Valid Values are SampleCount
, Average
,
Sum
, Minimum
and Maximum
Valid Values are SampleCount
, Average
,
Sum
, Minimum
and Maximum
Statistic
public CloudWatchAlarmConfiguration withStatistic(String statistic)
The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.
Valid Values are SampleCount
, Average
,
Sum
, Minimum
and Maximum
statistic
- The statistic to apply to the CloudWatch metric that is associated
with the CloudWatch alarm.
Valid Values are SampleCount
, Average
,
Sum
, Minimum
and Maximum
Statistic
public void setStatistic(Statistic statistic)
The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.
Valid Values are SampleCount
, Average
,
Sum
, Minimum
and Maximum
statistic
- The statistic to apply to the CloudWatch metric that is associated
with the CloudWatch alarm.
Valid Values are SampleCount
, Average
,
Sum
, Minimum
and Maximum
Statistic
public CloudWatchAlarmConfiguration withStatistic(Statistic statistic)
The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.
Valid Values are SampleCount
, Average
,
Sum
, Minimum
and Maximum
statistic
- The statistic to apply to the CloudWatch metric that is associated
with the CloudWatch alarm.
Valid Values are SampleCount
, Average
,
Sum
, Minimum
and Maximum
Statistic
public List<Dimension> getDimensions()
A list of Dimension
elements for the CloudWatch metric that
is associated with the CloudWatch alarm. For information about the
metrics and dimensions that CloudWatch supports, see Amazon CloudWatch Namespaces, Dimensions, and Metrics Reference.
Dimension
elements for the CloudWatch
metric that is associated with the CloudWatch alarm. For
information about the metrics and dimensions that CloudWatch
supports, see Amazon CloudWatch Namespaces, Dimensions, and Metrics
Reference.public void setDimensions(Collection<Dimension> dimensions)
A list of Dimension
elements for the CloudWatch metric that
is associated with the CloudWatch alarm. For information about the
metrics and dimensions that CloudWatch supports, see Amazon CloudWatch Namespaces, Dimensions, and Metrics Reference.
dimensions
- A list of Dimension
elements for the CloudWatch
metric that is associated with the CloudWatch alarm. For
information about the metrics and dimensions that CloudWatch
supports, see Amazon CloudWatch Namespaces, Dimensions, and Metrics
Reference.public CloudWatchAlarmConfiguration withDimensions(Dimension... dimensions)
A list of Dimension
elements for the CloudWatch metric that
is associated with the CloudWatch alarm. For information about the
metrics and dimensions that CloudWatch supports, see Amazon CloudWatch Namespaces, Dimensions, and Metrics Reference.
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
- A list of Dimension
elements for the CloudWatch
metric that is associated with the CloudWatch alarm. For
information about the metrics and dimensions that CloudWatch
supports, see Amazon CloudWatch Namespaces, Dimensions, and Metrics
Reference.public CloudWatchAlarmConfiguration withDimensions(Collection<Dimension> dimensions)
A list of Dimension
elements for the CloudWatch metric that
is associated with the CloudWatch alarm. For information about the
metrics and dimensions that CloudWatch supports, see Amazon CloudWatch Namespaces, Dimensions, and Metrics Reference.
dimensions
- A list of Dimension
elements for the CloudWatch
metric that is associated with the CloudWatch alarm. For
information about the metrics and dimensions that CloudWatch
supports, see Amazon CloudWatch Namespaces, Dimensions, and Metrics
Reference.public String toString()
toString
in class Object
Object.toString()
public CloudWatchAlarmConfiguration clone()
Copyright © 2018. All rights reserved.