Class CfnInstanceFleetConfigMixinProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnInstanceFleetConfigMixinProps>
- Enclosing interface:
CfnInstanceFleetConfigMixinProps
CfnInstanceFleetConfigMixinProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.Sets the value ofCfnInstanceFleetConfigMixinProps.getClusterId()instanceFleetType(String instanceFleetType) Sets the value ofCfnInstanceFleetConfigMixinProps.getInstanceFleetType()instanceTypeConfigs(List<? extends Object> instanceTypeConfigs) Sets the value ofCfnInstanceFleetConfigMixinProps.getInstanceTypeConfigs()instanceTypeConfigs(IResolvable instanceTypeConfigs) Sets the value ofCfnInstanceFleetConfigMixinProps.getInstanceTypeConfigs()launchSpecifications(CfnInstanceFleetConfigPropsMixin.InstanceFleetProvisioningSpecificationsProperty launchSpecifications) Sets the value ofCfnInstanceFleetConfigMixinProps.getLaunchSpecifications()launchSpecifications(IResolvable launchSpecifications) Sets the value ofCfnInstanceFleetConfigMixinProps.getLaunchSpecifications()Sets the value ofCfnInstanceFleetConfigMixinProps.getName()resizeSpecifications(CfnInstanceFleetConfigPropsMixin.InstanceFleetResizingSpecificationsProperty resizeSpecifications) Sets the value ofCfnInstanceFleetConfigMixinProps.getResizeSpecifications()resizeSpecifications(IResolvable resizeSpecifications) Sets the value ofCfnInstanceFleetConfigMixinProps.getResizeSpecifications()targetOnDemandCapacity(Number targetOnDemandCapacity) Sets the value ofCfnInstanceFleetConfigMixinProps.getTargetOnDemandCapacity()targetSpotCapacity(Number targetSpotCapacity) Sets the value ofCfnInstanceFleetConfigMixinProps.getTargetSpotCapacity()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
clusterId
Sets the value ofCfnInstanceFleetConfigMixinProps.getClusterId()- Parameters:
clusterId- The unique identifier of the EMR cluster.- Returns:
this
-
instanceFleetType
@Stability(Stable) public CfnInstanceFleetConfigMixinProps.Builder instanceFleetType(String instanceFleetType) Sets the value ofCfnInstanceFleetConfigMixinProps.getInstanceFleetType()- Parameters:
instanceFleetType- The node type that the instance fleet hosts. Allowed Values : TASK- Returns:
this
-
instanceTypeConfigs
@Stability(Stable) public CfnInstanceFleetConfigMixinProps.Builder instanceTypeConfigs(IResolvable instanceTypeConfigs) Sets the value ofCfnInstanceFleetConfigMixinProps.getInstanceTypeConfigs()- Parameters:
instanceTypeConfigs-InstanceTypeConfigsdetermine 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 CfnInstanceFleetConfigMixinProps.Builder instanceTypeConfigs(List<? extends Object> instanceTypeConfigs) Sets the value ofCfnInstanceFleetConfigMixinProps.getInstanceTypeConfigs()- Parameters:
instanceTypeConfigs-InstanceTypeConfigsdetermine 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 CfnInstanceFleetConfigMixinProps.Builder launchSpecifications(IResolvable launchSpecifications) Sets the value ofCfnInstanceFleetConfigMixinProps.getLaunchSpecifications()- Parameters:
launchSpecifications- The launch specification for the instance fleet.- Returns:
this
-
launchSpecifications
@Stability(Stable) public CfnInstanceFleetConfigMixinProps.Builder launchSpecifications(CfnInstanceFleetConfigPropsMixin.InstanceFleetProvisioningSpecificationsProperty launchSpecifications) Sets the value ofCfnInstanceFleetConfigMixinProps.getLaunchSpecifications()- Parameters:
launchSpecifications- The launch specification for the instance fleet.- Returns:
this
-
name
Sets the value ofCfnInstanceFleetConfigMixinProps.getName()- Parameters:
name- The friendly name of the instance fleet.- Returns:
this
-
resizeSpecifications
@Stability(Stable) public CfnInstanceFleetConfigMixinProps.Builder resizeSpecifications(IResolvable resizeSpecifications) Sets the value ofCfnInstanceFleetConfigMixinProps.getResizeSpecifications()- Parameters:
resizeSpecifications- The resize specification for the instance fleet.- Returns:
this
-
resizeSpecifications
@Stability(Stable) public CfnInstanceFleetConfigMixinProps.Builder resizeSpecifications(CfnInstanceFleetConfigPropsMixin.InstanceFleetResizingSpecificationsProperty resizeSpecifications) Sets the value ofCfnInstanceFleetConfigMixinProps.getResizeSpecifications()- Parameters:
resizeSpecifications- The resize specification for the instance fleet.- Returns:
this
-
targetOnDemandCapacity
@Stability(Stable) public CfnInstanceFleetConfigMixinProps.Builder targetOnDemandCapacity(Number targetOnDemandCapacity) Sets the value ofCfnInstanceFleetConfigMixinProps.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, 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 CfnInstanceFleetConfigMixinProps.Builder targetSpotCapacity(Number targetSpotCapacity) Sets the value ofCfnInstanceFleetConfigMixinProps.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<CfnInstanceFleetConfigMixinProps>- Returns:
- a new instance of
CfnInstanceFleetConfigMixinProps - Throws:
NullPointerException- if any required attribute was not provided
-