@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.570Z") @Stability(value=Stable) public interface AsgCapacityProviderProps extends software.amazon.jsii.JsiiSerializable, AddAutoScalingGroupCapacityOptions
Example:
// Example automatically generated from non-compiling source. May contain errors.
LaunchTemplate launchTemplate = LaunchTemplate.Builder.create(this, "ASG-LaunchTemplate")
.instanceType(new InstanceType("t3.medium"))
.machineImage(EcsOptimizedImage.amazonLinux2())
.userData(UserData.forLinux())
.build();
AutoScalingGroup autoScalingGroup = AutoScalingGroup.Builder.create(this, "ASG")
.vpc(vpc)
.mixedInstancesPolicy(MixedInstancesPolicy.builder()
.instancesDistribution(InstancesDistribution.builder()
.onDemandPercentageAboveBaseCapacity(50)
.build())
.launchTemplate(launchTemplate)
.build())
.build();
Cluster cluster = Cluster.Builder.create(this, "Cluster").vpc(vpc).build();
AsgCapacityProvider capacityProvider = AsgCapacityProvider.Builder.create(this, "AsgCapacityProvider")
.autoScalingGroup(autoScalingGroup)
.machineImageType(MachineImageType.AMAZON_LINUX_2)
.build();
cluster.addAsgCapacityProvider(capacityProvider);
| Modifier and Type | Interface and Description |
|---|---|
static class |
AsgCapacityProviderProps.Builder
A builder for
AsgCapacityProviderProps |
static class |
AsgCapacityProviderProps.Jsii$Proxy
An implementation for
AsgCapacityProviderProps |
| Modifier and Type | Method and Description |
|---|---|
static AsgCapacityProviderProps.Builder |
builder() |
IAutoScalingGroup |
getAutoScalingGroup()
The autoscaling group to add as a Capacity Provider.
|
default String |
getCapacityProviderName()
The name of the capacity provider.
|
default Boolean |
getEnableManagedScaling()
Whether to enable managed scaling.
|
default Boolean |
getEnableManagedTerminationProtection()
Whether to enable managed termination protection.
|
default Number |
getMaximumScalingStepSize()
Maximum scaling step size.
|
default Number |
getMinimumScalingStepSize()
Minimum scaling step size.
|
default Number |
getTargetCapacityPercent()
Target capacity percent.
|
getCanContainersAccessInstanceRole, getMachineImageType, getSpotInstanceDraining, getTopicEncryptionKey@Stability(value=Stable) @NotNull IAutoScalingGroup getAutoScalingGroup()
@Stability(value=Stable) @Nullable default String getCapacityProviderName()
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
@Stability(value=Stable) @Nullable default Boolean getEnableManagedScaling()
Default: true
@Stability(value=Stable) @Nullable default Boolean getEnableManagedTerminationProtection()
Default: true
@Stability(value=Stable) @Nullable default Number getMaximumScalingStepSize()
In most cases this should be left alone.
Default: 1000
@Stability(value=Stable) @Nullable default Number getMinimumScalingStepSize()
In most cases this should be left alone.
Default: 1
@Stability(value=Stable) @Nullable default Number getTargetCapacityPercent()
In most cases this should be left alone.
Default: 100
@Stability(value=Stable) static AsgCapacityProviderProps.Builder builder()
builder in interface AddAutoScalingGroupCapacityOptionsAsgCapacityProviderProps.Builder of AsgCapacityProviderPropsCopyright © 2022. All rights reserved.