EmrCreateClusterProps
- class aws_cdk.aws_stepfunctions_tasks.EmrCreateClusterProps(*, comment=None, credentials=None, heartbeat=None, heartbeat_timeout=None, input_path=None, integration_pattern=None, output_path=None, result_path=None, result_selector=None, state_name=None, task_timeout=None, timeout=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 EmrCreateCluster.
See the RunJobFlow API for complete documentation on input parameters
- Parameters:
comment (
Optional
[str
]) – An optional description for this state. Default: - No commentcredentials (
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: - Noneheartbeat_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: - Noneinput_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: - The entire task input (JSON path ‘$’)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
, andEmrContainersStartJobRun
.output_path (
Optional
[str
]) – JSONPath expression to select select a portion of the state output to pass to the next state. 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 ‘$’)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: - Replaces the entire input with the result (JSON path ‘$’)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: - Nonestate_name (
Optional
[str
]) – Optional name for this state. Default: - The construct ID will be used as state nametask_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: - Nonetimeout (
Optional
[Duration
]) – (deprecated) Timeout for the task. Default: - Noneinstances (
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: - Noneapplications (
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 defaultauto_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 timeoutbootstrap_actions (
Optional
[Sequence
[Union
[BootstrapActionConfigProperty
,Dict
[str
,Any
]]]]) – A list of bootstrap actions to run before Hadoop starts on the cluster nodes. Default: - Nonecluster_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 createdconfigurations (
Optional
[Sequence
[Union
[ConfigurationProperty
,Dict
[str
,Any
]]]]) – The list of configurations supplied for the EMR cluster you are creating. Default: - Nonecustom_ami_id (
Optional
[str
]) – The ID of a custom Amazon EBS-backed Linux AMI. Default: - Noneebs_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 defaultkerberos_attributes (
Union
[KerberosAttributesProperty
,Dict
[str
,Any
],None
]) – Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. Default: - Nonelog_uri (
Optional
[str
]) – The location in Amazon S3 to write the log files of the job flow. Default: - Nonerelease_label (
Optional
[str
]) – The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. Default: - EMR selected defaultscale_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 defaultsecurity_configuration (
Optional
[str
]) – The name of a security configuration to apply to the cluster. Default: - Noneservice_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 allowedtags (
Optional
[Mapping
[str
,str
]]) – A list of tags to associate with a cluster and propagate to Amazon EC2 instances. Default: - Nonevisible_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
- See:
https://docs.aws.amazon.com/emr/latest/APIReference/API_RunJobFlow.html
- 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
- 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
An optional description for 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:
The entire task input (JSON path ‘$’)
- 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
, andEmrContainersStartJobRun
.
- 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 select a portion of the state output to pass to the next state.
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 ‘$’)
- 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:
Replaces the entire input with the result (JSON path ‘$’)
- 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.
- 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