aws-cdk-lib.aws_ec2.CfnSpotFleet.LaunchTemplateConfigProperty

interface LaunchTemplateConfigProperty

LanguageType name
.NETAmazon.CDK.AWS.EC2.CfnSpotFleet.LaunchTemplateConfigProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsec2#CfnSpotFleet_LaunchTemplateConfigProperty
Javasoftware.amazon.awscdk.services.ec2.CfnSpotFleet.LaunchTemplateConfigProperty
Pythonaws_cdk.aws_ec2.CfnSpotFleet.LaunchTemplateConfigProperty
TypeScript aws-cdk-lib » aws_ec2 » CfnSpotFleet » LaunchTemplateConfigProperty

Specifies a launch template and overrides.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const launchTemplateConfigProperty: ec2.CfnSpotFleet.LaunchTemplateConfigProperty = {
  launchTemplateSpecification: {
    version: 'version',

    // the properties below are optional
    launchTemplateId: 'launchTemplateId',
    launchTemplateName: 'launchTemplateName',
  },
  overrides: [{
    availabilityZone: 'availabilityZone',
    instanceRequirements: {
      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,
      },
      burstablePerformance: 'burstablePerformance',
      cpuManufacturers: ['cpuManufacturers'],
      excludedInstanceTypes: ['excludedInstanceTypes'],
      instanceGenerations: ['instanceGenerations'],
      localStorage: 'localStorage',
      localStorageTypes: ['localStorageTypes'],
      memoryGiBPerVCpu: {
        max: 123,
        min: 123,
      },
      memoryMiB: {
        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,
      },
      vCpuCount: {
        max: 123,
        min: 123,
      },
    },
    instanceType: 'instanceType',
    priority: 123,
    spotPrice: 'spotPrice',
    subnetId: 'subnetId',
    weightedCapacity: 123,
  }],
};

Properties

NameTypeDescription
launchTemplateSpecification?IResolvable | FleetLaunchTemplateSpecificationPropertyThe launch template to use.
overrides?IResolvable | IResolvable | LaunchTemplateOverridesProperty[]Any parameters that you specify override the same parameters in the launch template.

launchTemplateSpecification?

Type: IResolvable | FleetLaunchTemplateSpecificationProperty (optional)

The launch template to use.

Make sure that the launch template does not contain the NetworkInterfaceId parameter because you can't specify a network interface ID in a Spot Fleet.


overrides?

Type: IResolvable | IResolvable | LaunchTemplateOverridesProperty[] (optional)

Any parameters that you specify override the same parameters in the launch template.