LaunchTemplateProperty Struct
Use this structure to specify the launch templates and instance types (overrides) for a mixed instances policy.
LaunchTemplate is a property of the AWS::AutoScaling::AutoScalingGroup MixedInstancesPolicy property type.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_autoscaling as autoscaling } from 'aws-cdk-lib';
const launchTemplateProperty: autoscaling.CfnAutoScalingGroup.LaunchTemplateProperty = {
launchTemplateSpecification: {
version: 'version',
// the properties below are optional
launchTemplateId: 'launchTemplateId',
launchTemplateName: 'launchTemplateName',
},
// the properties below are optional
overrides: [{
imageId: 'imageId',
instanceRequirements: {
memoryMiB: {
max: 123,
min: 123,
},
vCpuCount: {
max: 123,
min: 123,
},
// the properties below are optional
acceleratorCount: {
max: 123,
min: 123,
},
acceleratorManufacturers: ['acceleratorManufacturers'],
acceleratorNames: ['acceleratorNames'],
acceleratorTotalMemoryMiB: {
max: 123,
min: 123,
},
acceleratorTypes: ['acceleratorTypes'],
allowedInstanceTypes: ['allowedInstanceTypes'],
bareMetal: 'bareMetal',
baselineEbsBandwidthMbps: {
max: 123,
min: 123,
},
baselinePerformanceFactors: {
cpu: {
references: [{
instanceFamily: 'instanceFamily',
}],
},
},
burstablePerformance: 'burstablePerformance',
cpuManufacturers: ['cpuManufacturers'],
excludedInstanceTypes: ['excludedInstanceTypes'],
instanceGenerations: ['instanceGenerations'],
localStorage: 'localStorage',
localStorageTypes: ['localStorageTypes'],
maxSpotPriceAsPercentageOfOptimalOnDemandPrice: 123,
memoryGiBPerVCpu: {
max: 123,
min: 123,
},
networkBandwidthGbps: {
max: 123,
min: 123,
},
networkInterfaceCount: {
max: 123,
min: 123,
},
onDemandMaxPricePercentageOverLowestPrice: 123,
requireHibernateSupport: false,
spotMaxPricePercentageOverLowestPrice: 123,
totalLocalStorageGb: {
max: 123,
min: 123,
},
},
instanceType: 'instanceType',
launchTemplateSpecification: {
version: 'version',
// the properties below are optional
launchTemplateId: 'launchTemplateId',
launchTemplateName: 'launchTemplateName',
},
weightedCapacity: 'weightedCapacity',
}],
};
Properties
launchTemplateSpecificationIResolvable | CfnAutoScalingGroup.LaunchTemplateSpecificationPropertylaunch_template_specificationtyping.Union[IResolvable, LaunchTemplateSpecificationProperty]launchTemplateSpecificationIResolvableLaunchTemplateSpecificationIResolvableLaunchTemplateSpecificationinterface{}required#The launch template.
overridesoptionalIResolvable | IResolvable | CfnAutoScalingGroup.LaunchTemplateOverridesProperty[]overridesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, LaunchTemplateOverridesProperty]]]overridesoptionalIResolvableOverridesoptionalIResolvableOverridesoptionalinterface{}#Any properties that you specify override the same properties in the launch template.