@aws-sdk/client-eks 3.28.0 → 3.32.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 (58) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/EKS.ts +83 -0
  3. package/EKSClient.ts +6 -0
  4. package/commands/DeregisterClusterCommand.ts +94 -0
  5. package/commands/RegisterClusterCommand.ts +103 -0
  6. package/dist/cjs/EKS.js +30 -0
  7. package/dist/cjs/EKS.js.map +1 -1
  8. package/dist/cjs/EKSClient.js.map +1 -1
  9. package/dist/cjs/commands/DeregisterClusterCommand.js +61 -0
  10. package/dist/cjs/commands/DeregisterClusterCommand.js.map +1 -0
  11. package/dist/cjs/commands/RegisterClusterCommand.js +70 -0
  12. package/dist/cjs/commands/RegisterClusterCommand.js.map +1 -0
  13. package/dist/cjs/index.js +2 -0
  14. package/dist/cjs/index.js.map +1 -1
  15. package/dist/cjs/models/models_0.js +69 -3
  16. package/dist/cjs/models/models_0.js.map +1 -1
  17. package/dist/cjs/package.json +32 -32
  18. package/dist/cjs/protocols/Aws_restJson1.js +279 -45
  19. package/dist/cjs/protocols/Aws_restJson1.js.map +1 -1
  20. package/dist/cjs/waiters/waitForClusterDeleted.js +9 -0
  21. package/dist/cjs/waiters/waitForClusterDeleted.js.map +1 -1
  22. package/dist/es/EKS.js +30 -0
  23. package/dist/es/EKS.js.map +1 -1
  24. package/dist/es/EKSClient.js.map +1 -1
  25. package/dist/es/commands/DeregisterClusterCommand.js +65 -0
  26. package/dist/es/commands/DeregisterClusterCommand.js.map +1 -0
  27. package/dist/es/commands/RegisterClusterCommand.js +74 -0
  28. package/dist/es/commands/RegisterClusterCommand.js.map +1 -0
  29. package/dist/es/endpoints.js +1 -2
  30. package/dist/es/endpoints.js.map +1 -1
  31. package/dist/es/index.js +2 -0
  32. package/dist/es/index.js.map +1 -1
  33. package/dist/es/models/models_0.js +54 -0
  34. package/dist/es/models/models_0.js.map +1 -1
  35. package/dist/es/package.json +32 -32
  36. package/dist/es/protocols/Aws_restJson1.js +459 -135
  37. package/dist/es/protocols/Aws_restJson1.js.map +1 -1
  38. package/dist/es/waiters/waitForClusterDeleted.js +10 -1
  39. package/dist/es/waiters/waitForClusterDeleted.js.map +1 -1
  40. package/dist/types/EKS.d.ts +23 -0
  41. package/dist/types/EKSClient.d.ts +4 -2
  42. package/dist/types/commands/DeregisterClusterCommand.d.ts +35 -0
  43. package/dist/types/commands/RegisterClusterCommand.d.ts +44 -0
  44. package/dist/types/index.d.ts +2 -0
  45. package/dist/types/models/models_0.d.ts +129 -3
  46. package/dist/types/protocols/Aws_restJson1.d.ts +6 -0
  47. package/dist/types/ts3.4/EKS.d.ts +23 -0
  48. package/dist/types/ts3.4/EKSClient.d.ts +4 -2
  49. package/dist/types/ts3.4/commands/DeregisterClusterCommand.d.ts +35 -0
  50. package/dist/types/ts3.4/commands/RegisterClusterCommand.d.ts +44 -0
  51. package/dist/types/ts3.4/index.d.ts +2 -0
  52. package/dist/types/ts3.4/models/models_0.d.ts +129 -3
  53. package/dist/types/ts3.4/protocols/Aws_restJson1.d.ts +6 -0
  54. package/index.ts +2 -0
  55. package/models/models_0.ts +163 -3
  56. package/package.json +32 -32
  57. package/protocols/Aws_restJson1.ts +312 -44
  58. package/waiters/waitForClusterDeleted.ts +8 -0
@@ -20,6 +20,7 @@ import {
20
20
  DeleteFargateProfileCommandOutput,
21
21
  } from "../commands/DeleteFargateProfileCommand";
22
22
  import { DeleteNodegroupCommandInput, DeleteNodegroupCommandOutput } from "../commands/DeleteNodegroupCommand";
23
+ import { DeregisterClusterCommandInput, DeregisterClusterCommandOutput } from "../commands/DeregisterClusterCommand";
23
24
  import { DescribeAddonCommandInput, DescribeAddonCommandOutput } from "../commands/DescribeAddonCommand";
