Interface EmrCreateCluster.IInstancesConfigProperty
A specification of the number and type of Amazon EC2 instances.
Namespace: Amazon.CDK.AWS.StepFunctions.Tasks
Assembly: Amazon.CDK.AWS.StepFunctions.Tasks.dll
Syntax (csharp)
public interface IInstancesConfigProperty
Syntax (vb)
Public Interface IInstancesConfigProperty
Remarks
See the RunJobFlow API for complete documentation on input parameters
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_JobFlowInstancesConfig.html
ExampleMetadata: infused
Examples
var clusterRole = new Role(this, "ClusterRole", new RoleProps {
AssumedBy = new ServicePrincipal("ec2.amazonaws.com")
});
var serviceRole = new Role(this, "ServiceRole", new RoleProps {
AssumedBy = new ServicePrincipal("elasticmapreduce.amazonaws.com")
});
var autoScalingRole = new Role(this, "AutoScalingRole", new RoleProps {
AssumedBy = new ServicePrincipal("elasticmapreduce.amazonaws.com")
});
autoScalingRole.AssumeRolePolicy.AddStatements(
new PolicyStatement(new PolicyStatementProps {
Effect = Effect.ALLOW,
Principals = new [] {
new ServicePrincipal("application-autoscaling.amazonaws.com") },
Actions = new [] { "sts:AssumeRole" }
}));
new EmrCreateCluster(this, "Create Cluster", new EmrCreateClusterProps {
Instances = new InstancesConfigProperty { },
ClusterRole = clusterRole,
Name = TaskInput.FromJsonPathAt("$.ClusterName").Value,
ServiceRole = serviceRole,
AutoScalingRole = autoScalingRole
});
Synopsis
Properties
AdditionalMasterSecurityGroups | A list of additional Amazon EC2 security group IDs for the master node. |
AdditionalSlaveSecurityGroups | A list of additional Amazon EC2 security group IDs for the core and task nodes. |
Ec2KeyName | The name of the EC2 key pair that can be used to ssh to the master node as the user called "hadoop.". |
Ec2SubnetId | Applies to clusters that use the uniform instance group configuration. |
Ec2SubnetIds | Applies to clusters that use the instance fleet configuration. |
EmrManagedMasterSecurityGroup | The identifier of the Amazon EC2 security group for the master node. |
EmrManagedSlaveSecurityGroup | The identifier of the Amazon EC2 security group for the core and task nodes. |
HadoopVersion | Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop version for the cluster. |
InstanceCount | The number of EC2 instances in the cluster. |
InstanceFleets | Describes the EC2 instances and instance configurations for clusters that use the instance fleet configuration. |
InstanceGroups | Configuration for the instance groups in a cluster. |
MasterInstanceType | The EC2 instance type of the master node. |
Placement | The Availability Zone in which the cluster runs. |
ServiceAccessSecurityGroup | The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets. |
SlaveInstanceType | The EC2 instance type of the core and task nodes. |
TerminationProtected | 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. |
Properties
AdditionalMasterSecurityGroups
A list of additional Amazon EC2 security group IDs for the master node.
virtual string[] AdditionalMasterSecurityGroups { get; }
Property Value
System.String[]
Remarks
Default: - None
AdditionalSlaveSecurityGroups
A list of additional Amazon EC2 security group IDs for the core and task nodes.
virtual string[] AdditionalSlaveSecurityGroups { get; }
Property Value
System.String[]
Remarks
Default: - None
Ec2KeyName
The name of the EC2 key pair that can be used to ssh to the master node as the user called "hadoop.".
virtual string Ec2KeyName { get; }
Property Value
System.String
Remarks
Default: - None
Ec2SubnetId
Applies to clusters that use the uniform instance group configuration.
virtual string Ec2SubnetId { get; }
Property Value
System.String
Remarks
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
Ec2SubnetIds
Applies to clusters that use the instance fleet configuration.
virtual string[] Ec2SubnetIds { get; }
Property Value
System.String[]
Remarks
When multiple EC2 subnet IDs are specified, Amazon EMR evaluates them and launches instances in the optimal subnet.
Default: EMR selected default
EmrManagedMasterSecurityGroup
The identifier of the Amazon EC2 security group for the master node.
virtual string EmrManagedMasterSecurityGroup { get; }
Property Value
System.String
Remarks
Default: - None
EmrManagedSlaveSecurityGroup
The identifier of the Amazon EC2 security group for the core and task nodes.
virtual string EmrManagedSlaveSecurityGroup { get; }
Property Value
System.String
Remarks
Default: - None
HadoopVersion
Applies only to Amazon EMR release versions earlier than 4.0. The Hadoop version for the cluster.
virtual string HadoopVersion { get; }
Property Value
System.String
Remarks
Default: - 0.18 if the AmiVersion parameter is not set. If AmiVersion is set, the version of Hadoop for that AMI version is used.
InstanceCount
The number of EC2 instances in the cluster.
virtual Nullable<double> InstanceCount { get; }
Property Value
System.Nullable<System.Double>
Remarks
Default: 0
InstanceFleets
Describes the EC2 instances and instance configurations for clusters that use the instance fleet configuration.
virtual EmrCreateCluster.IInstanceFleetConfigProperty[] InstanceFleets { get; }
Property Value
EmrCreateCluster.IInstanceFleetConfigProperty[]
Remarks
The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.
Default: - None
InstanceGroups
Configuration for the instance groups in a cluster.
virtual EmrCreateCluster.IInstanceGroupConfigProperty[] InstanceGroups { get; }
Property Value
EmrCreateCluster.IInstanceGroupConfigProperty[]
Remarks
Default: - None
MasterInstanceType
The EC2 instance type of the master node.
virtual string MasterInstanceType { get; }
Property Value
System.String
Remarks
Default: - None
Placement
The Availability Zone in which the cluster runs.
virtual EmrCreateCluster.IPlacementTypeProperty Placement { get; }
Property Value
EmrCreateCluster.IPlacementTypeProperty
Remarks
Default: - EMR selected default
ServiceAccessSecurityGroup
The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.
virtual string ServiceAccessSecurityGroup { get; }
Property Value
System.String
Remarks
Default: - None
SlaveInstanceType
The EC2 instance type of the core and task nodes.
virtual string SlaveInstanceType { get; }
Property Value
System.String
Remarks
Default: - None
TerminationProtected
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.
virtual Nullable<bool> TerminationProtected { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false