Class CloudWatchAlarmConfiguration
- All Implemented Interfaces:
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.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
The arithmetic operation to use when comparing the specified Statistic and Threshold.A list ofDimension
elements for the CloudWatch metric that is associated with the CloudWatch alarm.The number of periods over which data is compared to the specified threshold.The name of the CloudWatch metric that is associated with the CloudWatch alarm.The namespace of the CloudWatch metric that is associated with the CloudWatch alarm.An integer that represents the period in seconds over which the statistic is applied.The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.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 ofDimension
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
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.toString()
Returns a string representation of this object; useful for testing and debugging.withComparisonOperator
(ComparisonOperator comparisonOperator) The arithmetic operation to use when comparing the specified Statistic and Threshold.withComparisonOperator
(String comparisonOperator) The arithmetic operation to use when comparing the specified Statistic and Threshold.withDimensions
(Dimension... dimensions) A list ofDimension
elements for the CloudWatch metric that is associated with the CloudWatch alarm.withDimensions
(Collection<Dimension> dimensions) A list ofDimension
elements for the CloudWatch metric that is associated with the CloudWatch alarm.withEvaluationPeriods
(Integer evaluationPeriods) The number of periods over which data is compared to the specified threshold.withMetricName
(String metricName) The name of the CloudWatch metric that is associated with the CloudWatch alarm.withNamespace
(String namespace) The namespace of the CloudWatch metric that is associated with the CloudWatch alarm.withPeriod
(Integer period) An integer that represents the period in seconds over which the statistic is applied.withStatistic
(Statistic statistic) The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.withStatistic
(String statistic) The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.withThreshold
(Double threshold) The value that the metric is compared with to determine the state of the alarm.
-
Constructor Details
-
CloudWatchAlarmConfiguration
public CloudWatchAlarmConfiguration()
-
-
Method Details
-
setEvaluationPeriods
The number of periods over which data is compared to the specified threshold.
- Parameters:
evaluationPeriods
- The number of periods over which data is compared to the specified threshold.
-
getEvaluationPeriods
The number of periods over which data is compared to the specified threshold.
- Returns:
- The number of periods over which data is compared to the specified threshold.
-
withEvaluationPeriods
The number of periods over which data is compared to the specified threshold.
- Parameters:
evaluationPeriods
- The number of periods over which data is compared to the specified threshold.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setThreshold
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.
- Parameters:
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.
-
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.
- Returns:
- 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.
-
withThreshold
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.
- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setComparisonOperator
The arithmetic operation to use when comparing the specified Statistic and Threshold.
Valid Values are
GreaterThanOrEqualToThreshold
,GreaterThanThreshold
,LessThanThreshold
andLessThanOrEqualToThreshold
- Parameters:
comparisonOperator
- The arithmetic operation to use when comparing the specified Statistic and Threshold.Valid Values are
GreaterThanOrEqualToThreshold
,GreaterThanThreshold
,LessThanThreshold
andLessThanOrEqualToThreshold
- See Also:
-
getComparisonOperator
The arithmetic operation to use when comparing the specified Statistic and Threshold.
Valid Values are
GreaterThanOrEqualToThreshold
,GreaterThanThreshold
,LessThanThreshold
andLessThanOrEqualToThreshold
- Returns:
- The arithmetic operation to use when comparing the specified
Statistic and Threshold.
Valid Values are
GreaterThanOrEqualToThreshold
,GreaterThanThreshold
,LessThanThreshold
andLessThanOrEqualToThreshold
- See Also:
-
withComparisonOperator
The arithmetic operation to use when comparing the specified Statistic and Threshold.
Valid Values are
GreaterThanOrEqualToThreshold
,GreaterThanThreshold
,LessThanThreshold
andLessThanOrEqualToThreshold
- Parameters:
comparisonOperator
- The arithmetic operation to use when comparing the specified Statistic and Threshold.Valid Values are
GreaterThanOrEqualToThreshold
,GreaterThanThreshold
,LessThanThreshold
andLessThanOrEqualToThreshold
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setComparisonOperator
The arithmetic operation to use when comparing the specified Statistic and Threshold.
Valid Values are
GreaterThanOrEqualToThreshold
,GreaterThanThreshold
,LessThanThreshold
andLessThanOrEqualToThreshold
- Parameters:
comparisonOperator
- The arithmetic operation to use when comparing the specified Statistic and Threshold.Valid Values are
GreaterThanOrEqualToThreshold
,GreaterThanThreshold
,LessThanThreshold
andLessThanOrEqualToThreshold
- See Also:
-
withComparisonOperator
The arithmetic operation to use when comparing the specified Statistic and Threshold.
Valid Values are
GreaterThanOrEqualToThreshold
,GreaterThanThreshold
,LessThanThreshold
andLessThanOrEqualToThreshold
- Parameters:
comparisonOperator
- The arithmetic operation to use when comparing the specified Statistic and Threshold.Valid Values are
GreaterThanOrEqualToThreshold
,GreaterThanThreshold
,LessThanThreshold
andLessThanOrEqualToThreshold
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setPeriod
An integer that represents the period in seconds over which the statistic is applied.
- Parameters:
period
- An integer that represents the period in seconds over which the statistic is applied.
-
getPeriod
An integer that represents the period in seconds over which the statistic is applied.
- Returns:
- An integer that represents the period in seconds over which the statistic is applied.
-
withPeriod
An integer that represents the period in seconds over which the statistic is applied.
- Parameters:
period
- An integer that represents the period in seconds over which the statistic is applied.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setMetricName
The name of the CloudWatch metric that is associated with the CloudWatch alarm.
- Parameters:
metricName
- The name of the CloudWatch metric that is associated with the CloudWatch alarm.
-
getMetricName
The name of the CloudWatch metric that is associated with the CloudWatch alarm.
- Returns:
- The name of the CloudWatch metric that is associated with the CloudWatch alarm.
-
withMetricName
The name of the CloudWatch metric that is associated with the CloudWatch alarm.
- Parameters:
metricName
- The name of the CloudWatch metric that is associated with the CloudWatch alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setNamespace
The namespace of the CloudWatch metric that is associated with the CloudWatch alarm.
- Parameters:
namespace
- The namespace of the CloudWatch metric that is associated with the CloudWatch alarm.
-
getNamespace
The namespace of the CloudWatch metric that is associated with the CloudWatch alarm.
- Returns:
- The namespace of the CloudWatch metric that is associated with the CloudWatch alarm.
-
withNamespace
The namespace of the CloudWatch metric that is associated with the CloudWatch alarm.
- Parameters:
namespace
- The namespace of the CloudWatch metric that is associated with the CloudWatch alarm.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setStatistic
The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.
Valid Values are
SampleCount
,Average
,Sum
,Minimum
andMaximum
- Parameters:
statistic
- The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.Valid Values are
SampleCount
,Average
,Sum
,Minimum
andMaximum
- See Also:
-
getStatistic
The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.
Valid Values are
SampleCount
,Average
,Sum
,Minimum
andMaximum
- Returns:
- The statistic to apply to the CloudWatch metric that is
associated with the CloudWatch alarm.
Valid Values are
SampleCount
,Average
,Sum
,Minimum
andMaximum
- See Also:
-
withStatistic
The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.
Valid Values are
SampleCount
,Average
,Sum
,Minimum
andMaximum
- Parameters:
statistic
- The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.Valid Values are
SampleCount
,Average
,Sum
,Minimum
andMaximum
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setStatistic
The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.
Valid Values are
SampleCount
,Average
,Sum
,Minimum
andMaximum
- Parameters:
statistic
- The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.Valid Values are
SampleCount
,Average
,Sum
,Minimum
andMaximum
- See Also:
-
withStatistic
The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.
Valid Values are
SampleCount
,Average
,Sum
,Minimum
andMaximum
- Parameters:
statistic
- The statistic to apply to the CloudWatch metric that is associated with the CloudWatch alarm.Valid Values are
SampleCount
,Average
,Sum
,Minimum
andMaximum
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
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.- Returns:
- 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.
-
setDimensions
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.- Parameters:
dimensions
- A list ofDimension
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.
-
withDimensions
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)
orwithDimensions(java.util.Collection)
if you want to override the existing values.- Parameters:
dimensions
- A list ofDimension
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withDimensions
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.- Parameters:
dimensions
- A list ofDimension
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-