@aws-sdk/client-emr-containers 3.202.0 → 3.204.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist-cjs/EMRContainers.js +60 -0
  2. package/dist-cjs/commands/CreateJobTemplateCommand.js +46 -0
  3. package/dist-cjs/commands/DeleteJobTemplateCommand.js +46 -0
  4. package/dist-cjs/commands/DescribeJobTemplateCommand.js +46 -0
  5. package/dist-cjs/commands/ListJobTemplatesCommand.js +46 -0
  6. package/dist-cjs/commands/index.js +4 -0
  7. package/dist-cjs/models/models_0.js +102 -26
  8. package/dist-cjs/pagination/ListJobTemplatesPaginator.js +36 -0
  9. package/dist-cjs/pagination/index.js +1 -0
  10. package/dist-cjs/protocols/Aws_restJson1.js +424 -1
  11. package/dist-cjs/runtimeConfig.browser.js +0 -3
  12. package/dist-cjs/runtimeConfig.js +0 -3
  13. package/dist-cjs/runtimeConfig.shared.js +3 -0
  14. package/dist-es/EMRContainers.js +60 -0
  15. package/dist-es/commands/CreateJobTemplateCommand.js +42 -0
  16. package/dist-es/commands/DeleteJobTemplateCommand.js +42 -0
  17. package/dist-es/commands/DescribeJobTemplateCommand.js +42 -0
  18. package/dist-es/commands/ListJobTemplatesCommand.js +42 -0
  19. package/dist-es/commands/index.js +4 -0
  20. package/dist-es/models/models_0.js +82 -21
  21. package/dist-es/pagination/ListJobTemplatesPaginator.js +32 -0
  22. package/dist-es/pagination/index.js +1 -0
  23. package/dist-es/protocols/Aws_restJson1.js +415 -0
  24. package/dist-es/runtimeConfig.browser.js +0 -3
  25. package/dist-es/runtimeConfig.js +0 -3
  26. package/dist-es/runtimeConfig.shared.js +3 -0
  27. package/dist-types/EMRContainers.d.ts +51 -10
  28. package/dist-types/EMRContainersClient.d.ts +6 -2
  29. package/dist-types/commands/CreateJobTemplateCommand.d.ts +40 -0
  30. package/dist-types/commands/CreateManagedEndpointCommand.d.ts +2 -2
  31. package/dist-types/commands/DeleteJobTemplateCommand.d.ts +40 -0
  32. package/dist-types/commands/DeleteManagedEndpointCommand.d.ts +3 -2
  33. package/dist-types/commands/DescribeJobTemplateCommand.d.ts +40 -0
  34. package/dist-types/commands/DescribeManagedEndpointCommand.d.ts +3 -3
  35. package/dist-types/commands/ListJobTemplatesCommand.d.ts +40 -0
  36. package/dist-types/commands/ListManagedEndpointsCommand.d.ts +3 -3
  37. package/dist-types/commands/index.d.ts +4 -0
  38. package/dist-types/models/models_0.d.ts +382 -69
  39. package/dist-types/pagination/ListJobTemplatesPaginator.d.ts +4 -0
  40. package/dist-types/pagination/index.d.ts +1 -0
  41. package/dist-types/protocols/Aws_restJson1.d.ts +12 -0
  42. package/dist-types/runtimeConfig.browser.d.ts +2 -2
  43. package/dist-types/runtimeConfig.d.ts +2 -2
  44. package/dist-types/runtimeConfig.shared.d.ts +2 -0
  45. package/dist-types/ts3.4/EMRContainers.d.ts +68 -0
  46. package/dist-types/ts3.4/EMRContainersClient.d.ts +24 -0
  47. package/dist-types/ts3.4/commands/CreateJobTemplateCommand.d.ts +38 -0
  48. package/dist-types/ts3.4/commands/DeleteJobTemplateCommand.d.ts +38 -0
  49. package/dist-types/ts3.4/commands/DescribeJobTemplateCommand.d.ts +38 -0
  50. package/dist-types/ts3.4/commands/ListJobTemplatesCommand.d.ts +37 -0
  51. package/dist-types/ts3.4/commands/index.d.ts +4 -0
  52. package/dist-types/ts3.4/models/models_0.d.ts +152 -29
  53. package/dist-types/ts3.4/pagination/ListJobTemplatesPaginator.d.ts +11 -0
  54. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  55. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +48 -0
  56. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -2
  57. package/dist-types/ts3.4/runtimeConfig.d.ts +2 -2
  58. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +2 -0
  59. package/package.json +5 -4
  60. package/CHANGELOG.md +0 -1266
@@ -21,6 +21,32 @@ export const serializeAws_restJson1CancelJobRunCommand = async (input, context)
21
21
  body,
22
22
  });
23
23
  };
