Interface EmrCreateCluster.InstancesConfigProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
EmrCreateCluster.InstancesConfigProperty.Jsii$Proxy
- Enclosing class:
EmrCreateCluster
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:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forEmrCreateCluster.InstancesConfigProperty
static final class
An implementation forEmrCreateCluster.InstancesConfigProperty
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
A list of additional Amazon EC2 security group IDs for the master node.A list of additional Amazon EC2 security group IDs for the core and task nodes.default String
The name of the EC2 key pair that can be used to ssh to the master node as the user called "hadoop.".default String
Applies to clusters that use the uniform instance group configuration.Applies to clusters that use the instance fleet configuration.default String
The identifier of the Amazon EC2 security group for the master node.default String
The identifier of the Amazon EC2 security group for the core and task nodes.default String
Applies only to Amazon EMR release versions earlier than 4.0.default Number
The number of EC2 instances in the cluster.Describes the EC2 instances and instance configurations for clusters that use the instance fleet configuration.Configuration for the instance groups in a cluster.default String
The EC2 instance type of the master node.The Availability Zone in which the cluster runs.default String
The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.default String
The EC2 instance type of the core and task nodes.default Boolean
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.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAdditionalMasterSecurityGroups
A list of additional Amazon EC2 security group IDs for the master node.Default: - None
-
getAdditionalSlaveSecurityGroups
A list of additional Amazon EC2 security group IDs for the core and task nodes.Default: - None
-
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
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
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
The identifier of the Amazon EC2 security group for the master node.Default: - None
-
getEmrManagedSlaveSecurityGroup
The identifier of the Amazon EC2 security group for the core and task nodes.Default: - None
-
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
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
The EC2 instance type of the master node.Default: - None
-
getPlacement
The Availability Zone in which the cluster runs.Default: - EMR selected default
-
getServiceAccessSecurityGroup
The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.Default: - None
-
getSlaveInstanceType
The EC2 instance type of the core and task nodes.Default: - None
-
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
-