aws-cdk-lib.aws_ec2.CfnLaunchTemplate.CapacityReservationSpecificationProperty

interface CapacityReservationSpecificationProperty

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

Specifies an instance's Capacity Reservation targeting option. You can specify only one option at a time.

CapacityReservationSpecification is a property of AWS::EC2::LaunchTemplate LaunchTemplateData .

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 capacityReservationSpecificationProperty: ec2.CfnLaunchTemplate.CapacityReservationSpecificationProperty = {
  capacityReservationPreference: 'capacityReservationPreference',
  capacityReservationTarget: {
    capacityReservationId: 'capacityReservationId',
    capacityReservationResourceGroupArn: 'capacityReservationResourceGroupArn',
  },
};

Properties

NameTypeDescription
capacityReservationPreference?stringIndicates the instance's Capacity Reservation preferences. Possible preferences include:.
capacityReservationTarget?IResolvable | CapacityReservationTargetPropertyInformation about the target Capacity Reservation or Capacity Reservation group.

capacityReservationPreference?

Type: string (optional)

Indicates the instance's Capacity Reservation preferences. Possible preferences include:.

  • open - The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).
  • none - The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.

capacityReservationTarget?

Type: IResolvable | CapacityReservationTargetProperty (optional)

Information about the target Capacity Reservation or Capacity Reservation group.