Interface CfnLaunchTemplate.CapacityReservationSpecificationProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnLaunchTemplate.CapacityReservationSpecificationProperty.Jsii$Proxy
- Enclosing class:
CfnLaunchTemplate
@Stability(Stable)
public static interface CfnLaunchTemplate.CapacityReservationSpecificationProperty
extends software.amazon.jsii.JsiiSerializable
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 software.amazon.awscdk.services.ec2.*; CapacityReservationSpecificationProperty capacityReservationSpecificationProperty = CapacityReservationSpecificationProperty.builder() .capacityReservationPreference("capacityReservationPreference") .capacityReservationTarget(CapacityReservationTargetProperty.builder() .capacityReservationId("capacityReservationId") .capacityReservationResourceGroupArn("capacityReservationResourceGroupArn") .build()) .build();
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
static final class
An implementation forCfnLaunchTemplate.CapacityReservationSpecificationProperty
-
Method Summary
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getCapacityReservationPreference
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 anyopen
Capacity 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.
- See Also:
-
getCapacityReservationTarget
Information about the target Capacity Reservation or Capacity Reservation group.- See Also:
-
builder
@Stability(Stable) static CfnLaunchTemplate.CapacityReservationSpecificationProperty.Builder builder()
-