24
+ export const serializeAws_restJson1CreateJobTemplateCommand = async (input, context) => {
25
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
26
+ const headers = {
27
+ "content-type": "application/json",
28
+ };
29
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobtemplates";
30
+ let body;
31
+ body = JSON.stringify({
32
+ clientToken: input.clientToken ?? generateIdempotencyToken(),
33
+ ...(input.jobTemplateData != null && {
34
+ jobTemplateData: serializeAws_restJson1JobTemplateData(input.jobTemplateData, context),
35
+ }),
36
+ ...(input.kmsKeyArn != null && { kmsKeyArn: input.kmsKeyArn }),
37
+ ...(input.name != null && { name: input.name }),
38
+ ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
39
+ });
40
+ return new __HttpRequest({
41
+ protocol,
42
+ hostname,
43
+ port,
44
+ method: "POST",
45
+ headers,
46
+ path: resolvedPath,
47
+ body,
48
+ });
49
+ };
24
50
  export const serializeAws_restJson1CreateManagedEndpointCommand = async (input, context) => {
25
51
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
26
52
  const headers = {
@@ -77,6 +103,22 @@ export const serializeAws_restJson1CreateVirtualClusterCommand = async (input, c
77
103
  body,
78
104
  });
79
105
  };
106
+ export const serializeAws_restJson1DeleteJobTemplateCommand = async (input, context) => {
107
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
108
+ const headers = {};
109
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobtemplates/{id}";
110
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
111
+ let body;
112
+ return new __HttpRequest({
113
+ protocol,
114
+ hostname,
115
+ port,
116
+ method: "DELETE",
117
+ headers,
118
+ path: resolvedPath,
119
+ body,
120
+ });
121
+ };
80
122
  export const serializeAws_restJson1DeleteManagedEndpointCommand = async (input, context) => {
81
123
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
82
124
  const headers = {};
@@ -129,6 +171,22 @@ export const serializeAws_restJson1DescribeJobRunCommand = async (input, context
129
171
  body,
130
172
  });
131
173
  };
174
+ export const serializeAws_restJson1DescribeJobTemplateCommand = async (input, context) => {
175
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
176
+ const headers = {};
177
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobtemplates/{id}";
178
+ resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
179
+ let body;
180
+ return new __HttpRequest({
181
+ protocol,
182
+ hostname,
183
+ port,
184
+ method: "GET",
185
+ headers,
186
+ path: resolvedPath,
187
+ body,
188
+ });
189
+ };
132
190
  export const serializeAws_restJson1DescribeManagedEndpointCommand = async (input, context) => {
133
191
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
134
192
  const headers = {};
@@ -195,6 +253,34 @@ export const serializeAws_restJson1ListJobRunsCommand = async (input, context) =
195
253
  body,
196
254
  });
197
255
  };
256
+ export const serializeAws_restJson1ListJobTemplatesCommand = async (input, context) => {
257
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
258
+ const headers = {};
259
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/jobtemplates";
260
+ const query = map({
261
+ createdAfter: [
262
+ () => input.createdAfter !== void 0,
263
+ () => (input.createdAfter.toISOString().split(".")[0] + "Z").toString(),
264
+ ],
265
+ createdBefore: [
266
+ () => input.createdBefore !== void 0,
267
+ () => (input.createdBefore.toISOString().split(".")[0] + "Z").toString(),
268
+ ],
269
+ maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
270
+ nextToken: [, input.nextToken],
271
+ });
272
+ let body;
273
+ return new __HttpRequest({
274
+ protocol,
275
+ hostname,
276
+ port,
277
+ method: "GET",
278
+ headers,
279
+ path: resolvedPath,
280
+ query,
281
+ body,
282
+ });
283
+ };
198
284
  export const serializeAws_restJson1ListManagedEndpointsCommand = async (input, context) => {
199
285
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
200
286
  const headers = {};
@@ -290,6 +376,10 @@ export const serializeAws_restJson1StartJobRunCommand = async (input, context) =
290
376
  }),
291
377
  ...(input.executionRoleArn != null && { executionRoleArn: input.executionRoleArn }),
292
378
  ...(input.jobDriver != null && { jobDriver: serializeAws_restJson1JobDriver(input.jobDriver, context) }),
379
+ ...(input.jobTemplateId != null && { jobTemplateId: input.jobTemplateId }),
380
+ ...(input.jobTemplateParameters != null && {
381
+ jobTemplateParameters: serializeAws_restJson1TemplateParameterInputMap(input.jobTemplateParameters, context),
382
+ }),
293
383
  ...(input.name != null && { name: input.name }),
294
384
  ...(input.releaseLabel != null && { releaseLabel: input.releaseLabel }),
295
385
  ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
@@ -384,6 +474,54 @@ const deserializeAws_restJson1CancelJobRunCommandError = async (output, context)
384
474
  });
385
475
  }
386
476
  };
