Class EmrCreateClusterProps
Properties for EmrCreateCluster.
Inheritance
Namespace: Amazon.CDK.AWS.StepFunctions.Tasks
Assembly: Amazon.CDK.AWS.StepFunctions.Tasks.dll
Syntax (csharp)
public class EmrCreateClusterProps : Object, IEmrCreateClusterProps, ITaskStateBaseProps
Syntax (vb)
Public Class EmrCreateClusterProps
Inherits Object
Implements IEmrCreateClusterProps, ITaskStateBaseProps
Remarks
See the RunJobFlow API for complete documentation on input parameters
See: https://docs.aws.amazon.com/emr/latest/APIReference/API_RunJobFlow.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
Constructors
EmrCreateClusterProps() |
Properties
AdditionalInfo | A JSON string for selecting additional features. |
Applications | A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. |
AutoScalingRole | An IAM role for automatic scaling policies. |
BootstrapActions | A list of bootstrap actions to run before Hadoop starts on the cluster nodes. |
ClusterRole | Also called instance profile and EC2 role. |
Comment | An optional description for this state. |
Configurations | The list of configurations supplied for the EMR cluster you are creating. |
CustomAmiId | The ID of a custom Amazon EBS-backed Linux AMI. |
EbsRootVolumeSize | The size of the EBS root device volume of the Linux AMI that is used for each EC2 instance. |
Heartbeat | Timeout for the heartbeat. |
InputPath | JSONPath expression to select part of the state to be the input to this state. |
Instances | A specification of the number and type of Amazon EC2 instances. |
IntegrationPattern | AWS Step Functions integrates with services directly in the Amazon States Language. |
KerberosAttributes | Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. |
LogUri | The location in Amazon S3 to write the log files of the job flow. |
Name | The Name of the Cluster. |
OutputPath | JSONPath expression to select select a portion of the state output to pass to the next state. |
ReleaseLabel | The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. |
ResultPath | JSONPath expression to indicate where to inject the state's output. |
ResultSelector | The JSON that will replace the state's raw result and become the effective result before ResultPath is applied. |
ScaleDownBehavior | Specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. |
SecurityConfiguration | The name of a security configuration to apply to the cluster. |
ServiceRole | The IAM role that will be assumed by the Amazon EMR service to access AWS resources on your behalf. |
StepConcurrencyLevel | Specifies the step concurrency level to allow multiple steps to run in parallel. |
Tags | A list of tags to associate with a cluster and propagate to Amazon EC2 instances. |
Timeout | Timeout for the state machine. |
VisibleToAllUsers | A value of true indicates that all IAM users in the AWS account can perform cluster actions if they have the proper IAM policy permissions. |
Constructors
EmrCreateClusterProps()
public EmrCreateClusterProps()
Properties
AdditionalInfo
A JSON string for selecting additional features.
public string AdditionalInfo { get; set; }
Property Value
System.String
Remarks
Default: - None
Applications
A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster.
public EmrCreateCluster.IApplicationConfigProperty[] Applications { get; set; }
Property Value
EmrCreateCluster.IApplicationConfigProperty[]
Remarks
Default: - EMR selected default
AutoScalingRole
An IAM role for automatic scaling policies.
public IRole AutoScalingRole { get; set; }
Property Value
Remarks
Default: - A role will be created.
BootstrapActions
A list of bootstrap actions to run before Hadoop starts on the cluster nodes.
public EmrCreateCluster.IBootstrapActionConfigProperty[] BootstrapActions { get; set; }
Property Value
EmrCreateCluster.IBootstrapActionConfigProperty[]
Remarks
Default: - None
ClusterRole
Also called instance profile and EC2 role.
public IRole ClusterRole { get; set; }
Property Value
Remarks
An IAM role for an EMR cluster. The EC2 instances of the cluster assume this role.
This attribute has been renamed from jobFlowRole to clusterRole to align with other ERM/StepFunction integration parameters.
Default: - * A Role will be created
Comment
An optional description for this state.
public string Comment { get; set; }
Property Value
System.String
Remarks
Default: - No comment
Configurations
The list of configurations supplied for the EMR cluster you are creating.
public EmrCreateCluster.IConfigurationProperty[] Configurations { get; set; }
Property Value
EmrCreateCluster.IConfigurationProperty[]
Remarks
Default: - None
CustomAmiId
The ID of a custom Amazon EBS-backed Linux AMI.
public string CustomAmiId { get; set; }
Property Value
System.String
Remarks
Default: - None
EbsRootVolumeSize
The size of the EBS root device volume of the Linux AMI that is used for each EC2 instance.
public Size EbsRootVolumeSize { get; set; }
Property Value
Remarks
Default: - EMR selected default
Heartbeat
Timeout for the heartbeat.
public Duration Heartbeat { get; set; }
Property Value
Remarks
Default: - None
InputPath
JSONPath expression to select part of the state to be the input to this state.
public string InputPath { get; set; }
Property Value
System.String
Remarks
May also be the special value JsonPath.DISCARD, which will cause the effective input to be the empty object {}.
Default: - The entire task input (JSON path '$')
Instances
A specification of the number and type of Amazon EC2 instances.
public EmrCreateCluster.IInstancesConfigProperty Instances { get; set; }
Property Value
EmrCreateCluster.IInstancesConfigProperty
IntegrationPattern
AWS Step Functions integrates with services directly in the Amazon States Language.
public Nullable<IntegrationPattern> IntegrationPattern { get; set; }
Property Value
System.Nullable<IntegrationPattern>
Remarks
You can control these AWS services using service integration patterns
Default: - IntegrationPattern.REQUEST_RESPONSE
for most tasks.
IntegrationPattern.RUN_JOB
for the following exceptions:
BatchSubmitJob
, EmrAddStep
, EmrCreateCluster
, EmrTerminationCluster
, and EmrContainersStartJobRun
.
See: https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token
KerberosAttributes
Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration.
public EmrCreateCluster.IKerberosAttributesProperty KerberosAttributes { get; set; }
Property Value
EmrCreateCluster.IKerberosAttributesProperty
Remarks
Default: - None
LogUri
The location in Amazon S3 to write the log files of the job flow.
public string LogUri { get; set; }
Property Value
System.String
Remarks
Default: - None
Name
The Name of the Cluster.
public string Name { get; set; }
Property Value
System.String
OutputPath
JSONPath expression to select select a portion of the state output to pass to the next state.
public string OutputPath { get; set; }
Property Value
System.String
Remarks
May also be the special value JsonPath.DISCARD, which will cause the effective output to be the empty object {}.
Default: - The entire JSON node determined by the state input, the task result, and resultPath is passed to the next state (JSON path '$')
ReleaseLabel
The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster.
public string ReleaseLabel { get; set; }
Property Value
System.String
Remarks
Default: - EMR selected default
ResultPath
JSONPath expression to indicate where to inject the state's output.
public string ResultPath { get; set; }
Property Value
System.String
Remarks
May also be the special value JsonPath.DISCARD, which will cause the state's input to become its output.
Default: - Replaces the entire input with the result (JSON path '$')
ResultSelector
The JSON that will replace the state's raw result and become the effective result before ResultPath is applied.
public IDictionary<string, object> ResultSelector { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Remarks
You can use ResultSelector to create a payload with values that are static or selected from the state's raw result.
Default: - None
ScaleDownBehavior
Specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized.
public Nullable<EmrCreateCluster.EmrClusterScaleDownBehavior> ScaleDownBehavior { get; set; }
Property Value
System.Nullable<EmrCreateCluster.EmrClusterScaleDownBehavior>
Remarks
Default: - EMR selected default
SecurityConfiguration
The name of a security configuration to apply to the cluster.
public string SecurityConfiguration { get; set; }
Property Value
System.String
Remarks
Default: - None
ServiceRole
The IAM role that will be assumed by the Amazon EMR service to access AWS resources on your behalf.
public IRole ServiceRole { get; set; }
Property Value
Remarks
Default: - A role will be created that Amazon EMR service can assume.
StepConcurrencyLevel
Specifies the step concurrency level to allow multiple steps to run in parallel.
public Nullable<double> StepConcurrencyLevel { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Requires EMR release label 5.28.0 or above. Must be in range [1, 256].
Default: 1 - no step concurrency allowed
Tags
A list of tags to associate with a cluster and propagate to Amazon EC2 instances.
public IDictionary<string, string> Tags { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
Default: - None
Timeout
Timeout for the state machine.
public Duration Timeout { get; set; }
Property Value
Remarks
Default: - None
VisibleToAllUsers
A value of true indicates that all IAM users in the AWS account can perform cluster actions if they have the proper IAM policy permissions.
public Nullable<bool> VisibleToAllUsers { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: true