Class CfnCluster.OnDemandCapacityReservationOptionsProperty.Builder
java.lang.Object
software.amazon.awscdk.services.emr.CfnCluster.OnDemandCapacityReservationOptionsProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnCluster.OnDemandCapacityReservationOptionsProperty>
- Enclosing interface:
CfnCluster.OnDemandCapacityReservationOptionsProperty
@Stability(Stable)
public static final class CfnCluster.OnDemandCapacityReservationOptionsProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnCluster.OnDemandCapacityReservationOptionsProperty>
A builder for
CfnCluster.OnDemandCapacityReservationOptionsProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.capacityReservationPreference
(String capacityReservationPreference) capacityReservationResourceGroupArn
(String capacityReservationResourceGroupArn) usageStrategy
(String usageStrategy) Sets the value ofCfnCluster.OnDemandCapacityReservationOptionsProperty.getUsageStrategy()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
capacityReservationPreference
@Stability(Stable) public CfnCluster.OnDemandCapacityReservationOptionsProperty.Builder capacityReservationPreference(String capacityReservationPreference) Sets the value ofCfnCluster.OnDemandCapacityReservationOptionsProperty.getCapacityReservationPreference()
- Parameters:
capacityReservationPreference
- Indicates the instance's Capacity Reservation preferences. Possible preferences include:.open
- The instance can run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).none
- The instance avoids running in a Capacity Reservation even if one is available. The instance runs as an On-Demand Instance.
- Returns:
this
-
capacityReservationResourceGroupArn
@Stability(Stable) public CfnCluster.OnDemandCapacityReservationOptionsProperty.Builder capacityReservationResourceGroupArn(String capacityReservationResourceGroupArn) Sets the value ofCfnCluster.OnDemandCapacityReservationOptionsProperty.getCapacityReservationResourceGroupArn()
- Parameters:
capacityReservationResourceGroupArn
- The ARN of the Capacity Reservation resource group in which to run the instance.- Returns:
this
-
usageStrategy
@Stability(Stable) public CfnCluster.OnDemandCapacityReservationOptionsProperty.Builder usageStrategy(String usageStrategy) Sets the value ofCfnCluster.OnDemandCapacityReservationOptionsProperty.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
) 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
).If you do not specify a value, the fleet fulfills 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<CfnCluster.OnDemandCapacityReservationOptionsProperty>
- Returns:
- a new instance of
CfnCluster.OnDemandCapacityReservationOptionsProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-