Class CfnLaunchTemplate.CapacityReservationSpecificationProperty.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnLaunchTemplate.CapacityReservationSpecificationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLaunchTemplate.CapacityReservationSpecificationProperty>
- Enclosing interface:
CfnLaunchTemplate.CapacityReservationSpecificationProperty
@Stability(Stable)
public static final class CfnLaunchTemplate.CapacityReservationSpecificationProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnLaunchTemplate.CapacityReservationSpecificationProperty>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.capacityReservationPreference(String capacityReservationPreference) capacityReservationTarget(IResolvable capacityReservationTarget) capacityReservationTarget(CfnLaunchTemplate.CapacityReservationTargetProperty capacityReservationTarget)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
capacityReservationPreference
@Stability(Stable) public CfnLaunchTemplate.CapacityReservationSpecificationProperty.Builder capacityReservationPreference(String capacityReservationPreference) Sets the value ofCfnLaunchTemplate.CapacityReservationSpecificationProperty.getCapacityReservationPreference()- Parameters:
capacityReservationPreference- 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.
- Returns:
this
-
capacityReservationTarget
@Stability(Stable) public CfnLaunchTemplate.CapacityReservationSpecificationProperty.Builder capacityReservationTarget(IResolvable capacityReservationTarget) Sets the value ofCfnLaunchTemplate.CapacityReservationSpecificationProperty.getCapacityReservationTarget()- Parameters:
capacityReservationTarget- Information about the target Capacity Reservation or Capacity Reservation group.- Returns:
this
-
capacityReservationTarget
@Stability(Stable) public CfnLaunchTemplate.CapacityReservationSpecificationProperty.Builder capacityReservationTarget(CfnLaunchTemplate.CapacityReservationTargetProperty capacityReservationTarget) Sets the value ofCfnLaunchTemplate.CapacityReservationSpecificationProperty.getCapacityReservationTarget()- Parameters:
capacityReservationTarget- Information about the target Capacity Reservation or Capacity Reservation group.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnLaunchTemplate.CapacityReservationSpecificationProperty>- Returns:
- a new instance of
CfnLaunchTemplate.CapacityReservationSpecificationProperty - Throws:
NullPointerException- if any required attribute was not provided
-