Class PutScalingPolicyRequest
- java.lang.Object
-
- com.amazonaws.AmazonWebServiceRequest
-
- com.amazonaws.services.autoscaling.model.PutScalingPolicyRequest
-
- All Implemented Interfaces:
ReadLimitInfo
,Serializable
,Cloneable
public class PutScalingPolicyRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
-
Constructor Summary
Constructors Constructor Description PutScalingPolicyRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PutScalingPolicyRequest
clone()
Creates a shallow clone of this request.boolean
equals(Object obj)
String
getAdjustmentType()
The adjustment type.String
getAutoScalingGroupName()
The name or ARN of the group.Integer
getCooldown()
The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.Integer
getEstimatedInstanceWarmup()
The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.String
getMetricAggregationType()
The aggregation type for the CloudWatch metrics.Integer
getMinAdjustmentMagnitude()
The minimum number of instances to scale.Integer
getMinAdjustmentStep()
Available for backward compatibility.String
getPolicyName()
The name of the policy.String
getPolicyType()
The policy type.Integer
getScalingAdjustment()
The amount by which to scale, based on the specified adjustment type.List<StepAdjustment>
getStepAdjustments()
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.String
toString()
Returns a string representation of this object; useful for testing and debugging.PutScalingPolicyRequest
withAdjustmentType(String adjustmentType)
The adjustment type.PutScalingPolicyRequest
withAutoScalingGroupName(String autoScalingGroupName)
The name or ARN of the group.PutScalingPolicyRequest
withCooldown(Integer cooldown)
The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.PutScalingPolicyRequest
withEstimatedInstanceWarmup(Integer estimatedInstanceWarmup)
The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.PutScalingPolicyRequest
withMetricAggregationType(String metricAggregationType)
The aggregation type for the CloudWatch metrics.PutScalingPolicyRequest
withMinAdjustmentMagnitude(Integer minAdjustmentMagnitude)
The minimum number of instances to scale.PutScalingPolicyRequest
withMinAdjustmentStep(Integer minAdjustmentStep)
Available for backward compatibility.PutScalingPolicyRequest
withPolicyName(String policyName)
The name of the policy.PutScalingPolicyRequest
withPolicyType(String policyType)
The policy type.PutScalingPolicyRequest
withScalingAdjustment(Integer scalingAdjustment)
The amount by which to scale, based on the specified adjustment type.PutScalingPolicyRequest
withStepAdjustments(StepAdjustment... stepAdjustments)
A set of adjustments that enable you to scale based on the size of the alarm breach.PutScalingPolicyRequest
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
-
-
-
-
Method Detail
-
setAutoScalingGroupName
public void setAutoScalingGroupName(String autoScalingGroupName)
The name or ARN of the group.
- Parameters:
autoScalingGroupName
- The name or ARN of the group.
-
getAutoScalingGroupName
public String getAutoScalingGroupName()
The name or ARN of the group.
- Returns:
- The name or ARN of the group.
-
withAutoScalingGroupName
public PutScalingPolicyRequest withAutoScalingGroupName(String autoScalingGroupName)
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
public void setPolicyName(String policyName)
The name of the policy.
- Parameters:
policyName
- The name of the policy.
-
getPolicyName
public String getPolicyName()
The name of the policy.
- Returns:
- The name of the policy.
-
withPolicyName
public PutScalingPolicyRequest withPolicyName(String policyName)
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
public void setPolicyType(String policyType)
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
public String 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
public PutScalingPolicyRequest withPolicyType(String policyType)
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
public void setAdjustmentType(String adjustmentType)
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
public String 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
public PutScalingPolicyRequest withAdjustmentType(String adjustmentType)
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
public void setMinAdjustmentStep(Integer minAdjustmentStep)
Available for backward compatibility. Use
MinAdjustmentMagnitude
instead.- Parameters:
minAdjustmentStep
- Available for backward compatibility. UseMinAdjustmentMagnitude
instead.
-
getMinAdjustmentStep
public Integer getMinAdjustmentStep()
Available for backward compatibility. Use
MinAdjustmentMagnitude
instead.- Returns:
- Available for backward compatibility. Use
MinAdjustmentMagnitude
instead.
-
withMinAdjustmentStep
public PutScalingPolicyRequest withMinAdjustmentStep(Integer minAdjustmentStep)
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
public void setMinAdjustmentMagnitude(Integer minAdjustmentMagnitude)
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
public Integer 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
public PutScalingPolicyRequest withMinAdjustmentMagnitude(Integer minAdjustmentMagnitude)
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
public void setScalingAdjustment(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.- 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
public 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.- 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
public PutScalingPolicyRequest withScalingAdjustment(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.- 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
public void setCooldown(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.
- 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
public 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.
- 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
public PutScalingPolicyRequest withCooldown(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.
- 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
public void setMetricAggregationType(String metricAggregationType)
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
public String 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
public PutScalingPolicyRequest withMetricAggregationType(String metricAggregationType)
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
public 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.- 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
public void setStepAdjustments(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.- 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
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)
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
public PutScalingPolicyRequest withStepAdjustments(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.- 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
public void setEstimatedInstanceWarmup(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
.- 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
public 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
.- 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
public PutScalingPolicyRequest withEstimatedInstanceWarmup(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
.- 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
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public PutScalingPolicyRequest 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:
Object.clone()
-
-