Class CfnCapacityProvider.ManagedScalingProperty.Builder
java.lang.Object
software.amazon.awscdk.services.ecs.CfnCapacityProvider.ManagedScalingProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnCapacityProvider.ManagedScalingProperty>
- Enclosing interface:
- CfnCapacityProvider.ManagedScalingProperty
@Stability(Stable)
public static final class CfnCapacityProvider.ManagedScalingProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnCapacityProvider.ManagedScalingProperty>
A builder for
CfnCapacityProvider.ManagedScalingProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.instanceWarmupPeriod
(Number instanceWarmupPeriod) Sets the value ofCfnCapacityProvider.ManagedScalingProperty.getInstanceWarmupPeriod()
maximumScalingStepSize
(Number maximumScalingStepSize) Sets the value ofCfnCapacityProvider.ManagedScalingProperty.getMaximumScalingStepSize()
minimumScalingStepSize
(Number minimumScalingStepSize) Sets the value ofCfnCapacityProvider.ManagedScalingProperty.getMinimumScalingStepSize()
Sets the value ofCfnCapacityProvider.ManagedScalingProperty.getStatus()
targetCapacity
(Number targetCapacity) Sets the value ofCfnCapacityProvider.ManagedScalingProperty.getTargetCapacity()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
instanceWarmupPeriod
@Stability(Stable) public CfnCapacityProvider.ManagedScalingProperty.Builder instanceWarmupPeriod(Number instanceWarmupPeriod) Sets the value ofCfnCapacityProvider.ManagedScalingProperty.getInstanceWarmupPeriod()
- Parameters:
instanceWarmupPeriod
- The period of time, in seconds, after a newly launched Amazon EC2 instance can contribute to CloudWatch metrics for Auto Scaling group. If this parameter is omitted, the default value of300
seconds is used.- Returns:
this
-
maximumScalingStepSize
@Stability(Stable) public CfnCapacityProvider.ManagedScalingProperty.Builder maximumScalingStepSize(Number maximumScalingStepSize) Sets the value ofCfnCapacityProvider.ManagedScalingProperty.getMaximumScalingStepSize()
- Parameters:
maximumScalingStepSize
- The maximum number of Amazon EC2 instances that Amazon ECS will scale out at one time. The scale in process is not affected by this parameter. If this parameter is omitted, the default value of1
is used.- Returns:
this
-
minimumScalingStepSize
@Stability(Stable) public CfnCapacityProvider.ManagedScalingProperty.Builder minimumScalingStepSize(Number minimumScalingStepSize) Sets the value ofCfnCapacityProvider.ManagedScalingProperty.getMinimumScalingStepSize()
- Parameters:
minimumScalingStepSize
- The minimum number of Amazon EC2 instances that Amazon ECS will scale out at one time. The scale in process is not affected by this parameter If this parameter is omitted, the default value of1
is used.When additional capacity is required, Amazon ECS will scale up the minimum scaling step size even if the actual demand is less than the minimum scaling step size.
If you use a capacity provider with an Auto Scaling group configured with more than one Amazon EC2 instance type or Availability Zone, Amazon ECS will scale up by the exact minimum scaling step size value and will ignore both the maximum scaling step size as well as the capacity demand.
- Returns:
this
-
status
Sets the value ofCfnCapacityProvider.ManagedScalingProperty.getStatus()
- Parameters:
status
- Determines whether to use managed scaling for the capacity provider.- Returns:
this
-
targetCapacity
@Stability(Stable) public CfnCapacityProvider.ManagedScalingProperty.Builder targetCapacity(Number targetCapacity) Sets the value ofCfnCapacityProvider.ManagedScalingProperty.getTargetCapacity()
- Parameters:
targetCapacity
- The target capacity utilization as a percentage for the capacity provider. The specified value must be greater than0
and less than or equal to100
. For example, if you want the capacity provider to maintain 10% spare capacity, then that means the utilization is 90%, so use atargetCapacity
of90
. The default value of100
percent results in the Amazon EC2 instances in your Auto Scaling group being completely used.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnCapacityProvider.ManagedScalingProperty>
- Returns:
- a new instance of
CfnCapacityProvider.ManagedScalingProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-