@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()
The adjustment type.
|
String |
autoScalingGroupName()
The name or ARN of the group.
|
static PutScalingPolicyRequest.Builder |
builder() |
Integer |
cooldown()
The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can
start.
|
boolean |
equals(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)
Used to retrieve the value of a field from any class that extends
SdkRequest . |
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 to scale, based on the specified adjustment type.
|
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 policy.
|
PutScalingPolicyRequest.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
overrideConfiguration
copy
public String autoScalingGroupName()
The name or ARN of the 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()
The adjustment type. The valid values are ChangeInCapacity
, ExactCapacity
, and
PercentChangeInCapacity
.
This parameter is supported if the policy type is SimpleScaling
or StepScaling
.
For more information, see Dynamic Scaling in the Auto Scaling User Guide.
ChangeInCapacity
, ExactCapacity
, and
PercentChangeInCapacity
.
This parameter is supported if the policy type is SimpleScaling
or StepScaling
.
For more information, see Dynamic Scaling in the 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 parameter is supported 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 parameter is supported if the policy type is SimpleScaling
or StepScaling
.
public 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.
This parameter is required if the policy type is SimpleScaling
and not supported otherwise.
This parameter is required if the policy type is SimpleScaling
and not supported otherwise.
public Integer cooldown()
The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start. If this parameter is not specified, the default cooldown period for the group applies.
This parameter is supported if the policy type is SimpleScaling
.
For more information, see Auto Scaling Cooldowns in the Auto Scaling User Guide.
This parameter is supported if the policy type is SimpleScaling
.
For more information, see Auto Scaling Cooldowns in the 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
.
This parameter is supported if the policy type is StepScaling
.
Minimum
,
Maximum
, and Average
. If the aggregation type is null, the value is treated as
Average
.
This parameter is supported 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.
This parameter is required if the policy type is StepScaling
and not supported otherwise.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This parameter is required if the policy type is StepScaling
and not supported otherwise.
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.
This parameter is supported if the policy type is StepScaling
or TargetTrackingScaling
.
This parameter is supported if the policy type is StepScaling
or
TargetTrackingScaling
.
public TargetTrackingConfiguration targetTrackingConfiguration()
A target tracking policy.
This parameter is required if the policy type is TargetTrackingScaling
and not supported otherwise.
This parameter is required if the policy type is TargetTrackingScaling
and not supported
otherwise.
public PutScalingPolicyRequest.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<PutScalingPolicyRequest.Builder,PutScalingPolicyRequest>
toBuilder
in class AutoScalingRequest
public static PutScalingPolicyRequest.Builder builder()
public static Class<? extends PutScalingPolicyRequest.Builder> serializableBuilderClass()
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
SdkRequest
SdkRequest
. The field name
specified should match the member name from the corresponding service-2.json model specified in the
codegen-resources folder for a given service. The class specifies what class to cast the returned value to.
If the returned value is also a modeled class, the SdkRequest.getValueForField(String, Class)
method will
again be available.getValueForField
in class SdkRequest
fieldName
- The name of the member to be retrieved.clazz
- The class to cast the returned object to.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.