public class PutScalingPolicyRequest extends AmazonWebServiceRequest implements java.io.Serializable, java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
adjustmentType
The adjustment type.
|
private java.lang.String |
autoScalingGroupName
The name or ARN of the group.
|
private java.lang.Integer |
cooldown
The amount of time, in seconds, after a scaling activity completes and
before the next scaling activity can start.
|
private java.lang.Integer |
estimatedInstanceWarmup
The estimated time, in seconds, until a newly launched instance can
contribute to the CloudWatch metrics.
|
private java.lang.String |
metricAggregationType
The aggregation type for the CloudWatch metrics.
|
private java.lang.Integer |
minAdjustmentMagnitude
The minimum number of instances to scale.
|
private java.lang.Integer |
minAdjustmentStep
Available for backward compatibility.
|
private java.lang.String |
policyName
The name of the policy.
|
private java.lang.String |
policyType
The policy type.
|
private java.lang.Integer |
scalingAdjustment
The amount by which to scale, based on the specified adjustment type.
|
private SdkInternalList<StepAdjustment> |
stepAdjustments
A set of adjustments that enable you to scale based on the size of the
alarm breach.
|
NOOP
Constructor and Description |
---|
PutScalingPolicyRequest() |
Modifier and Type | Method and Description |
---|---|
PutScalingPolicyRequest |
clone()
Creates a shallow clone of this request.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAdjustmentType()
The adjustment type.
|
java.lang.String |
getAutoScalingGroupName()
The name or ARN of the group.
|
java.lang.Integer |
getCooldown()
The amount of time, in seconds, after a scaling activity completes and
before the next scaling activity can start.
|
java.lang.Integer |
getEstimatedInstanceWarmup()
The estimated time, in seconds, until a newly launched instance can
contribute to the CloudWatch metrics.
|
java.lang.String |
getMetricAggregationType()
The aggregation type for the CloudWatch metrics.
|
java.lang.Integer |
getMinAdjustmentMagnitude()
The minimum number of instances to scale.
|
java.lang.Integer |
getMinAdjustmentStep()
Available for backward compatibility.
|
java.lang.String |
getPolicyName()
The name of the policy.
|
java.lang.String |
getPolicyType()
The policy type.
|
java.lang.Integer |
getScalingAdjustment()
The amount by which to scale, based on the specified adjustment type.
|
java.util.List<StepAdjustment> |
getStepAdjustments()
A set of adjustments that enable you to scale based on the size of the
alarm breach.
|
int |
hashCode() |
void |
setAdjustmentType(java.lang.String adjustmentType)
The adjustment type.
|
void |
setAutoScalingGroupName(java.lang.String autoScalingGroupName)
The name or ARN of the group.
|
void |
setCooldown(java.lang.Integer cooldown)
The amount of time, in seconds, after a scaling activity completes and
before the next scaling activity can start.
|
void |
setEstimatedInstanceWarmup(java.lang.Integer estimatedInstanceWarmup)
The estimated time, in seconds, until a newly launched instance can
contribute to the CloudWatch metrics.
|
void |
setMetricAggregationType(java.lang.String metricAggregationType)
The aggregation type for the CloudWatch metrics.
|
void |
setMinAdjustmentMagnitude(java.lang.Integer minAdjustmentMagnitude)
The minimum number of instances to scale.
|
void |
setMinAdjustmentStep(java.lang.Integer minAdjustmentStep)
Available for backward compatibility.
|
void |
setPolicyName(java.lang.String policyName)
The name of the policy.
|
void |
setPolicyType(java.lang.String policyType)
The policy type.
|
void |
setScalingAdjustment(java.lang.Integer scalingAdjustment)
The amount by which to scale, based on the specified adjustment type.
|
void |
setStepAdjustments(java.util.Collection<StepAdjustment> stepAdjustments)
A set of adjustments that enable you to scale based on the size of the
alarm breach.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
PutScalingPolicyRequest |
withAdjustmentType(java.lang.String adjustmentType)
The adjustment type.
|
PutScalingPolicyRequest |
withAutoScalingGroupName(java.lang.String autoScalingGroupName)
The name or ARN of the group.
|
PutScalingPolicyRequest |
withCooldown(java.lang.Integer cooldown)
The amount of time, in seconds, after a scaling activity completes and
before the next scaling activity can start.
|
PutScalingPolicyRequest |
withEstimatedInstanceWarmup(java.lang.Integer estimatedInstanceWarmup)
The estimated time, in seconds, until a newly launched instance can
contribute to the CloudWatch metrics.
|
PutScalingPolicyRequest |
withMetricAggregationType(java.lang.String metricAggregationType)
The aggregation type for the CloudWatch metrics.
|
PutScalingPolicyRequest |
withMinAdjustmentMagnitude(java.lang.Integer minAdjustmentMagnitude)
The minimum number of instances to scale.
|
PutScalingPolicyRequest |
withMinAdjustmentStep(java.lang.Integer minAdjustmentStep)
Available for backward compatibility.
|
PutScalingPolicyRequest |
withPolicyName(java.lang.String policyName)
The name of the policy.
|
PutScalingPolicyRequest |
withPolicyType(java.lang.String policyType)
The policy type.
|
PutScalingPolicyRequest |
withScalingAdjustment(java.lang.Integer scalingAdjustment)
The amount by which to scale, based on the specified adjustment type.
|
PutScalingPolicyRequest |
withStepAdjustments(java.util.Collection<StepAdjustment> stepAdjustments)
A set of adjustments that enable you to scale based on the size of the
alarm breach.
|
PutScalingPolicyRequest |
withStepAdjustments(StepAdjustment... stepAdjustments)
A set of adjustments that enable you to scale based on the size of the
alarm breach.
|
copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
private java.lang.String autoScalingGroupName
The name or ARN of the group.
private java.lang.String policyName
The name of the policy.
private java.lang.String policyType
The policy type. Valid values are SimpleScaling
and
StepScaling
. If the policy type is null, the value is
treated as SimpleScaling
.
private java.lang.String adjustmentType
The adjustment type. Valid values are ChangeInCapacity
,
ExactCapacity
, and PercentChangeInCapacity
.
For more information, see Dynamic Scaling in the Auto Scaling Developer Guide.
private java.lang.Integer minAdjustmentStep
Available for backward compatibility. Use
MinAdjustmentMagnitude
instead.
private java.lang.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
.
private java.lang.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.
private java.lang.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 not supported unless the policy type is
SimpleScaling
.
For more information, see Auto Scaling Cooldowns in the Auto Scaling Developer Guide.
private java.lang.String metricAggregationType
The aggregation type for the CloudWatch metrics. Valid values are
Minimum
, Maximum
, and Average
. If
the aggregation type is null, the value is treated as
Average
.
This parameter is not supported if the policy type is
SimpleScaling
.
private SdkInternalList<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.
private java.lang.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 not supported if the policy type is
SimpleScaling
.
public void setAutoScalingGroupName(java.lang.String autoScalingGroupName)
The name or ARN of the group.
autoScalingGroupName
- The name or ARN of the group.public java.lang.String getAutoScalingGroupName()
The name or ARN of the group.
public PutScalingPolicyRequest withAutoScalingGroupName(java.lang.String autoScalingGroupName)
The name or ARN of the group.
autoScalingGroupName
- The name or ARN of the group.public void setPolicyName(java.lang.String policyName)
The name of the policy.
policyName
- The name of the policy.public java.lang.String getPolicyName()
The name of the policy.
public PutScalingPolicyRequest withPolicyName(java.lang.String policyName)
The name of the policy.
policyName
- The name of the policy.public void setPolicyType(java.lang.String policyType)
The policy type. Valid values are SimpleScaling
and
StepScaling
. If the policy type is null, the value is
treated as SimpleScaling
.
policyType
- The policy type. Valid values are SimpleScaling
and
StepScaling
. If the policy type is null, the value is
treated as SimpleScaling
.public java.lang.String getPolicyType()
The policy type. Valid values are SimpleScaling
and
StepScaling
. If the policy type is null, the value is
treated as SimpleScaling
.
SimpleScaling
and
StepScaling
. If the policy type is null, the value
is treated as SimpleScaling
.public PutScalingPolicyRequest withPolicyType(java.lang.String policyType)
The policy type. Valid values are SimpleScaling
and
StepScaling
. If the policy type is null, the value is
treated as SimpleScaling
.
policyType
- The policy type. Valid values are SimpleScaling
and
StepScaling
. If the policy type is null, the value is
treated as SimpleScaling
.public void setAdjustmentType(java.lang.String adjustmentType)
The adjustment type. Valid values are ChangeInCapacity
,
ExactCapacity
, and PercentChangeInCapacity
.
For more information, see Dynamic Scaling in the Auto Scaling Developer Guide.
adjustmentType
- The adjustment type. Valid values are
ChangeInCapacity
, ExactCapacity
, and
PercentChangeInCapacity
.
For more information, see Dynamic Scaling in the Auto Scaling Developer Guide.
public java.lang.String getAdjustmentType()
The adjustment type. Valid values are ChangeInCapacity
,
ExactCapacity
, and PercentChangeInCapacity
.
For more information, see Dynamic Scaling in the Auto Scaling Developer Guide.
ChangeInCapacity
, ExactCapacity
, and
PercentChangeInCapacity
.
For more information, see Dynamic Scaling in the Auto Scaling Developer Guide.
public PutScalingPolicyRequest withAdjustmentType(java.lang.String adjustmentType)
The adjustment type. Valid values are ChangeInCapacity
,
ExactCapacity
, and PercentChangeInCapacity
.
For more information, see Dynamic Scaling in the Auto Scaling Developer Guide.
adjustmentType
- The adjustment type. Valid values are
ChangeInCapacity
, ExactCapacity
, and
PercentChangeInCapacity
.
For more information, see Dynamic Scaling in the Auto Scaling Developer Guide.
public void setMinAdjustmentStep(java.lang.Integer minAdjustmentStep)
Available for backward compatibility. Use
MinAdjustmentMagnitude
instead.
minAdjustmentStep
- Available for backward compatibility. Use
MinAdjustmentMagnitude
instead.public java.lang.Integer getMinAdjustmentStep()
Available for backward compatibility. Use
MinAdjustmentMagnitude
instead.
MinAdjustmentMagnitude
instead.public PutScalingPolicyRequest withMinAdjustmentStep(java.lang.Integer minAdjustmentStep)
Available for backward compatibility. Use
MinAdjustmentMagnitude
instead.
minAdjustmentStep
- Available for backward compatibility. Use
MinAdjustmentMagnitude
instead.public void setMinAdjustmentMagnitude(java.lang.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
.
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
.public java.lang.Integer getMinAdjustmentMagnitude()
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
.
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
.public PutScalingPolicyRequest withMinAdjustmentMagnitude(java.lang.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
.
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
.public void setScalingAdjustment(java.lang.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.
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.
public java.lang.Integer getScalingAdjustment()
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 PutScalingPolicyRequest withScalingAdjustment(java.lang.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.
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.
public void setCooldown(java.lang.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 not supported unless the policy type is
SimpleScaling
.
For more information, see Auto Scaling Cooldowns in the Auto Scaling Developer Guide.
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 not supported unless the policy type is
SimpleScaling
.
For more information, see Auto Scaling Cooldowns in the Auto Scaling Developer Guide.
public java.lang.Integer getCooldown()
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 not supported unless the policy type is
SimpleScaling
.
For more information, see Auto Scaling Cooldowns in the Auto Scaling Developer Guide.
This parameter is not supported unless the policy type is
SimpleScaling
.
For more information, see Auto Scaling Cooldowns in the Auto Scaling Developer Guide.
public PutScalingPolicyRequest withCooldown(java.lang.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 not supported unless the policy type is
SimpleScaling
.
For more information, see Auto Scaling Cooldowns in the Auto Scaling Developer Guide.
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 not supported unless the policy type is
SimpleScaling
.
For more information, see Auto Scaling Cooldowns in the Auto Scaling Developer Guide.
public void setMetricAggregationType(java.lang.String metricAggregationType)
The aggregation type for the CloudWatch metrics. Valid values are
Minimum
, Maximum
, and Average
. If
the aggregation type is null, the value is treated as
Average
.
This parameter is not supported if the policy type is
SimpleScaling
.
metricAggregationType
- The aggregation type for the CloudWatch metrics. Valid values are
Minimum
, Maximum
, and
Average
. If the aggregation type is null, the value
is treated as Average
.
This parameter is not supported if the policy type is
SimpleScaling
.
public java.lang.String getMetricAggregationType()
The aggregation type for the CloudWatch metrics. Valid values are
Minimum
, Maximum
, and Average
. If
the aggregation type is null, the value is treated as
Average
.
This parameter is not supported if the policy type is
SimpleScaling
.
Minimum
, Maximum
, and
Average
. If the aggregation type is null, the value
is treated as Average
.
This parameter is not supported if the policy type is
SimpleScaling
.
public PutScalingPolicyRequest withMetricAggregationType(java.lang.String metricAggregationType)
The aggregation type for the CloudWatch metrics. Valid values are
Minimum
, Maximum
, and Average
. If
the aggregation type is null, the value is treated as
Average
.
This parameter is not supported if the policy type is
SimpleScaling
.
metricAggregationType
- The aggregation type for the CloudWatch metrics. Valid values are
Minimum
, Maximum
, and
Average
. If the aggregation type is null, the value
is treated as Average
.
This parameter is not supported if the policy type is
SimpleScaling
.
public java.util.List<StepAdjustment> getStepAdjustments()
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.
This parameter is required if the policy type is
StepScaling
and not supported otherwise.
public void setStepAdjustments(java.util.Collection<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.
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.
public PutScalingPolicyRequest withStepAdjustments(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.
NOTE: This method appends the values to the existing list (if
any). Use setStepAdjustments(java.util.Collection)
or
withStepAdjustments(java.util.Collection)
if you want to
override the existing values.
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.
public PutScalingPolicyRequest withStepAdjustments(java.util.Collection<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.
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.
public void setEstimatedInstanceWarmup(java.lang.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 not supported if the policy type is
SimpleScaling
.
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 not supported if the policy type is
SimpleScaling
.
public java.lang.Integer getEstimatedInstanceWarmup()
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 not supported if the policy type is
SimpleScaling
.
This parameter is not supported if the policy type is
SimpleScaling
.
public PutScalingPolicyRequest withEstimatedInstanceWarmup(java.lang.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 not supported if the policy type is
SimpleScaling
.
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 not supported if the policy type is
SimpleScaling
.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public PutScalingPolicyRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()