@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class CloudWatchAlarmDefinition extends Object implements Serializable, Cloneable, StructuredPojo
The definition of a CloudWatch metric alarm, which determines when an automatic scaling activity is triggered. When the defined alarm conditions are satisfied, scaling activity begins.
Constructor and Description |
---|
CloudWatchAlarmDefinition() |
Modifier and Type | Method and Description |
---|---|
CloudWatchAlarmDefinition |
clone() |
boolean |
equals(Object obj) |
String |
getComparisonOperator()
Determines how the metric specified by
MetricName is compared to the value specified by
Threshold . |
List<MetricDimension> |
getDimensions()
A CloudWatch metric dimension.
|
Integer |
getEvaluationPeriods()
The number of periods, expressed in seconds using
Period , during which the alarm condition must
exist before the alarm triggers automatic scaling activity. |
String |
getMetricName()
The name of the CloudWatch metric that is watched to determine an alarm condition.
|
String |
getNamespace()
The namespace for the CloudWatch metric.
|
Integer |
getPeriod()
The period, in seconds, over which the statistic is applied.
|
String |
getStatistic()
The statistic to apply to the metric associated with the alarm.
|
Double |
getThreshold()
The value against which the specified statistic is compared.
|
String |
getUnit()
The unit of measure associated with the CloudWatch metric being watched.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setComparisonOperator(ComparisonOperator comparisonOperator)
Determines how the metric specified by
MetricName is compared to the value specified by
Threshold . |
void |
setComparisonOperator(String comparisonOperator)
Determines how the metric specified by
MetricName is compared to the value specified by
Threshold . |
void |
setDimensions(Collection<MetricDimension> dimensions)
A CloudWatch metric dimension.
|
void |
setEvaluationPeriods(Integer evaluationPeriods)
The number of periods, expressed in seconds using
Period , during which the alarm condition must
exist before the alarm triggers automatic scaling activity. |
void |
setMetricName(String metricName)
The name of the CloudWatch metric that is watched to determine an alarm condition.
|
void |
setNamespace(String namespace)
The namespace for the CloudWatch metric.
|
void |
setPeriod(Integer period)
The period, in seconds, over which the statistic is applied.
|
void |
setStatistic(Statistic statistic)
The statistic to apply to the metric associated with the alarm.
|
void |
setStatistic(String statistic)
The statistic to apply to the metric associated with the alarm.
|
void |
setThreshold(Double threshold)
The value against which the specified statistic is compared.
|
void |
setUnit(String unit)
The unit of measure associated with the CloudWatch metric being watched.
|
void |
setUnit(Unit unit)
The unit of measure associated with the CloudWatch metric being watched.
|
String |
toString()
Returns a string representation of this object; useful for testing and debugging.
|
CloudWatchAlarmDefinition |
withComparisonOperator(ComparisonOperator comparisonOperator)
Determines how the metric specified by
MetricName is compared to the value specified by
Threshold . |
CloudWatchAlarmDefinition |
withComparisonOperator(String comparisonOperator)
Determines how the metric specified by
MetricName is compared to the value specified by
Threshold . |
CloudWatchAlarmDefinition |
withDimensions(Collection<MetricDimension> dimensions)
A CloudWatch metric dimension.
|
CloudWatchAlarmDefinition |
withDimensions(MetricDimension... dimensions)
A CloudWatch metric dimension.
|
CloudWatchAlarmDefinition |
withEvaluationPeriods(Integer evaluationPeriods)
The number of periods, expressed in seconds using
Period , during which the alarm condition must
exist before the alarm triggers automatic scaling activity. |
CloudWatchAlarmDefinition |
withMetricName(String metricName)
The name of the CloudWatch metric that is watched to determine an alarm condition.
|
CloudWatchAlarmDefinition |
withNamespace(String namespace)
The namespace for the CloudWatch metric.
|
CloudWatchAlarmDefinition |
withPeriod(Integer period)
The period, in seconds, over which the statistic is applied.
|
CloudWatchAlarmDefinition |
withStatistic(Statistic statistic)
The statistic to apply to the metric associated with the alarm.
|
CloudWatchAlarmDefinition |
withStatistic(String statistic)
The statistic to apply to the metric associated with the alarm.
|
CloudWatchAlarmDefinition |
withThreshold(Double threshold)
The value against which the specified statistic is compared.
|
CloudWatchAlarmDefinition |
withUnit(String unit)
The unit of measure associated with the CloudWatch metric being watched.
|
CloudWatchAlarmDefinition |
withUnit(Unit unit)
The unit of measure associated with the CloudWatch metric being watched.
|
public void setComparisonOperator(String comparisonOperator)
Determines how the metric specified by MetricName
is compared to the value specified by
Threshold
.
comparisonOperator
- Determines how the metric specified by MetricName
is compared to the value specified by
Threshold
.ComparisonOperator
public String getComparisonOperator()
Determines how the metric specified by MetricName
is compared to the value specified by
Threshold
.
MetricName
is compared to the value specified by
Threshold
.ComparisonOperator
public CloudWatchAlarmDefinition withComparisonOperator(String comparisonOperator)
Determines how the metric specified by MetricName
is compared to the value specified by
Threshold
.
comparisonOperator
- Determines how the metric specified by MetricName
is compared to the value specified by
Threshold
.ComparisonOperator
public void setComparisonOperator(ComparisonOperator comparisonOperator)
Determines how the metric specified by MetricName
is compared to the value specified by
Threshold
.
comparisonOperator
- Determines how the metric specified by MetricName
is compared to the value specified by
Threshold
.ComparisonOperator
public CloudWatchAlarmDefinition withComparisonOperator(ComparisonOperator comparisonOperator)
Determines how the metric specified by MetricName
is compared to the value specified by
Threshold
.
comparisonOperator
- Determines how the metric specified by MetricName
is compared to the value specified by
Threshold
.ComparisonOperator
public void setEvaluationPeriods(Integer evaluationPeriods)
The number of periods, expressed in seconds using Period
, during which the alarm condition must
exist before the alarm triggers automatic scaling activity. The default value is 1
.
evaluationPeriods
- The number of periods, expressed in seconds using Period
, during which the alarm condition
must exist before the alarm triggers automatic scaling activity. The default value is 1
.public Integer getEvaluationPeriods()
The number of periods, expressed in seconds using Period
, during which the alarm condition must
exist before the alarm triggers automatic scaling activity. The default value is 1
.
Period
, during which the alarm condition
must exist before the alarm triggers automatic scaling activity. The default value is 1
.public CloudWatchAlarmDefinition withEvaluationPeriods(Integer evaluationPeriods)
The number of periods, expressed in seconds using Period
, during which the alarm condition must
exist before the alarm triggers automatic scaling activity. The default value is 1
.
evaluationPeriods
- The number of periods, expressed in seconds using Period
, during which the alarm condition
must exist before the alarm triggers automatic scaling activity. The default value is 1
.public void setMetricName(String metricName)
The name of the CloudWatch metric that is watched to determine an alarm condition.
metricName
- The name of the CloudWatch metric that is watched to determine an alarm condition.public String getMetricName()
The name of the CloudWatch metric that is watched to determine an alarm condition.
public CloudWatchAlarmDefinition withMetricName(String metricName)
The name of the CloudWatch metric that is watched to determine an alarm condition.
metricName
- The name of the CloudWatch metric that is watched to determine an alarm condition.public void setNamespace(String namespace)
The namespace for the CloudWatch metric. The default is AWS/ElasticMapReduce
.
namespace
- The namespace for the CloudWatch metric. The default is AWS/ElasticMapReduce
.public String getNamespace()
The namespace for the CloudWatch metric. The default is AWS/ElasticMapReduce
.
AWS/ElasticMapReduce
.public CloudWatchAlarmDefinition withNamespace(String namespace)
The namespace for the CloudWatch metric. The default is AWS/ElasticMapReduce
.
namespace
- The namespace for the CloudWatch metric. The default is AWS/ElasticMapReduce
.public void setPeriod(Integer period)
The period, in seconds, over which the statistic is applied. EMR CloudWatch metrics are emitted every five
minutes (300 seconds), so if an EMR CloudWatch metric is specified, specify 300
.
period
- The period, in seconds, over which the statistic is applied. EMR CloudWatch metrics are emitted every five
minutes (300 seconds), so if an EMR CloudWatch metric is specified, specify 300
.public Integer getPeriod()
The period, in seconds, over which the statistic is applied. EMR CloudWatch metrics are emitted every five
minutes (300 seconds), so if an EMR CloudWatch metric is specified, specify 300
.
300
.public CloudWatchAlarmDefinition withPeriod(Integer period)
The period, in seconds, over which the statistic is applied. EMR CloudWatch metrics are emitted every five
minutes (300 seconds), so if an EMR CloudWatch metric is specified, specify 300
.
period
- The period, in seconds, over which the statistic is applied. EMR CloudWatch metrics are emitted every five
minutes (300 seconds), so if an EMR CloudWatch metric is specified, specify 300
.public void setStatistic(String statistic)
The statistic to apply to the metric associated with the alarm. The default is AVERAGE
.
statistic
- The statistic to apply to the metric associated with the alarm. The default is AVERAGE
.Statistic
public String getStatistic()
The statistic to apply to the metric associated with the alarm. The default is AVERAGE
.
AVERAGE
.Statistic
public CloudWatchAlarmDefinition withStatistic(String statistic)
The statistic to apply to the metric associated with the alarm. The default is AVERAGE
.
statistic
- The statistic to apply to the metric associated with the alarm. The default is AVERAGE
.Statistic
public void setStatistic(Statistic statistic)
The statistic to apply to the metric associated with the alarm. The default is AVERAGE
.
statistic
- The statistic to apply to the metric associated with the alarm. The default is AVERAGE
.Statistic
public CloudWatchAlarmDefinition withStatistic(Statistic statistic)
The statistic to apply to the metric associated with the alarm. The default is AVERAGE
.
statistic
- The statistic to apply to the metric associated with the alarm. The default is AVERAGE
.Statistic
public void setThreshold(Double threshold)
The value against which the specified statistic is compared.
threshold
- The value against which the specified statistic is compared.public Double getThreshold()
The value against which the specified statistic is compared.
public CloudWatchAlarmDefinition withThreshold(Double threshold)
The value against which the specified statistic is compared.
threshold
- The value against which the specified statistic is compared.public void setUnit(String unit)
The unit of measure associated with the CloudWatch metric being watched. The value specified for
Unit
must correspond to the units specified in the CloudWatch metric.
unit
- The unit of measure associated with the CloudWatch metric being watched. The value specified for
Unit
must correspond to the units specified in the CloudWatch metric.Unit
public String getUnit()
The unit of measure associated with the CloudWatch metric being watched. The value specified for
Unit
must correspond to the units specified in the CloudWatch metric.
Unit
must correspond to the units specified in the CloudWatch metric.Unit
public CloudWatchAlarmDefinition withUnit(String unit)
The unit of measure associated with the CloudWatch metric being watched. The value specified for
Unit
must correspond to the units specified in the CloudWatch metric.
unit
- The unit of measure associated with the CloudWatch metric being watched. The value specified for
Unit
must correspond to the units specified in the CloudWatch metric.Unit
public void setUnit(Unit unit)
The unit of measure associated with the CloudWatch metric being watched. The value specified for
Unit
must correspond to the units specified in the CloudWatch metric.
unit
- The unit of measure associated with the CloudWatch metric being watched. The value specified for
Unit
must correspond to the units specified in the CloudWatch metric.Unit
public CloudWatchAlarmDefinition withUnit(Unit unit)
The unit of measure associated with the CloudWatch metric being watched. The value specified for
Unit
must correspond to the units specified in the CloudWatch metric.
unit
- The unit of measure associated with the CloudWatch metric being watched. The value specified for
Unit
must correspond to the units specified in the CloudWatch metric.Unit
public List<MetricDimension> getDimensions()
A CloudWatch metric dimension.
public void setDimensions(Collection<MetricDimension> dimensions)
A CloudWatch metric dimension.
dimensions
- A CloudWatch metric dimension.public CloudWatchAlarmDefinition withDimensions(MetricDimension... dimensions)
A CloudWatch metric dimension.
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 CloudWatch metric dimension.public CloudWatchAlarmDefinition withDimensions(Collection<MetricDimension> dimensions)
A CloudWatch metric dimension.
dimensions
- A CloudWatch metric dimension.public String toString()
toString
in class Object
Object.toString()
public CloudWatchAlarmDefinition clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.