Class StepScalingPolicyConfiguration
- java.lang.Object
-
- com.amazonaws.services.applicationautoscaling.model.StepScalingPolicyConfiguration
-
- All Implemented Interfaces:
Serializable,Cloneable
public class StepScalingPolicyConfiguration extends Object implements Serializable, Cloneable
An object representing a step scaling policy configuration.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StepScalingPolicyConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StepScalingPolicyConfigurationclone()booleanequals(Object obj)StringgetAdjustmentType()The adjustment type, which specifies how theScalingAdjustmentparameter in a StepAdjustment is interpreted.IntegergetCooldown()The amount of time, in seconds, after a scaling activity completes where previous trigger-related scaling activities can influence future scaling events.StringgetMetricAggregationType()The aggregation type for the CloudWatch metrics.IntegergetMinAdjustmentMagnitude()The minimum number to adjust your scalable dimension as a result of a scaling activity.List<StepAdjustment>getStepAdjustments()A set of adjustments that enable you to scale based on the size of the alarm breach.inthashCode()voidsetAdjustmentType(AdjustmentType adjustmentType)The adjustment type, which specifies how theScalingAdjustmentparameter in a StepAdjustment is interpreted.voidsetAdjustmentType(String adjustmentType)The adjustment type, which specifies how theScalingAdjustmentparameter in a StepAdjustment is interpreted.voidsetCooldown(Integer cooldown)The amount of time, in seconds, after a scaling activity completes where previous trigger-related scaling activities can influence future scaling events.voidsetMetricAggregationType(MetricAggregationType metricAggregationType)The aggregation type for the CloudWatch metrics.voidsetMetricAggregationType(String metricAggregationType)The aggregation type for the CloudWatch metrics.voidsetMinAdjustmentMagnitude(Integer minAdjustmentMagnitude)The minimum number to adjust your scalable dimension as a result of a scaling activity.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.StepScalingPolicyConfigurationwithAdjustmentType(AdjustmentType adjustmentType)The adjustment type, which specifies how theScalingAdjustmentparameter in a StepAdjustment is interpreted.StepScalingPolicyConfigurationwithAdjustmentType(String adjustmentType)The adjustment type, which specifies how theScalingAdjustmentparameter in a StepAdjustment is interpreted.StepScalingPolicyConfigurationwithCooldown(Integer cooldown)The amount of time, in seconds, after a scaling activity completes where previous trigger-related scaling activities can influence future scaling events.StepScalingPolicyConfigurationwithMetricAggregationType(MetricAggregationType metricAggregationType)The aggregation type for the CloudWatch metrics.StepScalingPolicyConfigurationwithMetricAggregationType(String metricAggregationType)The aggregation type for the CloudWatch metrics.StepScalingPolicyConfigurationwithMinAdjustmentMagnitude(Integer minAdjustmentMagnitude)The minimum number to adjust your scalable dimension as a result of a scaling activity.StepScalingPolicyConfigurationwithStepAdjustments(StepAdjustment... stepAdjustments)A set of adjustments that enable you to scale based on the size of the alarm breach.StepScalingPolicyConfigurationwithStepAdjustments(Collection<StepAdjustment> stepAdjustments)A set of adjustments that enable you to scale based on the size of the alarm breach.
-
-
-
Method Detail
-
setAdjustmentType
public void setAdjustmentType(String adjustmentType)
The adjustment type, which specifies how the
ScalingAdjustmentparameter in a StepAdjustment is interpreted.- Parameters:
adjustmentType- The adjustment type, which specifies how theScalingAdjustmentparameter in a StepAdjustment is interpreted.- See Also:
AdjustmentType
-
getAdjustmentType
public String getAdjustmentType()
The adjustment type, which specifies how the
ScalingAdjustmentparameter in a StepAdjustment is interpreted.- Returns:
- The adjustment type, which specifies how the
ScalingAdjustmentparameter in a StepAdjustment is interpreted. - See Also:
AdjustmentType
-
withAdjustmentType
public StepScalingPolicyConfiguration withAdjustmentType(String adjustmentType)
The adjustment type, which specifies how the
ScalingAdjustmentparameter in a StepAdjustment is interpreted.- Parameters:
adjustmentType- The adjustment type, which specifies how theScalingAdjustmentparameter in a StepAdjustment is interpreted.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
AdjustmentType
-
setAdjustmentType
public void setAdjustmentType(AdjustmentType adjustmentType)
The adjustment type, which specifies how the
ScalingAdjustmentparameter in a StepAdjustment is interpreted.- Parameters:
adjustmentType- The adjustment type, which specifies how theScalingAdjustmentparameter in a StepAdjustment is interpreted.- See Also:
AdjustmentType
-
withAdjustmentType
public StepScalingPolicyConfiguration withAdjustmentType(AdjustmentType adjustmentType)
The adjustment type, which specifies how the
ScalingAdjustmentparameter in a StepAdjustment is interpreted.- Parameters:
adjustmentType- The adjustment type, which specifies how theScalingAdjustmentparameter in a StepAdjustment is interpreted.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
AdjustmentType
-
getStepAdjustments
public List<StepAdjustment> getStepAdjustments()
A set of adjustments that enable you to scale based on the size of the alarm breach.
- Returns:
- A set of adjustments that enable you to scale based on the size of the alarm breach.
-
setStepAdjustments
public void setStepAdjustments(Collection<StepAdjustment> stepAdjustments)
A set of adjustments that enable you to scale based on the size of the alarm breach.
- Parameters:
stepAdjustments- A set of adjustments that enable you to scale based on the size of the alarm breach.
-
withStepAdjustments
public StepScalingPolicyConfiguration withStepAdjustments(StepAdjustment... stepAdjustments)
A set of adjustments that enable you to scale based on the size of the alarm breach.
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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withStepAdjustments
public StepScalingPolicyConfiguration withStepAdjustments(Collection<StepAdjustment> stepAdjustments)
A set of adjustments that enable you to scale based on the size of the alarm breach.
- Parameters:
stepAdjustments- A set of adjustments that enable you to scale based on the size of the alarm breach.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setMinAdjustmentMagnitude
public void setMinAdjustmentMagnitude(Integer minAdjustmentMagnitude)
The minimum number to adjust your scalable dimension as a result of a scaling activity. If the adjustment type is
PercentChangeInCapacity, the scaling policy changes the scalable dimension of the scalable target by this amount.- Parameters:
minAdjustmentMagnitude- The minimum number to adjust your scalable dimension as a result of a scaling activity. If the adjustment type isPercentChangeInCapacity, the scaling policy changes the scalable dimension of the scalable target by this amount.
-
getMinAdjustmentMagnitude
public Integer getMinAdjustmentMagnitude()
The minimum number to adjust your scalable dimension as a result of a scaling activity. If the adjustment type is
PercentChangeInCapacity, the scaling policy changes the scalable dimension of the scalable target by this amount.- Returns:
- The minimum number to adjust your scalable dimension as a result
of a scaling activity. If the adjustment type is
PercentChangeInCapacity, the scaling policy changes the scalable dimension of the scalable target by this amount.
-
withMinAdjustmentMagnitude
public StepScalingPolicyConfiguration withMinAdjustmentMagnitude(Integer minAdjustmentMagnitude)
The minimum number to adjust your scalable dimension as a result of a scaling activity. If the adjustment type is
PercentChangeInCapacity, the scaling policy changes the scalable dimension of the scalable target by this amount.- Parameters:
minAdjustmentMagnitude- The minimum number to adjust your scalable dimension as a result of a scaling activity. If the adjustment type isPercentChangeInCapacity, the scaling policy changes the scalable dimension of the scalable target by this amount.- 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 where previous trigger-related scaling activities can influence future scaling events.
For scale out policies, while
Cooldownis in effect, the capacity that has been added by the previous scale out event that initiated theCooldownis calculated as part of the desired capacity for the next scale out. The intention is to continuously (but not excessively) scale out. For example, an alarm triggers a step scaling policy to scale out an Amazon ECS service by 2 tasks, the scaling activity completes successfully, and aCooldownperiod of 5 minutes starts. During theCooldownperiod, if the alarm triggers the same policy again but at a more aggressive step adjustment to scale out the service by 3 tasks, the 2 tasks that were added in the previous scale out event are considered part of that capacity and only 1 additional task is added to the desired count.For scale in policies, the
Cooldownperiod is used to block subsequent scale in requests until it has expired. The intention is to scale in conservatively to protect your application's availability. However, if another alarm triggers a scale out policy during theCooldownperiod after a scale-in, Application Auto Scaling scales out your scalable target immediately.- Parameters:
cooldown- The amount of time, in seconds, after a scaling activity completes where previous trigger-related scaling activities can influence future scaling events.For scale out policies, while
Cooldownis in effect, the capacity that has been added by the previous scale out event that initiated theCooldownis calculated as part of the desired capacity for the next scale out. The intention is to continuously (but not excessively) scale out. For example, an alarm triggers a step scaling policy to scale out an Amazon ECS service by 2 tasks, the scaling activity completes successfully, and aCooldownperiod of 5 minutes starts. During theCooldownperiod, if the alarm triggers the same policy again but at a more aggressive step adjustment to scale out the service by 3 tasks, the 2 tasks that were added in the previous scale out event are considered part of that capacity and only 1 additional task is added to the desired count.For scale in policies, the
Cooldownperiod is used to block subsequent scale in requests until it has expired. The intention is to scale in conservatively to protect your application's availability. However, if another alarm triggers a scale out policy during theCooldownperiod after a scale-in, Application Auto Scaling scales out your scalable target immediately.
-
getCooldown
public Integer getCooldown()
The amount of time, in seconds, after a scaling activity completes where previous trigger-related scaling activities can influence future scaling events.
For scale out policies, while
Cooldownis in effect, the capacity that has been added by the previous scale out event that initiated theCooldownis calculated as part of the desired capacity for the next scale out. The intention is to continuously (but not excessively) scale out. For example, an alarm triggers a step scaling policy to scale out an Amazon ECS service by 2 tasks, the scaling activity completes successfully, and aCooldownperiod of 5 minutes starts. During theCooldownperiod, if the alarm triggers the same policy again but at a more aggressive step adjustment to scale out the service by 3 tasks, the 2 tasks that were added in the previous scale out event are considered part of that capacity and only 1 additional task is added to the desired count.For scale in policies, the
Cooldownperiod is used to block subsequent scale in requests until it has expired. The intention is to scale in conservatively to protect your application's availability. However, if another alarm triggers a scale out policy during theCooldownperiod after a scale-in, Application Auto Scaling scales out your scalable target immediately.- Returns:
- The amount of time, in seconds, after a scaling activity
completes where previous trigger-related scaling activities can
influence future scaling events.
For scale out policies, while
Cooldownis in effect, the capacity that has been added by the previous scale out event that initiated theCooldownis calculated as part of the desired capacity for the next scale out. The intention is to continuously (but not excessively) scale out. For example, an alarm triggers a step scaling policy to scale out an Amazon ECS service by 2 tasks, the scaling activity completes successfully, and aCooldownperiod of 5 minutes starts. During theCooldownperiod, if the alarm triggers the same policy again but at a more aggressive step adjustment to scale out the service by 3 tasks, the 2 tasks that were added in the previous scale out event are considered part of that capacity and only 1 additional task is added to the desired count.For scale in policies, the
Cooldownperiod is used to block subsequent scale in requests until it has expired. The intention is to scale in conservatively to protect your application's availability. However, if another alarm triggers a scale out policy during theCooldownperiod after a scale-in, Application Auto Scaling scales out your scalable target immediately.
-
withCooldown
public StepScalingPolicyConfiguration withCooldown(Integer cooldown)
The amount of time, in seconds, after a scaling activity completes where previous trigger-related scaling activities can influence future scaling events.
For scale out policies, while
Cooldownis in effect, the capacity that has been added by the previous scale out event that initiated theCooldownis calculated as part of the desired capacity for the next scale out. The intention is to continuously (but not excessively) scale out. For example, an alarm triggers a step scaling policy to scale out an Amazon ECS service by 2 tasks, the scaling activity completes successfully, and aCooldownperiod of 5 minutes starts. During theCooldownperiod, if the alarm triggers the same policy again but at a more aggressive step adjustment to scale out the service by 3 tasks, the 2 tasks that were added in the previous scale out event are considered part of that capacity and only 1 additional task is added to the desired count.For scale in policies, the
Cooldownperiod is used to block subsequent scale in requests until it has expired. The intention is to scale in conservatively to protect your application's availability. However, if another alarm triggers a scale out policy during theCooldownperiod after a scale-in, Application Auto Scaling scales out your scalable target immediately.- Parameters:
cooldown- The amount of time, in seconds, after a scaling activity completes where previous trigger-related scaling activities can influence future scaling events.For scale out policies, while
Cooldownis in effect, the capacity that has been added by the previous scale out event that initiated theCooldownis calculated as part of the desired capacity for the next scale out. The intention is to continuously (but not excessively) scale out. For example, an alarm triggers a step scaling policy to scale out an Amazon ECS service by 2 tasks, the scaling activity completes successfully, and aCooldownperiod of 5 minutes starts. During theCooldownperiod, if the alarm triggers the same policy again but at a more aggressive step adjustment to scale out the service by 3 tasks, the 2 tasks that were added in the previous scale out event are considered part of that capacity and only 1 additional task is added to the desired count.For scale in policies, the
Cooldownperiod is used to block subsequent scale in requests until it has expired. The intention is to scale in conservatively to protect your application's availability. However, if another alarm triggers a scale out policy during theCooldownperiod after a scale-in, Application Auto Scaling scales out your scalable target immediately.- 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.- Parameters:
metricAggregationType- The aggregation type for the CloudWatch metrics. Valid values areMinimum,Maximum, andAverage.- See Also:
MetricAggregationType
-
getMetricAggregationType
public String getMetricAggregationType()
The aggregation type for the CloudWatch metrics. Valid values are
Minimum,Maximum, andAverage.- Returns:
- The aggregation type for the CloudWatch metrics. Valid values are
Minimum,Maximum, andAverage. - See Also:
MetricAggregationType
-
withMetricAggregationType
public StepScalingPolicyConfiguration withMetricAggregationType(String metricAggregationType)
The aggregation type for the CloudWatch metrics. Valid values are
Minimum,Maximum, andAverage.- Parameters:
metricAggregationType- The aggregation type for the CloudWatch metrics. Valid values areMinimum,Maximum, andAverage.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
MetricAggregationType
-
setMetricAggregationType
public void setMetricAggregationType(MetricAggregationType metricAggregationType)
The aggregation type for the CloudWatch metrics. Valid values are
Minimum,Maximum, andAverage.- Parameters:
metricAggregationType- The aggregation type for the CloudWatch metrics. Valid values areMinimum,Maximum, andAverage.- See Also:
MetricAggregationType
-
withMetricAggregationType
public StepScalingPolicyConfiguration withMetricAggregationType(MetricAggregationType metricAggregationType)
The aggregation type for the CloudWatch metrics. Valid values are
Minimum,Maximum, andAverage.- Parameters:
metricAggregationType- The aggregation type for the CloudWatch metrics. Valid values areMinimum,Maximum, andAverage.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
MetricAggregationType
-
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 StepScalingPolicyConfiguration clone()
-
-