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 Details

    • Builder

      public Builder()
  • Method Details

    • instances

      @Stability(Stable) public CfnClusterProps.Builder instances(IResolvable instances)
      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)
      Parameters:
      instances - A specification of the number and type of Amazon EC2 instances. This parameter is required.
      Returns:
      this
    • jobFlowRole

      @Stability(Stable) public CfnClusterProps.Builder jobFlowRole(String jobFlowRole)
      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 is EMR_EC2_DefaultRole . In order to use the default role, you must have already created it using the AWS CLI or console.
      Returns:
      this
    • name

      @Stability(Stable) public CfnClusterProps.Builder name(String name)
      Sets the value of CfnClusterProps.getName()
      Parameters:
      name - The name of the cluster. This parameter is required. This parameter can't contain the characters <, >, $, |, or ` (backtick).
      Returns:
      this
    • serviceRole

      @Stability(Stable) public CfnClusterProps.Builder serviceRole(String serviceRole)
      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 CfnClusterProps.Builder additionalInfo(Object additionalInfo)
      Parameters:
      additionalInfo - A JSON string for selecting additional features.
      Returns:
      this
    • applications

      @Stability(Stable) public CfnClusterProps.Builder applications(IResolvable applications)
      Parameters:
      applications - The applications to install on this cluster, for example, Spark, Flink, Oozie, Zeppelin, and so on.
      Returns:
      this
    • applications

      @Stability(Stable) public CfnClusterProps.Builder applications(List<? extends Object> applications)
      Parameters:
      applications - The applications to install on this cluster, for example, Spark, Flink, Oozie, Zeppelin, and so on.
      Returns:
      this
    • autoScalingRole

      @Stability(Stable) public CfnClusterProps.Builder autoScalingRole(String autoScalingRole)
      Parameters:
      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.
      Returns:
      this
    • autoTerminationPolicy

      @Stability(Stable) public CfnClusterProps.Builder autoTerminationPolicy(IResolvable autoTerminationPolicy)
      Parameters:
      autoTerminationPolicy - 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)
      Parameters:
      autoTerminationPolicy - 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

      @Stability(Stable) public CfnClusterProps.Builder bootstrapActions(IResolvable bootstrapActions)
      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)
      Parameters:
      bootstrapActions - A list of bootstrap actions to run before Hadoop starts on the cluster nodes.
      Returns:
      this
    • configurations

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

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

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

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

      @Stability(Stable) public CfnClusterProps.Builder logUri(String logUri)
      Sets the value of CfnClusterProps.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)
      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)
      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

      @Stability(Stable) public CfnClusterProps.Builder osReleaseLabel(String osReleaseLabel)
      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)
      Parameters:
      placementGroupConfigs - the value to be set.
      Returns:
      this
    • placementGroupConfigs

      @Stability(Stable) public CfnClusterProps.Builder placementGroupConfigs(List<? extends Object> placementGroupConfigs)
      Parameters:
      placementGroupConfigs - the value to be set.
      Returns:
      this
    • releaseLabel

      @Stability(Stable) public CfnClusterProps.Builder releaseLabel(String releaseLabel)
      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 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 .
      Returns:
      this
    • scaleDownBehavior

      @Stability(Stable) public CfnClusterProps.Builder scaleDownBehavior(String scaleDownBehavior)
      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)
      Parameters:
      securityConfiguration - The name of the security configuration applied to the cluster.
      Returns:
      this
    • stepConcurrencyLevel

      @Stability(Stable) public CfnClusterProps.Builder stepConcurrencyLevel(Number stepConcurrencyLevel)
      Parameters:
      stepConcurrencyLevel - Specifies the number of steps that can be executed concurrently. The default value is 1 . The maximum value is 256 .
      Returns:
      this
    • steps

      @Stability(Stable) public CfnClusterProps.Builder steps(IResolvable steps)
      Sets the value of CfnClusterProps.getSteps()
      Parameters:
      steps - A list of steps to run.
      Returns:
      this
    • steps

      @Stability(Stable) public CfnClusterProps.Builder steps(List<? extends Object> steps)
      Sets the value of CfnClusterProps.getSteps()
      Parameters:
      steps - A list of steps to run.
      Returns:
      this
    • tags

      @Stability(Stable) public CfnClusterProps.Builder tags(List<? extends CfnTag> tags)
      Sets the value of CfnClusterProps.getTags()
      Parameters:
      tags - A list of tags associated with a cluster.
      Returns:
      this
    • visibleToAllUsers

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

      Returns:
      this
    • visibleToAllUsers

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

      Returns:
      this
    • build

      @Stability(Stable) public CfnClusterProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<CfnClusterProps>
      Returns:
      a new instance of CfnClusterProps
      Throws:
      NullPointerException - if any required attribute was not provided