Class CfnCluster.Builder

java.lang.Object
software.amazon.awscdk.services.emr.CfnCluster.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnCluster>
Enclosing class:
CfnCluster

@Stability(Stable) public static final class CfnCluster.Builder extends Object implements software.amazon.jsii.Builder<CfnCluster>
A fluent builder for CfnCluster.
  • Method Details

    • create

      @Stability(Stable) public static CfnCluster.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      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

      @Stability(Stable) public CfnCluster.Builder instances(IResolvable 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

      @Stability(Stable) public CfnCluster.Builder jobFlowRole(String 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

      @Stability(Stable) public CfnCluster.Builder name(String name)
      The name of the cluster.

      Parameters:
      name - The name of the cluster. This parameter is required.
      Returns:
      this
    • serviceRole

      @Stability(Stable) public CfnCluster.Builder serviceRole(String 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

      @Stability(Stable) public CfnCluster.Builder additionalInfo(Object additionalInfo)
      A JSON string for selecting additional features.

      Parameters:
      additionalInfo - A JSON string for selecting additional features. This parameter is required.
      Returns:
      this
    • applications

      @Stability(Stable) public CfnCluster.Builder applications(IResolvable 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

      @Stability(Stable) public CfnCluster.Builder applications(List<? extends Object> 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

      @Stability(Stable) public CfnCluster.Builder autoScalingRole(String 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

      @Stability(Stable) public CfnCluster.Builder bootstrapActions(IResolvable 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

      @Stability(Stable) public CfnCluster.Builder configurations(IResolvable 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

      @Stability(Stable) public CfnCluster.Builder configurations(List<? extends Object> 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

      @Stability(Stable) public CfnCluster.Builder customAmiId(String 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

      @Stability(Stable) public CfnCluster.Builder 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.

      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

      @Stability(Stable) public CfnCluster.Builder kerberosAttributes(IResolvable 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

      @Stability(Stable) public CfnCluster.Builder logEncryptionKmsKeyId(String 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

      @Stability(Stable) public CfnCluster.Builder logUri(String 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

      @Stability(Stable) public CfnCluster.Builder managedScalingPolicy(IResolvable 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

      @Stability(Stable) public CfnCluster.Builder osReleaseLabel(String osReleaseLabel)
      AWS::EMR::Cluster.OSReleaseLabel.

      Parameters:
      osReleaseLabel - AWS::EMR::Cluster.OSReleaseLabel. This parameter is required.
      Returns:
      this
    • releaseLabel

      @Stability(Stable) public CfnCluster.Builder releaseLabel(String 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 as emr-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 use AmiVersion .

      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

      @Stability(Stable) public CfnCluster.Builder scaleDownBehavior(String 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

      @Stability(Stable) public CfnCluster.Builder securityConfiguration(String 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

      @Stability(Stable) public CfnCluster.Builder stepConcurrencyLevel(Number stepConcurrencyLevel)
      Specifies the number of steps that can be executed concurrently.

      The default value is 1 . The maximum value is 256 .

      Parameters:
      stepConcurrencyLevel - Specifies the number of steps that can be executed concurrently. This parameter is required.
      Returns:
      this
    • steps

      @Stability(Stable) public CfnCluster.Builder steps(IResolvable steps)
      A list of steps to run.

      Parameters:
      steps - A list of steps to run. This parameter is required.
      Returns:
      this
    • steps

      @Stability(Stable) public CfnCluster.Builder steps(List<? extends Object> steps)
      A list of steps to run.

      Parameters:
      steps - A list of steps to run. This parameter is required.
      Returns:
      this
    • tags

      @Stability(Stable) public CfnCluster.Builder tags(List<? extends CfnTag> 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

      @Stability(Stable) public CfnCluster.Builder visibleToAllUsers(Boolean 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 is false , 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, for AWS::EMR::Cluster resources in CloudFormation, the default is false .

      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

      @Stability(Stable) public CfnCluster.Builder visibleToAllUsers(IResolvable 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 is false , 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, for AWS::EMR::Cluster resources in CloudFormation, the default is false .

      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

      @Stability(Stable) public CfnCluster build()
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnCluster>
      Returns:
      a newly built instance of CfnCluster.