steps
Creates, updates, deletes or gets a step resource or lists steps in a region
Overview
| Name | steps |
| Type | Resource |
| Description | Schema for AWS::EMR::Step |
| Id | awscc.emr.steps |
Fields
| Name | Datatype | Description |
|---|---|---|
id | string | ID generated by service |
action_on_failure | string | This specifies what action to take when the cluster step fails. Possible values are CANCEL_AND_WAIT and CONTINUE. |
hadoop_jar_step | object | The HadoopJarStepConfig property type specifies a job flow step consisting of a JAR file whose main function will be executed. The main function submits a job for the cluster to execute as a step on the master node, and then waits for the job to finish or fail before executing subsequent steps. |
job_flow_id | string | A string that uniquely identifies the cluster (job flow). |
name | string | The name of the cluster step. |
region | string | AWS region. |
For more information, see AWS::EMR::Step.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | JobFlowId, HadoopJarStep, ActionOnFailure, Name, region |
get_resource | SELECT | Identifier, region |
SELECT examples
Gets all properties from an individual step.
SELECT
region,
id,
action_on_failure,
hadoop_jar_step,
job_flow_id,
name
FROM awscc.emr.steps
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';
INSERT example
Use the following StackQL query and manifest file to create a new step resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.emr.steps (
ActionOnFailure,
HadoopJarStep,
JobFlowId,
Name,
region
)
SELECT
'{{ action_on_failure }}',
'{{ hadoop_jar_step }}',
'{{ job_flow_id }}',
'{{ name }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.emr.steps (
ActionOnFailure,
HadoopJarStep,
JobFlowId,
Name,
region
)
SELECT
'{{ action_on_failure }}',
'{{ hadoop_jar_step }}',
'{{ job_flow_id }}',
'{{ name }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: step
props:
- name: action_on_failure
value: '{{ action_on_failure }}'
- name: hadoop_jar_step
value:
args:
- '{{ args[0] }}'
jar: '{{ jar }}'
main_class: '{{ main_class }}'
step_properties:
- key: '{{ key }}'
value: '{{ value }}'
- name: job_flow_id
value: '{{ job_flow_id }}'
- name: name
value: '{{ name }}'
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the steps resource, the following permissions are required:
- Create
emr:AddJobFlowSteps