EmrCreateClusterProps

class aws_cdk.aws_stepfunctions_tasks.EmrCreateClusterProps(*, comment=None, query_language=None, state_name=None, credentials=None, heartbeat=None, heartbeat_timeout=None, integration_pattern=None, task_timeout=None, timeout=None, assign=None, input_path=None, output_path=None, outputs=None, result_path=None, result_selector=None, instances, name, additional_info=None, applications=None, auto_scaling_role=None, auto_termination_policy_idle_timeout=None, bootstrap_actions=None, cluster_role=None, configurations=None, custom_ami_id=None, ebs_root_volume_size=None, kerberos_attributes=None, log_uri=None, release_label=None, scale_down_behavior=None, security_configuration=None, service_role=None, step_concurrency_level=None, tags=None, visible_to_all_users=None)

Bases: TaskStateBaseProps

Properties for calling an AWS service’s API action from your state machine across regions.

Parameters:
  • comment (Optional[str]) – A comment describing this state. Default: No comment

  • query_language (Optional[QueryLanguage]) – The name of the query language used by the state. If the state does not contain a queryLanguage field, then it will use the query language specified in the top-level queryLanguage field. Default: - JSONPath

  • state_name (Optional[str]) – Optional name for this state. Default: - The construct ID will be used as state name

  • credentials (Union[Credentials, Dict[str, Any], None]) – Credentials for an IAM Role that the State Machine assumes for executing the task. This enables cross-account resource invocations. Default: - None (Task is executed using the State Machine’s execution role)

  • heartbeat (Optional[Duration]) – (deprecated) Timeout for the heartbeat. Default: - None

  • heartbeat_timeout (Optional[Timeout]) – Timeout for the heartbeat. [disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface Default: - None

  • integration_pattern (Optional[IntegrationPattern]) – AWS Step Functions integrates with services directly in the Amazon States Language. You can control these AWS services using service integration patterns. Depending on the AWS Service, the Service Integration Pattern availability will vary. Default: - IntegrationPattern.REQUEST_RESPONSE for most tasks. IntegrationPattern.RUN_JOB for the following exceptions: BatchSubmitJob, EmrAddStep, EmrCreateCluster, EmrTerminationCluster, and EmrContainersStartJobRun.

  • task_timeout (Optional[Timeout]) – Timeout for the task. [disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface Default: - None

  • timeout (Optional[Duration]) – (deprecated) Timeout for the task. Default: - None

  • assign (Optional[Mapping[str, Any]]) – Workflow variables to store in this step. Using workflow variables, you can store data in a step and retrieve that data in future steps. Default: - Not assign variables

  • input_path (Optional[str]) – JSONPath expression to select part of the state to be the input to this state. May also be the special value JsonPath.DISCARD, which will cause the effective input to be the empty object {}. Default: $

  • output_path (Optional[str]) – JSONPath expression to select part of the state to be the output to this state. May also be the special value JsonPath.DISCARD, which will cause the effective output to be the empty object {}. Default: $

  • outputs (Any) – Used to specify and transform output from the state. When specified, the value overrides the state output default. The output field accepts any JSON value (object, array, string, number, boolean, null). Any string value, including those inside objects or arrays, will be evaluated as JSONata if surrounded by {% %} characters. Output also accepts a JSONata expression directly. Default: - $states.result or $states.errorOutput

  • result_path (Optional[str]) – JSONPath expression to indicate where to inject the state’s output. May also be the special value JsonPath.DISCARD, which will cause the state’s input to become its output. Default: $

  • result_selector (Optional[Mapping[str, Any]]) – The JSON that will replace the state’s raw result and become the effective result before ResultPath is applied. You can use ResultSelector to create a payload with values that are static or selected from the state’s raw result. Default: - None

  • instances (Union[InstancesConfigProperty, Dict[str, Any]]) – A specification of the number and type of Amazon EC2 instances.

  • name (str) – The Name of the Cluster.

  • additional_info (Optional[str]) – A JSON string for selecting additional features. Default: - None

  • applications (Optional[Sequence[Union[ApplicationConfigProperty, Dict[str, Any]]]]) – A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. Default: - EMR selected default

  • auto_scaling_role (Optional[IRole]) – An IAM role for automatic scaling policies. Default: - A role will be created.

  • auto_termination_policy_idle_timeout (Optional[Duration]) – The amount of idle time after which the cluster automatically terminates. You can specify a minimum of 60 seconds and a maximum of 604800 seconds (seven days). Default: - No timeout

  • bootstrap_actions (Optional[Sequence[Union[BootstrapActionConfigProperty, Dict[str, Any]]]]) – A list of bootstrap actions to run before Hadoop starts on the cluster nodes. Default: - None

  • cluster_role (Optional[IRole]) – Also called instance profile and EC2 role. 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

  • configurations (Optional[Sequence[Union[ConfigurationProperty, Dict[str, Any]]]]) – The list of configurations supplied for the EMR cluster you are creating. Default: - None

  • custom_ami_id (Optional[str]) – The ID of a custom Amazon EBS-backed Linux AMI. Default: - None

  • ebs_root_volume_size (Optional[Size]) – The size of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Default: - EMR selected default

  • kerberos_attributes (Union[KerberosAttributesProperty, Dict[str, Any], None]) – Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. Default: - None

  • log_uri (Optional[str]) – The location in Amazon S3 to write the log files of the job flow. Default: - None

  • release_label (Optional[str]) – The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. Default: - EMR selected default

  • scale_down_behavior (Optional[EmrClusterScaleDownBehavior]) – Specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. Default: - EMR selected default

  • security_configuration (Optional[str]) – The name of a security configuration to apply to the cluster. Default: - None

  • service_role (Optional[IRole]) – The IAM role that will be assumed by the Amazon EMR service to access AWS resources on your behalf. Default: - A role will be created that Amazon EMR service can assume.

  • step_concurrency_level (Union[int, float, None]) – Specifies the step concurrency level to allow multiple steps to run in parallel. Requires EMR release label 5.28.0 or above. Must be in range [1, 256]. Default: 1 - no step concurrency allowed

  • tags (Optional[Mapping[str, str]]) – A list of tags to associate with a cluster and propagate to Amazon EC2 instances. Default: - None

  • visible_to_all_users (Optional[bool]) – 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. Default: true

ExampleMetadata:

infused

Example:

cluster_role = iam.Role(self, "ClusterRole",
    assumed_by=iam.ServicePrincipal("ec2.amazonaws.com")
)

service_role = iam.Role(self, "ServiceRole",
    assumed_by=iam.ServicePrincipal("elasticmapreduce.amazonaws.com")
)

auto_scaling_role = iam.Role(self, "AutoScalingRole",
    assumed_by=iam.ServicePrincipal("elasticmapreduce.amazonaws.com")
)

auto_scaling_role.assume_role_policy.add_statements(
    iam.PolicyStatement(
        effect=iam.Effect.ALLOW,
        principals=[
            iam.ServicePrincipal("application-autoscaling.amazonaws.com")
        ],
        actions=["sts:AssumeRole"
        ]
    ))

tasks.EmrCreateCluster(self, "Create Cluster",
    instances=tasks.EmrCreateCluster.InstancesConfigProperty(),
    cluster_role=cluster_role,
    name=sfn.TaskInput.from_json_path_at("$.ClusterName").value,
    service_role=service_role,
    auto_scaling_role=auto_scaling_role
)

Attributes

additional_info

A JSON string for selecting additional features.

Default:
  • None

applications

A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster.

Default:
  • EMR selected default

assign

Workflow variables to store in this step.

Using workflow variables, you can store data in a step and retrieve that data in future steps.

Default:
  • Not assign variables

See:

https://docs.aws.amazon.com/ja_jp/step-functions/latest/dg/workflow-variables.html

auto_scaling_role

An IAM role for automatic scaling policies.

Default:
  • A role will be created.

auto_termination_policy_idle_timeout

The amount of idle time after which the cluster automatically terminates.

You can specify a minimum of 60 seconds and a maximum of 604800 seconds (seven days).

Default:
  • No timeout

bootstrap_actions

A list of bootstrap actions to run before Hadoop starts on the cluster nodes.

Default:
  • None

cluster_role

Also called instance profile and EC2 role.

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

A comment describing this state.

Default:

No comment

configurations

The list of configurations supplied for the EMR cluster you are creating.

Default:
  • None

credentials

Credentials for an IAM Role that the State Machine assumes for executing the task.

This enables cross-account resource invocations.

Default:
  • None (Task is executed using the State Machine’s execution role)

See:

https://docs.aws.amazon.com/step-functions/latest/dg/concepts-access-cross-acct-resources.html

custom_ami_id

The ID of a custom Amazon EBS-backed Linux AMI.

Default:
  • None

ebs_root_volume_size

The size of the EBS root device volume of the Linux AMI that is used for each EC2 instance.

Default:
  • EMR selected default

heartbeat

(deprecated) Timeout for the heartbeat.

Default:
  • None

Deprecated:

use heartbeatTimeout

Stability:

deprecated

heartbeat_timeout

Timeout for the heartbeat.

[disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface

Default:
  • None

input_path

JSONPath expression to select part of the state to be the input to this state.

May also be the special value JsonPath.DISCARD, which will cause the effective input to be the empty object {}.

Default:

$

instances

A specification of the number and type of Amazon EC2 instances.

integration_pattern

AWS Step Functions integrates with services directly in the Amazon States Language.

You can control these AWS services using service integration patterns.

Depending on the AWS Service, the Service Integration Pattern availability will vary.

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-supported-services.html

kerberos_attributes

Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration.

Default:
  • None

log_uri

The location in Amazon S3 to write the log files of the job flow.

Default:
  • None

name

The Name of the Cluster.

output_path

JSONPath expression to select part of the state to be the output to this state.

May also be the special value JsonPath.DISCARD, which will cause the effective output to be the empty object {}.

Default:

$

outputs

Used to specify and transform output from the state.

When specified, the value overrides the state output default. The output field accepts any JSON value (object, array, string, number, boolean, null). Any string value, including those inside objects or arrays, will be evaluated as JSONata if surrounded by {% %} characters. Output also accepts a JSONata expression directly.

Default:
  • $states.result or $states.errorOutput

See:

https://docs.aws.amazon.com/step-functions/latest/dg/concepts-input-output-filtering.html

query_language

The name of the query language used by the state.

If the state does not contain a queryLanguage field, then it will use the query language specified in the top-level queryLanguage field.

Default:
  • JSONPath

release_label

The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster.

Default:
  • EMR selected default

result_path

JSONPath expression to indicate where to inject the state’s output.

May also be the special value JsonPath.DISCARD, which will cause the state’s input to become its output.

Default:

$

result_selector

The JSON that will replace the state’s raw result and become the effective result before ResultPath is applied.

You can use ResultSelector to create a payload with values that are static or selected from the state’s raw result.

Default:
  • None

See:

https://docs.aws.amazon.com/step-functions/latest/dg/input-output-inputpath-params.html#input-output-resultselector

scale_down_behavior

Specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized.

Default:
  • EMR selected default

security_configuration

The name of a security configuration to apply to the cluster.

Default:
  • None

service_role

The IAM role that will be assumed by the Amazon EMR service to access AWS resources on your behalf.

Default:
  • A role will be created that Amazon EMR service can assume.

state_name

Optional name for this state.

Default:
  • The construct ID will be used as state name

step_concurrency_level

Specifies the step concurrency level to allow multiple steps to run in parallel.

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.

Default:
  • None

task_timeout

Timeout for the task.

[disable-awslint:duration-prop-type] is needed because all props interface in aws-stepfunctions-tasks extend this interface

Default:
  • None

timeout

(deprecated) Timeout for the task.

Default:
  • None

Deprecated:

use taskTimeout

Stability:

deprecated

visible_to_all_users

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.

Default:

true