@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class ScalingPolicy extends Object implements Serializable, Cloneable
Describes a scaling policy.
Constructor and Description |
---|
ScalingPolicy() |
Modifier and Type | Method and Description |
---|---|
ScalingPolicy |
clone() |
boolean |
equals(Object obj) |
String |
getAdjustmentType()
The adjustment type, which specifies how
ScalingAdjustment is interpreted. |
List<Alarm> |
getAlarms()
The CloudWatch alarms related to the policy.
|
String |
getAutoScalingGroupName()
The name of the Auto Scaling group.
|
Integer |
getCooldown()
The amount of time, in seconds, after a scaling activity completes before any further dynamic scaling activities
can start.
|
Boolean |
getEnabled()
Indicates whether the policy is enabled (
true ) or disabled (false ). |
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 |
getPolicyARN()
The Amazon Resource Name (ARN) of the policy.
|
String |
getPolicyName()
The name of the scaling 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.
|
TargetTrackingConfiguration |
getTargetTrackingConfiguration()
A target tracking scaling policy.
|
int |
hashCode() |
Boolean |
isEnabled()
Indicates whether the policy is enabled (
true ) or disabled (false ). |
void |
setAdjustmentType(String adjustmentType)
The adjustment type, which specifies how
ScalingAdjustment is interpreted. |
void |
setAlarms(Collection<Alarm> alarms)
The CloudWatch alarms related to the policy.
|
void |
setAutoScalingGroupName(String autoScalingGroupName)
The name of the Auto Scaling group.
|
void |
setCooldown(Integer cooldown)
The amount of time, in seconds, after a scaling activity completes before any further dynamic scaling activities
can start.
|
void |
setEnabled(Boolean enabled)
Indicates whether the policy is enabled (
true ) or disabled (false ). |
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 |
setPolicyARN(String policyARN)
The Amazon Resource Name (ARN) of the policy.
|
void |
setPolicyName(String policyName)
The name of the scaling 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.
|
void |
setTargetTrackingConfiguration(TargetTrackingConfiguration targetTrackingConfiguration)
A target tracking scaling policy.
|
String |
toString()
Returns a string representation of this object.
|
ScalingPolicy |
withAdjustmentType(String adjustmentType)
The adjustment type, which specifies how
ScalingAdjustment is interpreted. |
ScalingPolicy |
withAlarms(Alarm... alarms)
The CloudWatch alarms related to the policy.
|
ScalingPolicy |
withAlarms(Collection<Alarm> alarms)
The CloudWatch alarms related to the policy.
|
ScalingPolicy |
withAutoScalingGroupName(String autoScalingGroupName)
The name of the Auto Scaling group.
|
ScalingPolicy |
withCooldown(Integer cooldown)
The amount of time, in seconds, after a scaling activity completes before any further dynamic scaling activities
can start.
|
ScalingPolicy |
withEnabled(Boolean enabled)
Indicates whether the policy is enabled (
true ) or disabled (false ). |
ScalingPolicy |
withEstimatedInstanceWarmup(Integer estimatedInstanceWarmup)
The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.
|
ScalingPolicy |
withMetricAggregationType(String metricAggregationType)
The aggregation type for the CloudWatch metrics.
|
ScalingPolicy |
withMinAdjustmentMagnitude(Integer minAdjustmentMagnitude)
The minimum number of instances to scale.
|
ScalingPolicy |
withMinAdjustmentStep(Integer minAdjustmentStep)
Available for backward compatibility.
|
ScalingPolicy |
withPolicyARN(String policyARN)
The Amazon Resource Name (ARN) of the policy.
|
ScalingPolicy |
withPolicyName(String policyName)
The name of the scaling policy.
|
ScalingPolicy |
withPolicyType(String policyType)
The policy type.
|
ScalingPolicy |
withScalingAdjustment(Integer scalingAdjustment)
The amount by which to scale, based on the specified adjustment type.
|
ScalingPolicy |
withStepAdjustments(Collection<StepAdjustment> stepAdjustments)
A set of adjustments that enable you to scale based on the size of the alarm breach.
|
ScalingPolicy |
withStepAdjustments(StepAdjustment... stepAdjustments)
A set of adjustments that enable you to scale based on the size of the alarm breach.
|
ScalingPolicy |
withTargetTrackingConfiguration(TargetTrackingConfiguration targetTrackingConfiguration)
A target tracking scaling policy.
|
public void setAutoScalingGroupName(String autoScalingGroupName)
The name of the Auto Scaling group.
autoScalingGroupName
- The name of the Auto Scaling group.public String getAutoScalingGroupName()
The name of the Auto Scaling group.
public ScalingPolicy withAutoScalingGroupName(String autoScalingGroupName)
The name of the Auto Scaling group.
autoScalingGroupName
- The name of the Auto Scaling group.public void setPolicyName(String policyName)
The name of the scaling policy.
policyName
- The name of the scaling policy.public String getPolicyName()
The name of the scaling policy.
public ScalingPolicy withPolicyName(String policyName)
The name of the scaling policy.
policyName
- The name of the scaling policy.public void setPolicyARN(String policyARN)
The Amazon Resource Name (ARN) of the policy.
policyARN
- The Amazon Resource Name (ARN) of the policy.public String getPolicyARN()
The Amazon Resource Name (ARN) of the policy.
public ScalingPolicy withPolicyARN(String policyARN)
The Amazon Resource Name (ARN) of the policy.
policyARN
- The Amazon Resource Name (ARN) of the policy.public void setPolicyType(String policyType)
The policy type. The valid values are SimpleScaling
, StepScaling
, and
TargetTrackingScaling
.
policyType
- The policy type. The valid values are SimpleScaling
, StepScaling
, and
TargetTrackingScaling
.public String getPolicyType()
The policy type. The valid values are SimpleScaling
, StepScaling
, and
TargetTrackingScaling
.
SimpleScaling
, StepScaling
, and
TargetTrackingScaling
.public ScalingPolicy withPolicyType(String policyType)
The policy type. The valid values are SimpleScaling
, StepScaling
, and
TargetTrackingScaling
.
policyType
- The policy type. The valid values are SimpleScaling
, StepScaling
, and
TargetTrackingScaling
.public void setAdjustmentType(String adjustmentType)
The adjustment type, which specifies how ScalingAdjustment
is interpreted. The valid values are
ChangeInCapacity
, ExactCapacity
, and PercentChangeInCapacity
.
adjustmentType
- The adjustment type, which specifies how ScalingAdjustment
is interpreted. The valid values
are ChangeInCapacity
, ExactCapacity
, and PercentChangeInCapacity
.public String getAdjustmentType()
The adjustment type, which specifies how ScalingAdjustment
is interpreted. The valid values are
ChangeInCapacity
, ExactCapacity
, and PercentChangeInCapacity
.
ScalingAdjustment
is interpreted. The valid values
are ChangeInCapacity
, ExactCapacity
, and PercentChangeInCapacity
.public ScalingPolicy withAdjustmentType(String adjustmentType)
The adjustment type, which specifies how ScalingAdjustment
is interpreted. The valid values are
ChangeInCapacity
, ExactCapacity
, and PercentChangeInCapacity
.
adjustmentType
- The adjustment type, which specifies how ScalingAdjustment
is interpreted. The valid values
are ChangeInCapacity
, ExactCapacity
, and PercentChangeInCapacity
.public void setMinAdjustmentStep(Integer minAdjustmentStep)
Available for backward compatibility. Use MinAdjustmentMagnitude
instead.
minAdjustmentStep
- Available for backward compatibility. Use MinAdjustmentMagnitude
instead.public Integer getMinAdjustmentStep()
Available for backward compatibility. Use MinAdjustmentMagnitude
instead.
MinAdjustmentMagnitude
instead.public ScalingPolicy withMinAdjustmentStep(Integer minAdjustmentStep)
Available for backward compatibility. Use MinAdjustmentMagnitude
instead.
minAdjustmentStep
- Available for backward compatibility. Use MinAdjustmentMagnitude
instead.public void setMinAdjustmentMagnitude(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 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 ScalingPolicy withMinAdjustmentMagnitude(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(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.
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.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.
public ScalingPolicy 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.
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.public void setCooldown(Integer cooldown)
The amount of time, in seconds, after a scaling activity completes before any further dynamic scaling activities can start.
cooldown
- The amount of time, in seconds, after a scaling activity completes before any further dynamic scaling
activities can start.public Integer getCooldown()
The amount of time, in seconds, after a scaling activity completes before any further dynamic scaling activities can start.
public ScalingPolicy withCooldown(Integer cooldown)
The amount of time, in seconds, after a scaling activity completes before any further dynamic scaling activities can start.
cooldown
- The amount of time, in seconds, after a scaling activity completes before any further dynamic scaling
activities can start.public List<StepAdjustment> getStepAdjustments()
A set of adjustments that enable you to scale based on the size of the alarm breach.
public void setStepAdjustments(Collection<StepAdjustment> stepAdjustments)
A set of adjustments that enable you to scale based on the size of the alarm breach.
stepAdjustments
- A set of adjustments that enable you to scale based on the size of the alarm breach.public ScalingPolicy 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)
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.public ScalingPolicy withStepAdjustments(Collection<StepAdjustment> stepAdjustments)
A set of adjustments that enable you to scale based on the size of the alarm breach.
stepAdjustments
- A set of adjustments that enable you to scale based on the size of the alarm breach.public void setMetricAggregationType(String metricAggregationType)
The aggregation type for the CloudWatch metrics. The valid values are Minimum
, Maximum
,
and Average
.
metricAggregationType
- The aggregation type for the CloudWatch metrics. The valid values are Minimum
,
Maximum
, and Average
.public String getMetricAggregationType()
The aggregation type for the CloudWatch metrics. The valid values are Minimum
, Maximum
,
and Average
.
Minimum
,
Maximum
, and Average
.public ScalingPolicy withMetricAggregationType(String metricAggregationType)
The aggregation type for the CloudWatch metrics. The valid values are Minimum
, Maximum
,
and Average
.
metricAggregationType
- The aggregation type for the CloudWatch metrics. The valid values are Minimum
,
Maximum
, and Average
.public void setEstimatedInstanceWarmup(Integer estimatedInstanceWarmup)
The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.
estimatedInstanceWarmup
- The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.public Integer getEstimatedInstanceWarmup()
The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.
public ScalingPolicy withEstimatedInstanceWarmup(Integer estimatedInstanceWarmup)
The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.
estimatedInstanceWarmup
- The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.public List<Alarm> getAlarms()
The CloudWatch alarms related to the policy.
public void setAlarms(Collection<Alarm> alarms)
The CloudWatch alarms related to the policy.
alarms
- The CloudWatch alarms related to the policy.public ScalingPolicy withAlarms(Alarm... alarms)
The CloudWatch alarms related to the policy.
NOTE: This method appends the values to the existing list (if any). Use
setAlarms(java.util.Collection)
or withAlarms(java.util.Collection)
if you want to override the
existing values.
alarms
- The CloudWatch alarms related to the policy.public ScalingPolicy withAlarms(Collection<Alarm> alarms)
The CloudWatch alarms related to the policy.
alarms
- The CloudWatch alarms related to the policy.public void setTargetTrackingConfiguration(TargetTrackingConfiguration targetTrackingConfiguration)
A target tracking scaling policy.
targetTrackingConfiguration
- A target tracking scaling policy.public TargetTrackingConfiguration getTargetTrackingConfiguration()
A target tracking scaling policy.
public ScalingPolicy withTargetTrackingConfiguration(TargetTrackingConfiguration targetTrackingConfiguration)
A target tracking scaling policy.
targetTrackingConfiguration
- A target tracking scaling policy.public void setEnabled(Boolean enabled)
Indicates whether the policy is enabled (true
) or disabled (false
).
enabled
- Indicates whether the policy is enabled (true
) or disabled (false
).public Boolean getEnabled()
Indicates whether the policy is enabled (true
) or disabled (false
).
true
) or disabled (false
).public ScalingPolicy withEnabled(Boolean enabled)
Indicates whether the policy is enabled (true
) or disabled (false
).
enabled
- Indicates whether the policy is enabled (true
) or disabled (false
).public Boolean isEnabled()
Indicates whether the policy is enabled (true
) or disabled (false
).
true
) or disabled (false
).public String toString()
toString
in class Object
Object.toString()
public ScalingPolicy clone()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.