Skip to content

Commit 011ec88

Browse files
author
awstools
committed
feat(client-emr-containers): Adding support for Job templates. Job templates allow you to create and store templates to configure Spark applications parameters. This helps you ensure consistent settings across applications by reusing and enforcing configuration overrides in data pipelines.
1 parent e5d0217 commit 011ec88

17 files changed

+2762
-403
lines changed

clients/client-emr-containers/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
"@aws-sdk/types": "*",
4343
"@aws-sdk/url-parser": "*",
4444
"@aws-sdk/util-base64": "*",
45+
"@aws-sdk/util-base64-browser": "*",
46+
"@aws-sdk/util-base64-node": "*",
4547
"@aws-sdk/util-body-length-browser": "*",
4648
"@aws-sdk/util-body-length-node": "*",
4749
"@aws-sdk/util-defaults-mode-browser": "*",

clients/client-emr-containers/src/EMRContainers.ts

Lines changed: 171 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ import {
66
CancelJobRunCommandInput,
77
CancelJobRunCommandOutput,
88
} from "./commands/CancelJobRunCommand";
9+
import {
10+
CreateJobTemplateCommand,
11+
CreateJobTemplateCommandInput,
12+
CreateJobTemplateCommandOutput,
13+
} from "./commands/CreateJobTemplateCommand";
914
import {
1015
CreateManagedEndpointCommand,
1116
CreateManagedEndpointCommandInput,
@@ -16,6 +21,11 @@ import {
1621
CreateVirtualClusterCommandInput,
1722
CreateVirtualClusterCommandOutput,
1823
} from "./commands/CreateVirtualClusterCommand";
24+
import {
25+
DeleteJobTemplateCommand,
26+
DeleteJobTemplateCommandInput,
27+
DeleteJobTemplateCommandOutput,
28+
} from "./commands/DeleteJobTemplateCommand";
1929
import {
2030
DeleteManagedEndpointCommand,
2131
DeleteManagedEndpointCommandInput,
@@ -31,6 +41,11 @@ import {
3141
DescribeJobRunCommandInput,
3242
DescribeJobRunCommandOutput,
3343
} from "./commands/DescribeJobRunCommand";
44+
import {
45+
DescribeJobTemplateCommand,
46+
DescribeJobTemplateCommandInput,
47+
DescribeJobTemplateCommandOutput,
48+
} from "./commands/DescribeJobTemplateCommand";
3449
import {
3550
DescribeManagedEndpointCommand,
3651
DescribeManagedEndpointCommandInput,
@@ -42,6 +57,11 @@ import {
4257
DescribeVirtualClusterCommandOutput,
4358
} from "./commands/DescribeVirtualClusterCommand";
4459
import { ListJobRunsCommand, ListJobRunsCommandInput, ListJobRunsCommandOutput } from "./commands/ListJobRunsCommand";
60+
import {
61+
ListJobTemplatesCommand,
62+
ListJobTemplatesCommandInput,
63+
ListJobTemplatesCommandOutput,
64+
} from "./commands/ListJobTemplatesCommand";
4565
import {
4666
ListManagedEndpointsCommand,
4767
ListManagedEndpointsCommandInput,
@@ -125,8 +145,43 @@ export class EMRContainers extends EMRContainersClient {
125145
}
126146

127147
/**
128-
* <p>Creates a managed endpoint. A managed endpoint is a gateway that connects EMR Studio to
129-
* Amazon EMR on EKS so that EMR Studio can communicate with your virtual cluster.</p>
148+
* <p>Creates a job template. Job template stores values of StartJobRun API request in a
149+
* template and can be used to start a job run. Job template allows two use cases: avoid
150+
* repeating recurring StartJobRun API request values, enforcing certain values in StartJobRun
151+
* API request.</p>
152+
*/
153+
public createJobTemplate(
154+
args: CreateJobTemplateCommandInput,
155+
options?: __HttpHandlerOptions
156+
): Promise<CreateJobTemplateCommandOutput>;
157+
public createJobTemplate(
158+
args: CreateJobTemplateCommandInput,
159+
cb: (err: any, data?: CreateJobTemplateCommandOutput) => void
160+
): void;
161+
public createJobTemplate(
162+
args: CreateJobTemplateCommandInput,
163+
options: __HttpHandlerOptions,
164+
cb: (err: any, data?: CreateJobTemplateCommandOutput) => void
165+
): void;
166+
public createJobTemplate(
167+
args: CreateJobTemplateCommandInput,
168+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateJobTemplateCommandOutput) => void),
169+
cb?: (err: any, data?: CreateJobTemplateCommandOutput) => void
170+
): Promise<CreateJobTemplateCommandOutput> | void {
171+
const command = new CreateJobTemplateCommand(args);
172+
if (typeof optionsOrCb === "function") {
173+
this.send(command, optionsOrCb);
174+
} else if (typeof cb === "function") {
175+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
176+
this.send(command, optionsOrCb || {}, cb);
177+
} else {
178+
return this.send(command, optionsOrCb);
179+
}
180+
}
181+
182+
/**
183+
* <p>Creates a managed endpoint. A managed endpoint is a gateway that connects EMR Studio
184+
* to Amazon EMR on EKS so that EMR Studio can communicate with your virtual cluster.</p>
130185
*/
131186
public createManagedEndpoint(
132187
args: CreateManagedEndpointCommandInput,
@@ -194,8 +249,44 @@ export class EMRContainers extends EMRContainersClient {
194249
}
195250

196251
/**
197-
* <p>Deletes a managed endpoint. A managed endpoint is a gateway that connects EMR Studio to
198-
* Amazon EMR on EKS so that EMR Studio can communicate with your virtual cluster.</p>
252+
* <p>Deletes a job template. Job template stores values of StartJobRun API request in a
253+
* template and can be used to start a job run. Job template allows two use cases: avoid
254+
* repeating recurring StartJobRun API request values, enforcing certain values in StartJobRun
255+
* API request.</p>
256+
*/
257+
public deleteJobTemplate(
258+
args: DeleteJobTemplateCommandInput,
259+
options?: __HttpHandlerOptions
260+
): Promise<DeleteJobTemplateCommandOutput>;
261+
public deleteJobTemplate(
262+
args: DeleteJobTemplateCommandInput,
263+
cb: (err: any, data?: DeleteJobTemplateCommandOutput) => void
264+
): void;
265+
public deleteJobTemplate(
266+
args: DeleteJobTemplateCommandInput,
267+
options: __HttpHandlerOptions,
268+
cb: (err: any, data?: DeleteJobTemplateCommandOutput) => void
269+
): void;
270+
public deleteJobTemplate(
271+
args: DeleteJobTemplateCommandInput,
272+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteJobTemplateCommandOutput) => void),
273+
cb?: (err: any, data?: DeleteJobTemplateCommandOutput) => void
274+
): Promise<DeleteJobTemplateCommandOutput> | void {
275+
const command = new DeleteJobTemplateCommand(args);
276+
if (typeof optionsOrCb === "function") {
277+
this.send(command, optionsOrCb);
278+
} else if (typeof cb === "function") {
279+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
280+
this.send(command, optionsOrCb || {}, cb);
281+
} else {
282+
return this.send(command, optionsOrCb);
283+
}
284+
}
285+
286+
/**
287+
* <p>Deletes a managed endpoint. A managed endpoint is a gateway
288+
* that connects EMR Studio to Amazon EMR on EKS so that EMR Studio
289+
* can communicate with your virtual cluster.</p>
199290
*/
200291
public deleteManagedEndpoint(
201292
args: DeleteManagedEndpointCommandInput,
@@ -296,9 +387,44 @@ export class EMRContainers extends EMRContainersClient {
296387
}
297388

298389
/**
299-
* <p>Displays detailed information about a managed endpoint. A managed endpoint is a gateway
300-
* that connects EMR Studio to Amazon EMR on EKS so that EMR Studio can communicate with your
301-
* virtual cluster.</p>
390+
* <p>Displays detailed information about a specified job template. Job template stores values
391+
* of StartJobRun API request in a template and can be used to start a job run. Job template
392+
* allows two use cases: avoid repeating recurring StartJobRun API request values, enforcing
393+
* certain values in StartJobRun API request.</p>
394+
*/
395+
public describeJobTemplate(
396+
args: DescribeJobTemplateCommandInput,
397+
options?: __HttpHandlerOptions
398+
): Promise<DescribeJobTemplateCommandOutput>;
399+
public describeJobTemplate(
400+
args: DescribeJobTemplateCommandInput,
401+
cb: (err: any, data?: DescribeJobTemplateCommandOutput) => void
402+
): void;
403+
public describeJobTemplate(
404+
args: DescribeJobTemplateCommandInput,
405+
options: __HttpHandlerOptions,
406+
cb: (err: any, data?: DescribeJobTemplateCommandOutput) => void
407+
): void;
408+
public describeJobTemplate(
409+
args: DescribeJobTemplateCommandInput,
410+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeJobTemplateCommandOutput) => void),
411+
cb?: (err: any, data?: DescribeJobTemplateCommandOutput) => void
412+
): Promise<DescribeJobTemplateCommandOutput> | void {
413+
const command = new DescribeJobTemplateCommand(args);
414+
if (typeof optionsOrCb === "function") {
415+
this.send(command, optionsOrCb);
416+
} else if (typeof cb === "function") {
417+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
418+
this.send(command, optionsOrCb || {}, cb);
419+
} else {
420+
return this.send(command, optionsOrCb);
421+
}
422+
}
423+
424+
/**
425+
* <p>Displays detailed information about a managed endpoint. A managed endpoint is
426+
* a gateway that connects EMR Studio to Amazon EMR on EKS so that EMR Studio can
427+
* communicate with your virtual cluster.</p>
302428
*/
303429
public describeManagedEndpoint(
304430
args: DescribeManagedEndpointCommandInput,
@@ -394,9 +520,44 @@ export class EMRContainers extends EMRContainersClient {
394520
}
395521

396522
/**
397-
* <p>Lists managed endpoints based on a set of parameters. A managed endpoint is a gateway
398-
* that connects EMR Studio to Amazon EMR on EKS so that EMR Studio can communicate with your
399-
* virtual cluster.</p>
523+
* <p>Lists job templates based on a set of parameters. Job template stores values of
524+
* StartJobRun API request in a template and can be used to start a job run. Job template
525+
* allows two use cases: avoid repeating recurring StartJobRun API request values, enforcing
526+
* certain values in StartJobRun API request.</p>
527+
*/
528+
public listJobTemplates(
529+
args: ListJobTemplatesCommandInput,
530+
options?: __HttpHandlerOptions
531+
): Promise<ListJobTemplatesCommandOutput>;
532+
public listJobTemplates(
533+
args: ListJobTemplatesCommandInput,
534+
cb: (err: any, data?: ListJobTemplatesCommandOutput) => void
535+
): void;
536+
public listJobTemplates(
537+
args: ListJobTemplatesCommandInput,
538+
options: __HttpHandlerOptions,
539+
cb: (err: any, data?: ListJobTemplatesCommandOutput) => void
540+
): void;
541+
public listJobTemplates(
542+
args: ListJobTemplatesCommandInput,
543+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListJobTemplatesCommandOutput) => void),
544+
cb?: (err: any, data?: ListJobTemplatesCommandOutput) => void
545+
): Promise<ListJobTemplatesCommandOutput> | void {
546+
const command = new ListJobTemplatesCommand(args);
547+
if (typeof optionsOrCb === "function") {
548+
this.send(command, optionsOrCb);
549+
} else if (typeof cb === "function") {
550+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
551+
this.send(command, optionsOrCb || {}, cb);
552+
} else {
553+
return this.send(command, optionsOrCb);
554+
}
555+
}
556+
557+
/**
558+
* <p>Lists managed endpoints based on a set of parameters. A managed endpoint
559+
* is a gateway that connects EMR Studio to Amazon EMR on EKS so that EMR Studio
560+
* can communicate with your virtual cluster.</p>
400561
*/
401562
public listManagedEndpoints(
402563
args: ListManagedEndpointsCommandInput,

clients/client-emr-containers/src/EMRContainersClient.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ import {
4848
} from "@aws-sdk/types";
4949

5050
import { CancelJobRunCommandInput, CancelJobRunCommandOutput } from "./commands/CancelJobRunCommand";
51+
import { CreateJobTemplateCommandInput, CreateJobTemplateCommandOutput } from "./commands/CreateJobTemplateCommand";
5152
import {
5253
CreateManagedEndpointCommandInput,
5354
CreateManagedEndpointCommandOutput,
@@ -56,6 +57,7 @@ import {
5657
CreateVirtualClusterCommandInput,
5758
CreateVirtualClusterCommandOutput,
5859
} from "./commands/CreateVirtualClusterCommand";
60+
import { DeleteJobTemplateCommandInput, DeleteJobTemplateCommandOutput } from "./commands/DeleteJobTemplateCommand";
5961
import {
6062
DeleteManagedEndpointCommandInput,
6163
DeleteManagedEndpointCommandOutput,
@@ -65,6 +67,10 @@ import {
6567
DeleteVirtualClusterCommandOutput,
6668
} from "./commands/DeleteVirtualClusterCommand";
6769
import { DescribeJobRunCommandInput, DescribeJobRunCommandOutput } from "./commands/DescribeJobRunCommand";
70+
import {
71+
DescribeJobTemplateCommandInput,
72+
DescribeJobTemplateCommandOutput,
73+
} from "./commands/DescribeJobTemplateCommand";
6874
import {
6975
DescribeManagedEndpointCommandInput,
7076
DescribeManagedEndpointCommandOutput,
@@ -74,6 +80,7 @@ import {
7480
DescribeVirtualClusterCommandOutput,
7581
} from "./commands/DescribeVirtualClusterCommand";
7682
import { ListJobRunsCommandInput, ListJobRunsCommandOutput } from "./commands/ListJobRunsCommand";
83+
import { ListJobTemplatesCommandInput, ListJobTemplatesCommandOutput } from "./commands/ListJobTemplatesCommand";
7784
import {
7885
ListManagedEndpointsCommandInput,
7986
ListManagedEndpointsCommandOutput,
@@ -99,14 +106,18 @@ import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
99106

100107
export type ServiceInputTypes =
101108
| CancelJobRunCommandInput
109+
| CreateJobTemplateCommandInput
102110
| CreateManagedEndpointCommandInput
103111
| CreateVirtualClusterCommandInput
112+
| DeleteJobTemplateCommandInput
104113
| DeleteManagedEndpointCommandInput
105114
| DeleteVirtualClusterCommandInput
106115
| DescribeJobRunCommandInput
116+
| DescribeJobTemplateCommandInput
107117
| DescribeManagedEndpointCommandInput
108118
| DescribeVirtualClusterCommandInput
109119
| ListJobRunsCommandInput
120+
| ListJobTemplatesCommandInput
110121
| ListManagedEndpointsCommandInput
111122
| ListTagsForResourceCommandInput
112123
| ListVirtualClustersCommandInput
@@ -116,14 +127,18 @@ export type ServiceInputTypes =
116127

117128
export type ServiceOutputTypes =
118129
| CancelJobRunCommandOutput
130+
| CreateJobTemplateCommandOutput
119131
| CreateManagedEndpointCommandOutput
120132
| CreateVirtualClusterCommandOutput
133+
| DeleteJobTemplateCommandOutput
121134
| DeleteManagedEndpointCommandOutput
122135
| DeleteVirtualClusterCommandOutput
123136
| DescribeJobRunCommandOutput
137+
| DescribeJobTemplateCommandOutput
124138
| DescribeManagedEndpointCommandOutput
125139
| DescribeVirtualClusterCommandOutput
126140
| ListJobRunsCommandOutput
141+
| ListJobTemplatesCommandOutput
127142
| ListManagedEndpointsCommandOutput
128143
| ListTagsForResourceCommandOutput
129144
| ListVirtualClustersCommandOutput

0 commit comments

Comments
 (0)