@Generated(value="software.amazon.awssdk:codegen") public final class PutScalingPolicyRequest extends AutoScalingRequest implements ToCopyableBuilder<PutScalingPolicyRequest.Builder,PutScalingPolicyRequest>
| Modifier and Type | Class and Description |
|---|---|
static interface |
PutScalingPolicyRequest.Builder |
| Modifier and Type | Method and Description |
|---|---|
String |
adjustmentType()
Specifies whether the
ScalingAdjustment parameter is an absolute number or a percentage of the
current capacity. |
String |
autoScalingGroupName()
The name of the Auto Scaling group.
|
static PutScalingPolicyRequest.Builder |
builder() |
Integer |
cooldown()
The amount of time, in seconds, after a scaling activity completes before any further dynamic scaling activities
can start.
|
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) |
int |
hashCode() |
String |
metricAggregationType()
The aggregation type for the CloudWatch metrics.
|
Integer |
minAdjustmentMagnitude()
The minimum number of instances to scale.
|
Integer |
minAdjustmentStep()
Available for backward compatibility.
|
String |
policyName()
The name of the policy.
|
String |
policyType()
The policy type.
|
Integer |
scalingAdjustment()
The amount by which a simple scaling policy scales the Auto Scaling group in response to an alarm breach.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends PutScalingPolicyRequest.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.
|
PutScalingPolicyRequest.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
overrideConfigurationclone, finalize, getClass, notify, notifyAll, wait, wait, waitcopypublic String autoScalingGroupName()
The name of the Auto Scaling group.
public String policyName()
The name of the policy.
public String policyType()
The policy type. The valid values are SimpleScaling, StepScaling, and
TargetTrackingScaling. If the policy type is null, the value is treated as
SimpleScaling.
SimpleScaling, StepScaling, and
TargetTrackingScaling. If the policy type is null, the value is treated as
SimpleScaling.public String adjustmentType()
Specifies whether the ScalingAdjustment parameter is an absolute number or a percentage of the
current capacity. The valid values are ChangeInCapacity, ExactCapacity, and
PercentChangeInCapacity.
Valid only if the policy type is StepScaling or SimpleScaling. For more information,
see Scaling Adjustment Types in the Amazon EC2 Auto Scaling User Guide.
ScalingAdjustment parameter is an absolute number or a percentage of
the current capacity. The valid values are ChangeInCapacity, ExactCapacity, and
PercentChangeInCapacity.
Valid only if the policy type is StepScaling or SimpleScaling. For more
information, see Scaling Adjustment Types in the Amazon EC2 Auto Scaling User Guide.
public Integer minAdjustmentStep()
Available for backward compatibility. Use MinAdjustmentMagnitude instead.
MinAdjustmentMagnitude instead.public Integer minAdjustmentMagnitude()
The minimum number of instances to scale. If the value of AdjustmentType is
PercentChangeInCapacity, the scaling policy changes the DesiredCapacity of the Auto
Scaling group by at least this many instances. Otherwise, the error is ValidationError.
This property replaces the MinAdjustmentStep property. For example, suppose that you create a step
scaling policy to scale out an Auto Scaling group by 25 percent and you specify a
MinAdjustmentMagnitude of 2. If the group has 4 instances and the scaling policy is performed, 25
percent of 4 is 1. However, because you specified a MinAdjustmentMagnitude of 2, Amazon EC2 Auto
Scaling scales out the group by 2 instances.
Valid only if the policy type is SimpleScaling or StepScaling.
AdjustmentType is
PercentChangeInCapacity, the scaling policy changes the DesiredCapacity of the
Auto Scaling group by at least this many instances. Otherwise, the error is ValidationError
.
This property replaces the MinAdjustmentStep property. For example, suppose that you create
a step scaling policy to scale out an Auto Scaling group by 25 percent and you specify a
MinAdjustmentMagnitude of 2. If the group has 4 instances and the scaling policy is
performed, 25 percent of 4 is 1. However, because you specified a MinAdjustmentMagnitude of
2, Amazon EC2 Auto Scaling scales out the group by 2 instances.
Valid only if the policy type is SimpleScaling or StepScaling.
public Integer scalingAdjustment()
The amount by which a simple scaling policy scales the Auto Scaling group in response to an alarm breach. The
adjustment is based on the value that you specified in the AdjustmentType parameter (either an
absolute number or a percentage). A positive value adds to the current capacity and a negative value subtracts
from the current capacity. For exact capacity, you must specify a positive value.
Conditional: If you specify SimpleScaling for the policy type, you must specify this parameter. (Not
used with any other policy type.)
AdjustmentType parameter
(either an absolute number or a percentage). A positive value adds to the current capacity and a negative
value subtracts from the current capacity. For exact capacity, you must specify a positive value.
Conditional: If you specify SimpleScaling for the policy type, you must specify this
parameter. (Not used with any other policy type.)
public Integer cooldown()
The amount of time, in seconds, after a scaling activity completes before any further dynamic scaling activities can start. If this parameter is not specified, the default cooldown period for the group applies.
Valid only if the policy type is SimpleScaling. For more information, see Scaling Cooldowns in the Amazon
EC2 Auto Scaling User Guide.
Valid only if the policy type is SimpleScaling. For more information, see Scaling Cooldowns in the
Amazon EC2 Auto Scaling User Guide.
public String metricAggregationType()
The aggregation type for the CloudWatch metrics. The valid values are Minimum, Maximum,
and Average. If the aggregation type is null, the value is treated as Average.
Valid only if the policy type is StepScaling.
Minimum,
Maximum, and Average. If the aggregation type is null, the value is treated as
Average.
Valid only if the policy type is StepScaling.
public List<StepAdjustment> stepAdjustments()
A set of adjustments that enable you to scale based on the size of the alarm breach.
Conditional: If you specify StepScaling for the policy type, you must specify this parameter. (Not
used with any other policy type.)
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
Conditional: If you specify StepScaling for the policy type, you must specify this
parameter. (Not used with any other policy type.)
public Integer estimatedInstanceWarmup()
The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. The default is to use the value specified for the default cooldown period for the group.
Valid only if the policy type is StepScaling or TargetTrackingScaling.
Valid only if the policy type is StepScaling or TargetTrackingScaling.
public TargetTrackingConfiguration targetTrackingConfiguration()
A target tracking scaling policy. Includes support for predefined or customized metrics.
For more information, see TargetTrackingConfiguration in the Amazon EC2 Auto Scaling API Reference.
Conditional: If you specify TargetTrackingScaling for the policy type, you must specify this
parameter. (Not used with any other policy type.)
For more information, see TargetTrackingConfiguration in the Amazon EC2 Auto Scaling API Reference.
Conditional: If you specify TargetTrackingScaling for the policy type, you must specify this
parameter. (Not used with any other policy type.)
public PutScalingPolicyRequest.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<PutScalingPolicyRequest.Builder,PutScalingPolicyRequest>toBuilder in class AutoScalingRequestpublic static PutScalingPolicyRequest.Builder builder()
public static Class<? extends PutScalingPolicyRequest.Builder> serializableBuilderClass()
public int hashCode()
hashCode in class AwsRequestpublic boolean equals(Object obj)
equals in class AwsRequestpublic boolean equalsBySdkFields(Object obj)
equalsBySdkFields in interface SdkPojopublic String toString()
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
getValueForField in class SdkRequestCopyright © 2019. All rights reserved.