Class CfnInstanceGroupConfigProps.Builder
java.lang.Object
software.amazon.awscdk.services.emr.CfnInstanceGroupConfigProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnInstanceGroupConfigProps>
- Enclosing interface:
- CfnInstanceGroupConfigProps
@Stability(Stable)
public static final class CfnInstanceGroupConfigProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnInstanceGroupConfigProps>
A builder for
CfnInstanceGroupConfigProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionautoScalingPolicy(IResolvable autoScalingPolicy) Sets the value ofCfnInstanceGroupConfigProps.getAutoScalingPolicy()autoScalingPolicy(CfnInstanceGroupConfig.AutoScalingPolicyProperty autoScalingPolicy) Sets the value ofCfnInstanceGroupConfigProps.getAutoScalingPolicy()Sets the value ofCfnInstanceGroupConfigProps.getBidPrice()build()Builds the configured instance.configurations(List<? extends Object> configurations) Sets the value ofCfnInstanceGroupConfigProps.getConfigurations()configurations(IResolvable configurations) Sets the value ofCfnInstanceGroupConfigProps.getConfigurations()customAmiId(String customAmiId) Sets the value ofCfnInstanceGroupConfigProps.getCustomAmiId()ebsConfiguration(IResolvable ebsConfiguration) Sets the value ofCfnInstanceGroupConfigProps.getEbsConfiguration()ebsConfiguration(CfnInstanceGroupConfig.EbsConfigurationProperty ebsConfiguration) Sets the value ofCfnInstanceGroupConfigProps.getEbsConfiguration()instanceCount(Number instanceCount) Sets the value ofCfnInstanceGroupConfigProps.getInstanceCount()instanceRole(String instanceRole) Sets the value ofCfnInstanceGroupConfigProps.getInstanceRole()instanceType(String instanceType) Sets the value ofCfnInstanceGroupConfigProps.getInstanceType()Sets the value ofCfnInstanceGroupConfigProps.getJobFlowId()Sets the value ofCfnInstanceGroupConfigProps.getMarket()Sets the value ofCfnInstanceGroupConfigProps.getName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
instanceCount
Sets the value ofCfnInstanceGroupConfigProps.getInstanceCount()- Parameters:
instanceCount- Target number of instances for the instance group. This parameter is required.- Returns:
this
-
instanceRole
Sets the value ofCfnInstanceGroupConfigProps.getInstanceRole()- Parameters:
instanceRole- The role of the instance group in the cluster. This parameter is required. Allowed Values : TASK- Returns:
this
-
instanceType
Sets the value ofCfnInstanceGroupConfigProps.getInstanceType()- Parameters:
instanceType- The Amazon EC2 instance type for all instances in the instance group. This parameter is required.- Returns:
this
-
jobFlowId
Sets the value ofCfnInstanceGroupConfigProps.getJobFlowId()- Parameters:
jobFlowId- The ID of an Amazon EMR cluster that you want to associate this instance group with. This parameter is required.- Returns:
this
-
autoScalingPolicy
@Stability(Stable) public CfnInstanceGroupConfigProps.Builder autoScalingPolicy(IResolvable autoScalingPolicy) Sets the value ofCfnInstanceGroupConfigProps.getAutoScalingPolicy()- Parameters:
autoScalingPolicy-AutoScalingPolicyis a subproperty ofInstanceGroupConfig.AutoScalingPolicydefines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric. For more information, see Using Automatic Scaling in Amazon EMR in the Amazon EMR Management Guide .- Returns:
this
-
autoScalingPolicy
@Stability(Stable) public CfnInstanceGroupConfigProps.Builder autoScalingPolicy(CfnInstanceGroupConfig.AutoScalingPolicyProperty autoScalingPolicy) Sets the value ofCfnInstanceGroupConfigProps.getAutoScalingPolicy()- Parameters:
autoScalingPolicy-AutoScalingPolicyis a subproperty ofInstanceGroupConfig.AutoScalingPolicydefines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric. For more information, see Using Automatic Scaling in Amazon EMR in the Amazon EMR Management Guide .- Returns:
this
-
bidPrice
Sets the value ofCfnInstanceGroupConfigProps.getBidPrice()- Parameters:
bidPrice- If specified, indicates that the instance group uses Spot Instances. This is the maximum price you are willing to pay for Spot Instances. SpecifyOnDemandPriceto set the amount equal to the On-Demand price, or specify an amount in USD.- Returns:
this
-
configurations
@Stability(Stable) public CfnInstanceGroupConfigProps.Builder configurations(IResolvable configurations) Sets the value ofCfnInstanceGroupConfigProps.getConfigurations()- Parameters:
configurations-
The list of configurations supplied for an Amazon EMR cluster instance group. You can specify a separate configuration for each instance group (master, core, and task).Amazon EMR releases 4.x or later.
- Returns:
this
-
configurations
@Stability(Stable) public CfnInstanceGroupConfigProps.Builder configurations(List<? extends Object> configurations) Sets the value ofCfnInstanceGroupConfigProps.getConfigurations()- Parameters:
configurations-
The list of configurations supplied for an Amazon EMR cluster instance group. You can specify a separate configuration for each instance group (master, core, and task).Amazon EMR releases 4.x or later.
- Returns:
this
-
customAmiId
Sets the value ofCfnInstanceGroupConfigProps.getCustomAmiId()- Parameters:
customAmiId- The custom AMI ID to use for the provisioned instance group.- Returns:
this
-
ebsConfiguration
@Stability(Stable) public CfnInstanceGroupConfigProps.Builder ebsConfiguration(IResolvable ebsConfiguration) Sets the value ofCfnInstanceGroupConfigProps.getEbsConfiguration()- Parameters:
ebsConfiguration-EbsConfigurationdetermines the EBS volumes to attach to EMR cluster instances.- Returns:
this
-
ebsConfiguration
@Stability(Stable) public CfnInstanceGroupConfigProps.Builder ebsConfiguration(CfnInstanceGroupConfig.EbsConfigurationProperty ebsConfiguration) Sets the value ofCfnInstanceGroupConfigProps.getEbsConfiguration()- Parameters:
ebsConfiguration-EbsConfigurationdetermines the EBS volumes to attach to EMR cluster instances.- Returns:
this
-
market
Sets the value ofCfnInstanceGroupConfigProps.getMarket()- Parameters:
market- Market type of the Amazon EC2 instances used to create a cluster node.- Returns:
this
-
name
Sets the value ofCfnInstanceGroupConfigProps.getName()- Parameters:
name- Friendly name given to the instance group.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnInstanceGroupConfigProps>- Returns:
- a new instance of
CfnInstanceGroupConfigProps - Throws:
NullPointerException- if any required attribute was not provided
-