Class EmrCreateCluster
A Step Functions Task to create an EMR Cluster.
Inherited Members
Namespace: Amazon.CDK.AWS.StepFunctions.Tasks
Assembly: Amazon.CDK.AWS.StepFunctions.Tasks.dll
Syntax (csharp)
public class EmrCreateCluster : TaskStateBase, IConstruct, IDependable, IChainable, INextable
Syntax (vb)
Public Class EmrCreateCluster
Inherits TaskStateBase
Implements IConstruct, IDependable, IChainable, INextable
Remarks
The ClusterConfiguration is defined as Parameters in the state machine definition.
OUTPUT: the ClusterId.
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
Constructors
EmrCreateCluster(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
EmrCreateCluster(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
EmrCreateCluster(Construct, String, IEmrCreateClusterProps) |
Properties
AutoScalingRole | The autoscaling role for the EMR Cluster. |
ClusterRole | The instance role for the EMR Cluster. |
ServiceRole | The service role for the EMR Cluster. |
TaskMetrics | |
TaskPolicies |
Constructors
EmrCreateCluster(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected EmrCreateCluster(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
EmrCreateCluster(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected EmrCreateCluster(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
EmrCreateCluster(Construct, String, IEmrCreateClusterProps)
public EmrCreateCluster(Construct scope, string id, IEmrCreateClusterProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IEmrCreateClusterProps
Properties
AutoScalingRole
The autoscaling role for the EMR Cluster.
public virtual IRole AutoScalingRole { get; }
Property Value
Remarks
Only available after task has been added to a state machine.
ClusterRole
The instance role for the EMR Cluster.
public virtual IRole ClusterRole { get; }
Property Value
Remarks
Only available after task has been added to a state machine.
ServiceRole
The service role for the EMR Cluster.
public virtual IRole ServiceRole { get; }
Property Value
Remarks
Only available after task has been added to a state machine.
TaskMetrics
protected override ITaskMetricsConfig TaskMetrics { get; }
Property Value
Overrides
TaskPolicies
protected override PolicyStatement[] TaskPolicies { get; }
Property Value