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 PutScalingPolicyRequestclone()Creates a shallow clone of this request.booleanequals(Object obj)StringgetAdjustmentType()The adjustment type.StringgetAutoScalingGroupName()The name or ARN of the group.IntegergetCooldown()The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.IntegergetEstimatedInstanceWarmup()The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.StringgetMetricAggregationType()The aggregation type for the CloudWatch metrics.IntegergetMinAdjustmentMagnitude()The minimum number of instances to scale.IntegergetMinAdjustmentStep()Available for backward compatibility.StringgetPolicyName()The name of the policy.StringgetPolicyType()The policy type.IntegergetScalingAdjustment()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.inthashCode()voidsetAdjustmentType(String adjustmentType)The adjustment type.voidsetAutoScalingGroupName(String autoScalingGroupName)The name or ARN of the group.voidsetCooldown(Integer cooldown)The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.voidsetEstimatedInstanceWarmup(Integer estimatedInstanceWarmup)The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.voidsetMetricAggregationType(String metricAggregationType)The aggregation type for the CloudWatch metrics.voidsetMinAdjustmentMagnitude(Integer minAdjustmentMagnitude)The minimum number of instances to scale.voidsetMinAdjustmentStep(Integer minAdjustmentStep)Available for backward compatibility.voidsetPolicyName(String policyName)The name of the policy.voidsetPolicyType(String policyType)The policy type.voidsetScalingAdjustment(Integer scalingAdjustment)The amount by which to scale, based on the specified adjustment type.voidsetStepAdjustments(Collection<StepAdjustment> stepAdjustments)A set of adjustments that enable you to scale based on the size of the alarm breach.StringtoString()Returns a string representation of this object; useful for testing and debugging.PutScalingPolicyRequestwithAdjustmentType(String adjustmentType)The adjustment type.PutScalingPolicyRequestwithAutoScalingGroupName(String autoScalingGroupName)The name or ARN of the group.PutScalingPolicyRequestwithCooldown(Integer cooldown)The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start.PutScalingPolicyRequestwithEstimatedInstanceWarmup(Integer estimatedInstanceWarmup)The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.PutScalingPolicyRequestwithMetricAggregationType(String metricAggregationType)The aggregation type for the CloudWatch metrics.PutScalingPolicyRequestwithMinAdjustmentMagnitude(Integer minAdjustmentMagnitude)The minimum number of instances to scale.PutScalingPolicyRequestwithMinAdjustmentStep(Integer minAdjustmentStep)Available for backward compatibility.PutScalingPolicyRequestwithPolicyName(String policyName)The name of the policy.PutScalingPolicyRequestwithPolicyType(String policyType)The policy type.PutScalingPolicyRequestwithScalingAdjustment(Integer scalingAdjustment)The amount by which to scale, based on the specified adjustment type.PutScalingPolicyRequestwithStepAdjustments(StepAdjustment... stepAdjustments)A set of adjustments that enable you to scale based on the size of the alarm breach.PutScalingPolicyRequestwithStepAdjustments(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
SimpleScalingandStepScaling. If the policy type is null, the value is treated asSimpleScaling.- Parameters:
policyType- The policy type. Valid values areSimpleScalingandStepScaling. If the policy type is null, the value is treated asSimpleScaling.
-
getPolicyType
public String getPolicyType()
The policy type. Valid values are
SimpleScalingandStepScaling. If the policy type is null, the value is treated asSimpleScaling.- Returns:
- The policy type. Valid values are
SimpleScalingandStepScaling. If the policy type is null, the value is treated asSimpleScaling.
-
withPolicyType
public PutScalingPolicyRequest withPolicyType(String policyType)
The policy type. Valid values are
SimpleScalingandStepScaling. If the policy type is null, the value is treated asSimpleScaling.- Parameters:
policyType- The policy type. Valid values areSimpleScalingandStepScaling. 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
MinAdjustmentMagnitudeinstead.- Parameters:
minAdjustmentStep- Available for backward compatibility. UseMinAdjustmentMagnitudeinstead.
-
getMinAdjustmentStep
public Integer getMinAdjustmentStep()
Available for backward compatibility. Use
MinAdjustmentMagnitudeinstead.- Returns:
- Available for backward compatibility. Use
MinAdjustmentMagnitudeinstead.
-
withMinAdjustmentStep
public PutScalingPolicyRequest withMinAdjustmentStep(Integer minAdjustmentStep)
Available for backward compatibility. Use
MinAdjustmentMagnitudeinstead.- Parameters:
minAdjustmentStep- Available for backward compatibility. UseMinAdjustmentMagnitudeinstead.- 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
AdjustmentTypeisPercentChangeInCapacity, the scaling policy changes theDesiredCapacityof 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 ofAdjustmentTypeisPercentChangeInCapacity, the scaling policy changes theDesiredCapacityof 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
AdjustmentTypeisPercentChangeInCapacity, the scaling policy changes theDesiredCapacityof 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
AdjustmentTypeisPercentChangeInCapacity, the scaling policy changes theDesiredCapacityof 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
AdjustmentTypeisPercentChangeInCapacity, the scaling policy changes theDesiredCapacityof 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 ofAdjustmentTypeisPercentChangeInCapacity, the scaling policy changes theDesiredCapacityof 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
SimpleScalingand 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
SimpleScalingand 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
SimpleScalingand 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
SimpleScalingand 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
SimpleScalingand 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
SimpleScalingand 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
StepScalingand 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
StepScalingand 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
StepScalingand 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
StepScalingand 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
StepScalingand 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
StepScalingand 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
StepScalingand 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
StepScalingand 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:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public PutScalingPolicyRequest clone()
Description copied from class:AmazonWebServiceRequestCreates a shallow clone of this request. Explicitly does not clone the deep structure of the request object.- Overrides:
clonein classAmazonWebServiceRequest- See Also:
Object.clone()
-
-