Skip to content

Commit 1708c81

Browse files
author
awstools
committed
feat(client-glue): AWS Glue now supports dynamic session policies for job executions. This feature allows you to specify custom, fine-grained permissions for each job run without creating multiple IAM roles.
1 parent 322ef3e commit 1708c81

File tree

11 files changed

+51
-22
lines changed

11 files changed

+51
-22
lines changed

clients/client-glue/src/commands/BatchGetWorkflowsCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ export interface BatchGetWorkflowsCommandOutput extends BatchGetWorkflowsRespons
163163
* // MaintenanceWindow: "STRING_VALUE",
164164
* // ProfileName: "STRING_VALUE",
165165
* // StateDetail: "STRING_VALUE",
166+
* // ExecutionRoleSessionPolicy: "STRING_VALUE",
166167
* // },
167168
* // ],
168169
* // },
@@ -276,6 +277,7 @@ export interface BatchGetWorkflowsCommandOutput extends BatchGetWorkflowsRespons
276277
* // MaintenanceWindow: "STRING_VALUE",
277278
* // ProfileName: "STRING_VALUE",
278279
* // StateDetail: "STRING_VALUE",
280+
* // ExecutionRoleSessionPolicy: "STRING_VALUE",
279281
* // },
280282
* // ],
281283
* // },

clients/client-glue/src/commands/GetJobRunCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ export interface GetJobRunCommandOutput extends GetJobRunResponse, __MetadataBea
8282
* // MaintenanceWindow: "STRING_VALUE",
8383
* // ProfileName: "STRING_VALUE",
8484
* // StateDetail: "STRING_VALUE",
85+
* // ExecutionRoleSessionPolicy: "STRING_VALUE",
8586
* // },
8687
* // };
8788
*

clients/client-glue/src/commands/GetJobRunsCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ export interface GetJobRunsCommandOutput extends GetJobRunsResponse, __MetadataB
8585
* // MaintenanceWindow: "STRING_VALUE",
8686
* // ProfileName: "STRING_VALUE",
8787
* // StateDetail: "STRING_VALUE",
88+
* // ExecutionRoleSessionPolicy: "STRING_VALUE",
8889
* // },
8990
* // ],
9091
* // NextToken: "STRING_VALUE",

clients/client-glue/src/commands/GetWorkflowCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ export interface GetWorkflowCommandOutput extends GetWorkflowResponse, __Metadat
159159
* // MaintenanceWindow: "STRING_VALUE",
160160
* // ProfileName: "STRING_VALUE",
161161
* // StateDetail: "STRING_VALUE",
162+
* // ExecutionRoleSessionPolicy: "STRING_VALUE",
162163
* // },
163164
* // ],
164165
* // },
@@ -272,6 +273,7 @@ export interface GetWorkflowCommandOutput extends GetWorkflowResponse, __Metadat
272273
* // MaintenanceWindow: "STRING_VALUE",
273274
* // ProfileName: "STRING_VALUE",
274275
* // StateDetail: "STRING_VALUE",
276+
* // ExecutionRoleSessionPolicy: "STRING_VALUE",
275277
* // },
276278
* // ],
277279
* // },

clients/client-glue/src/commands/GetWorkflowRunCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ export interface GetWorkflowRunCommandOutput extends GetWorkflowRunResponse, __M
152152
* // MaintenanceWindow: "STRING_VALUE",
153153
* // ProfileName: "STRING_VALUE",
154154
* // StateDetail: "STRING_VALUE",
155+
* // ExecutionRoleSessionPolicy: "STRING_VALUE",
155156
* // },
156157
* // ],
157158
* // },

clients/client-glue/src/commands/GetWorkflowRunsCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ export interface GetWorkflowRunsCommandOutput extends GetWorkflowRunsResponse, _
154154
* // MaintenanceWindow: "STRING_VALUE",
155155
* // ProfileName: "STRING_VALUE",
156156
* // StateDetail: "STRING_VALUE",
157+
* // ExecutionRoleSessionPolicy: "STRING_VALUE",
157158
* // },
158159
* // ],
159160
* // },

clients/client-glue/src/commands/StartJobRunCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export interface StartJobRunCommandOutput extends StartJobRunResponse, __Metadat
5252
* WorkerType: "Standard" || "G.1X" || "G.2X" || "G.025X" || "G.4X" || "G.8X" || "Z.2X",
5353
* NumberOfWorkers: Number("int"),
5454
* ExecutionClass: "FLEX" || "STANDARD",
55+
* ExecutionRoleSessionPolicy: "STRING_VALUE",
5556
* };
5657
* const command = new StartJobRunCommand(input);
5758
* const response = await client.send(command);

clients/client-glue/src/models/models_0.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9360,6 +9360,13 @@ export interface JobRun {
93609360
* @public
93619361
*/
93629362
StateDetail?: string | undefined;
9363+
9364+
/**
9365+
* <p>This inline session policy to the StartJobRun API allows you to dynamically restrict the permissions of the specified
9366+
* execution role for the scope of the job, without requiring the creation of additional IAM roles.</p>
9367+
* @public
9368+
*/
9369+
ExecutionRoleSessionPolicy?: string | undefined;
93639370
}
93649371

