@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)",
date="2023-03-22T19:35:48.006Z")
public interface MixedInstancesPolicy
For more information, see Auto Scaling groups with multiple instance types and purchase options in the Amazon EC2 Auto Scaling User Guide:
https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-purchase-options.html
Example:
Vpc vpc; LaunchTemplate launchTemplate1; LaunchTemplate launchTemplate2; AutoScalingGroup.Builder.create(this, "ASG") .vpc(vpc) .mixedInstancesPolicy(MixedInstancesPolicy.builder() .instancesDistribution(InstancesDistribution.builder() .onDemandPercentageAboveBaseCapacity(50) .build()) .launchTemplate(launchTemplate1) .launchTemplateOverrides(List.of(LaunchTemplateOverrides.builder().instanceType(new InstanceType("t3.micro")).build(), LaunchTemplateOverrides.builder().instanceType(new InstanceType("t3a.micro")).build(), LaunchTemplateOverrides.builder().instanceType(new InstanceType("t4g.micro")).launchTemplate(launchTemplate2).build())) .build()) .build();
Modifier and Type | Interface and Description |
---|---|
static class |
MixedInstancesPolicy.Builder
A builder for
MixedInstancesPolicy |
static class |
MixedInstancesPolicy.Jsii$Proxy
An implementation for
MixedInstancesPolicy |
Modifier and Type | Method and Description |
---|---|
static MixedInstancesPolicy.Builder |
builder() |
default InstancesDistribution |
getInstancesDistribution()
InstancesDistribution to use.
|
ILaunchTemplate |
getLaunchTemplate()
Launch template to use.
|
default java.util.List<LaunchTemplateOverrides> |
getLaunchTemplateOverrides()
Launch template overrides.
|
ILaunchTemplate getLaunchTemplate()
default InstancesDistribution getInstancesDistribution()
Default: - The value for each property in it uses a default value.
default java.util.List<LaunchTemplateOverrides> getLaunchTemplateOverrides()
The maximum number of instance types that can be associated with an Auto Scaling group is 40.
The maximum number of distinct launch templates you can define for an Auto Scaling group is 20.
Default: - Do not provide any overrides
static MixedInstancesPolicy.Builder builder()
MixedInstancesPolicy.Builder
of MixedInstancesPolicy