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) An auto-termination policy for an Amazon EMR cluster.autoTerminationPolicy
(CfnCluster.AutoTerminationPolicyProperty autoTerminationPolicy) An auto-termination policy for an Amazon EMR cluster.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.ebsRootVolumeIops
(Number ebsRootVolumeIops) The IOPS, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance.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.ebsRootVolumeThroughput
(Number 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.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) The Amazon Linux release specified in a cluster launch RunJobFlow request.placementGroupConfigs
(List<? extends Object> placementGroupConfigs) placementGroupConfigs
(IResolvable placementGroupConfigs) 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
@Stability(Stable) public static CfnCluster.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.- Returns:
- a new instance of
CfnCluster.Builder
.
-
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
- See Also:
-
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
- See Also:
-
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
- See Also:
-
name
The name of the cluster.This parameter can't contain the characters <, >, $, |, or ` (backtick).
- Parameters:
name
- The name of the cluster. This parameter is required.- Returns:
this
- See Also:
-
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
- See Also:
-
additionalInfo
A JSON string for selecting additional features.- Parameters:
additionalInfo
- A JSON string for selecting additional features. This parameter is required.- Returns:
this
- See Also:
-
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
- See Also:
-
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
- See Also:
-
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
- See Also:
-
autoTerminationPolicy
@Stability(Stable) public CfnCluster.Builder autoTerminationPolicy(IResolvable 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 .
- Parameters:
autoTerminationPolicy
- An auto-termination policy for an Amazon EMR cluster. This parameter is required.- Returns:
this
- See Also:
-
autoTerminationPolicy
@Stability(Stable) public CfnCluster.Builder autoTerminationPolicy(CfnCluster.AutoTerminationPolicyProperty 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 .
- Parameters:
autoTerminationPolicy
- An auto-termination policy for an Amazon EMR cluster. This parameter is required.- Returns:
this
- See Also:
-
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
- See Also:
-
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
- See Also:
-
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
- See Also:
-
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
- See Also:
-
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
- See Also:
-
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.
- Parameters:
ebsRootVolumeIops
- The IOPS, 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
- See Also:
-
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
- See Also:
-
ebsRootVolumeThroughput
@Stability(Stable) public CfnCluster.Builder ebsRootVolumeThroughput(Number 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.
- 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. This parameter is required.- Returns:
this
- See Also:
-
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
- See Also:
-
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
- See Also:
-
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
- See Also:
-
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
- See Also:
-
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
- See Also:
-
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
- See Also:
-
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.
- Parameters:
osReleaseLabel
- The Amazon Linux release specified in a cluster launch RunJobFlow request. This parameter is required.- Returns:
this
- See Also:
-
placementGroupConfigs
@Stability(Stable) public CfnCluster.Builder placementGroupConfigs(IResolvable placementGroupConfigs) - Parameters:
placementGroupConfigs
- This parameter is required.- Returns:
this
- See Also:
-
placementGroupConfigs
@Stability(Stable) public CfnCluster.Builder placementGroupConfigs(List<? extends Object> placementGroupConfigs) - Parameters:
placementGroupConfigs
- This parameter is required.- Returns:
this
- See Also:
-
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
- See Also:
-
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
- See Also:
-
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
- See Also:
-
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
- See Also:
-
steps
A list of steps to run.- Parameters:
steps
- A list of steps to run. This parameter is required.- Returns:
this
- See Also:
-
steps
A list of steps to run.- Parameters:
steps
- A list of steps to run. This parameter is required.- Returns:
this
- See Also:
-
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
- See Also:
-
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
- See Also:
-
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
- See Also:
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnCluster>
- Returns:
- a newly built instance of
CfnCluster
.
-