Class CfnClusterProps.Builder
java.lang.Object
software.amazon.awscdk.services.emr.CfnClusterProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnClusterProps>
- Enclosing interface:
CfnClusterProps
@Stability(Stable)
public static final class CfnClusterProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnClusterProps>
A builder for
CfnClusterProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadditionalInfo
(Object additionalInfo) Sets the value ofCfnClusterProps.getAdditionalInfo()
applications
(List<? extends Object> applications) Sets the value ofCfnClusterProps.getApplications()
applications
(IResolvable applications) Sets the value ofCfnClusterProps.getApplications()
autoScalingRole
(String autoScalingRole) Sets the value ofCfnClusterProps.getAutoScalingRole()
autoTerminationPolicy
(IResolvable autoTerminationPolicy) Sets the value ofCfnClusterProps.getAutoTerminationPolicy()
autoTerminationPolicy
(CfnCluster.AutoTerminationPolicyProperty autoTerminationPolicy) Sets the value ofCfnClusterProps.getAutoTerminationPolicy()
bootstrapActions
(List<? extends Object> bootstrapActions) Sets the value ofCfnClusterProps.getBootstrapActions()
bootstrapActions
(IResolvable bootstrapActions) Sets the value ofCfnClusterProps.getBootstrapActions()
build()
Builds the configured instance.configurations
(List<? extends Object> configurations) Sets the value ofCfnClusterProps.getConfigurations()
configurations
(IResolvable configurations) Sets the value ofCfnClusterProps.getConfigurations()
customAmiId
(String customAmiId) Sets the value ofCfnClusterProps.getCustomAmiId()
ebsRootVolumeIops
(Number ebsRootVolumeIops) Sets the value ofCfnClusterProps.getEbsRootVolumeIops()
ebsRootVolumeSize
(Number ebsRootVolumeSize) Sets the value ofCfnClusterProps.getEbsRootVolumeSize()
ebsRootVolumeThroughput
(Number ebsRootVolumeThroughput) Sets the value ofCfnClusterProps.getEbsRootVolumeThroughput()
instances
(IResolvable instances) Sets the value ofCfnClusterProps.getInstances()
Sets the value ofCfnClusterProps.getInstances()
jobFlowRole
(String jobFlowRole) Sets the value ofCfnClusterProps.getJobFlowRole()
kerberosAttributes
(IResolvable kerberosAttributes) Sets the value ofCfnClusterProps.getKerberosAttributes()
kerberosAttributes
(CfnCluster.KerberosAttributesProperty kerberosAttributes) Sets the value ofCfnClusterProps.getKerberosAttributes()
logEncryptionKmsKeyId
(String logEncryptionKmsKeyId) Sets the value ofCfnClusterProps.getLogEncryptionKmsKeyId()
Sets the value ofCfnClusterProps.getLogUri()
managedScalingPolicy
(IResolvable managedScalingPolicy) Sets the value ofCfnClusterProps.getManagedScalingPolicy()
managedScalingPolicy
(CfnCluster.ManagedScalingPolicyProperty managedScalingPolicy) Sets the value ofCfnClusterProps.getManagedScalingPolicy()
Sets the value ofCfnClusterProps.getName()
osReleaseLabel
(String osReleaseLabel) Sets the value ofCfnClusterProps.getOsReleaseLabel()
placementGroupConfigs
(List<? extends Object> placementGroupConfigs) Sets the value ofCfnClusterProps.getPlacementGroupConfigs()
placementGroupConfigs
(IResolvable placementGroupConfigs) Sets the value ofCfnClusterProps.getPlacementGroupConfigs()
releaseLabel
(String releaseLabel) Sets the value ofCfnClusterProps.getReleaseLabel()
scaleDownBehavior
(String scaleDownBehavior) Sets the value ofCfnClusterProps.getScaleDownBehavior()
securityConfiguration
(String securityConfiguration) Sets the value ofCfnClusterProps.getSecurityConfiguration()
serviceRole
(String serviceRole) Sets the value ofCfnClusterProps.getServiceRole()
stepConcurrencyLevel
(Number stepConcurrencyLevel) Sets the value ofCfnClusterProps.getStepConcurrencyLevel()
Sets the value ofCfnClusterProps.getSteps()
steps
(IResolvable steps) Sets the value ofCfnClusterProps.getSteps()
Sets the value ofCfnClusterProps.getTags()
visibleToAllUsers
(Boolean visibleToAllUsers) Sets the value ofCfnClusterProps.getVisibleToAllUsers()
visibleToAllUsers
(IResolvable visibleToAllUsers) Sets the value ofCfnClusterProps.getVisibleToAllUsers()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
instances
Sets the value ofCfnClusterProps.getInstances()
- Parameters:
instances
- A specification of the number and type of Amazon EC2 instances. This parameter is required.- Returns:
this
-
instances
@Stability(Stable) public CfnClusterProps.Builder instances(CfnCluster.JobFlowInstancesConfigProperty instances) Sets the value ofCfnClusterProps.getInstances()
- Parameters:
instances
- A specification of the number and type of Amazon EC2 instances. This parameter is required.- Returns:
this
-
jobFlowRole
Sets the value ofCfnClusterProps.getJobFlowRole()
- Parameters:
jobFlowRole
- Also called instance profile and Amazon EC2 role. This parameter is required. An IAM role for an Amazon EMR cluster. The Amazon EC2 instances of the cluster assume this role. The default role isEMR_EC2_DefaultRole
. In order to use the default role, you must have already created it using the AWS CLI or console.- Returns:
this
-
name
Sets the value ofCfnClusterProps.getName()
- Parameters:
name
- The name of the cluster. This parameter is required. This parameter can't contain the characters <, >, $, |, or ` (backtick).- Returns:
this
-
serviceRole
Sets the value ofCfnClusterProps.getServiceRole()
- Parameters:
serviceRole
- The IAM role that Amazon EMR assumes in order to access AWS resources on your behalf. This parameter is required.- Returns:
this
-
additionalInfo
Sets the value ofCfnClusterProps.getAdditionalInfo()
- Parameters:
additionalInfo
- A JSON string for selecting additional features.- Returns:
this
-
applications
Sets the value ofCfnClusterProps.getApplications()
- Parameters:
applications
- The applications to install on this cluster, for example, Spark, Flink, Oozie, Zeppelin, and so on.- Returns:
this
-
applications
Sets the value ofCfnClusterProps.getApplications()
- Parameters:
applications
- The applications to install on this cluster, for example, Spark, Flink, Oozie, Zeppelin, and so on.- Returns:
this
-
autoScalingRole
Sets the value ofCfnClusterProps.getAutoScalingRole()
- Parameters:
autoScalingRole
- An IAM role for automatic scaling policies. The default role isEMR_AutoScaling_DefaultRole
. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate Amazon EC2 instances in an instance group.- Returns:
this
-
autoTerminationPolicy
@Stability(Stable) public CfnClusterProps.Builder autoTerminationPolicy(IResolvable autoTerminationPolicy) Sets the value ofCfnClusterProps.getAutoTerminationPolicy()
- Parameters:
autoTerminationPolicy
- An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. For alternative cluster termination options, see Control cluster termination .- Returns:
this
-
autoTerminationPolicy
@Stability(Stable) public CfnClusterProps.Builder autoTerminationPolicy(CfnCluster.AutoTerminationPolicyProperty autoTerminationPolicy) Sets the value ofCfnClusterProps.getAutoTerminationPolicy()
- Parameters:
autoTerminationPolicy
- An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. For alternative cluster termination options, see Control cluster termination .- Returns:
this
-
bootstrapActions
Sets the value ofCfnClusterProps.getBootstrapActions()
- Parameters:
bootstrapActions
- A list of bootstrap actions to run before Hadoop starts on the cluster nodes.- Returns:
this
-
bootstrapActions
@Stability(Stable) public CfnClusterProps.Builder bootstrapActions(List<? extends Object> bootstrapActions) Sets the value ofCfnClusterProps.getBootstrapActions()
- Parameters:
bootstrapActions
- A list of bootstrap actions to run before Hadoop starts on the cluster nodes.- Returns:
this
-
configurations
Sets the value ofCfnClusterProps.getConfigurations()
- Parameters:
configurations
- Applies only to Amazon EMR releases 4.x and later. The list of configurations that are supplied to the Amazon EMR cluster.- Returns:
this
-
configurations
@Stability(Stable) public CfnClusterProps.Builder configurations(List<? extends Object> configurations) Sets the value ofCfnClusterProps.getConfigurations()
- Parameters:
configurations
- Applies only to Amazon EMR releases 4.x and later. The list of configurations that are supplied to the Amazon EMR cluster.- Returns:
this
-
customAmiId
Sets the value ofCfnClusterProps.getCustomAmiId()
- Parameters:
customAmiId
- Available only in Amazon EMR releases 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI if the cluster uses a custom AMI.- Returns:
this
-
ebsRootVolumeIops
Sets the value ofCfnClusterProps.getEbsRootVolumeIops()
- Parameters:
ebsRootVolumeIops
- The IOPS, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.- Returns:
this
-
ebsRootVolumeSize
Sets the value ofCfnClusterProps.getEbsRootVolumeSize()
- Parameters:
ebsRootVolumeSize
- The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 4.x and later.- Returns:
this
-
ebsRootVolumeThroughput
@Stability(Stable) public CfnClusterProps.Builder ebsRootVolumeThroughput(Number ebsRootVolumeThroughput) Sets the value ofCfnClusterProps.getEbsRootVolumeThroughput()
- Parameters:
ebsRootVolumeThroughput
- The throughput, in MiB/s, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.- Returns:
this
-
kerberosAttributes
@Stability(Stable) public CfnClusterProps.Builder kerberosAttributes(IResolvable kerberosAttributes) Sets the value ofCfnClusterProps.getKerberosAttributes()
- Parameters:
kerberosAttributes
- Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. For more information see Use Kerberos Authentication in the Amazon EMR Management Guide .- Returns:
this
-
kerberosAttributes
@Stability(Stable) public CfnClusterProps.Builder kerberosAttributes(CfnCluster.KerberosAttributesProperty kerberosAttributes) Sets the value ofCfnClusterProps.getKerberosAttributes()
- Parameters:
kerberosAttributes
- Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. For more information see Use Kerberos Authentication in the Amazon EMR Management Guide .- Returns:
this
-
logEncryptionKmsKeyId
@Stability(Stable) public CfnClusterProps.Builder logEncryptionKmsKeyId(String logEncryptionKmsKeyId) Sets the value ofCfnClusterProps.getLogEncryptionKmsKeyId()
- Parameters:
logEncryptionKmsKeyId
- The AWS KMS key used for encrypting log files. This attribute is only available with Amazon EMR 5.30.0 and later, excluding Amazon EMR 6.0.0.- Returns:
this
-
logUri
Sets the value ofCfnClusterProps.getLogUri()
- Parameters:
logUri
- The path to the Amazon S3 location where logs for this cluster are stored.- Returns:
this
-
managedScalingPolicy
@Stability(Stable) public CfnClusterProps.Builder managedScalingPolicy(IResolvable managedScalingPolicy) Sets the value ofCfnClusterProps.getManagedScalingPolicy()
- Parameters:
managedScalingPolicy
- Creates or updates a managed scaling policy for an Amazon EMR cluster. The managed scaling policy defines the limits for resources, such as Amazon EC2 instances that can be added or terminated from a cluster. The policy only applies to the core and task nodes. The master node cannot be scaled after initial configuration.- Returns:
this
-
managedScalingPolicy
@Stability(Stable) public CfnClusterProps.Builder managedScalingPolicy(CfnCluster.ManagedScalingPolicyProperty managedScalingPolicy) Sets the value ofCfnClusterProps.getManagedScalingPolicy()
- Parameters:
managedScalingPolicy
- Creates or updates a managed scaling policy for an Amazon EMR cluster. The managed scaling policy defines the limits for resources, such as Amazon EC2 instances that can be added or terminated from a cluster. The policy only applies to the core and task nodes. The master node cannot be scaled after initial configuration.- Returns:
this
-
osReleaseLabel
Sets the value ofCfnClusterProps.getOsReleaseLabel()
- Parameters:
osReleaseLabel
- The Amazon Linux release specified in a cluster launch RunJobFlow request. If no Amazon Linux release was specified, the default Amazon Linux release is shown in the response.- Returns:
this
-
placementGroupConfigs
@Stability(Stable) public CfnClusterProps.Builder placementGroupConfigs(IResolvable placementGroupConfigs) Sets the value ofCfnClusterProps.getPlacementGroupConfigs()
- Parameters:
placementGroupConfigs
- the value to be set.- Returns:
this
-
placementGroupConfigs
@Stability(Stable) public CfnClusterProps.Builder placementGroupConfigs(List<? extends Object> placementGroupConfigs) Sets the value ofCfnClusterProps.getPlacementGroupConfigs()
- Parameters:
placementGroupConfigs
- the value to be set.- Returns:
this
-
releaseLabel
Sets the value ofCfnClusterProps.getReleaseLabel()
- Parameters:
releaseLabel
- The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. Release labels are in the formemr-x.x.x
, where x.x.x is an Amazon EMR release version such asemr-5.14.0
. For more information about Amazon EMR release versions and included application versions and features, see . The release label applies only to Amazon EMR releases version 4.0 and later. Earlier versions useAmiVersion
.- Returns:
this
-
scaleDownBehavior
Sets the value ofCfnClusterProps.getScaleDownBehavior()
- Parameters:
scaleDownBehavior
- The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized.TERMINATE_AT_INSTANCE_HOUR
indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version.TERMINATE_AT_TASK_COMPLETION
indicates that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption.TERMINATE_AT_TASK_COMPLETION
is available only in Amazon EMR releases 4.1.0 and later, and is the default for versions of Amazon EMR earlier than 5.1.0.- Returns:
this
-
securityConfiguration
@Stability(Stable) public CfnClusterProps.Builder securityConfiguration(String securityConfiguration) Sets the value ofCfnClusterProps.getSecurityConfiguration()
- Parameters:
securityConfiguration
- The name of the security configuration applied to the cluster.- Returns:
this
-
stepConcurrencyLevel
Sets the value ofCfnClusterProps.getStepConcurrencyLevel()
- Parameters:
stepConcurrencyLevel
- Specifies the number of steps that can be executed concurrently. The default value is1
. The maximum value is256
.- Returns:
this
-
steps
Sets the value ofCfnClusterProps.getSteps()
- Parameters:
steps
- A list of steps to run.- Returns:
this
-
steps
Sets the value ofCfnClusterProps.getSteps()
- Parameters:
steps
- A list of steps to run.- Returns:
this
-
tags
Sets the value ofCfnClusterProps.getTags()
- Parameters:
tags
- A list of tags associated with a cluster.- Returns:
this
-
visibleToAllUsers
Sets the value ofCfnClusterProps.getVisibleToAllUsers()
- Parameters:
visibleToAllUsers
- Indicates whether the cluster is visible to all IAM users of the AWS account associated with the cluster. If this value is set totrue
, all IAM users of that AWS account can view and manage the cluster if they have the proper policy permissions set. If this value isfalse
, only the IAM user that created the cluster can view and manage it. This value can be changed using the SetVisibleToAllUsers action.When you create clusters directly through the EMR console or API, this value is set to
true
by default. However, forAWS::EMR::Cluster
resources in CloudFormation, the default isfalse
.- Returns:
this
-
visibleToAllUsers
Sets the value ofCfnClusterProps.getVisibleToAllUsers()
- Parameters:
visibleToAllUsers
- Indicates whether the cluster is visible to all IAM users of the AWS account associated with the cluster. If this value is set totrue
, all IAM users of that AWS account can view and manage the cluster if they have the proper policy permissions set. If this value isfalse
, only the IAM user that created the cluster can view and manage it. This value can be changed using the SetVisibleToAllUsers action.When you create clusters directly through the EMR console or API, this value is set to
true
by default. However, forAWS::EMR::Cluster
resources in CloudFormation, the default isfalse
.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnClusterProps>
- Returns:
- a new instance of
CfnClusterProps
- Throws:
NullPointerException
- if any required attribute was not provided
-