Class CfnCluster.InstanceGroupConfigProperty.Builder
java.lang.Object
software.amazon.awscdk.services.emr.CfnCluster.InstanceGroupConfigProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnCluster.InstanceGroupConfigProperty>
- Enclosing interface:
- CfnCluster.InstanceGroupConfigProperty
@Stability(Stable)
public static final class CfnCluster.InstanceGroupConfigProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnCluster.InstanceGroupConfigProperty>
A builder for
CfnCluster.InstanceGroupConfigProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionautoScalingPolicy(IResolvable autoScalingPolicy) Sets the value ofCfnCluster.InstanceGroupConfigProperty.getAutoScalingPolicy()autoScalingPolicy(CfnCluster.AutoScalingPolicyProperty autoScalingPolicy) Sets the value ofCfnCluster.InstanceGroupConfigProperty.getAutoScalingPolicy()Sets the value ofCfnCluster.InstanceGroupConfigProperty.getBidPrice()build()Builds the configured instance.configurations(List<? extends Object> configurations) Sets the value ofCfnCluster.InstanceGroupConfigProperty.getConfigurations()configurations(IResolvable configurations) Sets the value ofCfnCluster.InstanceGroupConfigProperty.getConfigurations()customAmiId(String customAmiId) Sets the value ofCfnCluster.InstanceGroupConfigProperty.getCustomAmiId()ebsConfiguration(IResolvable ebsConfiguration) Sets the value ofCfnCluster.InstanceGroupConfigProperty.getEbsConfiguration()ebsConfiguration(CfnCluster.EbsConfigurationProperty ebsConfiguration) Sets the value ofCfnCluster.InstanceGroupConfigProperty.getEbsConfiguration()instanceCount(Number instanceCount) Sets the value ofCfnCluster.InstanceGroupConfigProperty.getInstanceCount()instanceType(String instanceType) Sets the value ofCfnCluster.InstanceGroupConfigProperty.getInstanceType()Sets the value ofCfnCluster.InstanceGroupConfigProperty.getMarket()Sets the value ofCfnCluster.InstanceGroupConfigProperty.getName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
instanceCount
@Stability(Stable) public CfnCluster.InstanceGroupConfigProperty.Builder instanceCount(Number instanceCount) Sets the value ofCfnCluster.InstanceGroupConfigProperty.getInstanceCount()- Parameters:
instanceCount- Target number of instances for the instance group. This parameter is required.- Returns:
this
-
instanceType
@Stability(Stable) public CfnCluster.InstanceGroupConfigProperty.Builder instanceType(String instanceType) Sets the value ofCfnCluster.InstanceGroupConfigProperty.getInstanceType()- Parameters:
instanceType- The Amazon EC2 instance type for all instances in the instance group. This parameter is required.- Returns:
this
-
autoScalingPolicy
@Stability(Stable) public CfnCluster.InstanceGroupConfigProperty.Builder autoScalingPolicy(IResolvable autoScalingPolicy) Sets the value ofCfnCluster.InstanceGroupConfigProperty.getAutoScalingPolicy()- Parameters:
autoScalingPolicy-AutoScalingPolicyis a subproperty of the InstanceGroupConfig property type that specifies the constraints and rules of an automatic scaling policy in Amazon EMR . The automatic scaling policy defines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric. Only core and task instance groups can use automatic scaling policies. For more information, see Using Automatic Scaling in Amazon EMR .- Returns:
this
-
autoScalingPolicy
@Stability(Stable) public CfnCluster.InstanceGroupConfigProperty.Builder autoScalingPolicy(CfnCluster.AutoScalingPolicyProperty autoScalingPolicy) Sets the value ofCfnCluster.InstanceGroupConfigProperty.getAutoScalingPolicy()- Parameters:
autoScalingPolicy-AutoScalingPolicyis a subproperty of the InstanceGroupConfig property type that specifies the constraints and rules of an automatic scaling policy in Amazon EMR . The automatic scaling policy defines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric. Only core and task instance groups can use automatic scaling policies. For more information, see Using Automatic Scaling in Amazon EMR .- Returns:
this
-
bidPrice
Sets the value ofCfnCluster.InstanceGroupConfigProperty.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 CfnCluster.InstanceGroupConfigProperty.Builder configurations(IResolvable configurations) Sets the value ofCfnCluster.InstanceGroupConfigProperty.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 CfnCluster.InstanceGroupConfigProperty.Builder configurations(List<? extends Object> configurations) Sets the value ofCfnCluster.InstanceGroupConfigProperty.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
@Stability(Stable) public CfnCluster.InstanceGroupConfigProperty.Builder customAmiId(String customAmiId) Sets the value ofCfnCluster.InstanceGroupConfigProperty.getCustomAmiId()- Parameters:
customAmiId- The custom AMI ID to use for the provisioned instance group.- Returns:
this
-
ebsConfiguration
@Stability(Stable) public CfnCluster.InstanceGroupConfigProperty.Builder ebsConfiguration(IResolvable ebsConfiguration) Sets the value ofCfnCluster.InstanceGroupConfigProperty.getEbsConfiguration()- Parameters:
ebsConfiguration- EBS configurations that will be attached to each Amazon EC2 instance in the instance group.- Returns:
this
-
ebsConfiguration
@Stability(Stable) public CfnCluster.InstanceGroupConfigProperty.Builder ebsConfiguration(CfnCluster.EbsConfigurationProperty ebsConfiguration) Sets the value ofCfnCluster.InstanceGroupConfigProperty.getEbsConfiguration()- Parameters:
ebsConfiguration- EBS configurations that will be attached to each Amazon EC2 instance in the instance group.- Returns:
this
-
market
Sets the value ofCfnCluster.InstanceGroupConfigProperty.getMarket()- Parameters:
market- Market type of the Amazon EC2 instances used to create a cluster node.- Returns:
this
-
name
Sets the value ofCfnCluster.InstanceGroupConfigProperty.getName()- Parameters:
name- Friendly name given to the instance group.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnCluster.InstanceGroupConfigProperty>- Returns:
- a new instance of
CfnCluster.InstanceGroupConfigProperty - Throws:
NullPointerException- if any required attribute was not provided
-