@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()
For responses, this returns true if the service returned a value for the Dimensions property.
|
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()
isEmpty() method on the property). This is
useful because the SDK will never return a null collection or map, but you may need to differentiate between the
service returning nothing (or null) and the service returning an empty collection or map. For requests, this
returns true if a value for the property was specified in the request builder, and false if a value was not
specified.public final List<MetricDimension> dimensions()
A CloudWatch metric dimension.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that
you can differentiate between null and empty), you can use the hasDimensions() method.
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 © 2022. All rights reserved.