Interface EmrCreateCluster.InstancesConfigProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
EmrCreateCluster.InstancesConfigProperty.Jsii$Proxy
Enclosing class:
EmrCreateCluster

@Stability(Stable) public static interface EmrCreateCluster.InstancesConfigProperty extends software.amazon.jsii.JsiiSerializable
A specification of the number and type of Amazon EC2 instances.

See the RunJobFlow API for complete documentation on input parameters

Example:

 Role clusterRole = Role.Builder.create(this, "ClusterRole")
         .assumedBy(new ServicePrincipal("ec2.amazonaws.com"))
         .build();
 Role serviceRole = Role.Builder.create(this, "ServiceRole")
         .assumedBy(new ServicePrincipal("elasticmapreduce.amazonaws.com"))
         .build();
 Role autoScalingRole = Role.Builder.create(this, "AutoScalingRole")
         .assumedBy(new ServicePrincipal("elasticmapreduce.amazonaws.com"))
         .build();
 autoScalingRole.assumeRolePolicy.addStatements(
 PolicyStatement.Builder.create()
         .effect(Effect.ALLOW)
         .principals(List.of(
             new ServicePrincipal("application-autoscaling.amazonaws.com")))
         .actions(List.of("sts:AssumeRole"))
         .build());
 EmrCreateCluster.Builder.create(this, "Create Cluster")
         .instances(InstancesConfigProperty.builder().build())
         .clusterRole(clusterRole)
         .name(TaskInput.fromJsonPathAt("$.ClusterName").getValue())
         .serviceRole(serviceRole)
         .autoScalingRole(autoScalingRole)
         .build();
 

See Also:
  • Method Details

    • getAdditionalMasterSecurityGroups

      @Stability(Stable) @Nullable default List<String> getAdditionalMasterSecurityGroups()
      A list of additional Amazon EC2 security group IDs for the master node.

      Default: - None

    • getAdditionalSlaveSecurityGroups

      @Stability(Stable) @Nullable default List<String> getAdditionalSlaveSecurityGroups()
      A list of additional Amazon EC2 security group IDs for the core and task nodes.

      Default: - None

    • getEc2KeyName

      @Stability(Stable) @Nullable default String getEc2KeyName()
      The name of the EC2 key pair that can be used to ssh to the master node as the user called "hadoop.".

      Default: - None

    • getEc2SubnetId

      @Stability(Stable) @Nullable default String getEc2SubnetId()
      Applies to clusters that use the uniform instance group configuration.

      To launch the cluster in Amazon Virtual Private Cloud (Amazon VPC), set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch.

      Default: EMR selected default

    • getEc2SubnetIds

      @Stability(Stable) @Nullable default List<String> getEc2SubnetIds()
      Applies to clusters that use the instance fleet configuration.

      When multiple EC2 subnet IDs are specified, Amazon EMR evaluates them and launches instances in the optimal subnet.

      Default: EMR selected default

    • getEmrManagedMasterSecurityGroup

      @Stability(Stable) @Nullable default String getEmrManagedMasterSecurityGroup()
      The identifier of the Amazon EC2 security group for the master node.

      Default: - None

    • getEmrManagedSlaveSecurityGroup

      @Stability(Stable) @Nullable default String getEmrManagedSlaveSecurityGroup()
      The identifier of the Amazon EC2 security group for the core and task nodes.

      Default: - None

    • getHadoopVersion

      @Stability(Stable) @Nullable default String getHadoopVersion()
      Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop version for the cluster.

      Default: - 0.18 if the AmiVersion parameter is not set. If AmiVersion is set, the version of Hadoop for that AMI version is used.

    • getInstanceCount

      @Stability(Stable) @Nullable default Number getInstanceCount()
      The number of EC2 instances in the cluster.

      Default: 0

    • getInstanceFleets

      @Stability(Stable) @Nullable default List<EmrCreateCluster.InstanceFleetConfigProperty> getInstanceFleets()
      Describes the EC2 instances and instance configurations for clusters that use the instance fleet configuration.

      The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.

      Default: - None

    • getInstanceGroups

      @Stability(Stable) @Nullable default List<EmrCreateCluster.InstanceGroupConfigProperty> getInstanceGroups()
      Configuration for the instance groups in a cluster.

      Default: - None

    • getMasterInstanceType

      @Stability(Stable) @Nullable default String getMasterInstanceType()
      The EC2 instance type of the master node.

      Default: - None

    • getPlacement

      @Stability(Stable) @Nullable default EmrCreateCluster.PlacementTypeProperty getPlacement()
      The Availability Zone in which the cluster runs.

      Default: - EMR selected default

    • getServiceAccessSecurityGroup

      @Stability(Stable) @Nullable default String getServiceAccessSecurityGroup()
      The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.

      Default: - None

    • getSlaveInstanceType

      @Stability(Stable) @Nullable default String getSlaveInstanceType()
      The EC2 instance type of the core and task nodes.

      Default: - None

    • getTerminationProtected

      @Stability(Stable) @Nullable default Boolean getTerminationProtected()
      Specifies whether to lock the cluster to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job-flow error.

      Default: false

    • builder

      @Stability(Stable) static EmrCreateCluster.InstancesConfigProperty.Builder builder()
      Returns:
      a EmrCreateCluster.InstancesConfigProperty.Builder of EmrCreateCluster.InstancesConfigProperty