477
+ export const deserializeAws_restJson1CreateJobTemplateCommand = async (output, context) => {
478
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
479
+ return deserializeAws_restJson1CreateJobTemplateCommandError(output, context);
480
+ }
481
+ const contents = map({
482
+ $metadata: deserializeMetadata(output),
483
+ });
484
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
485
+ if (data.arn != null) {
486
+ contents.arn = __expectString(data.arn);
487
+ }
488
+ if (data.createdAt != null) {
489
+ contents.createdAt = __expectNonNull(__parseRfc3339DateTime(data.createdAt));
490
+ }
491
+ if (data.id != null) {
492
+ contents.id = __expectString(data.id);
493
+ }
494
+ if (data.name != null) {
495
+ contents.name = __expectString(data.name);
496
+ }
497
+ return contents;
498
+ };
499
+ const deserializeAws_restJson1CreateJobTemplateCommandError = async (output, context) => {
500
+ const parsedOutput = {
501
+ ...output,
502
+ body: await parseErrorBody(output.body, context),
503
+ };
504
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
505
+ switch (errorCode) {
506
+ case "InternalServerException":
507
+ case "com.amazonaws.emrcontainers#InternalServerException":
508
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
509
+ case "ResourceNotFoundException":
510
+ case "com.amazonaws.emrcontainers#ResourceNotFoundException":
511
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
512
+ case "ValidationException":
513
+ case "com.amazonaws.emrcontainers#ValidationException":
514
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
515
+ default:
516
+ const parsedBody = parsedOutput.body;
517
+ throwDefaultError({
518
+ output,
519
+ parsedBody,
520
+ exceptionCtor: __BaseException,
521
+ errorCode,
522
+ });
523
+ }
524
+ };
387
525
  export const deserializeAws_restJson1CreateManagedEndpointCommand = async (output, context) => {
388
526
  if (output.statusCode !== 200 && output.statusCode >= 300) {
389
527
  return deserializeAws_restJson1CreateManagedEndpointCommandError(output, context);
@@ -477,6 +615,42 @@ const deserializeAws_restJson1CreateVirtualClusterCommandError = async (output,
477
615
  });
478
616
  }
479
617
  };
618
+ export const deserializeAws_restJson1DeleteJobTemplateCommand = async (output, context) => {
619
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
620
+ return deserializeAws_restJson1DeleteJobTemplateCommandError(output, context);
621
+ }
622
+ const contents = map({
623
+ $metadata: deserializeMetadata(output),
624
+ });
625
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
626
+ if (data.id != null) {
627
+ contents.id = __expectString(data.id);
628
+ }
629
+ return contents;
630
+ };
631
+ const deserializeAws_restJson1DeleteJobTemplateCommandError = async (output, context) => {
632
+ const parsedOutput = {
633
+ ...output,
634
+ body: await parseErrorBody(output.body, context),
635
+ };
636
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
637
+ switch (errorCode) {
638
+ case "InternalServerException":
639
+ case "com.amazonaws.emrcontainers#InternalServerException":
640
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
641
+ case "ValidationException":
642
+ case "com.amazonaws.emrcontainers#ValidationException":
643
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
644
+ default:
645
+ const parsedBody = parsedOutput.body;
646
+ throwDefaultError({
647
+ output,
648
+ parsedBody,
649
+ exceptionCtor: __BaseException,
650
+ errorCode,
651
+ });
652
+ }
653
+ };
480
654
  export const deserializeAws_restJson1DeleteManagedEndpointCommand = async (output, context) => {
481
655
  if (output.statusCode !== 200 && output.statusCode >= 300) {
482
656
  return deserializeAws_restJson1DeleteManagedEndpointCommandError(output, context);
@@ -591,6 +765,45 @@ const deserializeAws_restJson1DescribeJobRunCommandError = async (output, contex
591
765
  });
592
766
  }
593
767
  };
768
+ export const deserializeAws_restJson1DescribeJobTemplateCommand = async (output, context) => {
769
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
770
+ return deserializeAws_restJson1DescribeJobTemplateCommandError(output, context);
771
+ }
772
+ const contents = map({
773
+ $metadata: deserializeMetadata(output),
774
+ });
775
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
776
+ if (data.jobTemplate != null) {
777
+ contents.jobTemplate = deserializeAws_restJson1JobTemplate(data.jobTemplate, context);
778
+ }
779
+ return contents;
780
+ };
781
+ const deserializeAws_restJson1DescribeJobTemplateCommandError = async (output, context) => {
782
+ const parsedOutput = {
783
+ ...output,
784
+ body: await parseErrorBody(output.body, context),
785
+ };
786
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
787
+ switch (errorCode) {
788
+ case "InternalServerException":
789
+ case "com.amazonaws.emrcontainers#InternalServerException":
790
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
791
+ case "ResourceNotFoundException":
792
+ case "com.amazonaws.emrcontainers#ResourceNotFoundException":
793
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
794
+ case "ValidationException":
795
+ case "com.amazonaws.emrcontainers#ValidationException":
796
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
797
+ default:
798
+ const parsedBody = parsedOutput.body;
799
+ throwDefaultError({
800
+ output,
801
+ parsedBody,
802
+ exceptionCtor: __BaseException,
803
+ errorCode,
804
+ });
805
+ }
806
+ };
594
807
  export const deserializeAws_restJson1DescribeManagedEndpointCommand = async (output, context) => {
595
808
  if (output.statusCode !== 200 && output.statusCode >= 300) {
596
809
  return deserializeAws_restJson1DescribeManagedEndpointCommandError(output, context);
@@ -708,6 +921,45 @@ const deserializeAws_restJson1ListJobRunsCommandError = async (output, context)
708
921
  });
