interface CapacityReservationSpecificationProperty
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.EC2.Mixins.CfnLaunchTemplatePropsMixin.CapacityReservationSpecificationProperty |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awsec2/mixins#CfnLaunchTemplatePropsMixin_CapacityReservationSpecificationProperty |
Java | software.amazon.awscdk.mixins.preview.services.ec2.mixins.CfnLaunchTemplatePropsMixin.CapacityReservationSpecificationProperty |
Python | aws_cdk.mixins_preview.aws_ec2.mixins.CfnLaunchTemplatePropsMixin.CapacityReservationSpecificationProperty |
TypeScript | @aws-cdk/mixins-preview » aws_ec2 » mixins » CfnLaunchTemplatePropsMixin » 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 { mixins as ec2_mixins } from '@aws-cdk/mixins-preview/aws-ec2';
const capacityReservationSpecificationProperty: ec2_mixins.CfnLaunchTemplatePropsMixin.CapacityReservationSpecificationProperty = {
capacityReservationPreference: 'capacityReservationPreference',
capacityReservationTarget: {
capacityReservationId: 'capacityReservationId',
capacityReservationResourceGroupArn: 'capacityReservationResourceGroupArn',
},
};
Properties
| Name | Type | Description |
|---|---|---|
| capacity | string | Indicates the instance's Capacity Reservation preferences. Possible preferences include:. |
| capacity | IResolvable | Capacity | Information about the target Capacity Reservation or Capacity Reservation group. |
capacityReservationPreference?
Type:
string
(optional)
Indicates the instance's Capacity Reservation preferences. Possible preferences include:.
capacity-reservations-only- The instance will only run in a Capacity Reservation or Capacity Reservation group. If capacity isn't available, the instance will fail to launch.open- The instance can run in anyopenCapacity Reservation that has matching attributes (instance type, platform, Availability Zone, tenancy).none- The instance avoids running in a Capacity Reservation even if one is available. The instance runs in On-Demand capacity.
capacityReservationTarget?
Type:
IResolvable | Capacity
(optional)
Information about the target Capacity Reservation or Capacity Reservation group.

.NET
Go
Java
Python
TypeScript