24
25
  import {
25
26
  DescribeAddonVersionsCommandInput,
@@ -56,6 +57,7 @@ import {
56
57
  ListTagsForResourceCommandOutput,
57
58
  } from "../commands/ListTagsForResourceCommand";
58
59
  import { ListUpdatesCommandInput, ListUpdatesCommandOutput } from "../commands/ListUpdatesCommand";
60
+ import { RegisterClusterCommandInput, RegisterClusterCommandOutput } from "../commands/RegisterClusterCommand";
59
61
  import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
60
62
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
61
63
  import { UpdateAddonCommandInput, UpdateAddonCommandOutput } from "../commands/UpdateAddonCommand";
@@ -87,6 +89,8 @@ import {
87
89
  ClientException,
88
90
  Cluster,
89
91
  Compatibility,
92
+ ConnectorConfigRequest,
93
+ ConnectorConfigResponse,
90
94
  EncryptionConfig,
91
95
  ErrorDetail,
92
96
  FargateProfile,
@@ -131,9 +135,13 @@ import {
131
135
  import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
132
136
  import {
133
137
  expectBoolean as __expectBoolean,
134
- expectInt as __expectInt,
138
+ expectInt32 as __expectInt32,
139
+ expectNonNull as __expectNonNull,
140
+ expectNumber as __expectNumber,
141
+ expectObject as __expectObject,
135
142
  expectString as __expectString,
136
143
  extendedEncodeURIComponent as __extendedEncodeURIComponent,
144
+ parseEpochTimestamp as __parseEpochTimestamp,
137
145
  } from "@aws-sdk/smithy-client";
138
146
  import {
139
147
  Endpoint as __Endpoint,
@@ -570,6 +578,35 @@ export const serializeAws_restJson1DeleteNodegroupCommand = async (
570
578
  });
571
579
  };
572
580
 
581
+ export const serializeAws_restJson1DeregisterClusterCommand = async (
582
+ input: DeregisterClusterCommandInput,
583
+ context: __SerdeContext
584
+ ): Promise<__HttpRequest> => {
585
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
586
+ const headers: any = {};
587
+ let resolvedPath =
588
+ `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster-registrations/{name}";
589
+ if (input.name !== undefined) {
590
+ const labelValue: string = input.name;
591
+ if (labelValue.length <= 0) {
592
+ throw new Error("Empty value provided for input HTTP label: name.");
593
+ }
594
+ resolvedPath = resolvedPath.replace("{name}", __extendedEncodeURIComponent(labelValue));
595
+ } else {
596
+ throw new Error("No value provided for input HTTP label: name.");
597
+ }
598
+ let body: any;
599
+ return new __HttpRequest({
600
+ protocol,
601
+ hostname,
602
+ port,
603
+ method: "DELETE",
604
+ headers,
605
+ path: resolvedPath,
606
+ body,
607
+ });
608
+ };
609
+
573
610
  export const serializeAws_restJson1DescribeAddonCommand = async (
574
611
  input: DescribeAddonCommandInput,
575
612
  context: __SerdeContext
@@ -906,6 +943,7 @@ export const serializeAws_restJson1ListClustersCommand = async (
906
943
  const query: any = {
907
944
  ...(input.maxResults !== undefined && { maxResults: input.maxResults.toString() }),
908
945
  ...(input.nextToken !== undefined && { nextToken: input.nextToken }),
946
+ ...(input.include !== undefined && { include: (input.include || []).map((_entry) => _entry as any) }),
909
947
  };
910
948
  let body: any;
911
949
  return new __HttpRequest({
@@ -1086,6 +1124,35 @@ export const serializeAws_restJson1ListUpdatesCommand = async (
1086
1124
  });
1087
1125
  };
1088
1126
 
1127
+ export const serializeAws_restJson1RegisterClusterCommand = async (
1128
+ input: RegisterClusterCommandInput,
1129
+ context: __SerdeContext
1130
+ ): Promise<__HttpRequest> => {
1131
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1132
+ const headers: any = {
1133
+ "content-type": "application/json",
1134
+ };
1135
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/cluster-registrations";
1136
+ let body: any;
1137
+ body = JSON.stringify({
1138
+ clientRequestToken: input.clientRequestToken ?? generateIdempotencyToken(),
1139
+ ...(input.connectorConfig !== undefined &&
1140
+ input.connectorConfig !== null && {
1141
+ connectorConfig: serializeAws_restJson1ConnectorConfigRequest(input.connectorConfig, context),
1142
+ }),
1143
+ ...(input.name !== undefined && input.name !== null && { name: input.name }),
1144
+ });
1145
+ return new __HttpRequest({
1146
+ protocol,
1147
+ hostname,
1148
+ port,
1149
+ method: "POST",
1150
+ headers,
1151
+ path: resolvedPath,
1152
+ body,
1153
+ });
1154
+ };
1155
+
1089
1156
  export const serializeAws_restJson1TagResourceCommand = async (
1090
1157
  input: TagResourceCommandInput,
1091
1158
  context: __SerdeContext
@@ -1393,7 +1460,7 @@ export const deserializeAws_restJson1AssociateEncryptionConfigCommand = async (
1393
1460
  $metadata: deserializeMetadata(output),
1394
1461
  update: undefined,
1395
1462
  };
1396
- const data: any = await parseBody(output.body, context);
1463
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1397
1464
  if (data.update !== undefined && data.update !== null) {
1398
1465
  contents.update = deserializeAws_restJson1Update(data.update, context);
1399
1466
  }
@@ -1489,7 +1556,7 @@ export const deserializeAws_restJson1AssociateIdentityProviderConfigCommand = as
1489
1556
  tags: undefined,
1490
1557
  update: undefined,
1491
1558
  };
1492
- const data: any = await parseBody(output.body, context);
1559
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1493
1560
  if (data.tags !== undefined && data.tags !== null) {
1494
1561
  contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
1495
1562
  }
@@ -1587,7 +1654,7 @@ export const deserializeAws_restJson1CreateAddonCommand = async (
1587
1654
  $metadata: deserializeMetadata(output),
1588
1655
  addon: undefined,
1589
1656
  };
1590
- const data: any = await parseBody(output.body, context);
1657
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1591
1658
  if (data.addon !== undefined && data.addon !== null) {
1592
1659
  contents.addon = deserializeAws_restJson1Addon(data.addon, context);
1593
1660
  }
@@ -1682,7 +1749,7 @@ export const deserializeAws_restJson1CreateClusterCommand = async (
1682
1749
  $metadata: deserializeMetadata(output),
1683
1750
  cluster: undefined,
1684
1751
  };
1685
- const data: any = await parseBody(output.body, context);
1752
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1686
1753
  if (data.cluster !== undefined && data.cluster !== null) {
1687
1754
  contents.cluster = deserializeAws_restJson1Cluster(data.cluster, context);
1688
1755
  }
@@ -1785,7 +1852,7 @@ export const deserializeAws_restJson1CreateFargateProfileCommand = async (
1785
1852
  $metadata: deserializeMetadata(output),
1786
1853
  fargateProfile: undefined,
1787
1854
  };
1788
- const data: any = await parseBody(output.body, context);
1855
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1789
1856
  if (data.fargateProfile !== undefined && data.fargateProfile !== null) {
1790
1857
  contents.fargateProfile = deserializeAws_restJson1FargateProfile(data.fargateProfile, context);
1791
1858
  }
@@ -1880,7 +1947,7 @@ export const deserializeAws_restJson1CreateNodegroupCommand = async (
1880
1947
  $metadata: deserializeMetadata(output),
1881
1948
  nodegroup: undefined,
1882
1949
  };
1883
- const data: any = await parseBody(output.body, context);
1950
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1884
1951
  if (data.nodegroup !== undefined && data.nodegroup !== null) {
1885
1952
  contents.nodegroup = deserializeAws_restJson1Nodegroup(data.nodegroup, context);
1886
1953
  }
@@ -1983,7 +2050,7 @@ export const deserializeAws_restJson1DeleteAddonCommand = async (
1983
2050
  $metadata: deserializeMetadata(output),
1984
2051
  addon: undefined,
1985
2052
  };
1986
- const data: any = await parseBody(output.body, context);
2053
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1987
2054
  if (data.addon !== undefined && data.addon !== null) {
1988
2055
  contents.addon = deserializeAws_restJson1Addon(data.addon, context);
1989
2056
  }
@@ -2070,7 +2137,7 @@ export const deserializeAws_restJson1DeleteClusterCommand = async (
2070
2137
  $metadata: deserializeMetadata(output),
2071
2138
  cluster: undefined,
2072
2139
  };
2073
- const data: any = await parseBody(output.body, context);
2140
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2074
2141
  if (data.cluster !== undefined && data.cluster !== null) {
2075
2142
  contents.cluster = deserializeAws_restJson1Cluster(data.cluster, context);
2076
2143
  }
@@ -2157,7 +2224,7 @@ export const deserializeAws_restJson1DeleteFargateProfileCommand = async (
2157
2224
  $metadata: deserializeMetadata(output),
2158
2225
  fargateProfile: undefined,
2159
2226
  };
2160
- const data: any = await parseBody(output.body, context);
2227
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2161
2228
  if (data.fargateProfile !== undefined && data.fargateProfile !== null) {
2162
2229
  contents.fargateProfile = deserializeAws_restJson1FargateProfile(data.fargateProfile, context);
2163
2230
  }
@@ -2236,7 +2303,7 @@ export const deserializeAws_restJson1DeleteNodegroupCommand = async (
2236
2303
  $metadata: deserializeMetadata(output),
2237
2304
  nodegroup: undefined,
2238
2305
  };
2239
- const data: any = await parseBody(output.body, context);
2306
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2240
2307
  if (data.nodegroup !== undefined && data.nodegroup !== null) {
2241
2308
  contents.nodegroup = deserializeAws_restJson1Nodegroup(data.nodegroup, context);
2242
2309
  }
@@ -2320,6 +2387,93 @@ const deserializeAws_restJson1DeleteNodegroupCommandError = async (
2320
2387
  return Promise.reject(Object.assign(new Error(message), response));
2321
2388
  };
2322
2389
 
2390
+ export const deserializeAws_restJson1DeregisterClusterCommand = async (
2391
+ output: __HttpResponse,
2392
+ context: __SerdeContext
2393
+ ): Promise<DeregisterClusterCommandOutput> => {
2394
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2395
+ return deserializeAws_restJson1DeregisterClusterCommandError(output, context);
2396
+ }
2397
+ const contents: DeregisterClusterCommandOutput = {
2398
+ $metadata: deserializeMetadata(output),
2399
+ cluster: undefined,
2400
+ };
2401
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2402
+ if (data.cluster !== undefined && data.cluster !== null) {
2403
+ contents.cluster = deserializeAws_restJson1Cluster(data.cluster, context);
2404
+ }
2405
+ return Promise.resolve(contents);
2406
+ };
2407
+
2408
+ const deserializeAws_restJson1DeregisterClusterCommandError = async (
2409
+ output: __HttpResponse,
2410
+ context: __SerdeContext
2411
+ ): Promise<DeregisterClusterCommandOutput> => {
2412
+ const parsedOutput: any = {
2413
+ ...output,
2414
+ body: await parseBody(output.body, context),
2415
+ };
2416
+ let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2417
+ let errorCode: string = "UnknownError";
2418
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2419
+ switch (errorCode) {
2420
+ case "ClientException":
2421
+ case "com.amazonaws.eks#ClientException":
2422
+ response = {
2423
+ ...(await deserializeAws_restJson1ClientExceptionResponse(parsedOutput, context)),
2424
+ name: errorCode,
2425
+ $metadata: deserializeMetadata(output),
2426
+ };
2427
+ break;
2428
+ case "ResourceInUseException":
2429
+ case "com.amazonaws.eks#ResourceInUseException":
2430
+ response = {
2431
+ ...(await deserializeAws_restJson1ResourceInUseExceptionResponse(parsedOutput, context)),
2432
+ name: errorCode,
2433
+ $metadata: deserializeMetadata(output),
2434
+ };
2435
+ break;
2436
+ case "ResourceNotFoundException":
2437
+ case "com.amazonaws.eks#ResourceNotFoundException":
2438
+ response = {
2439
+ ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2440
+ name: errorCode,
2441
+ $metadata: deserializeMetadata(output),
2442
+ };
2443
+ break;
2444
+ case "ServerException":
2445
+ case "com.amazonaws.eks#ServerException":
2446
+ response = {
2447
+ ...(await deserializeAws_restJson1ServerExceptionResponse(parsedOutput, context)),
2448
+ name: errorCode,
2449
+ $metadata: deserializeMetadata(output),
2450
+ };
2451
+ break;
2452
+ case "ServiceUnavailableException":
2453
+ case "com.amazonaws.eks#ServiceUnavailableException":
2454
+ response = {
2455
+ ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
2456
+ name: errorCode,
2457
+ $metadata: deserializeMetadata(output),
2458
+ };
2459
+ break;
2460
+ default:
2461
+ const parsedBody = parsedOutput.body;
2462
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
2463
+ response = {
2464
+ ...parsedBody,
2465
+ name: `${errorCode}`,
2466
+ message: parsedBody.message || parsedBody.Message || errorCode,
2467
+ $fault: "client",
2468
+ $metadata: deserializeMetadata(output),
2469
+ } as any;
2470
+ }
2471
+ const message = response.message || response.Message || errorCode;
2472
+ response.message = message;
2473
+ delete response.Message;
2474
+ return Promise.reject(Object.assign(new Error(message), response));
2475
+ };
2476
+
2323
2477
  export const deserializeAws_restJson1DescribeAddonCommand = async (
2324
2478
  output: __HttpResponse,
2325
2479
  context: __SerdeContext
@@ -2331,7 +2485,7 @@ export const deserializeAws_restJson1DescribeAddonCommand = async (
2331
2485
  $metadata: deserializeMetadata(output),
2332
2486
  addon: undefined,
2333
2487
  };
2334
- const data: any = await parseBody(output.body, context);
2488
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2335
2489
  if (data.addon !== undefined && data.addon !== null) {
2336
2490
  contents.addon = deserializeAws_restJson1Addon(data.addon, context);
2337
2491
  }
@@ -2419,7 +2573,7 @@ export const deserializeAws_restJson1DescribeAddonVersionsCommand = async (
2419
2573
  addons: undefined,
2420
2574
  nextToken: undefined,
2421
2575
  };
2422
- const data: any = await parseBody(output.body, context);
2576
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2423
2577
  if (data.addons !== undefined && data.addons !== null) {
2424
2578
  contents.addons = deserializeAws_restJson1Addons(data.addons, context);
2425
2579
  }
@@ -2493,7 +2647,7 @@ export const deserializeAws_restJson1DescribeClusterCommand = async (
2493
2647
  $metadata: deserializeMetadata(output),
2494
2648
  cluster: undefined,
2495
2649
  };
2496
- const data: any = await parseBody(output.body, context);
2650
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2497
2651
  if (data.cluster !== undefined && data.cluster !== null) {
2498
2652
  contents.cluster = deserializeAws_restJson1Cluster(data.cluster, context);
2499
2653
  }
@@ -2572,7 +2726,7 @@ export const deserializeAws_restJson1DescribeFargateProfileCommand = async (
2572
2726
  $metadata: deserializeMetadata(output),
2573
2727
  fargateProfile: undefined,
2574
2728
  };
2575
- const data: any = await parseBody(output.body, context);
2729
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2576
2730
  if (data.fargateProfile !== undefined && data.fargateProfile !== null) {
2577
2731
  contents.fargateProfile = deserializeAws_restJson1FargateProfile(data.fargateProfile, context);
2578
2732
  }
@@ -2651,7 +2805,7 @@ export const deserializeAws_restJson1DescribeIdentityProviderConfigCommand = asy
2651
2805
  $metadata: deserializeMetadata(output),
2652
2806
  identityProviderConfig: undefined,
2653
2807
  };
2654
- const data: any = await parseBody(output.body, context);
2808
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2655
2809
  if (data.identityProviderConfig !== undefined && data.identityProviderConfig !== null) {
2656
2810
  contents.identityProviderConfig = deserializeAws_restJson1IdentityProviderConfigResponse(
2657
2811
  data.identityProviderConfig,
@@ -2741,7 +2895,7 @@ export const deserializeAws_restJson1DescribeNodegroupCommand = async (
2741
2895
  $metadata: deserializeMetadata(output),
2742
2896
  nodegroup: undefined,
2743
2897
  };
2744
- const data: any = await parseBody(output.body, context);
2898
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2745
2899
  if (data.nodegroup !== undefined && data.nodegroup !== null) {
2746
2900
  contents.nodegroup = deserializeAws_restJson1Nodegroup(data.nodegroup, context);
2747
2901
  }
@@ -2828,7 +2982,7 @@ export const deserializeAws_restJson1DescribeUpdateCommand = async (
2828
2982
  $metadata: deserializeMetadata(output),
2829
2983
  update: undefined,
2830
2984
  };
2831
- const data: any = await parseBody(output.body, context);
2985
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2832
2986
  if (data.update !== undefined && data.update !== null) {
2833
2987
  contents.update = deserializeAws_restJson1Update(data.update, context);
2834
2988
  }
@@ -2907,7 +3061,7 @@ export const deserializeAws_restJson1DisassociateIdentityProviderConfigCommand =
2907
3061
  $metadata: deserializeMetadata(output),
2908
3062
  update: undefined,
2909
3063
  };
2910
- const data: any = await parseBody(output.body, context);
3064
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2911
3065
  if (data.update !== undefined && data.update !== null) {
2912
3066
  contents.update = deserializeAws_restJson1Update(data.update, context);
2913
3067
  }
@@ -3003,7 +3157,7 @@ export const deserializeAws_restJson1ListAddonsCommand = async (
3003
3157
  addons: undefined,
3004
3158
  nextToken: undefined,
3005
3159
  };
3006
- const data: any = await parseBody(output.body, context);
3160
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3007
3161
  if (data.addons !== undefined && data.addons !== null) {
3008
3162
  contents.addons = deserializeAws_restJson1StringList(data.addons, context);
3009
3163
  }
@@ -3094,7 +3248,7 @@ export const deserializeAws_restJson1ListClustersCommand = async (
3094
3248
  clusters: undefined,
3095
3249
  nextToken: undefined,
3096
3250
  };
3097
- const data: any = await parseBody(output.body, context);
3251
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3098
3252
  if (data.clusters !== undefined && data.clusters !== null) {
3099
3253
  contents.clusters = deserializeAws_restJson1StringList(data.clusters, context);
3100
3254
  }
@@ -3177,7 +3331,7 @@ export const deserializeAws_restJson1ListFargateProfilesCommand = async (
3177
3331
  fargateProfileNames: undefined,
3178
3332
  nextToken: undefined,
3179
3333
  };
3180
- const data: any = await parseBody(output.body, context);
3334
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3181
3335
  if (data.fargateProfileNames !== undefined && data.fargateProfileNames !== null) {
3182
3336
  contents.fargateProfileNames = deserializeAws_restJson1StringList(data.fargateProfileNames, context);
3183
3337
  }
@@ -3260,7 +3414,7 @@ export const deserializeAws_restJson1ListIdentityProviderConfigsCommand = async
3260
3414
  identityProviderConfigs: undefined,
3261
3415
  nextToken: undefined,
3262
3416
  };
3263
- const data: any = await parseBody(output.body, context);
3417
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3264
3418
  if (data.identityProviderConfigs !== undefined && data.identityProviderConfigs !== null) {
3265
3419
  contents.identityProviderConfigs = deserializeAws_restJson1IdentityProviderConfigs(
3266
3420
  data.identityProviderConfigs,
@@ -3354,7 +3508,7 @@ export const deserializeAws_restJson1ListNodegroupsCommand = async (
3354
3508
  nextToken: undefined,
3355
3509
  nodegroups: undefined,
3356
3510
  };
3357
- const data: any = await parseBody(output.body, context);
3511
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3358
3512
  if (data.nextToken !== undefined && data.nextToken !== null) {
3359
3513
  contents.nextToken = __expectString(data.nextToken);
3360
3514
  }
@@ -3444,7 +3598,7 @@ export const deserializeAws_restJson1ListTagsForResourceCommand = async (
3444
3598
  $metadata: deserializeMetadata(output),
3445
3599
  tags: undefined,
3446
3600
  };
3447
- const data: any = await parseBody(output.body, context);
3601
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3448
3602
  if (data.tags !== undefined && data.tags !== null) {
3449
3603
  contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
3450
3604
  }
@@ -3508,7 +3662,7 @@ export const deserializeAws_restJson1ListUpdatesCommand = async (
3508
3662
  nextToken: undefined,
3509
3663
  updateIds: undefined,
3510
3664
  };
3511
- const data: any = await parseBody(output.body, context);
3665
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3512
3666
  if (data.nextToken !== undefined && data.nextToken !== null) {
3513
3667
  contents.nextToken = __expectString(data.nextToken);
3514
3668
  }
@@ -3579,6 +3733,93 @@ const deserializeAws_restJson1ListUpdatesCommandError = async (
3579
3733
  return Promise.reject(Object.assign(new Error(message), response));
3580
3734
  };
3581
3735
 
3736
+ export const deserializeAws_restJson1RegisterClusterCommand = async (
3737
+ output: __HttpResponse,
3738
+ context: __SerdeContext
3739
+ ): Promise<RegisterClusterCommandOutput> => {
3740
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
3741
+ return deserializeAws_restJson1RegisterClusterCommandError(output, context);
3742
+ }
3743
+ const contents: RegisterClusterCommandOutput = {
3744
+ $metadata: deserializeMetadata(output),
3745
+ cluster: undefined,
3746
+ };
3747
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3748
+ if (data.cluster !== undefined && data.cluster !== null) {
3749
+ contents.cluster = deserializeAws_restJson1Cluster(data.cluster, context);
3750
+ }
3751
+ return Promise.resolve(contents);
3752
+ };
3753
+
3754
+ const deserializeAws_restJson1RegisterClusterCommandError = async (
3755
+ output: __HttpResponse,
3756
+ context: __SerdeContext
3757
+ ): Promise<RegisterClusterCommandOutput> => {
3758
+ const parsedOutput: any = {
3759
+ ...output,
3760
+ body: await parseBody(output.body, context),
3761
+ };
3762
+ let response: __SmithyException & __MetadataBearer & { [key: string]: any };
3763
+ let errorCode: string = "UnknownError";
3764
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3765
+ switch (errorCode) {
3766
+ case "ClientException":
3767
+ case "com.amazonaws.eks#ClientException":
3768
+ response = {
3769
+ ...(await deserializeAws_restJson1ClientExceptionResponse(parsedOutput, context)),
3770
+ name: errorCode,
3771
+ $metadata: deserializeMetadata(output),
3772
+ };
3773
+ break;
3774
+ case "InvalidParameterException":
3775
+ case "com.amazonaws.eks#InvalidParameterException":
3776
+ response = {
3777
+ ...(await deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)),
3778
+ name: errorCode,
3779
+ $metadata: deserializeMetadata(output),
3780
+ };
3781
+ break;
3782
+ case "ResourceLimitExceededException":
3783
+ case "com.amazonaws.eks#ResourceLimitExceededException":
3784
+ response = {
3785
+ ...(await deserializeAws_restJson1ResourceLimitExceededExceptionResponse(parsedOutput, context)),
3786
+ name: errorCode,
3787
+ $metadata: deserializeMetadata(output),
3788
+ };
3789
+ break;
3790
+ case "ServerException":
3791
+ case "com.amazonaws.eks#ServerException":
3792
+ response = {
3793
+ ...(await deserializeAws_restJson1ServerExceptionResponse(parsedOutput, context)),
3794
+ name: errorCode,
3795
+ $metadata: deserializeMetadata(output),
3796
+ };
3797
+ break;
3798
+ case "ServiceUnavailableException":
3799
+ case "com.amazonaws.eks#ServiceUnavailableException":
3800
+ response = {
3801
+ ...(await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)),
3802
+ name: errorCode,
3803
+ $metadata: deserializeMetadata(output),
3804
+ };
3805
+ break;
3806
+ default:
3807
+ const parsedBody = parsedOutput.body;
3808
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
3809
+ response = {
3810
+ ...parsedBody,
3811
+ name: `${errorCode}`,
3812
+ message: parsedBody.message || parsedBody.Message || errorCode,
3813
+ $fault: "client",
3814
+ $metadata: deserializeMetadata(output),
3815
+ } as any;
3816
+ }
3817
+ const message = response.message || response.Message || errorCode;
3818
+ response.message = message;
3819
+ delete response.Message;
3820
+ return Promise.reject(Object.assign(new Error(message), response));
3821
+ };
3822
+
3582
3823
  export const deserializeAws_restJson1TagResourceCommand = async (
3583
3824
  output: __HttpResponse,
3584
3825
  context: __SerdeContext
@@ -3708,7 +3949,7 @@ export const deserializeAws_restJson1UpdateAddonCommand = async (
3708
3949
  $metadata: deserializeMetadata(output),
3709
3950
  update: undefined,
3710
3951
  };
3711
- const data: any = await parseBody(output.body, context);
3952
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3712
3953
  if (data.update !== undefined && data.update !== null) {
3713
3954
  contents.update = deserializeAws_restJson1Update(data.update, context);
3714
3955
  }
@@ -3803,7 +4044,7 @@ export const deserializeAws_restJson1UpdateClusterConfigCommand = async (
3803
4044
  $metadata: deserializeMetadata(output),
3804
4045
  update: undefined,
3805
4046
  };
3806
- const data: any = await parseBody(output.body, context);
4047
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3807
4048
  if (data.update !== undefined && data.update !== null) {
3808
4049
  contents.update = deserializeAws_restJson1Update(data.update, context);
3809
4050
  }
@@ -3898,7 +4139,7 @@ export const deserializeAws_restJson1UpdateClusterVersionCommand = async (
3898
4139
  $metadata: deserializeMetadata(output),
3899
4140
  update: undefined,
3900
4141
  };
3901
- const data: any = await parseBody(output.body, context);
4142
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3902
4143
  if (data.update !== undefined && data.update !== null) {
3903
4144
  contents.update = deserializeAws_restJson1Update(data.update, context);
3904
4145
  }
@@ -3993,7 +4234,7 @@ export const deserializeAws_restJson1UpdateNodegroupConfigCommand = async (
3993
4234
  $metadata: deserializeMetadata(output),
3994
4235
  update: undefined,
3995
4236
  };
3996
- const data: any = await parseBody(output.body, context);
4237
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
3997
4238
  if (data.update !== undefined && data.update !== null) {
3998
4239
  contents.update = deserializeAws_restJson1Update(data.update, context);
3999
4240
  }
@@ -4088,7 +4329,7 @@ export const deserializeAws_restJson1UpdateNodegroupVersionCommand = async (
4088
4329
  $metadata: deserializeMetadata(output),
4089
4330
  update: undefined,
4090
4331
  };
4091
- const data: any = await parseBody(output.body, context);
4332
+ const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
4092
4333
  if (data.update !== undefined && data.update !== null) {
4093
4334
  contents.update = deserializeAws_restJson1Update(data.update, context);
4094
4335
  }
@@ -4459,6 +4700,13 @@ const deserializeAws_restJson1UnsupportedAvailabilityZoneExceptionResponse = asy
4459
4700
  return contents;
4460
4701
  };
4461
4702
 
4703
+ const serializeAws_restJson1ConnectorConfigRequest = (input: ConnectorConfigRequest, context: __SerdeContext): any => {
4704
+ return {
4705
+ ...(input.provider !== undefined && input.provider !== null && { provider: input.provider }),
4706
+ ...(input.roleArn !== undefined && input.roleArn !== null && { roleArn: input.roleArn }),
4707
+ };
4708
+ };
4709
+
4462
4710
  const serializeAws_restJson1EncryptionConfig = (input: EncryptionConfig, context: __SerdeContext): any => {
4463
4711
  return {
4464
4712
  ...(input.provider !== undefined &&
@@ -4762,7 +5010,7 @@ const deserializeAws_restJson1Addon = (output: any, context: __SerdeContext): Ad
4762
5010
  clusterName: __expectString(output.clusterName),
4763
5011
  createdAt:
4764
5012
  output.createdAt !== undefined && output.createdAt !== null
4765
- ? new Date(Math.round(output.createdAt * 1000))
5013
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt)))
4766
5014
  : undefined,
4767
5015
  health:
4768
5016
  output.health !== undefined && output.health !== null
@@ -4770,7 +5018,7 @@ const deserializeAws_restJson1Addon = (output: any, context: __SerdeContext): Ad
4770
5018
  : undefined,
4771
5019
  modifiedAt:
4772
5020
  output.modifiedAt !== undefined && output.modifiedAt !== null
4773
- ? new Date(Math.round(output.modifiedAt * 1000))
5021
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.modifiedAt)))
4774
5022
  : undefined,
4775
5023
  serviceAccountRoleArn: __expectString(output.serviceAccountRoleArn),
4776
5024
  status: __expectString(output.status),
@@ -4890,9 +5138,13 @@ const deserializeAws_restJson1Cluster = (output: any, context: __SerdeContext):
4890
5138
  ? deserializeAws_restJson1Certificate(output.certificateAuthority, context)
4891
5139
  : undefined,
4892
5140
  clientRequestToken: __expectString(output.clientRequestToken),
5141
+ connectorConfig:
5142
+ output.connectorConfig !== undefined && output.connectorConfig !== null
5143
+ ? deserializeAws_restJson1ConnectorConfigResponse(output.connectorConfig, context)
5144
+ : undefined,
4893
5145
  createdAt:
4894
5146
  output.createdAt !== undefined && output.createdAt !== null
4895
- ? new Date(Math.round(output.createdAt * 1000))
5147
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt)))
4896
5148
  : undefined,
4897
5149
  encryptionConfig:
4898
5150
  output.encryptionConfig !== undefined && output.encryptionConfig !== null
@@ -4949,6 +5201,22 @@ const deserializeAws_restJson1Compatibility = (output: any, context: __SerdeCont
4949
5201
  } as any;
4950
5202
  };
4951
5203
 
5204
+ const deserializeAws_restJson1ConnectorConfigResponse = (
5205
+ output: any,
5206
+ context: __SerdeContext
5207
+ ): ConnectorConfigResponse => {
5208
+ return {
5209
+ activationCode: __expectString(output.activationCode),
5210
+ activationExpiry:
5211
+ output.activationExpiry !== undefined && output.activationExpiry !== null
5212
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.activationExpiry)))
5213
+ : undefined,
5214
+ activationId: __expectString(output.activationId),
5215
+ provider: __expectString(output.provider),
5216
+ roleArn: __expectString(output.roleArn),
5217
+ } as any;
5218
+ };
5219
+
4952
5220
  const deserializeAws_restJson1EncryptionConfig = (output: any, context: __SerdeContext): EncryptionConfig => {
4953
5221
  return {
4954
5222
  provider:
@@ -5000,7 +5268,7 @@ const deserializeAws_restJson1FargateProfile = (output: any, context: __SerdeCon
5000
5268
  clusterName: __expectString(output.clusterName),
5001
5269
  createdAt:
5002
5270
  output.createdAt !== undefined && output.createdAt !== null
5003
- ? new Date(Math.round(output.createdAt * 1000))
5271
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt)))
5004
5272
  : undefined,
5005
5273
  fargateProfileArn: __expectString(output.fargateProfileArn),
5006
5274
  fargateProfileName: __expectString(output.fargateProfileName),
@@ -5210,9 +5478,9 @@ const deserializeAws_restJson1Nodegroup = (output: any, context: __SerdeContext)
5210
5478
  clusterName: __expectString(output.clusterName),
5211
5479
  createdAt:
5212
5480
  output.createdAt !== undefined && output.createdAt !== null
5213
- ? new Date(Math.round(output.createdAt * 1000))
5481
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt)))
5214
5482
  : undefined,
5215
- diskSize: __expectInt(output.diskSize),
5483
+ diskSize: __expectInt32(output.diskSize),
5216
5484
  health:
5217
5485
  output.health !== undefined && output.health !== null
5218
5486
  ? deserializeAws_restJson1NodegroupHealth(output.health, context)
@@ -5231,7 +5499,7 @@ const deserializeAws_restJson1Nodegroup = (output: any, context: __SerdeContext)
5231
5499
  : undefined,
5232
5500
  modifiedAt:
5233
5501
  output.modifiedAt !== undefined && output.modifiedAt !== null
5234
- ? new Date(Math.round(output.modifiedAt * 1000))
5502
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.modifiedAt)))
5235
5503
  : undefined,
5236
5504
  nodeRole: __expectString(output.nodeRole),
5237
5505
  nodegroupArn: __expectString(output.nodegroupArn),
@@ -5294,16 +5562,16 @@ const deserializeAws_restJson1NodegroupScalingConfig = (
5294
5562
  context: __SerdeContext
5295
5563
  ): NodegroupScalingConfig => {
5296
5564
  return {
5297
- desiredSize: __expectInt(output.desiredSize),
5298
- maxSize: __expectInt(output.maxSize),
5299
- minSize: __expectInt(output.minSize),
5565
+ desiredSize: __expectInt32(output.desiredSize),
5566
+ maxSize: __expectInt32(output.maxSize),
5567
+ minSize: __expectInt32(output.minSize),
5300
5568
  } as any;
5301
5569
  };
5302
5570
 
5303
5571
  const deserializeAws_restJson1NodegroupUpdateConfig = (output: any, context: __SerdeContext): NodegroupUpdateConfig => {
5304
5572
  return {
5305
- maxUnavailable: __expectInt(output.maxUnavailable),
5306
- maxUnavailablePercentage: __expectInt(output.maxUnavailablePercentage),
5573
+ maxUnavailable: __expectInt32(output.maxUnavailable),
5574
+ maxUnavailablePercentage: __expectInt32(output.maxUnavailablePercentage),
5307
5575
  } as any;
5308
5576
  };
5309
5577
 
@@ -5413,7 +5681,7 @@ const deserializeAws_restJson1Update = (output: any, context: __SerdeContext): U
5413
5681
  return {
5414
5682
  createdAt:
5415
5683
  output.createdAt !== undefined && output.createdAt !== null
5416
- ? new Date(Math.round(output.createdAt * 1000))
5684
+ ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt)))
5417
5685
  : undefined,
5418
5686
  errors:
5419
5687
  output.errors !== undefined && output.errors !== null