@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()
Specifies how the scaling adjustment is interpreted (for example, an absolute number or a percentage).
|
List<Alarm> |
getAlarms()
The CloudWatch alarms related to the policy.
|
String |
getAutoScalingGroupName()
The name of the Auto Scaling group.
|
Integer |
getCooldown()
The duration of the policy's cooldown period, in seconds.
|
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 value to scale by when the adjustment type is
PercentChangeInCapacity . |
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()
One of the following policy types:
|
PredictiveScalingConfiguration |
getPredictiveScalingConfiguration()
A predictive scaling policy.
|
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)
Specifies how the scaling adjustment is interpreted (for example, an absolute number or a percentage).
|
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 duration of the policy's cooldown period, in seconds.
|
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 value to scale by when the adjustment type is
PercentChangeInCapacity . |
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)
One of the following policy types:
|
void |
setPredictiveScalingConfiguration(PredictiveScalingConfiguration predictiveScalingConfiguration)
A predictive scaling policy.
|
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)
Specifies how the scaling adjustment is interpreted (for example, an absolute number or a percentage).
|
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 duration of the policy's cooldown period, in seconds.
|
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 value to scale by when the adjustment type is
PercentChangeInCapacity . |
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)
One of the following policy types:
|
ScalingPolicy |
withPredictiveScalingConfiguration(PredictiveScalingConfiguration predictiveScalingConfiguration)
A predictive scaling policy.
|
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)
One of the following policy types:
TargetTrackingScaling
StepScaling
SimpleScaling
(default)
PredictiveScaling
For more information, see Target tracking scaling policies and Step and simple scaling policies in the Amazon EC2 Auto Scaling User Guide.
policyType
- One of the following policy types:
TargetTrackingScaling
StepScaling
SimpleScaling
(default)
PredictiveScaling
For more information, see Target tracking scaling policies and Step and simple scaling policies in the Amazon EC2 Auto Scaling User Guide.
public String getPolicyType()
One of the following policy types:
TargetTrackingScaling
StepScaling
SimpleScaling
(default)
PredictiveScaling
For more information, see Target tracking scaling policies and Step and simple scaling policies in the Amazon EC2 Auto Scaling User Guide.
TargetTrackingScaling
StepScaling
SimpleScaling
(default)
PredictiveScaling
For more information, see Target tracking scaling policies and Step and simple scaling policies in the Amazon EC2 Auto Scaling User Guide.
public ScalingPolicy withPolicyType(String policyType)
One of the following policy types:
TargetTrackingScaling
StepScaling
SimpleScaling
(default)
PredictiveScaling
For more information, see Target tracking scaling policies and Step and simple scaling policies in the Amazon EC2 Auto Scaling User Guide.
policyType
- One of the following policy types:
TargetTrackingScaling
StepScaling
SimpleScaling
(default)
PredictiveScaling
For more information, see Target tracking scaling policies and Step and simple scaling policies in the Amazon EC2 Auto Scaling User Guide.
public void setAdjustmentType(String adjustmentType)
Specifies how the scaling adjustment is interpreted (for example, an absolute number or a percentage). The valid
values are ChangeInCapacity
, ExactCapacity
, and PercentChangeInCapacity
.
adjustmentType
- Specifies how the scaling adjustment is interpreted (for example, an absolute number or a percentage). The
valid values are ChangeInCapacity
, ExactCapacity
, and
PercentChangeInCapacity
.public String getAdjustmentType()
Specifies how the scaling adjustment is interpreted (for example, an absolute number or a percentage). The valid
values are ChangeInCapacity
, ExactCapacity
, and PercentChangeInCapacity
.
ChangeInCapacity
, ExactCapacity
, and
PercentChangeInCapacity
.public ScalingPolicy withAdjustmentType(String adjustmentType)
Specifies how the scaling adjustment is interpreted (for example, an absolute number or a percentage). The valid
values are ChangeInCapacity
, ExactCapacity
, and PercentChangeInCapacity
.
adjustmentType
- Specifies how the scaling adjustment is interpreted (for example, an absolute number or a percentage). 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 value to scale by when the adjustment type is PercentChangeInCapacity
.
minAdjustmentMagnitude
- The minimum value to scale by when the adjustment type is PercentChangeInCapacity
.public Integer getMinAdjustmentMagnitude()
The minimum value to scale by when the adjustment type is PercentChangeInCapacity
.
PercentChangeInCapacity
.public ScalingPolicy withMinAdjustmentMagnitude(Integer minAdjustmentMagnitude)
The minimum value to scale by when the adjustment type is PercentChangeInCapacity
.
minAdjustmentMagnitude
- The minimum value to scale by when the adjustment type is PercentChangeInCapacity
.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 duration of the policy's cooldown period, in seconds.
cooldown
- The duration of the policy's cooldown period, in seconds.public Integer getCooldown()
The duration of the policy's cooldown period, in seconds.
public ScalingPolicy withCooldown(Integer cooldown)
The duration of the policy's cooldown period, in seconds.
cooldown
- The duration of the policy's cooldown period, in seconds.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 void setPredictiveScalingConfiguration(PredictiveScalingConfiguration predictiveScalingConfiguration)
A predictive scaling policy.
predictiveScalingConfiguration
- A predictive scaling policy.public PredictiveScalingConfiguration getPredictiveScalingConfiguration()
A predictive scaling policy.
public ScalingPolicy withPredictiveScalingConfiguration(PredictiveScalingConfiguration predictiveScalingConfiguration)
A predictive scaling policy.
predictiveScalingConfiguration
- A predictive scaling policy.public String toString()
toString
in class Object
Object.toString()
public ScalingPolicy clone()