@Generated(value="software.amazon.awssdk:codegen") public final class ScalingPolicy extends Object implements SdkPojo, Serializable, ToCopyableBuilder<ScalingPolicy.Builder,ScalingPolicy>
Describes a scaling policy.
| Modifier and Type | Class and Description |
|---|---|
static interface |
ScalingPolicy.Builder |
| Modifier and Type | Method and Description |
|---|---|
String |
adjustmentType()
Specifies how the scaling adjustment is interpreted (for example, an absolute number or a percentage).
|
List<Alarm> |
alarms()
The CloudWatch alarms related to the policy.
|
String |
autoScalingGroupName()
The name of the Auto Scaling group.
|
static ScalingPolicy.Builder |
builder() |
Integer |
cooldown()
The duration of the policy's cooldown period, in seconds.
|
Boolean |
enabled()
Indicates whether the policy is enabled (
true) or disabled (false). |
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
Integer |
estimatedInstanceWarmup()
The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
boolean |
hasAlarms()
For responses, this returns true if the service returned a value for the Alarms property.
|
int |
hashCode() |
boolean |
hasStepAdjustments()
For responses, this returns true if the service returned a value for the StepAdjustments property.
|
String |
metricAggregationType()
The aggregation type for the CloudWatch metrics.
|
Integer |
minAdjustmentMagnitude()
The minimum value to scale by when the adjustment type is
PercentChangeInCapacity. |
Integer |
minAdjustmentStep()
Available for backward compatibility.
|
String |
policyARN()
The Amazon Resource Name (ARN) of the policy.
|
String |
policyName()
The name of the scaling policy.
|
String |
policyType()
One of the following policy types:
|
PredictiveScalingConfiguration |
predictiveScalingConfiguration()
A predictive scaling policy.
|
Integer |
scalingAdjustment()
The amount by which to scale, based on the specified adjustment type.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends ScalingPolicy.Builder> |
serializableBuilderClass() |
List<StepAdjustment> |
stepAdjustments()
A set of adjustments that enable you to scale based on the size of the alarm breach.
|
TargetTrackingConfiguration |
targetTrackingConfiguration()
A target tracking scaling policy.
|
ScalingPolicy.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic final String autoScalingGroupName()
The name of the Auto Scaling group.
public final String policyName()
The name of the scaling policy.
public final String policyARN()
The Amazon Resource Name (ARN) of the policy.
public final String policyType()
One of the following policy types:
TargetTrackingScaling
StepScaling
SimpleScaling (default)
PredictiveScaling
For more information, see Target tracking scaling policies and Step and simple scaling policies in the Amazon EC2 Auto Scaling User Guide.
TargetTrackingScaling
StepScaling
SimpleScaling (default)
PredictiveScaling
For more information, see Target tracking scaling policies and Step and simple scaling policies in the Amazon EC2 Auto Scaling User Guide.
public final String adjustmentType()
Specifies how the scaling adjustment is interpreted (for example, an absolute number or a percentage). The valid
values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
ChangeInCapacity, ExactCapacity, and
PercentChangeInCapacity.public final Integer minAdjustmentStep()
Available for backward compatibility. Use MinAdjustmentMagnitude instead.
MinAdjustmentMagnitude instead.public final Integer minAdjustmentMagnitude()
The minimum value to scale by when the adjustment type is PercentChangeInCapacity.
PercentChangeInCapacity.public final Integer scalingAdjustment()
The amount by which to scale, based on the specified adjustment type. A positive value adds to the current capacity while a negative number removes from the current capacity.
public final Integer cooldown()
The duration of the policy's cooldown period, in seconds.
public final boolean hasStepAdjustments()
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<StepAdjustment> stepAdjustments()
A set of adjustments that enable you to scale based on the size of the alarm breach.
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 hasStepAdjustments() method.
public final String metricAggregationType()
The aggregation type for the CloudWatch metrics. The valid values are Minimum, Maximum,
and Average.
Minimum,
Maximum, and Average.public final Integer estimatedInstanceWarmup()
The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.
public final boolean hasAlarms()
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<Alarm> alarms()
The CloudWatch alarms related to the policy.
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 hasAlarms() method.
public final TargetTrackingConfiguration targetTrackingConfiguration()
A target tracking scaling policy.
public final Boolean enabled()
Indicates whether the policy is enabled (true) or disabled (false).
true) or disabled (false).public final PredictiveScalingConfiguration predictiveScalingConfiguration()
A predictive scaling policy.
public ScalingPolicy.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<ScalingPolicy.Builder,ScalingPolicy>public static ScalingPolicy.Builder builder()
public static Class<? extends ScalingPolicy.Builder> serializableBuilderClass()
public final boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic final String toString()
Copyright © 2023. All rights reserved.