@Generated(value="software.amazon.awssdk:codegen") public final class CloudWatchAlarmDefinition extends Object implements SdkPojo, Serializable, 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) |
boolean |
equalsBySdkFields(Object obj) |
Integer |
evaluationPeriods()
The number of periods, in five-minute increments, during which the alarm condition must exist before the alarm
triggers automatic scaling activity.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
boolean |
hasDimensions()
Returns true if the Dimensions property was specified by the sender (it may be empty), or false if the sender did
not specify the value (it will be empty).
|
int |
hashCode() |
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.
|
List<SdkField<?>> |
sdkFields() |
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() |
String |
toString()
Returns a string representation of this object.
|
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.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final 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.ComparisonOperatorpublic final 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.ComparisonOperatorpublic final Integer evaluationPeriods()
The number of periods, in five-minute increments, during which the alarm condition must exist before the alarm
triggers automatic scaling activity. The default value is 1.
1.public final String metricName()
The name of the CloudWatch metric that is watched to determine an alarm condition.
public final String namespace()
The namespace for the CloudWatch metric. The default is AWS/ElasticMapReduce.
AWS/ElasticMapReduce.public final 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 final 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.Statisticpublic final 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.Statisticpublic final Double threshold()
The value against which the specified statistic is compared.
public final 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.Unitpublic final 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.Unitpublic final boolean hasDimensions()
public final List<MetricDimension> dimensions()
A CloudWatch metric dimension.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
You can use hasDimensions() to see if a value was sent in this field.
public CloudWatchAlarmDefinition.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<CloudWatchAlarmDefinition.Builder,CloudWatchAlarmDefinition>public static CloudWatchAlarmDefinition.Builder builder()
public static Class<? extends CloudWatchAlarmDefinition.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
Copyright © 2021. All rights reserved.