Class CfnEC2Fleet.CapacityReservationOptionsRequestProperty.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnEC2Fleet.CapacityReservationOptionsRequestProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnEC2Fleet.CapacityReservationOptionsRequestProperty>
- Enclosing interface:
CfnEC2Fleet.CapacityReservationOptionsRequestProperty
@Stability(Stable)
public static final class CfnEC2Fleet.CapacityReservationOptionsRequestProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnEC2Fleet.CapacityReservationOptionsRequestProperty>
A builder for
CfnEC2Fleet.CapacityReservationOptionsRequestProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.usageStrategy
(String usageStrategy) Sets the value ofCfnEC2Fleet.CapacityReservationOptionsRequestProperty.getUsageStrategy()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
usageStrategy
@Stability(Stable) public CfnEC2Fleet.CapacityReservationOptionsRequestProperty.Builder usageStrategy(String usageStrategy) Sets the value ofCfnEC2Fleet.CapacityReservationOptionsRequestProperty.getUsageStrategy()
- Parameters:
usageStrategy
- Indicates whether to use unused Capacity Reservations for fulfilling On-Demand capacity. If you specifyuse-capacity-reservations-first
, the fleet uses unused Capacity Reservations to fulfill On-Demand capacity up to the target On-Demand capacity. If multiple instance pools have unused Capacity Reservations, the On-Demand allocation strategy (lowest-price
orprioritized
) is applied. If the number of unused Capacity Reservations is less than the On-Demand target capacity, the remaining On-Demand target capacity is launched according to the On-Demand allocation strategy (lowest-price
orprioritized
).If you do not specify a value, the fleet fulfils the On-Demand capacity according to the chosen On-Demand allocation strategy.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnEC2Fleet.CapacityReservationOptionsRequestProperty>
- Returns:
- a new instance of
CfnEC2Fleet.CapacityReservationOptionsRequestProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-