@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.737Z") @Stability(value=Stable) public enum MachineImageType extends Enum<MachineImageType>
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);
| Enum Constant and Description |
|---|
AMAZON_LINUX_2
Amazon ECS-optimized Amazon Linux 2 AMI.
|
BOTTLEROCKET
Bottlerocket AMI.
|
| Modifier and Type | Method and Description |
|---|---|
static MachineImageType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MachineImageType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
@Stability(value=Stable) public static final MachineImageType AMAZON_LINUX_2
@Stability(value=Stable) public static final MachineImageType BOTTLEROCKET
public static MachineImageType[] values()
for (MachineImageType c : MachineImageType.values()) System.out.println(c);
public static MachineImageType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2022. All rights reserved.