709
922
  }
710
923
  };
924
+ export const deserializeAws_restJson1ListJobTemplatesCommand = async (output, context) => {
925
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
926
+ return deserializeAws_restJson1ListJobTemplatesCommandError(output, context);
927
+ }
928
+ const contents = map({
929
+ $metadata: deserializeMetadata(output),
930
+ });
931
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
932
+ if (data.nextToken != null) {
933
+ contents.nextToken = __expectString(data.nextToken);
934
+ }
935
+ if (data.templates != null) {
936
+ contents.templates = deserializeAws_restJson1JobTemplates(data.templates, context);
937
+ }
938
+ return contents;
939
+ };
940
+ const deserializeAws_restJson1ListJobTemplatesCommandError = async (output, context) => {
941
+ const parsedOutput = {
942
+ ...output,
943
+ body: await parseErrorBody(output.body, context),
944
+ };
945
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
946
+ switch (errorCode) {
947
+ case "InternalServerException":
948
+ case "com.amazonaws.emrcontainers#InternalServerException":
949
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
950
+ case "ValidationException":
951
+ case "com.amazonaws.emrcontainers#ValidationException":
952
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
953
+ default:
954
+ const parsedBody = parsedOutput.body;
955
+ throwDefaultError({
956
+ output,
957
+ parsedBody,
958
+ exceptionCtor: __BaseException,
959
+ errorCode,
960
+ });
961
+ }
962
+ };
711
963
  export const deserializeAws_restJson1ListManagedEndpointsCommand = async (output, context) => {
712
964
  if (output.statusCode !== 200 && output.statusCode >= 300) {
713
965
  return deserializeAws_restJson1ListManagedEndpointsCommandError(output, context);
@@ -1051,6 +1303,20 @@ const serializeAws_restJson1JobDriver = (input, context) => {
1051
1303
  }),
1052
1304
  };
1053
1305
  };
1306
+ const serializeAws_restJson1JobTemplateData = (input, context) => {
1307
+ return {
1308
+ ...(input.configurationOverrides != null && {
1309
+ configurationOverrides: serializeAws_restJson1ParametricConfigurationOverrides(input.configurationOverrides, context),
1310
+ }),
1311
+ ...(input.executionRoleArn != null && { executionRoleArn: input.executionRoleArn }),
1312
+ ...(input.jobDriver != null && { jobDriver: serializeAws_restJson1JobDriver(input.jobDriver, context) }),
1313
+ ...(input.jobTags != null && { jobTags: serializeAws_restJson1TagMap(input.jobTags, context) }),
1314
+ ...(input.parameterConfiguration != null && {
1315
+ parameterConfiguration: serializeAws_restJson1TemplateParameterConfigurationMap(input.parameterConfiguration, context),
1316
+ }),
1317
+ ...(input.releaseLabel != null && { releaseLabel: input.releaseLabel }),
1318
+ };
1319
+ };
1054
1320
  const serializeAws_restJson1MonitoringConfiguration = (input, context) => {
1055
1321
  return {
1056
1322
  ...(input.cloudWatchMonitoringConfiguration != null && {
@@ -1062,6 +1328,38 @@ const serializeAws_restJson1MonitoringConfiguration = (input, context) => {
1062
1328
  }),
1063
1329
  };
1064
1330
  };
1331
+ const serializeAws_restJson1ParametricCloudWatchMonitoringConfiguration = (input, context) => {
1332
+ return {
1333
+ ...(input.logGroupName != null && { logGroupName: input.logGroupName }),
1334
+ ...(input.logStreamNamePrefix != null && { logStreamNamePrefix: input.logStreamNamePrefix }),
1335
+ };
1336
+ };
1337
+ const serializeAws_restJson1ParametricConfigurationOverrides = (input, context) => {
1338
+ return {
1339
+ ...(input.applicationConfiguration != null && {
1340
+ applicationConfiguration: serializeAws_restJson1ConfigurationList(input.applicationConfiguration, context),
1341
+ }),
1342
+ ...(input.monitoringConfiguration != null && {
1343
+ monitoringConfiguration: serializeAws_restJson1ParametricMonitoringConfiguration(input.monitoringConfiguration, context),
1344
+ }),
1345
+ };
1346
+ };
1347
+ const serializeAws_restJson1ParametricMonitoringConfiguration = (input, context) => {
1348
+ return {
1349
+ ...(input.cloudWatchMonitoringConfiguration != null && {
1350
+ cloudWatchMonitoringConfiguration: serializeAws_restJson1ParametricCloudWatchMonitoringConfiguration(input.cloudWatchMonitoringConfiguration, context),
1351
+ }),
1352
+ ...(input.persistentAppUI != null && { persistentAppUI: input.persistentAppUI }),
1353
+ ...(input.s3MonitoringConfiguration != null && {
1354
+ s3MonitoringConfiguration: serializeAws_restJson1ParametricS3MonitoringConfiguration(input.s3MonitoringConfiguration, context),
1355
+ }),
1356
+ };
1357
+ };
1358
+ const serializeAws_restJson1ParametricS3MonitoringConfiguration = (input, context) => {
1359
+ return {
1360
+ ...(input.logUri != null && { logUri: input.logUri }),
1361
+ };
1362
+ };
1065
1363
  const serializeAws_restJson1S3MonitoringConfiguration = (input, context) => {
1066
1364
  return {
1067
1365
  ...(input.logUri != null && { logUri: input.logUri }),
@@ -1104,6 +1402,34 @@ const serializeAws_restJson1TagMap = (input, context) => {
1104
1402
  };
1105
1403
  }, {});
1106
1404
  };
