@Stability(value=Stable) public static final class AsgCapacityProvider.Builder extends Object implements software.amazon.jsii.Builder<AsgCapacityProvider>
AsgCapacityProvider.| Modifier and Type | Method and Description |
|---|---|
AsgCapacityProvider.Builder |
autoScalingGroup(IAutoScalingGroup autoScalingGroup)
The autoscaling group to add as a Capacity Provider.
|
AsgCapacityProvider |
build() |
AsgCapacityProvider.Builder |
canContainersAccessInstanceRole(Boolean canContainersAccessInstanceRole)
Specifies whether the containers can access the container instance role.
|
AsgCapacityProvider.Builder |
capacityProviderName(String capacityProviderName)
The name of the capacity provider.
|
static AsgCapacityProvider.Builder |
create(software.constructs.Construct scope,
String id) |
AsgCapacityProvider.Builder |
enableManagedScaling(Boolean enableManagedScaling)
Whether to enable managed scaling.
|
AsgCapacityProvider.Builder |
enableManagedTerminationProtection(Boolean enableManagedTerminationProtection)
Whether to enable managed termination protection.
|
AsgCapacityProvider.Builder |
machineImageType(MachineImageType machineImageType)
What type of machine image this is.
|
AsgCapacityProvider.Builder |
maximumScalingStepSize(Number maximumScalingStepSize)
Maximum scaling step size.
|
AsgCapacityProvider.Builder |
minimumScalingStepSize(Number minimumScalingStepSize)
Minimum scaling step size.
|
AsgCapacityProvider.Builder |
spotInstanceDraining(Boolean spotInstanceDraining)
Specify whether to enable Automated Draining for Spot Instances running Amazon ECS Services.
|
AsgCapacityProvider.Builder |
targetCapacityPercent(Number targetCapacityPercent)
Target capacity percent.
|
AsgCapacityProvider.Builder |
topicEncryptionKey(IKey topicEncryptionKey)
If
AddAutoScalingGroupCapacityOptions.taskDrainTime is non-zero, then the ECS cluster creates an SNS Topic to as part of a system to drain instances of tasks when the instance is being shut down. |
@Stability(value=Stable) public static AsgCapacityProvider.Builder create(software.constructs.Construct scope, String id)
scope - This parameter is required.id - This parameter is required.AsgCapacityProvider.Builder.@Stability(value=Stable) public AsgCapacityProvider.Builder canContainersAccessInstanceRole(Boolean canContainersAccessInstanceRole)
Default: false
canContainersAccessInstanceRole - Specifies whether the containers can access the container instance role. This parameter is required.this@Stability(value=Stable) public AsgCapacityProvider.Builder machineImageType(MachineImageType machineImageType)
Depending on the setting, different UserData will automatically be added
to the AutoScalingGroup to configure it properly for use with ECS.
If you create an AutoScalingGroup yourself and are adding it via
addAutoScalingGroup(), you must specify this value. If you are adding an
autoScalingGroup via addCapacity, this value will be determined
from the machineImage you pass.
Default: - Automatically determined from `machineImage`, if available, otherwise `MachineImageType.AMAZON_LINUX_2`.
machineImageType - What type of machine image this is. This parameter is required.this@Stability(value=Stable) public AsgCapacityProvider.Builder spotInstanceDraining(Boolean spotInstanceDraining)
For more information, see Using Spot Instances.
Default: false
spotInstanceDraining - Specify whether to enable Automated Draining for Spot Instances running Amazon ECS Services. This parameter is required.this@Stability(value=Stable) public AsgCapacityProvider.Builder topicEncryptionKey(IKey topicEncryptionKey)
AddAutoScalingGroupCapacityOptions.taskDrainTime is non-zero, then the ECS cluster creates an SNS Topic to as part of a system to drain instances of tasks when the instance is being shut down. If this property is provided, then this key will be used to encrypt the contents of that SNS Topic. See [SNS Data Encryption](https://docs.aws.amazon.com/sns/latest/dg/sns-data-encryption.html) for more information.
Default: The SNS Topic will not be encrypted.
topicEncryptionKey - If AddAutoScalingGroupCapacityOptions.taskDrainTime is non-zero, then the ECS cluster creates an SNS Topic to as part of a system to drain instances of tasks when the instance is being shut down. If this property is provided, then this key will be used to encrypt the contents of that SNS Topic. See [SNS Data Encryption](https://docs.aws.amazon.com/sns/latest/dg/sns-data-encryption.html) for more information. This parameter is required.this@Stability(value=Stable) public AsgCapacityProvider.Builder autoScalingGroup(IAutoScalingGroup autoScalingGroup)
autoScalingGroup - The autoscaling group to add as a Capacity Provider. This parameter is required.this@Stability(value=Stable) public AsgCapacityProvider.Builder capacityProviderName(String capacityProviderName)
If a name is specified,
it cannot start with aws, ecs, or fargate. If no name is specified,
a default name in the CFNStackName-CFNResourceName-RandomString format is used.
Default: CloudFormation-generated name
capacityProviderName - The name of the capacity provider. This parameter is required.this@Stability(value=Stable) public AsgCapacityProvider.Builder enableManagedScaling(Boolean enableManagedScaling)
Default: true
enableManagedScaling - Whether to enable managed scaling. This parameter is required.this@Stability(value=Stable) public AsgCapacityProvider.Builder enableManagedTerminationProtection(Boolean enableManagedTerminationProtection)
Default: true
enableManagedTerminationProtection - Whether to enable managed termination protection. This parameter is required.this@Stability(value=Stable) public AsgCapacityProvider.Builder maximumScalingStepSize(Number maximumScalingStepSize)
In most cases this should be left alone.
Default: 1000
maximumScalingStepSize - Maximum scaling step size. This parameter is required.this@Stability(value=Stable) public AsgCapacityProvider.Builder minimumScalingStepSize(Number minimumScalingStepSize)
In most cases this should be left alone.
Default: 1
minimumScalingStepSize - Minimum scaling step size. This parameter is required.this@Stability(value=Stable) public AsgCapacityProvider.Builder targetCapacityPercent(Number targetCapacityPercent)
In most cases this should be left alone.
Default: 100
targetCapacityPercent - Target capacity percent. This parameter is required.this@Stability(value=Stable) public AsgCapacityProvider build()
build in interface software.amazon.jsii.Builder<AsgCapacityProvider>Copyright © 2022. All rights reserved.