Class CfnAutoScalingGroup.CapacityReservationSpecificationProperty.Builder
java.lang.Object
software.amazon.awscdk.services.autoscaling.CfnAutoScalingGroup.CapacityReservationSpecificationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnAutoScalingGroup.CapacityReservationSpecificationProperty>
- Enclosing interface:
CfnAutoScalingGroup.CapacityReservationSpecificationProperty
@Stability(Stable)
public static final class CfnAutoScalingGroup.CapacityReservationSpecificationProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnAutoScalingGroup.CapacityReservationSpecificationProperty>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.capacityReservationPreference(String capacityReservationPreference) capacityReservationTarget(IResolvable capacityReservationTarget) capacityReservationTarget(CfnAutoScalingGroup.CapacityReservationTargetProperty capacityReservationTarget)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
capacityReservationPreference
@Stability(Stable) public CfnAutoScalingGroup.CapacityReservationSpecificationProperty.Builder capacityReservationPreference(String capacityReservationPreference) Sets the value ofCfnAutoScalingGroup.CapacityReservationSpecificationProperty.getCapacityReservationPreference()- Parameters:
capacityReservationPreference- The capacity reservation preference. The following options are available:. This parameter is required.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.
- Returns:
this
-
capacityReservationTarget
@Stability(Stable) public CfnAutoScalingGroup.CapacityReservationSpecificationProperty.Builder capacityReservationTarget(IResolvable capacityReservationTarget) Sets the value ofCfnAutoScalingGroup.CapacityReservationSpecificationProperty.getCapacityReservationTarget()- Parameters:
capacityReservationTarget- Describes a target Capacity Reservation or Capacity Reservation resource group.- Returns:
this
-
capacityReservationTarget
@Stability(Stable) public CfnAutoScalingGroup.CapacityReservationSpecificationProperty.Builder capacityReservationTarget(CfnAutoScalingGroup.CapacityReservationTargetProperty capacityReservationTarget) Sets the value ofCfnAutoScalingGroup.CapacityReservationSpecificationProperty.getCapacityReservationTarget()- Parameters:
capacityReservationTarget- Describes a target Capacity Reservation or Capacity Reservation resource group.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnAutoScalingGroup.CapacityReservationSpecificationProperty>- Returns:
- a new instance of
CfnAutoScalingGroup.CapacityReservationSpecificationProperty - Throws:
NullPointerException- if any required attribute was not provided
-