public static interface ScalingPolicy.Builder extends SdkPojo, CopyableBuilder<ScalingPolicy.Builder,ScalingPolicy>
Modifier and Type | Method and Description |
---|---|
ScalingPolicy.Builder |
adjustmentType(String adjustmentType)
Specifies how the scaling adjustment is interpreted (for example, an absolute number or a percentage).
|
ScalingPolicy.Builder |
alarms(Alarm... alarms)
The CloudWatch alarms related to the policy.
|
ScalingPolicy.Builder |
alarms(Collection<Alarm> alarms)
The CloudWatch alarms related to the policy.
|
ScalingPolicy.Builder |
alarms(Consumer<Alarm.Builder>... alarms)
The CloudWatch alarms related to the policy.
|
ScalingPolicy.Builder |
autoScalingGroupName(String autoScalingGroupName)
The name of the Auto Scaling group.
|
ScalingPolicy.Builder |
cooldown(Integer cooldown)
The duration of the policy's cooldown period, in seconds.
|
ScalingPolicy.Builder |
enabled(Boolean enabled)
Indicates whether the policy is enabled (
true ) or disabled (false ). |
ScalingPolicy.Builder |
estimatedInstanceWarmup(Integer estimatedInstanceWarmup)
The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.
|
ScalingPolicy.Builder |
metricAggregationType(String metricAggregationType)
The aggregation type for the CloudWatch metrics.
|
ScalingPolicy.Builder |
minAdjustmentMagnitude(Integer minAdjustmentMagnitude)
The minimum value to scale by when the adjustment type is
PercentChangeInCapacity . |
ScalingPolicy.Builder |
minAdjustmentStep(Integer minAdjustmentStep)
Available for backward compatibility.
|
ScalingPolicy.Builder |
policyARN(String policyARN)
The Amazon Resource Name (ARN) of the policy.
|
ScalingPolicy.Builder |
policyName(String policyName)
The name of the scaling policy.
|
ScalingPolicy.Builder |
policyType(String policyType)
One of the following policy types:
|
default ScalingPolicy.Builder |
predictiveScalingConfiguration(Consumer<PredictiveScalingConfiguration.Builder> predictiveScalingConfiguration)
A predictive scaling policy.
|
ScalingPolicy.Builder |
predictiveScalingConfiguration(PredictiveScalingConfiguration predictiveScalingConfiguration)
A predictive scaling policy.
|
ScalingPolicy.Builder |
scalingAdjustment(Integer scalingAdjustment)
The amount by which to scale, based on the specified adjustment type.
|
ScalingPolicy.Builder |
stepAdjustments(Collection<StepAdjustment> stepAdjustments)
A set of adjustments that enable you to scale based on the size of the alarm breach.
|
ScalingPolicy.Builder |
stepAdjustments(Consumer<StepAdjustment.Builder>... stepAdjustments)
A set of adjustments that enable you to scale based on the size of the alarm breach.
|
ScalingPolicy.Builder |
stepAdjustments(StepAdjustment... stepAdjustments)
A set of adjustments that enable you to scale based on the size of the alarm breach.
|
default ScalingPolicy.Builder |
targetTrackingConfiguration(Consumer<TargetTrackingConfiguration.Builder> targetTrackingConfiguration)
A target tracking scaling policy.
|
ScalingPolicy.Builder |
targetTrackingConfiguration(TargetTrackingConfiguration targetTrackingConfiguration)
A target tracking scaling policy.
|
equalsBySdkFields, sdkFields
copy
applyMutation, build
ScalingPolicy.Builder autoScalingGroupName(String autoScalingGroupName)
The name of the Auto Scaling group.
autoScalingGroupName
- The name of the Auto Scaling group.ScalingPolicy.Builder policyName(String policyName)
The name of the scaling policy.
policyName
- The name of the scaling policy.ScalingPolicy.Builder policyARN(String policyARN)
The Amazon Resource Name (ARN) of the policy.
policyARN
- The Amazon Resource Name (ARN) of the policy.ScalingPolicy.Builder policyType(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.
ScalingPolicy.Builder adjustmentType(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
.ScalingPolicy.Builder minAdjustmentStep(Integer minAdjustmentStep)
Available for backward compatibility. Use MinAdjustmentMagnitude
instead.
minAdjustmentStep
- Available for backward compatibility. Use MinAdjustmentMagnitude
instead.ScalingPolicy.Builder minAdjustmentMagnitude(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
.ScalingPolicy.Builder scalingAdjustment(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.ScalingPolicy.Builder cooldown(Integer cooldown)
The duration of the policy's cooldown period, in seconds.
cooldown
- The duration of the policy's cooldown period, in seconds.ScalingPolicy.Builder stepAdjustments(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.ScalingPolicy.Builder stepAdjustments(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.ScalingPolicy.Builder stepAdjustments(Consumer<StepAdjustment.Builder>... stepAdjustments)
A set of adjustments that enable you to scale based on the size of the alarm breach.
This is a convenience method that creates an instance of theStepAdjustment.Builder
avoiding the need to create
one manually via StepAdjustment.builder()
.
When the Consumer
completes,
SdkBuilder.build()
is called
immediately and its result is passed to #stepAdjustments(List
.
stepAdjustments
- a consumer that will call methods on
StepAdjustment.Builder
#stepAdjustments(java.util.Collection)
ScalingPolicy.Builder metricAggregationType(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
.ScalingPolicy.Builder estimatedInstanceWarmup(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.ScalingPolicy.Builder alarms(Collection<Alarm> alarms)
The CloudWatch alarms related to the policy.
alarms
- The CloudWatch alarms related to the policy.ScalingPolicy.Builder alarms(Alarm... alarms)
The CloudWatch alarms related to the policy.
alarms
- The CloudWatch alarms related to the policy.ScalingPolicy.Builder alarms(Consumer<Alarm.Builder>... alarms)
The CloudWatch alarms related to the policy.
This is a convenience method that creates an instance of theAlarm.Builder
avoiding the need to create one
manually via Alarm.builder()
.
When the Consumer
completes,
SdkBuilder.build()
is called immediately and its
result is passed to #alarms(List
.
alarms
- a consumer that will call methods on
Alarm.Builder
#alarms(java.util.Collection)
ScalingPolicy.Builder targetTrackingConfiguration(TargetTrackingConfiguration targetTrackingConfiguration)
A target tracking scaling policy.
targetTrackingConfiguration
- A target tracking scaling policy.default ScalingPolicy.Builder targetTrackingConfiguration(Consumer<TargetTrackingConfiguration.Builder> targetTrackingConfiguration)
A target tracking scaling policy.
This is a convenience method that creates an instance of theTargetTrackingConfiguration.Builder
avoiding the need to create one manually via TargetTrackingConfiguration.builder()
.
When the Consumer
completes, SdkBuilder.build()
is called
immediately and its result is passed to targetTrackingConfiguration(TargetTrackingConfiguration)
.
targetTrackingConfiguration
- a consumer that will call methods on TargetTrackingConfiguration.Builder
targetTrackingConfiguration(TargetTrackingConfiguration)
ScalingPolicy.Builder enabled(Boolean enabled)
Indicates whether the policy is enabled (true
) or disabled (false
).
enabled
- Indicates whether the policy is enabled (true
) or disabled (false
).ScalingPolicy.Builder predictiveScalingConfiguration(PredictiveScalingConfiguration predictiveScalingConfiguration)
A predictive scaling policy.
predictiveScalingConfiguration
- A predictive scaling policy.default ScalingPolicy.Builder predictiveScalingConfiguration(Consumer<PredictiveScalingConfiguration.Builder> predictiveScalingConfiguration)
A predictive scaling policy.
This is a convenience method that creates an instance of thePredictiveScalingConfiguration.Builder
avoiding the need to create one manually via PredictiveScalingConfiguration.builder()
.
When the Consumer
completes, SdkBuilder.build()
is called
immediately and its result is passed to
predictiveScalingConfiguration(PredictiveScalingConfiguration)
.
predictiveScalingConfiguration
- a consumer that will call methods on PredictiveScalingConfiguration.Builder
predictiveScalingConfiguration(PredictiveScalingConfiguration)
Copyright © 2023. All rights reserved.