Interface ScalingPolicy.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<ScalingPolicy.Builder,ScalingPolicy>,SdkBuilder<ScalingPolicy.Builder,ScalingPolicy>,SdkPojo
- Enclosing class:
- ScalingPolicy
public static interface ScalingPolicy.Builder extends SdkPojo, CopyableBuilder<ScalingPolicy.Builder,ScalingPolicy>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ScalingPolicy.BuilderadjustmentType(String adjustmentType)Specifies how the scaling adjustment is interpreted (for example, an absolute number or a percentage).ScalingPolicy.Builderalarms(Collection<Alarm> alarms)The CloudWatch alarms related to the policy.ScalingPolicy.Builderalarms(Consumer<Alarm.Builder>... alarms)The CloudWatch alarms related to the policy.ScalingPolicy.Builderalarms(Alarm... alarms)The CloudWatch alarms related to the policy.ScalingPolicy.BuilderautoScalingGroupName(String autoScalingGroupName)The name of the Auto Scaling group.ScalingPolicy.Buildercooldown(Integer cooldown)The duration of the policy's cooldown period, in seconds.ScalingPolicy.Builderenabled(Boolean enabled)Indicates whether the policy is enabled (true) or disabled (false).ScalingPolicy.BuilderestimatedInstanceWarmup(Integer estimatedInstanceWarmup)The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.ScalingPolicy.BuildermetricAggregationType(String metricAggregationType)The aggregation type for the CloudWatch metrics.ScalingPolicy.BuilderminAdjustmentMagnitude(Integer minAdjustmentMagnitude)The minimum value to scale by when the adjustment type isPercentChangeInCapacity.ScalingPolicy.BuilderminAdjustmentStep(Integer minAdjustmentStep)Available for backward compatibility.ScalingPolicy.BuilderpolicyARN(String policyARN)The Amazon Resource Name (ARN) of the policy.ScalingPolicy.BuilderpolicyName(String policyName)The name of the scaling policy.ScalingPolicy.BuilderpolicyType(String policyType)One of the following policy types:default ScalingPolicy.BuilderpredictiveScalingConfiguration(Consumer<PredictiveScalingConfiguration.Builder> predictiveScalingConfiguration)A predictive scaling policy.ScalingPolicy.BuilderpredictiveScalingConfiguration(PredictiveScalingConfiguration predictiveScalingConfiguration)A predictive scaling policy.ScalingPolicy.BuilderscalingAdjustment(Integer scalingAdjustment)The amount by which to scale, based on the specified adjustment type.ScalingPolicy.BuilderstepAdjustments(Collection<StepAdjustment> stepAdjustments)A set of adjustments that enable you to scale based on the size of the alarm breach.ScalingPolicy.BuilderstepAdjustments(Consumer<StepAdjustment.Builder>... stepAdjustments)A set of adjustments that enable you to scale based on the size of the alarm breach.ScalingPolicy.BuilderstepAdjustments(StepAdjustment... stepAdjustments)A set of adjustments that enable you to scale based on the size of the alarm breach.default ScalingPolicy.BuildertargetTrackingConfiguration(Consumer<TargetTrackingConfiguration.Builder> targetTrackingConfiguration)A target tracking scaling policy.ScalingPolicy.BuildertargetTrackingConfiguration(TargetTrackingConfiguration targetTrackingConfiguration)A target tracking scaling policy.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
-
-
-
Method Detail
-
autoScalingGroupName
ScalingPolicy.Builder autoScalingGroupName(String autoScalingGroupName)
The name of the Auto Scaling group.
- Parameters:
autoScalingGroupName- The name of the Auto Scaling group.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
policyName
ScalingPolicy.Builder policyName(String policyName)
The name of the scaling policy.
- Parameters:
policyName- The name of the scaling policy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
policyARN
ScalingPolicy.Builder policyARN(String policyARN)
The Amazon Resource Name (ARN) of the policy.
- Parameters:
policyARN- The Amazon Resource Name (ARN) of the policy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
policyType
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.
- Parameters:
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.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
adjustmentType
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, andPercentChangeInCapacity.- Parameters:
adjustmentType- Specifies how the scaling adjustment is interpreted (for example, an absolute number or a percentage). The valid values areChangeInCapacity,ExactCapacity, andPercentChangeInCapacity.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
minAdjustmentStep
ScalingPolicy.Builder minAdjustmentStep(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.
-
minAdjustmentMagnitude
ScalingPolicy.Builder minAdjustmentMagnitude(Integer minAdjustmentMagnitude)
The minimum value to scale by when the adjustment type is
PercentChangeInCapacity.- Parameters:
minAdjustmentMagnitude- The minimum value to scale by when the adjustment type isPercentChangeInCapacity.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
scalingAdjustment
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.
- 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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
cooldown
ScalingPolicy.Builder cooldown(Integer cooldown)
The duration of the policy's cooldown period, in seconds.
- Parameters:
cooldown- The duration of the policy's cooldown period, in seconds.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
stepAdjustments
ScalingPolicy.Builder stepAdjustments(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.
-
stepAdjustments
ScalingPolicy.Builder stepAdjustments(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.
-
stepAdjustments
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.Builderavoiding the need to create one manually viaStepAdjustment.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#stepAdjustments(List.) - Parameters:
stepAdjustments- a consumer that will call methods onStepAdjustment.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#stepAdjustments(java.util.Collection)
-
metricAggregationType
ScalingPolicy.Builder metricAggregationType(String metricAggregationType)
The aggregation type for the CloudWatch metrics. The valid values are
Minimum,Maximum, andAverage.- Parameters:
metricAggregationType- The aggregation type for the CloudWatch metrics. The valid values areMinimum,Maximum, andAverage.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
estimatedInstanceWarmup
ScalingPolicy.Builder estimatedInstanceWarmup(Integer estimatedInstanceWarmup)
The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.
- Parameters:
estimatedInstanceWarmup- The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
alarms
ScalingPolicy.Builder alarms(Collection<Alarm> alarms)
The CloudWatch alarms related to the policy.
- Parameters:
alarms- The CloudWatch alarms related to the policy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
alarms
ScalingPolicy.Builder alarms(Alarm... alarms)
The CloudWatch alarms related to the policy.
- Parameters:
alarms- The CloudWatch alarms related to the policy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
alarms
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.Builderavoiding the need to create one manually viaAlarm.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#alarms(List.) - Parameters:
alarms- a consumer that will call methods onAlarm.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#alarms(java.util.Collection)
-
targetTrackingConfiguration
ScalingPolicy.Builder targetTrackingConfiguration(TargetTrackingConfiguration targetTrackingConfiguration)
A target tracking scaling policy.
- Parameters:
targetTrackingConfiguration- A target tracking scaling policy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
targetTrackingConfiguration
default ScalingPolicy.Builder targetTrackingConfiguration(Consumer<TargetTrackingConfiguration.Builder> targetTrackingConfiguration)
A target tracking scaling policy.
This is a convenience method that creates an instance of theTargetTrackingConfiguration.Builderavoiding the need to create one manually viaTargetTrackingConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed totargetTrackingConfiguration(TargetTrackingConfiguration).- Parameters:
targetTrackingConfiguration- a consumer that will call methods onTargetTrackingConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
targetTrackingConfiguration(TargetTrackingConfiguration)
-
enabled
ScalingPolicy.Builder enabled(Boolean enabled)
Indicates whether the policy is enabled (
true) or disabled (false).- Parameters:
enabled- Indicates whether the policy is enabled (true) or disabled (false).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
predictiveScalingConfiguration
ScalingPolicy.Builder predictiveScalingConfiguration(PredictiveScalingConfiguration predictiveScalingConfiguration)
A predictive scaling policy.
- Parameters:
predictiveScalingConfiguration- A predictive scaling policy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
predictiveScalingConfiguration
default ScalingPolicy.Builder predictiveScalingConfiguration(Consumer<PredictiveScalingConfiguration.Builder> predictiveScalingConfiguration)
A predictive scaling policy.
This is a convenience method that creates an instance of thePredictiveScalingConfiguration.Builderavoiding the need to create one manually viaPredictiveScalingConfiguration.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed topredictiveScalingConfiguration(PredictiveScalingConfiguration).- Parameters:
predictiveScalingConfiguration- a consumer that will call methods onPredictiveScalingConfiguration.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
predictiveScalingConfiguration(PredictiveScalingConfiguration)
-
-