Class PutScalingPolicyRequest
- All Implemented Interfaces:
ReadLimitInfo
,Serializable
,Cloneable
- See Also:
-
Field Summary
Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates a shallow clone of this request.boolean
The adjustment type.The name or ARN of the group.The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.The aggregation type for the CloudWatch metrics.The minimum number of instances to scale.Available for backward compatibility.The name of the policy.The policy type.The amount by which to scale, based on the specified adjustment type.A set of adjustments that enable you to scale based on the size of the alarm breach.int
hashCode()
void
setAdjustmentType
(String adjustmentType) The adjustment type.void
setAutoScalingGroupName
(String autoScalingGroupName) The name or ARN of the group.void
setCooldown
(Integer cooldown) The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.void
setEstimatedInstanceWarmup
(Integer estimatedInstanceWarmup) The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.void
setMetricAggregationType
(String metricAggregationType) The aggregation type for the CloudWatch metrics.void
setMinAdjustmentMagnitude
(Integer minAdjustmentMagnitude) The minimum number of instances to scale.void
setMinAdjustmentStep
(Integer minAdjustmentStep) Available for backward compatibility.void
setPolicyName
(String policyName) The name of the policy.void
setPolicyType
(String policyType) The policy type.void
setScalingAdjustment
(Integer scalingAdjustment) The amount by which to scale, based on the specified adjustment type.void
setStepAdjustments
(Collection<StepAdjustment> stepAdjustments) A set of adjustments that enable you to scale based on the size of the alarm breach.toString()
Returns a string representation of this object; useful for testing and debugging.withAdjustmentType
(String adjustmentType) The adjustment type.withAutoScalingGroupName
(String autoScalingGroupName) The name or ARN of the group.withCooldown
(Integer cooldown) The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.withEstimatedInstanceWarmup
(Integer estimatedInstanceWarmup) The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.withMetricAggregationType
(String metricAggregationType) The aggregation type for the CloudWatch metrics.withMinAdjustmentMagnitude
(Integer minAdjustmentMagnitude) The minimum number of instances to scale.withMinAdjustmentStep
(Integer minAdjustmentStep) Available for backward compatibility.withPolicyName
(String policyName) The name of the policy.withPolicyType
(String policyType) The policy type.withScalingAdjustment
(Integer scalingAdjustment) The amount by which to scale, based on the specified adjustment type.withStepAdjustments
(StepAdjustment... stepAdjustments) A set of adjustments that enable you to scale based on the size of the alarm breach.withStepAdjustments
(Collection<StepAdjustment> stepAdjustments) A set of adjustments that enable you to scale based on the size of the alarm breach.Methods inherited from class com.amazonaws.AmazonWebServiceRequest
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
-
Constructor Details
-
PutScalingPolicyRequest
public PutScalingPolicyRequest()
-
-
Method Details
-
setAutoScalingGroupName
The name or ARN of the group.
- Parameters:
autoScalingGroupName
- The name or ARN of the group.
-
getAutoScalingGroupName
The name or ARN of the group.
- Returns:
- The name or ARN of the group.
-
withAutoScalingGroupName
The name or ARN of the group.
- Parameters:
autoScalingGroupName
- The name or ARN of the group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPolicyName
The name of the policy.
- Parameters:
policyName
- The name of the policy.
-
getPolicyName
The name of the policy.
- Returns:
- The name of the policy.
-
withPolicyName
The name of the policy.
- Parameters:
policyName
- The name of the policy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPolicyType
The policy type. Valid values are
SimpleScaling
andStepScaling
. If the policy type is null, the value is treated asSimpleScaling
.- Parameters:
policyType
- The policy type. Valid values areSimpleScaling
andStepScaling
. If the policy type is null, the value is treated asSimpleScaling
.
-
getPolicyType
The policy type. Valid values are
SimpleScaling
andStepScaling
. If the policy type is null, the value is treated asSimpleScaling
.- Returns:
- The policy type. Valid values are
SimpleScaling
andStepScaling
. If the policy type is null, the value is treated asSimpleScaling
.
-
withPolicyType
The policy type. Valid values are
SimpleScaling
andStepScaling
. If the policy type is null, the value is treated asSimpleScaling
.- Parameters:
policyType
- The policy type. Valid values areSimpleScaling
andStepScaling
. If the policy type is null, the value is treated asSimpleScaling
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setAdjustmentType
The adjustment type. Valid values are
ChangeInCapacity
,ExactCapacity
, andPercentChangeInCapacity
.For more information, see Dynamic Scaling in the Auto Scaling Developer Guide.
- Parameters:
adjustmentType
- The adjustment type. Valid values areChangeInCapacity
,ExactCapacity
, andPercentChangeInCapacity
.For more information, see Dynamic Scaling in the Auto Scaling Developer Guide.
-
getAdjustmentType
The adjustment type. Valid values are
ChangeInCapacity
,ExactCapacity
, andPercentChangeInCapacity
.For more information, see Dynamic Scaling in the Auto Scaling Developer Guide.
- Returns:
- The adjustment type. Valid values are
ChangeInCapacity
,ExactCapacity
, andPercentChangeInCapacity
.For more information, see Dynamic Scaling in the Auto Scaling Developer Guide.
-
withAdjustmentType
The adjustment type. Valid values are
ChangeInCapacity
,ExactCapacity
, andPercentChangeInCapacity
.For more information, see Dynamic Scaling in the Auto Scaling Developer Guide.
- Parameters:
adjustmentType
- The adjustment type. Valid values areChangeInCapacity
,ExactCapacity
, andPercentChangeInCapacity
.For more information, see Dynamic Scaling in the Auto Scaling Developer Guide.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setMinAdjustmentStep
Available for backward compatibility. Use
MinAdjustmentMagnitude
instead.- Parameters:
minAdjustmentStep
- Available for backward compatibility. UseMinAdjustmentMagnitude
instead.
-
getMinAdjustmentStep
Available for backward compatibility. Use
MinAdjustmentMagnitude
instead.- Returns:
- Available for backward compatibility. Use
MinAdjustmentMagnitude
instead.
-
withMinAdjustmentStep
Available for backward compatibility. Use
MinAdjustmentMagnitude
instead.- Parameters:
minAdjustmentStep
- Available for backward compatibility. UseMinAdjustmentMagnitude
instead.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setMinAdjustmentMagnitude
The minimum number of instances to scale. If the value of
AdjustmentType
isPercentChangeInCapacity
, the scaling policy changes theDesiredCapacity
of the Auto Scaling group by at least this many instances. Otherwise, the error isValidationError
.- Parameters:
minAdjustmentMagnitude
- The minimum number of instances to scale. If the value ofAdjustmentType
isPercentChangeInCapacity
, the scaling policy changes theDesiredCapacity
of the Auto Scaling group by at least this many instances. Otherwise, the error isValidationError
.
-
getMinAdjustmentMagnitude
The minimum number of instances to scale. If the value of
AdjustmentType
isPercentChangeInCapacity
, the scaling policy changes theDesiredCapacity
of the Auto Scaling group by at least this many instances. Otherwise, the error isValidationError
.- Returns:
- The minimum number of instances to scale. If the value of
AdjustmentType
isPercentChangeInCapacity
, the scaling policy changes theDesiredCapacity
of the Auto Scaling group by at least this many instances. Otherwise, the error isValidationError
.
-
withMinAdjustmentMagnitude
The minimum number of instances to scale. If the value of
AdjustmentType
isPercentChangeInCapacity
, the scaling policy changes theDesiredCapacity
of the Auto Scaling group by at least this many instances. Otherwise, the error isValidationError
.- Parameters:
minAdjustmentMagnitude
- The minimum number of instances to scale. If the value ofAdjustmentType
isPercentChangeInCapacity
, the scaling policy changes theDesiredCapacity
of the Auto Scaling group by at least this many instances. Otherwise, the error isValidationError
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setScalingAdjustment
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.- Parameters:
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.
-
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.- Returns:
- 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.
-
withScalingAdjustment
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.- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setCooldown
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.
- Parameters:
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.
-
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.
- Returns:
- 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.
-
withCooldown
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.
- Parameters:
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.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setMetricAggregationType
The aggregation type for the CloudWatch metrics. Valid values are
Minimum
,Maximum
, andAverage
. If the aggregation type is null, the value is treated asAverage
.This parameter is not supported if the policy type is
SimpleScaling
.- Parameters:
metricAggregationType
- The aggregation type for the CloudWatch metrics. Valid values areMinimum
,Maximum
, andAverage
. If the aggregation type is null, the value is treated asAverage
.This parameter is not supported if the policy type is
SimpleScaling
.
-
getMetricAggregationType
The aggregation type for the CloudWatch metrics. Valid values are
Minimum
,Maximum
, andAverage
. If the aggregation type is null, the value is treated asAverage
.This parameter is not supported if the policy type is
SimpleScaling
.- Returns:
- The aggregation type for the CloudWatch metrics. Valid values are
Minimum
,Maximum
, andAverage
. If the aggregation type is null, the value is treated asAverage
.This parameter is not supported if the policy type is
SimpleScaling
.
-
withMetricAggregationType
The aggregation type for the CloudWatch metrics. Valid values are
Minimum
,Maximum
, andAverage
. If the aggregation type is null, the value is treated asAverage
.This parameter is not supported if the policy type is
SimpleScaling
.- Parameters:
metricAggregationType
- The aggregation type for the CloudWatch metrics. Valid values areMinimum
,Maximum
, andAverage
. If the aggregation type is null, the value is treated asAverage
.This parameter is not supported if the policy type is
SimpleScaling
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
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.- Returns:
- 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.
-
setStepAdjustments
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.- Parameters:
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.
-
withStepAdjustments
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)
orwithStepAdjustments(java.util.Collection)
if you want to override the existing values.- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withStepAdjustments
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.- Parameters:
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setEstimatedInstanceWarmup
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
.- Parameters:
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
.
-
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
.- Returns:
- 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
.
-
withEstimatedInstanceWarmup
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
.- Parameters:
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
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
Description copied from class:AmazonWebServiceRequest
Creates a shallow clone of this request. Explicitly does not clone the deep structure of the request object.- Overrides:
clone
in classAmazonWebServiceRequest
- See Also:
-