Class CfnCluster.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnCluster>
- Enclosing class:
CfnCluster
CfnCluster
.-
Method Summary
Modifier and TypeMethodDescriptionadditionalInfo
(Object additionalInfo) A JSON string for selecting additional features.applications
(List<? extends Object> applications) The applications to install on this cluster, for example, Spark, Flink, Oozie, Zeppelin, and so on.applications
(IResolvable applications) The applications to install on this cluster, for example, Spark, Flink, Oozie, Zeppelin, and so on.autoScalingRole
(String autoScalingRole) An IAM role for automatic scaling policies.autoTerminationPolicy
(IResolvable autoTerminationPolicy) AWS::EMR::Cluster.AutoTerminationPolicy
.autoTerminationPolicy
(CfnCluster.AutoTerminationPolicyProperty autoTerminationPolicy) AWS::EMR::Cluster.AutoTerminationPolicy
.bootstrapActions
(List<? extends Object> bootstrapActions) A list of bootstrap actions to run before Hadoop starts on the cluster nodes.bootstrapActions
(IResolvable bootstrapActions) A list of bootstrap actions to run before Hadoop starts on the cluster nodes.build()
configurations
(List<? extends Object> configurations) Applies only to Amazon EMR releases 4.x and later.configurations
(IResolvable configurations) Applies only to Amazon EMR releases 4.x and later.static CfnCluster.Builder
customAmiId
(String customAmiId) Available only in Amazon EMR releases 5.7.0 and later.ebsRootVolumeSize
(Number ebsRootVolumeSize) The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance.instances
(IResolvable instances) A specification of the number and type of Amazon EC2 instances.A specification of the number and type of Amazon EC2 instances.jobFlowRole
(String jobFlowRole) Also called instance profile and Amazon EC2 role.kerberosAttributes
(IResolvable kerberosAttributes) Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration.kerberosAttributes
(CfnCluster.KerberosAttributesProperty kerberosAttributes) Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration.logEncryptionKmsKeyId
(String logEncryptionKmsKeyId) The AWS KMS key used for encrypting log files.The path to the Amazon S3 location where logs for this cluster are stored.managedScalingPolicy
(IResolvable managedScalingPolicy) Creates or updates a managed scaling policy for an Amazon EMR cluster.managedScalingPolicy
(CfnCluster.ManagedScalingPolicyProperty managedScalingPolicy) Creates or updates a managed scaling policy for an Amazon EMR cluster.The name of the cluster.osReleaseLabel
(String osReleaseLabel) AWS::EMR::Cluster.OSReleaseLabel
.releaseLabel
(String releaseLabel) The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster.scaleDownBehavior
(String scaleDownBehavior) The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized.securityConfiguration
(String securityConfiguration) The name of the security configuration applied to the cluster.serviceRole
(String serviceRole) The IAM role that Amazon EMR assumes in order to access AWS resources on your behalf.stepConcurrencyLevel
(Number stepConcurrencyLevel) Specifies the number of steps that can be executed concurrently.A list of steps to run.steps
(IResolvable steps) A list of steps to run.A list of tags associated with a cluster.visibleToAllUsers
(Boolean visibleToAllUsers) Indicates whether the cluster is visible to all IAM users of the AWS account associated with the cluster.visibleToAllUsers
(IResolvable visibleToAllUsers) Indicates whether the cluster is visible to all IAM users of the AWS account associated with the cluster.
-
Method Details
-
create
- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
- Returns:
- a new instance of
CfnCluster.Builder
.
-
instances
@Stability(Stable) public CfnCluster.Builder instances(CfnCluster.JobFlowInstancesConfigProperty instances) A specification of the number and type of Amazon EC2 instances.- Parameters:
instances
- A specification of the number and type of Amazon EC2 instances. This parameter is required.- Returns:
this
-
instances
A specification of the number and type of Amazon EC2 instances.- Parameters:
instances
- A specification of the number and type of Amazon EC2 instances. This parameter is required.- Returns:
this
-
jobFlowRole
Also called instance profile and Amazon EC2 role.An IAM role for an Amazon EMR cluster. The Amazon EC2 instances of the cluster assume this role. The default role is
EMR_EC2_DefaultRole
. In order to use the default role, you must have already created it using the AWS CLI or console.- Parameters:
jobFlowRole
- Also called instance profile and Amazon EC2 role. This parameter is required.- Returns:
this
-
name
The name of the cluster.- Parameters:
name
- The name of the cluster. This parameter is required.- Returns:
this
-
serviceRole
The IAM role that Amazon EMR assumes in order to access AWS resources on your behalf.- 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
A JSON string for selecting additional features.- Parameters:
additionalInfo
- A JSON string for selecting additional features. This parameter is required.- Returns:
this
-
applications
The applications to install on this cluster, for example, Spark, Flink, Oozie, Zeppelin, and so on.- Parameters:
applications
- The applications to install on this cluster, for example, Spark, Flink, Oozie, Zeppelin, and so on. This parameter is required.- Returns:
this
-
applications
The applications to install on this cluster, for example, Spark, Flink, Oozie, Zeppelin, and so on.- Parameters:
applications
- The applications to install on this cluster, for example, Spark, Flink, Oozie, Zeppelin, and so on. This parameter is required.- Returns:
this
-
autoScalingRole
An IAM role for automatic scaling policies.The default role is
EMR_AutoScaling_DefaultRole
. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate Amazon EC2 instances in an instance group.- Parameters:
autoScalingRole
- An IAM role for automatic scaling policies. This parameter is required.- Returns:
this
-
autoTerminationPolicy
@Stability(Stable) public CfnCluster.Builder autoTerminationPolicy(IResolvable autoTerminationPolicy) AWS::EMR::Cluster.AutoTerminationPolicy
.- Parameters:
autoTerminationPolicy
-AWS::EMR::Cluster.AutoTerminationPolicy
. This parameter is required.- Returns:
this
-
autoTerminationPolicy
@Stability(Stable) public CfnCluster.Builder autoTerminationPolicy(CfnCluster.AutoTerminationPolicyProperty autoTerminationPolicy) AWS::EMR::Cluster.AutoTerminationPolicy
.- Parameters:
autoTerminationPolicy
-AWS::EMR::Cluster.AutoTerminationPolicy
. This parameter is required.- Returns:
this
-
bootstrapActions
A list of bootstrap actions to run before Hadoop starts on the cluster nodes.- Parameters:
bootstrapActions
- A list of bootstrap actions to run before Hadoop starts on the cluster nodes. This parameter is required.- Returns:
this
-
bootstrapActions
@Stability(Stable) public CfnCluster.Builder bootstrapActions(List<? extends Object> bootstrapActions) A list of bootstrap actions to run before Hadoop starts on the cluster nodes.- Parameters:
bootstrapActions
- A list of bootstrap actions to run before Hadoop starts on the cluster nodes. This parameter is required.- Returns:
this
-
configurations
Applies only to Amazon EMR releases 4.x and later. The list of configurations that are supplied to the Amazon EMR cluster.- Parameters:
configurations
- Applies only to Amazon EMR releases 4.x and later. The list of configurations that are supplied to the Amazon EMR cluster. This parameter is required.- Returns:
this
-
configurations
Applies only to Amazon EMR releases 4.x and later. The list of configurations that are supplied to the Amazon EMR cluster.- Parameters:
configurations
- Applies only to Amazon EMR releases 4.x and later. The list of configurations that are supplied to the Amazon EMR cluster. This parameter is required.- Returns:
this
-
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.- 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. This parameter is required.- Returns:
this
-
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.
- 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. This parameter is required.- Returns:
this
-
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 .
- Parameters:
kerberosAttributes
- Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. This parameter is required.- Returns:
this
-
kerberosAttributes
@Stability(Stable) public CfnCluster.Builder kerberosAttributes(CfnCluster.KerberosAttributesProperty 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 .
- Parameters:
kerberosAttributes
- Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. This parameter is required.- Returns:
this
-
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.
- Parameters:
logEncryptionKmsKeyId
- The AWS KMS key used for encrypting log files. This parameter is required.- Returns:
this
-
logUri
The path to the Amazon S3 location where logs for this cluster are stored.- Parameters:
logUri
- The path to the Amazon S3 location where logs for this cluster are stored. This parameter is required.- Returns:
this
-
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.
- Parameters:
managedScalingPolicy
- Creates or updates a managed scaling policy for an Amazon EMR cluster. This parameter is required.- Returns:
this
-
managedScalingPolicy
@Stability(Stable) public CfnCluster.Builder managedScalingPolicy(CfnCluster.ManagedScalingPolicyProperty 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.
- Parameters:
managedScalingPolicy
- Creates or updates a managed scaling policy for an Amazon EMR cluster. This parameter is required.- Returns:
this
-
osReleaseLabel
AWS::EMR::Cluster.OSReleaseLabel
.- Parameters:
osReleaseLabel
-AWS::EMR::Cluster.OSReleaseLabel
. This parameter is required.- Returns:
this
-
releaseLabel
The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster.Release labels are in the form
emr-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
.- Parameters:
releaseLabel
- The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. This parameter is required.- Returns:
this
-
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.- Parameters:
scaleDownBehavior
- The way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. This parameter is required.- Returns:
this
-
securityConfiguration
The name of the security configuration applied to the cluster.- Parameters:
securityConfiguration
- The name of the security configuration applied to the cluster. This parameter is required.- Returns:
this
-
stepConcurrencyLevel
Specifies the number of steps that can be executed concurrently.The default value is
1
. The maximum value is256
.- Parameters:
stepConcurrencyLevel
- Specifies the number of steps that can be executed concurrently. This parameter is required.- Returns:
this
-
steps
A list of steps to run.- Parameters:
steps
- A list of steps to run. This parameter is required.- Returns:
this
-
steps
A list of steps to run.- Parameters:
steps
- A list of steps to run. This parameter is required.- Returns:
this
-
tags
A list of tags associated with a cluster.- Parameters:
tags
- A list of tags associated with a cluster. This parameter is required.- Returns:
this
-
visibleToAllUsers
Indicates whether the cluster is visible to all IAM users of the AWS account associated with the cluster.If this value is set to
true
, 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
.- Parameters:
visibleToAllUsers
- Indicates whether the cluster is visible to all IAM users of the AWS account associated with the cluster. This parameter is required.- Returns:
this
-
visibleToAllUsers
Indicates whether the cluster is visible to all IAM users of the AWS account associated with the cluster.If this value is set to
true
, 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
.- Parameters:
visibleToAllUsers
- Indicates whether the cluster is visible to all IAM users of the AWS account associated with the cluster. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnCluster>
- Returns:
- a newly built instance of
CfnCluster
.
-