1405
+ const serializeAws_restJson1TemplateParameterConfiguration = (input, context) => {
1406
+ return {
1407
+ ...(input.defaultValue != null && { defaultValue: input.defaultValue }),
1408
+ ...(input.type != null && { type: input.type }),
1409
+ };
1410
+ };
1411
+ const serializeAws_restJson1TemplateParameterConfigurationMap = (input, context) => {
1412
+ return Object.entries(input).reduce((acc, [key, value]) => {
1413
+ if (value === null) {
1414
+ return acc;
1415
+ }
1416
+ return {
1417
+ ...acc,
1418
+ [key]: serializeAws_restJson1TemplateParameterConfiguration(value, context),
1419
+ };
1420
+ }, {});
1421
+ };
1422
+ const serializeAws_restJson1TemplateParameterInputMap = (input, context) => {
1423
+ return Object.entries(input).reduce((acc, [key, value]) => {
1424
+ if (value === null) {
1425
+ return acc;
1426
+ }
1427
+ return {
1428
+ ...acc,
1429
+ [key]: value,
1430
+ };
1431
+ }, {});
1432
+ };
1107
1433
  const deserializeAws_restJson1Certificate = (output, context) => {
1108
1434
  return {
1109
1435
  certificateArn: __expectString(output.certificateArn),
@@ -1259,6 +1585,46 @@ const deserializeAws_restJson1JobRuns = (output, context) => {
1259
1585
  });
1260
1586
  return retVal;
1261
1587
  };
1588
+ const deserializeAws_restJson1JobTemplate = (output, context) => {
1589
+ return {
1590
+ arn: __expectString(output.arn),
1591
+ createdAt: output.createdAt != null ? __expectNonNull(__parseRfc3339DateTime(output.createdAt)) : undefined,
1592
+ createdBy: __expectString(output.createdBy),
1593
+ decryptionError: __expectString(output.decryptionError),
1594
+ id: __expectString(output.id),
1595
+ jobTemplateData: output.jobTemplateData != null
1596
+ ? deserializeAws_restJson1JobTemplateData(output.jobTemplateData, context)
1597
+ : undefined,
1598
+ kmsKeyArn: __expectString(output.kmsKeyArn),
1599
+ name: __expectString(output.name),
1600
+ tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
1601
+ };
1602
+ };
1603
+ const deserializeAws_restJson1JobTemplateData = (output, context) => {
1604
+ return {
1605
+ configurationOverrides: output.configurationOverrides != null
1606
+ ? deserializeAws_restJson1ParametricConfigurationOverrides(output.configurationOverrides, context)
1607
+ : undefined,
1608
+ executionRoleArn: __expectString(output.executionRoleArn),
1609
+ jobDriver: output.jobDriver != null ? deserializeAws_restJson1JobDriver(output.jobDriver, context) : undefined,
1610
+ jobTags: output.jobTags != null ? deserializeAws_restJson1TagMap(output.jobTags, context) : undefined,
1611
+ parameterConfiguration: output.parameterConfiguration != null
1612
+ ? deserializeAws_restJson1TemplateParameterConfigurationMap(output.parameterConfiguration, context)
1613
+ : undefined,
1614
+ releaseLabel: __expectString(output.releaseLabel),
1615
+ };
1616
+ };
1617
+ const deserializeAws_restJson1JobTemplates = (output, context) => {
1618
+ const retVal = (output || [])
1619
+ .filter((e) => e != null)
1620
+ .map((entry) => {
1621
+ if (entry === null) {
1622
+ return null;
1623
+ }
1624
+ return deserializeAws_restJson1JobTemplate(entry, context);
1625
+ });
1626
+ return retVal;
1627
+ };
1262
1628
  const deserializeAws_restJson1MonitoringConfiguration = (output, context) => {
1263
1629
  return {
1264
1630
  cloudWatchMonitoringConfiguration: output.cloudWatchMonitoringConfiguration != null
@@ -1270,6 +1636,38 @@ const deserializeAws_restJson1MonitoringConfiguration = (output, context) => {
1270
1636
  : undefined,
1271
1637
  };
1272
1638
  };
1639
+ const deserializeAws_restJson1ParametricCloudWatchMonitoringConfiguration = (output, context) => {
1640
+ return {
1641
+ logGroupName: __expectString(output.logGroupName),
1642
+ logStreamNamePrefix: __expectString(output.logStreamNamePrefix),
1643
+ };
1644
+ };
1645
+ const deserializeAws_restJson1ParametricConfigurationOverrides = (output, context) => {
1646
+ return {
1647
+ applicationConfiguration: output.applicationConfiguration != null
1648
+ ? deserializeAws_restJson1ConfigurationList(output.applicationConfiguration, context)
1649
+ : undefined,
1650
+ monitoringConfiguration: output.monitoringConfiguration != null
1651
+ ? deserializeAws_restJson1ParametricMonitoringConfiguration(output.monitoringConfiguration, context)
1652
+ : undefined,
1653
+ };
1654
+ };
1655
+ const deserializeAws_restJson1ParametricMonitoringConfiguration = (output, context) => {
1656
+ return {
1657
+ cloudWatchMonitoringConfiguration: output.cloudWatchMonitoringConfiguration != null
1658
+ ? deserializeAws_restJson1ParametricCloudWatchMonitoringConfiguration(output.cloudWatchMonitoringConfiguration, context)
1659
+ : undefined,
1660
+ persistentAppUI: __expectString(output.persistentAppUI),
1661
+ s3MonitoringConfiguration: output.s3MonitoringConfiguration != null
1662
+ ? deserializeAws_restJson1ParametricS3MonitoringConfiguration(output.s3MonitoringConfiguration, context)
1663
+ : undefined,
1664
+ };
1665
+ };
1666
+ const deserializeAws_restJson1ParametricS3MonitoringConfiguration = (output, context) => {
1667
+ return {
1668
+ logUri: __expectString(output.logUri),
1669
+ };
1670
+ };
1273
1671
  const deserializeAws_restJson1S3MonitoringConfiguration = (output, context) => {
1274
1672
  return {
1275
1673
  logUri: __expectString(output.logUri),
@@ -1323,6 +1721,23 @@ const deserializeAws_restJson1TagMap = (output, context) => {
1323
1721
  };
1324
1722
  }, {});
1325
1723
  };
