Skip to content

Commit

Permalink
feat(client-emr): This release adds support for the ExecutionRoleArn …
Browse files Browse the repository at this point in the history
…parameter in the AddJobFlowSteps and DescribeStep APIs. Customers can use ExecutionRoleArn to specify the IAM role used for each job they submit using the AddJobFlowSteps API.
  • Loading branch information
awstools committed Jun 30, 2022
1 parent 64d9e9f commit 5232298
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
20 changes: 20 additions & 0 deletions clients/client-emr/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,16 @@ export interface AddJobFlowStepsInput {
* <p> A list of <a>StepConfig</a> to be executed by the job flow. </p>
*/
Steps: StepConfig[] | undefined;

/**
* <p>The Amazon Resource Name (ARN) of the runtime role for a step on the cluster. The
* runtime role can be a cross-account IAM role. The runtime role ARN is a combination of
* account ID, role name, and role type using the following format:
* <code>arn:partition:service:region:account:resource</code>. </p>
* <p>For example, <code>arn:aws:iam::1234567890:role/ReadOnly</code> is a correctly formatted
* runtime role ARN.</p>
*/
ExecutionRoleArn?: string;
}

export namespace AddJobFlowStepsInput {
Expand Down Expand Up @@ -3294,6 +3304,16 @@ export interface Step {
* <p>The current execution status details of the cluster step.</p>
*/
Status?: StepStatus;

/**
* <p>The Amazon Resource Name (ARN) of the runtime role for a step on the cluster. The
* runtime role can be a cross-account IAM role. The runtime role ARN is a combination of
* account ID, role name, and role type using the following format:
* <code>arn:partition:service:region:account:resource</code>. </p>
* <p>For example, <code>arn:aws:iam::1234567890:role/ReadOnly</code> is a correctly formatted
* runtime role ARN.</p>
*/
ExecutionRoleArn?: string;
}

export namespace Step {
Expand Down
3 changes: 3 additions & 0 deletions clients/client-emr/src/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3431,6 +3431,8 @@ const serializeAws_json1_1AddInstanceGroupsInput = (input: AddInstanceGroupsInpu

const serializeAws_json1_1AddJobFlowStepsInput = (input: AddJobFlowStepsInput, context: __SerdeContext): any => {
return {
...(input.ExecutionRoleArn !== undefined &&
input.ExecutionRoleArn !== null && { ExecutionRoleArn: input.ExecutionRoleArn }),
...(input.JobFlowId !== undefined && input.JobFlowId !== null && { JobFlowId: input.JobFlowId }),
...(input.Steps !== undefined &&
input.Steps !== null && { Steps: serializeAws_json1_1StepConfigList(input.Steps, context) }),
Expand Down Expand Up @@ -6812,6 +6814,7 @@ const deserializeAws_json1_1Step = (output: any, context: __SerdeContext): Step
output.Config !== undefined && output.Config !== null
? deserializeAws_json1_1HadoopStepConfig(output.Config, context)
: undefined,
ExecutionRoleArn: __expectString(output.ExecutionRoleArn),
Id: __expectString(output.Id),
Name: __expectString(output.Name),
Status:
Expand Down
12 changes: 12 additions & 0 deletions codegen/sdk-codegen/aws-models/emr.json
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,12 @@
"smithy.api#documentation": "<p> A list of <a>StepConfig</a> to be executed by the job flow. </p>",
"smithy.api#required": {}
}
},
"ExecutionRoleArn": {
"target": "com.amazonaws.emr#ArnType",
"traits": {
"smithy.api#documentation": "<p>The Amazon Resource Name (ARN) of the runtime role for a step on the cluster. The\n runtime role can be a cross-account IAM role. The runtime role ARN is a combination of\n account ID, role name, and role type using the following format:\n <code>arn:partition:service:region:account:resource</code>. </p>\n <p>For example, <code>arn:aws:iam::1234567890:role/ReadOnly</code> is a correctly formatted\n runtime role ARN.</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -7289,6 +7295,12 @@
"traits": {
"smithy.api#documentation": "<p>The current execution status details of the cluster step.</p>"
}
},
"ExecutionRoleArn": {
"target": "com.amazonaws.emr#OptionalArnType",
"traits": {
"smithy.api#documentation": "<p>The Amazon Resource Name (ARN) of the runtime role for a step on the cluster. The\n runtime role can be a cross-account IAM role. The runtime role ARN is a combination of\n account ID, role name, and role type using the following format:\n <code>arn:partition:service:region:account:resource</code>. </p>\n <p>For example, <code>arn:aws:iam::1234567890:role/ReadOnly</code> is a correctly formatted\n runtime role ARN.</p>"
}
}
},
"traits": {
Expand Down

0 comments on commit 5232298

Please sign in to comment.