Class CfnClusterPropsMixin.InstanceFleetConfigProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnClusterPropsMixin.InstanceFleetConfigProperty>
- Enclosing interface:
CfnClusterPropsMixin.InstanceFleetConfigProperty
CfnClusterPropsMixin.InstanceFleetConfigProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.instanceTypeConfigs(List<? extends Object> instanceTypeConfigs) instanceTypeConfigs(IResolvable instanceTypeConfigs) launchSpecifications(CfnClusterPropsMixin.InstanceFleetProvisioningSpecificationsProperty launchSpecifications) launchSpecifications(IResolvable launchSpecifications) Sets the value ofCfnClusterPropsMixin.InstanceFleetConfigProperty.getName()resizeSpecifications(CfnClusterPropsMixin.InstanceFleetResizingSpecificationsProperty resizeSpecifications) resizeSpecifications(IResolvable resizeSpecifications) targetOnDemandCapacity(Number targetOnDemandCapacity) targetSpotCapacity(Number targetSpotCapacity) Sets the value ofCfnClusterPropsMixin.InstanceFleetConfigProperty.getTargetSpotCapacity()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
instanceTypeConfigs
@Stability(Stable) public CfnClusterPropsMixin.InstanceFleetConfigProperty.Builder instanceTypeConfigs(IResolvable instanceTypeConfigs) - Parameters:
instanceTypeConfigs- The instance type configurations that define the Amazon EC2 instances in the instance fleet.- Returns:
this
-
instanceTypeConfigs
@Stability(Stable) public CfnClusterPropsMixin.InstanceFleetConfigProperty.Builder instanceTypeConfigs(List<? extends Object> instanceTypeConfigs) - Parameters:
instanceTypeConfigs- The instance type configurations that define the Amazon EC2 instances in the instance fleet.- Returns:
this
-
launchSpecifications
@Stability(Stable) public CfnClusterPropsMixin.InstanceFleetConfigProperty.Builder launchSpecifications(IResolvable launchSpecifications) - Parameters:
launchSpecifications- The launch specification for the instance fleet.- Returns:
this
-
launchSpecifications
@Stability(Stable) public CfnClusterPropsMixin.InstanceFleetConfigProperty.Builder launchSpecifications(CfnClusterPropsMixin.InstanceFleetProvisioningSpecificationsProperty launchSpecifications) - Parameters:
launchSpecifications- The launch specification for the instance fleet.- Returns:
this
-
name
@Stability(Stable) public CfnClusterPropsMixin.InstanceFleetConfigProperty.Builder name(String name) Sets the value ofCfnClusterPropsMixin.InstanceFleetConfigProperty.getName()- Parameters:
name- The friendly name of the instance fleet.- Returns:
this
-
resizeSpecifications
@Stability(Stable) public CfnClusterPropsMixin.InstanceFleetConfigProperty.Builder resizeSpecifications(IResolvable resizeSpecifications) - Parameters:
resizeSpecifications- The resize specification for the instance fleet.- Returns:
this
-
resizeSpecifications
@Stability(Stable) public CfnClusterPropsMixin.InstanceFleetConfigProperty.Builder resizeSpecifications(CfnClusterPropsMixin.InstanceFleetResizingSpecificationsProperty resizeSpecifications) - Parameters:
resizeSpecifications- The resize specification for the instance fleet.- Returns:
this
-
targetOnDemandCapacity
@Stability(Stable) public CfnClusterPropsMixin.InstanceFleetConfigProperty.Builder targetOnDemandCapacity(Number targetOnDemandCapacity) - Parameters:
targetOnDemandCapacity- The target capacity of On-Demand units for the instance fleet, which determines how many On-Demand instances to provision. When the instance fleet launches, Amazon EMR tries to provision On-Demand instances as specified byInstanceTypeConfig. Each instance configuration has a specifiedWeightedCapacity. When an On-Demand instance is provisioned, theWeightedCapacityunits count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with aWeightedCapacityof 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units.If not specified or set to 0, only Spot instances are provisioned for the instance fleet using
TargetSpotCapacity. At least one ofTargetSpotCapacityandTargetOnDemandCapacityshould be greater than 0. For a master instance fleet, only one ofTargetSpotCapacityandTargetOnDemandCapacitycan be specified, and its value must be 1.- Returns:
this
-
targetSpotCapacity
@Stability(Stable) public CfnClusterPropsMixin.InstanceFleetConfigProperty.Builder targetSpotCapacity(Number targetSpotCapacity) Sets the value ofCfnClusterPropsMixin.InstanceFleetConfigProperty.getTargetSpotCapacity()- Parameters:
targetSpotCapacity- The target capacity of Spot units for the instance fleet, which determines how many Spot instances to provision. When the instance fleet launches, Amazon EMR tries to provision Spot instances as specified byInstanceTypeConfig. Each instance configuration has a specifiedWeightedCapacity. When a Spot instance is provisioned, theWeightedCapacityunits count toward the target capacity. Amazon EMR provisions instances until the target capacity is totally fulfilled, even if this results in an overage. For example, if there are 2 units remaining to fulfill capacity, and Amazon EMR can only provision an instance with aWeightedCapacityof 5 units, the instance is provisioned, and the target capacity is exceeded by 3 units.If not specified or set to 0, only On-Demand instances are provisioned for the instance fleet. At least one of
TargetSpotCapacityandTargetOnDemandCapacityshould be greater than 0. For a master instance fleet, only one ofTargetSpotCapacityandTargetOnDemandCapacitycan be specified, and its value must be 1.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnClusterPropsMixin.InstanceFleetConfigProperty>- Returns:
- a new instance of
CfnClusterPropsMixin.InstanceFleetConfigProperty - Throws:
NullPointerException- if any required attribute was not provided
-