@Generated(value="software.amazon.awssdk:codegen") public final class CloudWatchAlarmDefinition extends Object implements StructuredPojo, ToCopyableBuilder<CloudWatchAlarmDefinition.Builder,CloudWatchAlarmDefinition>
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.
Modifier and Type | Class and Description |
---|---|
static interface |
CloudWatchAlarmDefinition.Builder |
Modifier and Type | Method and Description |
---|---|
static CloudWatchAlarmDefinition.Builder |
builder() |
ComparisonOperator |
comparisonOperator()
Determines how the metric specified by
MetricName is compared to the value specified by
Threshold . |
String |
comparisonOperatorAsString()
Determines how the metric specified by
MetricName is compared to the value specified by
Threshold . |
List<MetricDimension> |
dimensions()
A CloudWatch metric dimension.
|
boolean |
equals(Object obj) |
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. |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
String |
metricName()
The name of the CloudWatch metric that is watched to determine an alarm condition.
|
String |
namespace()
The namespace for the CloudWatch metric.
|
Integer |
period()
The period, in seconds, over which the statistic is applied.
|
static Class<? extends CloudWatchAlarmDefinition.Builder> |
serializableBuilderClass() |
Statistic |
statistic()
The statistic to apply to the metric associated with the alarm.
|
String |
statisticAsString()
The statistic to apply to the metric associated with the alarm.
|
Double |
threshold()
The value against which the specified statistic is compared.
|
CloudWatchAlarmDefinition.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
Unit |
unit()
The unit of measure associated with the CloudWatch metric being watched.
|
String |
unitAsString()
The unit of measure associated with the CloudWatch metric being watched.
|
copy
public ComparisonOperator comparisonOperator()
Determines how the metric specified by MetricName
is compared to the value specified by
Threshold
.
If the service returns an enum value that is not available in the current SDK version,
comparisonOperator
will return ComparisonOperator.UNKNOWN_TO_SDK_VERSION
. The raw value returned
by the service is available from comparisonOperatorAsString()
.
MetricName
is compared to the value specified by
Threshold
.ComparisonOperator
public String comparisonOperatorAsString()
Determines how the metric specified by MetricName
is compared to the value specified by
Threshold
.
If the service returns an enum value that is not available in the current SDK version,
comparisonOperator
will return ComparisonOperator.UNKNOWN_TO_SDK_VERSION
. The raw value returned
by the service is available from comparisonOperatorAsString()
.
MetricName
is compared to the value specified by
Threshold
.ComparisonOperator
public 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
.
Period
, during which the alarm condition
must exist before the alarm triggers automatic scaling activity. The default value is 1
.public String metricName()
The name of the CloudWatch metric that is watched to determine an alarm condition.
public String namespace()
The namespace for the CloudWatch metric. The default is AWS/ElasticMapReduce
.
AWS/ElasticMapReduce
.public 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
.
300
.public Statistic statistic()
The statistic to apply to the metric associated with the alarm. The default is AVERAGE
.
If the service returns an enum value that is not available in the current SDK version, statistic
will
return Statistic.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
statisticAsString()
.
AVERAGE
.Statistic
public String statisticAsString()
The statistic to apply to the metric associated with the alarm. The default is AVERAGE
.
If the service returns an enum value that is not available in the current SDK version, statistic
will
return Statistic.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
statisticAsString()
.
AVERAGE
.Statistic
public Double threshold()
The value against which the specified statistic is compared.
public 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.
If the service returns an enum value that is not available in the current SDK version, unit
will return
Unit.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
unitAsString()
.
Unit
must correspond to the units specified in the CloudWatch metric.Unit
public String unitAsString()
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.
If the service returns an enum value that is not available in the current SDK version, unit
will return
Unit.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
unitAsString()
.
Unit
must correspond to the units specified in the CloudWatch metric.Unit
public List<MetricDimension> dimensions()
A CloudWatch metric dimension.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
public CloudWatchAlarmDefinition.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<CloudWatchAlarmDefinition.Builder,CloudWatchAlarmDefinition>
public static CloudWatchAlarmDefinition.Builder builder()
public static Class<? extends CloudWatchAlarmDefinition.Builder> serializableBuilderClass()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.