Class CfnInstanceFleetConfigProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnInstanceFleetConfigProps>
- Enclosing interface:
CfnInstanceFleetConfigProps
CfnInstanceFleetConfigProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofCfnInstanceFleetConfigProps.getClusterId()
instanceFleetType
(String instanceFleetType) Sets the value ofCfnInstanceFleetConfigProps.getInstanceFleetType()
instanceTypeConfigs
(List<? extends Object> instanceTypeConfigs) Sets the value ofCfnInstanceFleetConfigProps.getInstanceTypeConfigs()
instanceTypeConfigs
(IResolvable instanceTypeConfigs) Sets the value ofCfnInstanceFleetConfigProps.getInstanceTypeConfigs()
launchSpecifications
(IResolvable launchSpecifications) Sets the value ofCfnInstanceFleetConfigProps.getLaunchSpecifications()
launchSpecifications
(CfnInstanceFleetConfig.InstanceFleetProvisioningSpecificationsProperty launchSpecifications) Sets the value ofCfnInstanceFleetConfigProps.getLaunchSpecifications()
Sets the value ofCfnInstanceFleetConfigProps.getName()
resizeSpecifications
(IResolvable resizeSpecifications) Sets the value ofCfnInstanceFleetConfigProps.getResizeSpecifications()
resizeSpecifications
(CfnInstanceFleetConfig.InstanceFleetResizingSpecificationsProperty resizeSpecifications) Sets the value ofCfnInstanceFleetConfigProps.getResizeSpecifications()
targetOnDemandCapacity
(Number targetOnDemandCapacity) Sets the value ofCfnInstanceFleetConfigProps.getTargetOnDemandCapacity()
targetSpotCapacity
(Number targetSpotCapacity) Sets the value ofCfnInstanceFleetConfigProps.getTargetSpotCapacity()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
clusterId
Sets the value ofCfnInstanceFleetConfigProps.getClusterId()
- Parameters:
clusterId
- The unique identifier of the EMR cluster. This parameter is required.- Returns:
this
-
instanceFleetType
@Stability(Stable) public CfnInstanceFleetConfigProps.Builder instanceFleetType(String instanceFleetType) Sets the value ofCfnInstanceFleetConfigProps.getInstanceFleetType()
- Parameters:
instanceFleetType
- The node type that the instance fleet hosts. This parameter is required. Allowed Values : TASK- Returns:
this
-
instanceTypeConfigs
@Stability(Stable) public CfnInstanceFleetConfigProps.Builder instanceTypeConfigs(IResolvable instanceTypeConfigs) Sets the value ofCfnInstanceFleetConfigProps.getInstanceTypeConfigs()
- Parameters:
instanceTypeConfigs
-InstanceTypeConfigs
determine the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.
- Returns:
this
-
instanceTypeConfigs
@Stability(Stable) public CfnInstanceFleetConfigProps.Builder instanceTypeConfigs(List<? extends Object> instanceTypeConfigs) Sets the value ofCfnInstanceFleetConfigProps.getInstanceTypeConfigs()
- Parameters:
instanceTypeConfigs
-InstanceTypeConfigs
determine the EC2 instances that Amazon EMR attempts to provision to fulfill On-Demand and Spot target capacities.The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.
- Returns:
this
-
launchSpecifications
@Stability(Stable) public CfnInstanceFleetConfigProps.Builder launchSpecifications(IResolvable launchSpecifications) Sets the value ofCfnInstanceFleetConfigProps.getLaunchSpecifications()
- Parameters:
launchSpecifications
- The launch specification for the instance fleet.- Returns:
this
-
launchSpecifications
@Stability(Stable) public CfnInstanceFleetConfigProps.Builder launchSpecifications(CfnInstanceFleetConfig.InstanceFleetProvisioningSpecificationsProperty launchSpecifications) Sets the value ofCfnInstanceFleetConfigProps.getLaunchSpecifications()
- Parameters:
launchSpecifications
- The launch specification for the instance fleet.- Returns:
this
-
name
Sets the value ofCfnInstanceFleetConfigProps.getName()
- Parameters:
name
- The friendly name of the instance fleet.- Returns:
this
-
resizeSpecifications
@Stability(Stable) public CfnInstanceFleetConfigProps.Builder resizeSpecifications(IResolvable resizeSpecifications) Sets the value ofCfnInstanceFleetConfigProps.getResizeSpecifications()
- Parameters:
resizeSpecifications
- The resize specification for the instance fleet.- Returns:
this
-
resizeSpecifications
@Stability(Stable) public CfnInstanceFleetConfigProps.Builder resizeSpecifications(CfnInstanceFleetConfig.InstanceFleetResizingSpecificationsProperty resizeSpecifications) Sets the value ofCfnInstanceFleetConfigProps.getResizeSpecifications()
- Parameters:
resizeSpecifications
- The resize specification for the instance fleet.- Returns:
this
-
targetOnDemandCapacity
@Stability(Stable) public CfnInstanceFleetConfigProps.Builder targetOnDemandCapacity(Number targetOnDemandCapacity) Sets the value ofCfnInstanceFleetConfigProps.getTargetOnDemandCapacity()
- 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, theWeightedCapacity
units 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 aWeightedCapacity
of 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 ofTargetSpotCapacity
andTargetOnDemandCapacity
should be greater than 0. For a master instance fleet, only one ofTargetSpotCapacity
andTargetOnDemandCapacity
can be specified, and its value must be 1.- Returns:
this
-
targetSpotCapacity
@Stability(Stable) public CfnInstanceFleetConfigProps.Builder targetSpotCapacity(Number targetSpotCapacity) Sets the value ofCfnInstanceFleetConfigProps.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, theWeightedCapacity
units 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 aWeightedCapacity
of 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
TargetSpotCapacity
andTargetOnDemandCapacity
should be greater than 0. For a master instance fleet, only one ofTargetSpotCapacity
andTargetOnDemandCapacity
can be specified, and its value must be 1.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnInstanceFleetConfigProps>
- Returns:
- a new instance of
CfnInstanceFleetConfigProps
- Throws:
NullPointerException
- if any required attribute was not provided
-