interface CapacityReservationSpecificationProperty
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.AutoScaling.CfnAutoScalingGroup.CapacityReservationSpecificationProperty |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsautoscaling#CfnAutoScalingGroup_CapacityReservationSpecificationProperty |
Java | software.amazon.awscdk.services.autoscaling.CfnAutoScalingGroup.CapacityReservationSpecificationProperty |
Python | aws_cdk.aws_autoscaling.CfnAutoScalingGroup.CapacityReservationSpecificationProperty |
TypeScript | aws-cdk-lib » aws_autoscaling » CfnAutoScalingGroup » CapacityReservationSpecificationProperty |
Describes the Capacity Reservation preference and targeting options.
If you specify open or none for CapacityReservationPreference , do not specify a CapacityReservationTarget .
Example
// 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 capacityReservationSpecificationProperty: autoscaling.CfnAutoScalingGroup.CapacityReservationSpecificationProperty = {
capacityReservationPreference: 'capacityReservationPreference',
// the properties below are optional
capacityReservationTarget: {
capacityReservationIds: ['capacityReservationIds'],
capacityReservationResourceGroupArns: ['capacityReservationResourceGroupArns'],
},
};
Properties
| Name | Type | Description |
|---|---|---|
| capacity | string | The capacity reservation preference. The following options are available:. |
| capacity | IResolvable | Capacity | Describes a target Capacity Reservation or Capacity Reservation resource group. |
capacityReservationPreference
Type:
string
The capacity reservation preference. The following options are available:.
capacity-reservations-only- Auto Scaling will only launch instances into a Capacity Reservation or Capacity Reservation resource group. If capacity isn't available, instances will fail to launch.capacity-reservations-first- Auto Scaling will try to launch instances into a Capacity Reservation or Capacity Reservation resource group first. If capacity isn't available, instances will run in On-Demand capacity.none- Auto Scaling will not launch instances into a Capacity Reservation. Instances will run in On-Demand capacity.default- Auto Scaling uses the Capacity Reservation preference from your launch template or an open Capacity Reservation.
capacityReservationTarget?
Type:
IResolvable | Capacity
(optional)
Describes a target Capacity Reservation or Capacity Reservation resource group.

.NET
Go
Java
Python
TypeScript