93659372
/**

clients/client-glue/src/models/models_3.ts

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,6 +1344,13 @@ export interface StartJobRunRequest {
13441344
* @public
13451345
*/
13461346
ExecutionClass?: ExecutionClass | undefined;
1347+
1348+
/**
1349+
* <p>This inline session policy to the StartJobRun API allows you to dynamically restrict the permissions of the specified
1350+
* execution role for the scope of the job, without requiring the creation of additional IAM roles.</p>
1351+
* @public
1352+
*/
1353+
ExecutionRoleSessionPolicy?: string | undefined;
13471354
}
13481355

13491356
/**
@@ -5146,27 +5153,10 @@ export interface JobUpdate {
51465153

51475154
/**
51485155
* <p>The type of predefined worker that is allocated when a job runs. Accepts a value of
5149-
* G.1X, G.2X, G.4X, G.8X or G.025X for Spark jobs. Accepts the value Z.2X for Ray jobs.</p>
5150-
* <ul>
5151-
* <li>
5152-
* <p>For the <code>G.1X</code> worker type, each worker maps to 1 DPU (4 vCPUs, 16 GB of memory) with 94GB disk, and provides 1 executor per worker. We recommend this worker type for workloads such as data transforms, joins, and queries, to offers a scalable and cost effective way to run most jobs.</p>
5153-
* </li>
5154-
* <li>
5155-
* <p>For the <code>G.2X</code> worker type, each worker maps to 2 DPU (8 vCPUs, 32 GB of memory) with 138GB disk, and provides 1 executor per worker. We recommend this worker type for workloads such as data transforms, joins, and queries, to offers a scalable and cost effective way to run most jobs.</p>
5156-
* </li>
5157-
* <li>
5158-
* <p>For the <code>G.4X</code> worker type, each worker maps to 4 DPU (16 vCPUs, 64 GB of memory) with 256GB disk, and provides 1 executor per worker. We recommend this worker type for jobs whose workloads contain your most demanding transforms, aggregations, joins, and queries. This worker type is available only for Glue version 3.0 or later Spark ETL jobs in the following Amazon Web Services Regions: US East (Ohio), US East (N. Virginia), US West (Oregon), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo), Canada (Central), Europe (Frankfurt), Europe (Ireland), and Europe (Stockholm).</p>
5159-
* </li>
5160-
* <li>
5161-
* <p>For the <code>G.8X</code> worker type, each worker maps to 8 DPU (32 vCPUs, 128 GB of memory) with 512GB disk, and provides 1 executor per worker. We recommend this worker type for jobs whose workloads contain your most demanding transforms, aggregations, joins, and queries. This worker type is available only for Glue version 3.0 or later Spark ETL jobs, in the same Amazon Web Services Regions as supported for the <code>G.4X</code> worker type.</p>
5162-
* </li>
5163-
* <li>
5164-
* <p>For the <code>G.025X</code> worker type, each worker maps to 0.25 DPU (2 vCPUs, 4 GB of memory) with 84GB disk, and provides 1 executor per worker. We recommend this worker type for low volume streaming jobs. This worker type is only available for Glue version 3.0 or later streaming jobs.</p>
5165-
* </li>
5166-
* <li>
5167-
* <p>For the <code>Z.2X</code> worker type, each worker maps to 2 M-DPU (8vCPUs, 64 GB of memory) with 128 GB disk, and provides up to 8 Ray workers based on the autoscaler.</p>
5168-
* </li>
5169-
* </ul>
5156+
* G.1X, G.2X, G.4X, G.8X or G.025X for Spark jobs. Accepts the value Z.2X for Ray jobs. For more information, see
5157+
* <a href="https://docs.aws.amazon.com/glue/latest/dg/add-job.html#create-job">Defining job properties for Spark jobs
5158+
* </a>
5159+
* </p>
51705160
* @public
51715161
*/
51725162
WorkerType?: WorkerType | undefined;

clients/client-glue/src/protocols/Aws_json1_1.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12625,6 +12625,7 @@ const se_StartJobRunRequest = (input: StartJobRunRequest, context: __SerdeContex
1262512625
AllocatedCapacity: [],
1262612626
Arguments: _json,
1262712627
ExecutionClass: [],
12628+
ExecutionRoleSessionPolicy: [],
1262812629
JobName: [],
1262912630
JobRunId: [],
1263012631
JobRunQueuingEnabled: [],
@@ -15914,6 +15915,7 @@ const de_JobRun = (output: any, context: __SerdeContext): JobRun => {
1591415915
DPUSeconds: __limitedParseDouble,
1591515916
ErrorMessage: __expectString,
1591615917
ExecutionClass: __expectString,
15918+
ExecutionRoleSessionPolicy: __expectString,
1591715919
ExecutionTime: __expectInt32,
1591815920
GlueVersion: __expectString,
1591915921
Id: __expectString,

0 commit comments

Comments
 (0)