public static interface CfnAutoScalingGroup.MixedInstancesPolicyProperty
You can create a mixed instances policy for a new Auto Scaling group, or you can create it for an existing group by updating the group to specify MixedInstancesPolicy
as the top-level property instead of a launch template or launch configuration. If you specify a MixedInstancesPolicy
, you must specify a launch template as a property of the policy. You cannot specify a launch configuration for the policy.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.autoscaling.*; MixedInstancesPolicyProperty mixedInstancesPolicyProperty = MixedInstancesPolicyProperty.builder() .launchTemplate(LaunchTemplateProperty.builder() .launchTemplateSpecification(LaunchTemplateSpecificationProperty.builder() .version("version") // the properties below are optional .launchTemplateId("launchTemplateId") .launchTemplateName("launchTemplateName") .build()) // the properties below are optional .overrides(List.of(LaunchTemplateOverridesProperty.builder() .instanceRequirements(InstanceRequirementsProperty.builder() .acceleratorCount(AcceleratorCountRequestProperty.builder() .max(123) .min(123) .build()) .acceleratorManufacturers(List.of("acceleratorManufacturers")) .acceleratorNames(List.of("acceleratorNames")) .acceleratorTotalMemoryMiB(AcceleratorTotalMemoryMiBRequestProperty.builder() .max(123) .min(123) .build()) .acceleratorTypes(List.of("acceleratorTypes")) .bareMetal("bareMetal") .baselineEbsBandwidthMbps(BaselineEbsBandwidthMbpsRequestProperty.builder() .max(123) .min(123) .build()) .burstablePerformance("burstablePerformance") .cpuManufacturers(List.of("cpuManufacturers")) .excludedInstanceTypes(List.of("excludedInstanceTypes")) .instanceGenerations(List.of("instanceGenerations")) .localStorage("localStorage") .localStorageTypes(List.of("localStorageTypes")) .memoryGiBPerVCpu(MemoryGiBPerVCpuRequestProperty.builder() .max(123) .min(123) .build()) .memoryMiB(MemoryMiBRequestProperty.builder() .max(123) .min(123) .build()) .networkInterfaceCount(NetworkInterfaceCountRequestProperty.builder() .max(123) .min(123) .build()) .onDemandMaxPricePercentageOverLowestPrice(123) .requireHibernateSupport(false) .spotMaxPricePercentageOverLowestPrice(123) .totalLocalStorageGb(TotalLocalStorageGBRequestProperty.builder() .max(123) .min(123) .build()) .vCpuCount(VCpuCountRequestProperty.builder() .max(123) .min(123) .build()) .build()) .instanceType("instanceType") .launchTemplateSpecification(LaunchTemplateSpecificationProperty.builder() .version("version") // the properties below are optional .launchTemplateId("launchTemplateId") .launchTemplateName("launchTemplateName") .build()) .weightedCapacity("weightedCapacity") .build())) .build()) // the properties below are optional .instancesDistribution(InstancesDistributionProperty.builder() .onDemandAllocationStrategy("onDemandAllocationStrategy") .onDemandBaseCapacity(123) .onDemandPercentageAboveBaseCapacity(123) .spotAllocationStrategy("spotAllocationStrategy") .spotInstancePools(123) .spotMaxPrice("spotMaxPrice") .build()) .build();
Modifier and Type | Interface and Description |
---|---|
static class |
CfnAutoScalingGroup.MixedInstancesPolicyProperty.Builder
A builder for
CfnAutoScalingGroup.MixedInstancesPolicyProperty |
static class |
CfnAutoScalingGroup.MixedInstancesPolicyProperty.Jsii$Proxy
An implementation for
CfnAutoScalingGroup.MixedInstancesPolicyProperty |
Modifier and Type | Method and Description |
---|---|
static CfnAutoScalingGroup.MixedInstancesPolicyProperty.Builder |
builder() |
default java.lang.Object |
getInstancesDistribution()
The instances distribution.
|
java.lang.Object |
getLaunchTemplate()
One or more launch templates and the instance types (overrides) that are used to launch EC2 instances to fulfill On-Demand and Spot capacities.
|
java.lang.Object getLaunchTemplate()
default java.lang.Object getInstancesDistribution()
static CfnAutoScalingGroup.MixedInstancesPolicyProperty.Builder builder()