Class CfnCluster.JobFlowInstancesConfigProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnCluster.JobFlowInstancesConfigProperty>
- Enclosing interface:
CfnCluster.JobFlowInstancesConfigProperty
CfnCluster.JobFlowInstancesConfigProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadditionalMasterSecurityGroups
(List<String> additionalMasterSecurityGroups) additionalSlaveSecurityGroups
(List<String> additionalSlaveSecurityGroups) build()
Builds the configured instance.coreInstanceFleet
(IResolvable coreInstanceFleet) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getCoreInstanceFleet()
coreInstanceFleet
(CfnCluster.InstanceFleetConfigProperty coreInstanceFleet) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getCoreInstanceFleet()
coreInstanceGroup
(IResolvable coreInstanceGroup) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getCoreInstanceGroup()
coreInstanceGroup
(CfnCluster.InstanceGroupConfigProperty coreInstanceGroup) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getCoreInstanceGroup()
ec2KeyName
(String ec2KeyName) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getEc2KeyName()
ec2SubnetId
(String ec2SubnetId) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getEc2SubnetId()
ec2SubnetIds
(List<String> ec2SubnetIds) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getEc2SubnetIds()
emrManagedMasterSecurityGroup
(String emrManagedMasterSecurityGroup) emrManagedSlaveSecurityGroup
(String emrManagedSlaveSecurityGroup) hadoopVersion
(String hadoopVersion) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getHadoopVersion()
keepJobFlowAliveWhenNoSteps
(Boolean keepJobFlowAliveWhenNoSteps) keepJobFlowAliveWhenNoSteps
(IResolvable keepJobFlowAliveWhenNoSteps) masterInstanceFleet
(IResolvable masterInstanceFleet) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getMasterInstanceFleet()
masterInstanceFleet
(CfnCluster.InstanceFleetConfigProperty masterInstanceFleet) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getMasterInstanceFleet()
masterInstanceGroup
(IResolvable masterInstanceGroup) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getMasterInstanceGroup()
masterInstanceGroup
(CfnCluster.InstanceGroupConfigProperty masterInstanceGroup) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getMasterInstanceGroup()
placement
(IResolvable placement) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getPlacement()
placement
(CfnCluster.PlacementTypeProperty placement) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getPlacement()
serviceAccessSecurityGroup
(String serviceAccessSecurityGroup) taskInstanceFleets
(List<? extends Object> taskInstanceFleets) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getTaskInstanceFleets()
taskInstanceFleets
(IResolvable taskInstanceFleets) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getTaskInstanceFleets()
taskInstanceGroups
(List<? extends Object> taskInstanceGroups) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getTaskInstanceGroups()
taskInstanceGroups
(IResolvable taskInstanceGroups) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getTaskInstanceGroups()
terminationProtected
(Boolean terminationProtected) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getTerminationProtected()
terminationProtected
(IResolvable terminationProtected) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getTerminationProtected()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
additionalMasterSecurityGroups
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder additionalMasterSecurityGroups(List<String> additionalMasterSecurityGroups) - Parameters:
additionalMasterSecurityGroups
- A list of additional Amazon EC2 security group IDs for the master node.- Returns:
this
-
additionalSlaveSecurityGroups
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder additionalSlaveSecurityGroups(List<String> additionalSlaveSecurityGroups) - Parameters:
additionalSlaveSecurityGroups
- A list of additional Amazon EC2 security group IDs for the core and task nodes.- Returns:
this
-
coreInstanceFleet
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder coreInstanceFleet(IResolvable coreInstanceFleet) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getCoreInstanceFleet()
- Parameters:
coreInstanceFleet
- Describes the EC2 instances and instance configurations for the core instance fleet when using clusters with the instance fleet configuration.- Returns:
this
-
coreInstanceFleet
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder coreInstanceFleet(CfnCluster.InstanceFleetConfigProperty coreInstanceFleet) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getCoreInstanceFleet()
- Parameters:
coreInstanceFleet
- Describes the EC2 instances and instance configurations for the core instance fleet when using clusters with the instance fleet configuration.- Returns:
this
-
coreInstanceGroup
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder coreInstanceGroup(IResolvable coreInstanceGroup) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getCoreInstanceGroup()
- Parameters:
coreInstanceGroup
- Describes the EC2 instances and instance configurations for core instance groups when using clusters with the uniform instance group configuration.- Returns:
this
-
coreInstanceGroup
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder coreInstanceGroup(CfnCluster.InstanceGroupConfigProperty coreInstanceGroup) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getCoreInstanceGroup()
- Parameters:
coreInstanceGroup
- Describes the EC2 instances and instance configurations for core instance groups when using clusters with the uniform instance group configuration.- Returns:
this
-
ec2KeyName
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder ec2KeyName(String ec2KeyName) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getEc2KeyName()
- Parameters:
ec2KeyName
- The name of the Amazon EC2 key pair that can be used to connect to the master node using SSH as the user called "hadoop.".- Returns:
this
-
ec2SubnetId
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder ec2SubnetId(String ec2SubnetId) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getEc2SubnetId()
- Parameters:
ec2SubnetId
- Applies to clusters that use the uniform instance group configuration. To launch the cluster in Amazon Virtual Private Cloud (Amazon VPC), set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch. If you do not specify this value and your account supports EC2-Classic, the cluster launches in EC2-Classic.- Returns:
this
-
ec2SubnetIds
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder ec2SubnetIds(List<String> ec2SubnetIds) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getEc2SubnetIds()
- Parameters:
ec2SubnetIds
- Applies to clusters that use the instance fleet configuration. When multiple Amazon EC2 subnet IDs are specified, Amazon EMR evaluates them and launches instances in the optimal subnet.The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions.
- Returns:
this
-
emrManagedMasterSecurityGroup
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder emrManagedMasterSecurityGroup(String emrManagedMasterSecurityGroup) - Parameters:
emrManagedMasterSecurityGroup
- The identifier of the Amazon EC2 security group for the master node. If you specifyEmrManagedMasterSecurityGroup
, you must also specifyEmrManagedSlaveSecurityGroup
.- Returns:
this
-
emrManagedSlaveSecurityGroup
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder emrManagedSlaveSecurityGroup(String emrManagedSlaveSecurityGroup) - Parameters:
emrManagedSlaveSecurityGroup
- The identifier of the Amazon EC2 security group for the core and task nodes. If you specifyEmrManagedSlaveSecurityGroup
, you must also specifyEmrManagedMasterSecurityGroup
.- Returns:
this
-
hadoopVersion
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder hadoopVersion(String hadoopVersion) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getHadoopVersion()
- Parameters:
hadoopVersion
- Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop version for the cluster. Valid inputs are "0.18" (no longer maintained), "0.20" (no longer maintained), "0.20.205" (no longer maintained), "1.0.3", "2.2.0", or "2.4.0". If you do not set this value, the default of 0.18 is used, unless theAmiVersion
parameter is set in the RunJobFlow call, in which case the default version of Hadoop for that AMI version is used.- Returns:
this
-
keepJobFlowAliveWhenNoSteps
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder keepJobFlowAliveWhenNoSteps(Boolean keepJobFlowAliveWhenNoSteps) - Parameters:
keepJobFlowAliveWhenNoSteps
- Specifies whether the cluster should remain available after completing all steps. Defaults totrue
. For more information about configuring cluster termination, see Control Cluster Termination in the EMR Management Guide .- Returns:
this
-
keepJobFlowAliveWhenNoSteps
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder keepJobFlowAliveWhenNoSteps(IResolvable keepJobFlowAliveWhenNoSteps) - Parameters:
keepJobFlowAliveWhenNoSteps
- Specifies whether the cluster should remain available after completing all steps. Defaults totrue
. For more information about configuring cluster termination, see Control Cluster Termination in the EMR Management Guide .- Returns:
this
-
masterInstanceFleet
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder masterInstanceFleet(IResolvable masterInstanceFleet) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getMasterInstanceFleet()
- Parameters:
masterInstanceFleet
- Describes the EC2 instances and instance configurations for the master instance fleet when using clusters with the instance fleet configuration.- Returns:
this
-
masterInstanceFleet
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder masterInstanceFleet(CfnCluster.InstanceFleetConfigProperty masterInstanceFleet) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getMasterInstanceFleet()
- Parameters:
masterInstanceFleet
- Describes the EC2 instances and instance configurations for the master instance fleet when using clusters with the instance fleet configuration.- Returns:
this
-
masterInstanceGroup
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder masterInstanceGroup(IResolvable masterInstanceGroup) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getMasterInstanceGroup()
- Parameters:
masterInstanceGroup
- Describes the EC2 instances and instance configurations for the master instance group when using clusters with the uniform instance group configuration.- Returns:
this
-
masterInstanceGroup
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder masterInstanceGroup(CfnCluster.InstanceGroupConfigProperty masterInstanceGroup) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getMasterInstanceGroup()
- Parameters:
masterInstanceGroup
- Describes the EC2 instances and instance configurations for the master instance group when using clusters with the uniform instance group configuration.- Returns:
this
-
placement
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder placement(IResolvable placement) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getPlacement()
- Parameters:
placement
- The Availability Zone in which the cluster runs.- Returns:
this
-
placement
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder placement(CfnCluster.PlacementTypeProperty placement) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getPlacement()
- Parameters:
placement
- The Availability Zone in which the cluster runs.- Returns:
this
-
serviceAccessSecurityGroup
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder serviceAccessSecurityGroup(String serviceAccessSecurityGroup) - Parameters:
serviceAccessSecurityGroup
- The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.- Returns:
this
-
taskInstanceFleets
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder taskInstanceFleets(IResolvable taskInstanceFleets) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getTaskInstanceFleets()
- Parameters:
taskInstanceFleets
- Describes the EC2 instances and instance configurations for the task instance fleets when using clusters with the instance fleet configuration. These task instance fleets are added to the cluster as part of the cluster launch. Each task instance fleet must have a unique name specified so that CloudFormation can differentiate between the task instance fleets.You can currently specify only one task instance fleet for a cluster. After creating the cluster, you can only modify the mutable properties of
InstanceFleetConfig
, which areTargetOnDemandCapacity
andTargetSpotCapacity
. Modifying any other property results in cluster replacement. > To allow a maximum of 30 Amazon EC2 instance types per fleet, includeTaskInstanceFleets
when you create your cluster. If you create your cluster withoutTaskInstanceFleets
, Amazon EMR uses its default allocation strategy, which allows for a maximum of five Amazon EC2 instance types.- Returns:
this
-
taskInstanceFleets
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder taskInstanceFleets(List<? extends Object> taskInstanceFleets) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getTaskInstanceFleets()
- Parameters:
taskInstanceFleets
- Describes the EC2 instances and instance configurations for the task instance fleets when using clusters with the instance fleet configuration. These task instance fleets are added to the cluster as part of the cluster launch. Each task instance fleet must have a unique name specified so that CloudFormation can differentiate between the task instance fleets.You can currently specify only one task instance fleet for a cluster. After creating the cluster, you can only modify the mutable properties of
InstanceFleetConfig
, which areTargetOnDemandCapacity
andTargetSpotCapacity
. Modifying any other property results in cluster replacement. > To allow a maximum of 30 Amazon EC2 instance types per fleet, includeTaskInstanceFleets
when you create your cluster. If you create your cluster withoutTaskInstanceFleets
, Amazon EMR uses its default allocation strategy, which allows for a maximum of five Amazon EC2 instance types.- Returns:
this
-
taskInstanceGroups
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder taskInstanceGroups(IResolvable taskInstanceGroups) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getTaskInstanceGroups()
- Parameters:
taskInstanceGroups
- Describes the EC2 instances and instance configurations for task instance groups when using clusters with the uniform instance group configuration. These task instance groups are added to the cluster as part of the cluster launch. Each task instance group must have a unique name specified so that CloudFormation can differentiate between the task instance groups.After creating the cluster, you can only modify the mutable properties of
InstanceGroupConfig
, which areAutoScalingPolicy
andInstanceCount
. Modifying any other property results in cluster replacement.- Returns:
this
-
taskInstanceGroups
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder taskInstanceGroups(List<? extends Object> taskInstanceGroups) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getTaskInstanceGroups()
- Parameters:
taskInstanceGroups
- Describes the EC2 instances and instance configurations for task instance groups when using clusters with the uniform instance group configuration. These task instance groups are added to the cluster as part of the cluster launch. Each task instance group must have a unique name specified so that CloudFormation can differentiate between the task instance groups.After creating the cluster, you can only modify the mutable properties of
InstanceGroupConfig
, which areAutoScalingPolicy
andInstanceCount
. Modifying any other property results in cluster replacement.- Returns:
this
-
terminationProtected
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder terminationProtected(Boolean terminationProtected) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getTerminationProtected()
- Parameters:
terminationProtected
- Specifies whether to lock the cluster to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job-flow error.- Returns:
this
-
terminationProtected
@Stability(Stable) public CfnCluster.JobFlowInstancesConfigProperty.Builder terminationProtected(IResolvable terminationProtected) Sets the value ofCfnCluster.JobFlowInstancesConfigProperty.getTerminationProtected()
- Parameters:
terminationProtected
- Specifies whether to lock the cluster to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job-flow error.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnCluster.JobFlowInstancesConfigProperty>
- Returns:
- a new instance of
CfnCluster.JobFlowInstancesConfigProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-