1724
+ const deserializeAws_restJson1TemplateParameterConfiguration = (output, context) => {
1725
+ return {
1726
+ defaultValue: __expectString(output.defaultValue),
1727
+ type: __expectString(output.type),
1728
+ };
1729
+ };
1730
+ const deserializeAws_restJson1TemplateParameterConfigurationMap = (output, context) => {
1731
+ return Object.entries(output).reduce((acc, [key, value]) => {
1732
+ if (value === null) {
1733
+ return acc;
1734
+ }
1735
+ return {
1736
+ ...acc,
1737
+ [key]: deserializeAws_restJson1TemplateParameterConfiguration(value, context),
1738
+ };
1739
+ }, {});
1740
+ };
1326
1741
  const deserializeAws_restJson1VirtualCluster = (output, context) => {
1327
1742
  return {
1328
1743
  arn: __expectString(output.arn),
@@ -4,7 +4,6 @@ import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-
4
4
  import { FetchHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
5
5
  import { invalidProvider } from "@aws-sdk/invalid-dependency";
6
6
  import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
7
- import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
8
7
  import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
9
8
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
10
9
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
@@ -20,8 +19,6 @@ export const getRuntimeConfig = (config) => {
20
19
  ...config,
21
20
  runtime: "browser",
22
21
  defaultsMode,
23
- base64Decoder: config?.base64Decoder ?? fromBase64,
24
- base64Encoder: config?.base64Encoder ?? toBase64,
25
22
  bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
26
23
  credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
27
24
  defaultUserAgentProvider: config?.defaultUserAgentProvider ??
@@ -6,7 +6,6 @@ import { Hash } from "@aws-sdk/hash-node";
6
6
  import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@aws-sdk/middleware-retry";
7
7
  import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
8
8
  import { NodeHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/node-http-handler";
9
- import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
10
9
  import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
11
10
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
12
11
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
@@ -24,8 +23,6 @@ export const getRuntimeConfig = (config) => {
24
23
  ...config,
25
24
  runtime: "node",
26
25
  defaultsMode,
27
- base64Decoder: config?.base64Decoder ?? fromBase64,
28
- base64Encoder: config?.base64Encoder ?? toBase64,
29
26
  bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
30
27
  credentialDefaultProvider: config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider),
31
28
  defaultUserAgentProvider: config?.defaultUserAgentProvider ??
@@ -1,7 +1,10 @@
1
1
  import { parseUrl } from "@aws-sdk/url-parser";
2
+ import { fromBase64, toBase64 } from "@aws-sdk/util-base64";
2
3
  import { defaultEndpointResolver } from "./endpoint/endpointResolver";
3
4
  export const getRuntimeConfig = (config) => ({
4
5
  apiVersion: "2020-10-01",
6
+ base64Decoder: config?.base64Decoder ?? fromBase64,
7
+ base64Encoder: config?.base64Encoder ?? toBase64,
5
8
  disableHostPrefix: config?.disableHostPrefix ?? false,
6
9
  endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
7
10
  logger: config?.logger ?? {},
@@ -1,13 +1,17 @@
1
1
  import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
2
2
  import { CancelJobRunCommandInput, CancelJobRunCommandOutput } from "./commands/CancelJobRunCommand";
3
+ import { CreateJobTemplateCommandInput, CreateJobTemplateCommandOutput } from "./commands/CreateJobTemplateCommand";
3
4
  import { CreateManagedEndpointCommandInput, CreateManagedEndpointCommandOutput } from "./commands/CreateManagedEndpointCommand";
4
5
  import { CreateVirtualClusterCommandInput, CreateVirtualClusterCommandOutput } from "./commands/CreateVirtualClusterCommand";
6
+ import { DeleteJobTemplateCommandInput, DeleteJobTemplateCommandOutput } from "./commands/DeleteJobTemplateCommand";
5
7
  import { DeleteManagedEndpointCommandInput, DeleteManagedEndpointCommandOutput } from "./commands/DeleteManagedEndpointCommand";
6
8
  import { DeleteVirtualClusterCommandInput, DeleteVirtualClusterCommandOutput } from "./commands/DeleteVirtualClusterCommand";
7
9
  import { DescribeJobRunCommandInput, DescribeJobRunCommandOutput } from "./commands/DescribeJobRunCommand";
10
+ import { DescribeJobTemplateCommandInput, DescribeJobTemplateCommandOutput } from "./commands/DescribeJobTemplateCommand";
8
11
  import { DescribeManagedEndpointCommandInput, DescribeManagedEndpointCommandOutput } from "./commands/DescribeManagedEndpointCommand";
9
12
  import { DescribeVirtualClusterCommandInput, DescribeVirtualClusterCommandOutput } from "./commands/DescribeVirtualClusterCommand";
10
13
  import { ListJobRunsCommandInput, ListJobRunsCommandOutput } from "./commands/ListJobRunsCommand";
14
+ import { ListJobTemplatesCommandInput, ListJobTemplatesCommandOutput } from "./commands/ListJobTemplatesCommand";
11
15
  import { ListManagedEndpointsCommandInput, ListManagedEndpointsCommandOutput } from "./commands/ListManagedEndpointsCommand";
12
16
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
13
17
  import { ListVirtualClustersCommandInput, ListVirtualClustersCommandOutput } from "./commands/ListVirtualClustersCommand";
@@ -51,8 +55,17 @@ export declare class EMRContainers extends EMRContainersClient {
51
55
  cancelJobRun(args: CancelJobRunCommandInput, cb: (err: any, data?: CancelJobRunCommandOutput) => void): void;
52
56
  cancelJobRun(args: CancelJobRunCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CancelJobRunCommandOutput) => void): void;
53
57
  /**
54
- * <p>Creates a managed endpoint. A managed endpoint is a gateway that connects EMR Studio to
55
- * Amazon EMR on EKS so that EMR Studio can communicate with your virtual cluster.</p>
58
+ * <p>Creates a job template. Job template stores values of StartJobRun API request in a
59
+ * template and can be used to start a job run. Job template allows two use cases: avoid
60
+ * repeating recurring StartJobRun API request values, enforcing certain values in StartJobRun
61
+ * API request.</p>
62
+ */
63
+ createJobTemplate(args: CreateJobTemplateCommandInput, options?: __HttpHandlerOptions): Promise<CreateJobTemplateCommandOutput>;
64
+ createJobTemplate(args: CreateJobTemplateCommandInput, cb: (err: any, data?: CreateJobTemplateCommandOutput) => void): void;
65
+ createJobTemplate(args: CreateJobTemplateCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateJobTemplateCommandOutput) => void): void;
66
+ /**
67
+ * <p>Creates a managed endpoint. A managed endpoint is a gateway that connects EMR Studio
68
+ * to Amazon EMR on EKS so that EMR Studio can communicate with your virtual cluster.</p>
56
69
  */
57
70
  createManagedEndpoint(args: CreateManagedEndpointCommandInput, options?: __HttpHandlerOptions): Promise<CreateManagedEndpointCommandOutput>;
58
71
  createManagedEndpoint(args: CreateManagedEndpointCommandInput, cb: (err: any, data?: CreateManagedEndpointCommandOutput) => void): void;
@@ -68,8 +81,18 @@ export declare class EMRContainers extends EMRContainersClient {
68
81
  createVirtualCluster(args: CreateVirtualClusterCommandInput, cb: (err: any, data?: CreateVirtualClusterCommandOutput) => void): void;
69
82
  createVirtualCluster(args: CreateVirtualClusterCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateVirtualClusterCommandOutput) => void): void;
70
83
  /**
71
- * <p>Deletes a managed endpoint. A managed endpoint is a gateway that connects EMR Studio to
72
- * Amazon EMR on EKS so that EMR Studio can communicate with your virtual cluster.</p>
84
+ * <p>Deletes a job template. Job template stores values of StartJobRun API request in a
85
+ * template and can be used to start a job run. Job template allows two use cases: avoid
86
+ * repeating recurring StartJobRun API request values, enforcing certain values in StartJobRun
87
+ * API request.</p>
88
+ */
89
+ deleteJobTemplate(args: DeleteJobTemplateCommandInput, options?: __HttpHandlerOptions): Promise<DeleteJobTemplateCommandOutput>;
90
+ deleteJobTemplate(args: DeleteJobTemplateCommandInput, cb: (err: any, data?: DeleteJobTemplateCommandOutput) => void): void;
91
+ deleteJobTemplate(args: DeleteJobTemplateCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteJobTemplateCommandOutput) => void): void;
92
+ /**
93
+ * <p>Deletes a managed endpoint. A managed endpoint is a gateway
94
+ * that connects EMR Studio to Amazon EMR on EKS so that EMR Studio
95
+ * can communicate with your virtual cluster.</p>
73
96
  */
74
97
  deleteManagedEndpoint(args: DeleteManagedEndpointCommandInput, options?: __HttpHandlerOptions): Promise<DeleteManagedEndpointCommandOutput>;
75
98
  deleteManagedEndpoint(args: DeleteManagedEndpointCommandInput, cb: (err: any, data?: DeleteManagedEndpointCommandOutput) => void): void;
@@ -92,9 +115,18 @@ export declare class EMRContainers extends EMRContainersClient {
92
115
  describeJobRun(args: DescribeJobRunCommandInput, cb: (err: any, data?: DescribeJobRunCommandOutput) => void): void;
93
116
  describeJobRun(args: DescribeJobRunCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeJobRunCommandOutput) => void): void;
94
117
  /**
95
- * <p>Displays detailed information about a managed endpoint. A managed endpoint is a gateway
96
- * that connects EMR Studio to Amazon EMR on EKS so that EMR Studio can communicate with your
97
- * virtual cluster.</p>
118
+ * <p>Displays detailed information about a specified job template. Job template stores values
119
+ * of StartJobRun API request in a template and can be used to start a job run. Job template
120
+ * allows two use cases: avoid repeating recurring StartJobRun API request values, enforcing
121
+ * certain values in StartJobRun API request.</p>
122
+ */
123
+ describeJobTemplate(args: DescribeJobTemplateCommandInput, options?: __HttpHandlerOptions): Promise<DescribeJobTemplateCommandOutput>;
124
+ describeJobTemplate(args: DescribeJobTemplateCommandInput, cb: (err: any, data?: DescribeJobTemplateCommandOutput) => void): void;
125
+ describeJobTemplate(args: DescribeJobTemplateCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeJobTemplateCommandOutput) => void): void;
126
+ /**
127
+ * <p>Displays detailed information about a managed endpoint. A managed endpoint is
128
+ * a gateway that connects EMR Studio to Amazon EMR on EKS so that EMR Studio can
129
+ * communicate with your virtual cluster.</p>
98
130
  */
99
131
  describeManagedEndpoint(args: DescribeManagedEndpointCommandInput, options?: __HttpHandlerOptions): Promise<DescribeManagedEndpointCommandOutput>;
100
132
  describeManagedEndpoint(args: DescribeManagedEndpointCommandInput, cb: (err: any, data?: DescribeManagedEndpointCommandOutput) => void): void;
@@ -118,9 +150,18 @@ export declare class EMRContainers extends EMRContainersClient {
118
150
  listJobRuns(args: ListJobRunsCommandInput, cb: (err: any, data?: ListJobRunsCommandOutput) => void): void;
119
151
  listJobRuns(args: ListJobRunsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListJobRunsCommandOutput) => void): void;
120
152
  /**
121
- * <p>Lists managed endpoints based on a set of parameters. A managed endpoint is a gateway
122
- * that connects EMR Studio to Amazon EMR on EKS so that EMR Studio can communicate with your
123
- * virtual cluster.</p>
153
+ * <p>Lists job templates based on a set of parameters. Job template stores values of
154
+ * StartJobRun API request in a template and can be used to start a job run. Job template
155
+ * allows two use cases: avoid repeating recurring StartJobRun API request values, enforcing
156
+ * certain values in StartJobRun API request.</p>
157
+ */
158
+ listJobTemplates(args: ListJobTemplatesCommandInput, options?: __HttpHandlerOptions): Promise<ListJobTemplatesCommandOutput>;
159
+ listJobTemplates(args: ListJobTemplatesCommandInput, cb: (err: any, data?: ListJobTemplatesCommandOutput) => void): void;
160
+ listJobTemplates(args: ListJobTemplatesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListJobTemplatesCommandOutput) => void): void;
161
+ /**
162
+ * <p>Lists managed endpoints based on a set of parameters. A managed endpoint
163
+ * is a gateway that connects EMR Studio to Amazon EMR on EKS so that EMR Studio
164
+ * can communicate with your virtual cluster.</p>
124
165
  */
125
166
  listManagedEndpoints(args: ListManagedEndpointsCommandInput, options?: __HttpHandlerOptions): Promise<ListManagedEndpointsCommandOutput>;
126
167
  listManagedEndpoints(args: ListManagedEndpointsCommandInput, cb: (err: any, data?: ListManagedEndpointsCommandOutput) => void): void;