@aws-sdk/client-controltower 3.451.0 → 3.458.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 (65) hide show
  1. package/README.md +86 -30
  2. package/dist-cjs/ControlTower.js +14 -0
  3. package/dist-cjs/commands/CreateLandingZoneCommand.js +51 -0
  4. package/dist-cjs/commands/DeleteLandingZoneCommand.js +51 -0
  5. package/dist-cjs/commands/GetLandingZoneCommand.js +51 -0
  6. package/dist-cjs/commands/GetLandingZoneOperationCommand.js +51 -0
  7. package/dist-cjs/commands/ListLandingZonesCommand.js +51 -0
  8. package/dist-cjs/commands/ResetLandingZoneCommand.js +51 -0
  9. package/dist-cjs/commands/UpdateLandingZoneCommand.js +51 -0
  10. package/dist-cjs/commands/index.js +7 -0
  11. package/dist-cjs/models/models_0.js +21 -1
  12. package/dist-cjs/pagination/ListLandingZonesPaginator.js +29 -0
  13. package/dist-cjs/pagination/index.js +1 -0
  14. package/dist-cjs/protocols/Aws_restJson1.js +508 -1
  15. package/dist-es/ControlTower.js +14 -0
  16. package/dist-es/commands/CreateLandingZoneCommand.js +47 -0
  17. package/dist-es/commands/DeleteLandingZoneCommand.js +47 -0
  18. package/dist-es/commands/GetLandingZoneCommand.js +47 -0
  19. package/dist-es/commands/GetLandingZoneOperationCommand.js +47 -0
  20. package/dist-es/commands/ListLandingZonesCommand.js +47 -0
  21. package/dist-es/commands/ResetLandingZoneCommand.js +47 -0
  22. package/dist-es/commands/UpdateLandingZoneCommand.js +47 -0
  23. package/dist-es/commands/index.js +7 -0
  24. package/dist-es/models/models_0.js +20 -0
  25. package/dist-es/pagination/ListLandingZonesPaginator.js +25 -0
  26. package/dist-es/pagination/index.js +1 -0
  27. package/dist-es/protocols/Aws_restJson1.js +493 -0
  28. package/dist-types/ControlTower.d.ts +64 -15
  29. package/dist-types/ControlTowerClient.d.ts +24 -17
  30. package/dist-types/commands/CreateLandingZoneCommand.d.ts +94 -0
  31. package/dist-types/commands/DeleteLandingZoneCommand.d.ts +92 -0
  32. package/dist-types/commands/DisableControlCommand.d.ts +5 -5
  33. package/dist-types/commands/EnableControlCommand.d.ts +5 -5
  34. package/dist-types/commands/GetControlOperationCommand.d.ts +4 -4
  35. package/dist-types/commands/GetEnabledControlCommand.d.ts +6 -6
  36. package/dist-types/commands/GetLandingZoneCommand.d.ts +97 -0
  37. package/dist-types/commands/GetLandingZoneOperationCommand.d.ts +95 -0
  38. package/dist-types/commands/ListEnabledControlsCommand.d.ts +7 -7
  39. package/dist-types/commands/ListLandingZonesCommand.d.ts +93 -0
  40. package/dist-types/commands/ListTagsForResourceCommand.d.ts +2 -2
  41. package/dist-types/commands/ResetLandingZoneCommand.d.ts +92 -0
  42. package/dist-types/commands/TagResourceCommand.d.ts +2 -2
  43. package/dist-types/commands/UntagResourceCommand.d.ts +2 -2
  44. package/dist-types/commands/UpdateLandingZoneCommand.d.ts +95 -0
  45. package/dist-types/commands/index.d.ts +7 -0
  46. package/dist-types/index.d.ts +15 -15
  47. package/dist-types/models/models_0.d.ts +400 -12
  48. package/dist-types/pagination/ListLandingZonesPaginator.d.ts +7 -0
  49. package/dist-types/pagination/index.d.ts +1 -0
  50. package/dist-types/protocols/Aws_restJson1.d.ts +63 -0
  51. package/dist-types/ts3.4/ControlTower.d.ts +119 -0
  52. package/dist-types/ts3.4/ControlTowerClient.d.ts +44 -2
  53. package/dist-types/ts3.4/commands/CreateLandingZoneCommand.d.ts +38 -0
  54. package/dist-types/ts3.4/commands/DeleteLandingZoneCommand.d.ts +38 -0
  55. package/dist-types/ts3.4/commands/GetLandingZoneCommand.d.ts +35 -0
  56. package/dist-types/ts3.4/commands/GetLandingZoneOperationCommand.d.ts +42 -0
  57. package/dist-types/ts3.4/commands/ListLandingZonesCommand.d.ts +38 -0
  58. package/dist-types/ts3.4/commands/ResetLandingZoneCommand.d.ts +38 -0
  59. package/dist-types/ts3.4/commands/UpdateLandingZoneCommand.d.ts +38 -0
  60. package/dist-types/ts3.4/commands/index.d.ts +7 -0
  61. package/dist-types/ts3.4/models/models_0.d.ts +99 -0
  62. package/dist-types/ts3.4/pagination/ListLandingZonesPaginator.d.ts +11 -0
  63. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  64. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +84 -0
  65. package/package.json +3 -3
@@ -1,10 +1,54 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ListTagsForResourceCommand = exports.de_ListEnabledControlsCommand = exports.de_GetEnabledControlCommand = exports.de_GetControlOperationCommand = exports.de_EnableControlCommand = exports.de_DisableControlCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ListTagsForResourceCommand = exports.se_ListEnabledControlsCommand = exports.se_GetEnabledControlCommand = exports.se_GetControlOperationCommand = exports.se_EnableControlCommand = exports.se_DisableControlCommand = void 0;
3
+ exports.de_UpdateLandingZoneCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ResetLandingZoneCommand = exports.de_ListTagsForResourceCommand = exports.de_ListLandingZonesCommand = exports.de_ListEnabledControlsCommand = exports.de_GetLandingZoneOperationCommand = exports.de_GetLandingZoneCommand = exports.de_GetEnabledControlCommand = exports.de_GetControlOperationCommand = exports.de_EnableControlCommand = exports.de_DisableControlCommand = exports.de_DeleteLandingZoneCommand = exports.de_CreateLandingZoneCommand = exports.se_UpdateLandingZoneCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ResetLandingZoneCommand = exports.se_ListTagsForResourceCommand = exports.se_ListLandingZonesCommand = exports.se_ListEnabledControlsCommand = exports.se_GetLandingZoneOperationCommand = exports.se_GetLandingZoneCommand = exports.se_GetEnabledControlCommand = exports.se_GetControlOperationCommand = exports.se_EnableControlCommand = exports.se_DisableControlCommand = exports.se_DeleteLandingZoneCommand = exports.se_CreateLandingZoneCommand = void 0;
4
4
  const protocol_http_1 = require("@smithy/protocol-http");
5
5
  const smithy_client_1 = require("@smithy/smithy-client");
6
6
  const ControlTowerServiceException_1 = require("../models/ControlTowerServiceException");
7
7
  const models_0_1 = require("../models/models_0");
8
+ const se_CreateLandingZoneCommand = async (input, context) => {
9
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
+ const headers = {
11
+ "content-type": "application/json",
12
+ };
13
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/create-landingzone";
14
+ let body;
15
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
16
+ manifest: (_) => se_Manifest(_, context),
17
+ tags: (_) => (0, smithy_client_1._json)(_),
18
+ version: [],
19
+ }));
20
+ return new protocol_http_1.HttpRequest({
21
+ protocol,
22
+ hostname,
23
+ port,
24
+ method: "POST",
25
+ headers,
26
+ path: resolvedPath,
27
+ body,
28
+ });
29
+ };
30
+ exports.se_CreateLandingZoneCommand = se_CreateLandingZoneCommand;
31
+ const se_DeleteLandingZoneCommand = async (input, context) => {
32
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
33
+ const headers = {
34
+ "content-type": "application/json",
35
+ };
36
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/delete-landingzone";
37
+ let body;
38
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
39
+ landingZoneIdentifier: [],
40
+ }));
41
+ return new protocol_http_1.HttpRequest({
42
+ protocol,
43
+ hostname,
44
+ port,
45
+ method: "POST",
46
+ headers,
47
+ path: resolvedPath,
48
+ body,
49
+ });
50
+ };
51
+ exports.se_DeleteLandingZoneCommand = se_DeleteLandingZoneCommand;
8
52
  const se_DisableControlCommand = async (input, context) => {
9
53
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
54
  const headers = {
@@ -92,6 +136,48 @@ const se_GetEnabledControlCommand = async (input, context) => {
92
136
  });
93
137
  };
94
138
  exports.se_GetEnabledControlCommand = se_GetEnabledControlCommand;
139
+ const se_GetLandingZoneCommand = async (input, context) => {
140
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
141
+ const headers = {
142
+ "content-type": "application/json",
143
+ };
144
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-landingzone";
145
+ let body;
146
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
147
+ landingZoneIdentifier: [],
148
+ }));
149
+ return new protocol_http_1.HttpRequest({
150
+ protocol,
151
+ hostname,
152
+ port,
153
+ method: "POST",
154
+ headers,
155
+ path: resolvedPath,
156
+ body,
157
+ });
158
+ };
159
+ exports.se_GetLandingZoneCommand = se_GetLandingZoneCommand;
160
+ const se_GetLandingZoneOperationCommand = async (input, context) => {
161
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
162
+ const headers = {
163
+ "content-type": "application/json",
164
+ };
165
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/get-landingzone-operation";
166
+ let body;
167
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
168
+ operationIdentifier: [],
169
+ }));
170
+ return new protocol_http_1.HttpRequest({
171
+ protocol,
172
+ hostname,
173
+ port,
174
+ method: "POST",
175
+ headers,
176
+ path: resolvedPath,
177
+ body,
178
+ });
179
+ };
180
+ exports.se_GetLandingZoneOperationCommand = se_GetLandingZoneOperationCommand;
95
181
  const se_ListEnabledControlsCommand = async (input, context) => {
96
182
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
97
183
  const headers = {
@@ -115,6 +201,28 @@ const se_ListEnabledControlsCommand = async (input, context) => {
115
201
  });
116
202
  };
117
203
  exports.se_ListEnabledControlsCommand = se_ListEnabledControlsCommand;
204
+ const se_ListLandingZonesCommand = async (input, context) => {
205
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
206
+ const headers = {
207
+ "content-type": "application/json",
208
+ };
209
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-landingzones";
210
+ let body;
211
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
212
+ maxResults: [],
213
+ nextToken: [],
214
+ }));
215
+ return new protocol_http_1.HttpRequest({
216
+ protocol,
217
+ hostname,
218
+ port,
219
+ method: "POST",
220
+ headers,
221
+ path: resolvedPath,
222
+ body,
223
+ });
224
+ };
225
+ exports.se_ListLandingZonesCommand = se_ListLandingZonesCommand;
118
226
  const se_ListTagsForResourceCommand = async (input, context) => {
119
227
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
120
228
  const headers = {};
@@ -132,6 +240,27 @@ const se_ListTagsForResourceCommand = async (input, context) => {
132
240
  });
133
241
  };
134
242
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
243
+ const se_ResetLandingZoneCommand = async (input, context) => {
244
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
245
+ const headers = {
246
+ "content-type": "application/json",
247
+ };
248
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/reset-landingzone";
249
+ let body;
250
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
251
+ landingZoneIdentifier: [],
252
+ }));
253
+ return new protocol_http_1.HttpRequest({
254
+ protocol,
255
+ hostname,
256
+ port,
257
+ method: "POST",
258
+ headers,
259
+ path: resolvedPath,
260
+ body,
261
+ });
262
+ };
263
+ exports.se_ResetLandingZoneCommand = se_ResetLandingZoneCommand;
135
264
  const se_TagResourceCommand = async (input, context) => {
136
265
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
137
266
  const headers = {
@@ -178,6 +307,125 @@ const se_UntagResourceCommand = async (input, context) => {
178
307
  });
179
308
  };
180
309
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
310
+ const se_UpdateLandingZoneCommand = async (input, context) => {
311
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
312
+ const headers = {
313
+ "content-type": "application/json",
314
+ };
315
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/update-landingzone";
316
+ let body;
317
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
318
+ landingZoneIdentifier: [],
319
+ manifest: (_) => se_Manifest(_, context),
320
+ version: [],
321
+ }));
322
+ return new protocol_http_1.HttpRequest({
323
+ protocol,
324
+ hostname,
325
+ port,
326
+ method: "POST",
327
+ headers,
328
+ path: resolvedPath,
329
+ body,
330
+ });
331
+ };
332
+ exports.se_UpdateLandingZoneCommand = se_UpdateLandingZoneCommand;
333
+ const de_CreateLandingZoneCommand = async (output, context) => {
334
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
335
+ return de_CreateLandingZoneCommandError(output, context);
336
+ }
337
+ const contents = (0, smithy_client_1.map)({
338
+ $metadata: deserializeMetadata(output),
339
+ });
340
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
341
+ const doc = (0, smithy_client_1.take)(data, {
342
+ arn: smithy_client_1.expectString,
343
+ operationIdentifier: smithy_client_1.expectString,
344
+ });
345
+ Object.assign(contents, doc);
346
+ return contents;
347
+ };
348
+ exports.de_CreateLandingZoneCommand = de_CreateLandingZoneCommand;
349
+ const de_CreateLandingZoneCommandError = async (output, context) => {
350
+ const parsedOutput = {
351
+ ...output,
352
+ body: await parseErrorBody(output.body, context),
353
+ };
354
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
355
+ switch (errorCode) {
356
+ case "AccessDeniedException":
357
+ case "com.amazonaws.controltower#AccessDeniedException":
358
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
359
+ case "ConflictException":
360
+ case "com.amazonaws.controltower#ConflictException":
361
+ throw await de_ConflictExceptionRes(parsedOutput, context);
362
+ case "InternalServerException":
363
+ case "com.amazonaws.controltower#InternalServerException":
364
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
365
+ case "ThrottlingException":
366
+ case "com.amazonaws.controltower#ThrottlingException":
367
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
368
+ case "ValidationException":
369
+ case "com.amazonaws.controltower#ValidationException":
370
+ throw await de_ValidationExceptionRes(parsedOutput, context);
371
+ default:
372
+ const parsedBody = parsedOutput.body;
373
+ return throwDefaultError({
374
+ output,
375
+ parsedBody,
376
+ errorCode,
377
+ });
378
+ }
379
+ };
380
+ const de_DeleteLandingZoneCommand = async (output, context) => {
381
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
382
+ return de_DeleteLandingZoneCommandError(output, context);
383
+ }
384
+ const contents = (0, smithy_client_1.map)({
385
+ $metadata: deserializeMetadata(output),
386
+ });
387
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
388
+ const doc = (0, smithy_client_1.take)(data, {
389
+ operationIdentifier: smithy_client_1.expectString,
390
+ });
391
+ Object.assign(contents, doc);
392
+ return contents;
393
+ };
394
+ exports.de_DeleteLandingZoneCommand = de_DeleteLandingZoneCommand;
395
+ const de_DeleteLandingZoneCommandError = async (output, context) => {
396
+ const parsedOutput = {
397
+ ...output,
398
+ body: await parseErrorBody(output.body, context),
399
+ };
400
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
401
+ switch (errorCode) {
402
+ case "AccessDeniedException":
403
+ case "com.amazonaws.controltower#AccessDeniedException":
404
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
405
+ case "ConflictException":
406
+ case "com.amazonaws.controltower#ConflictException":
407
+ throw await de_ConflictExceptionRes(parsedOutput, context);
408
+ case "InternalServerException":
409
+ case "com.amazonaws.controltower#InternalServerException":
410
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
411
+ case "ResourceNotFoundException":
412
+ case "com.amazonaws.controltower#ResourceNotFoundException":
413
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
414
+ case "ThrottlingException":
415
+ case "com.amazonaws.controltower#ThrottlingException":
416
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
417
+ case "ValidationException":
418
+ case "com.amazonaws.controltower#ValidationException":
419
+ throw await de_ValidationExceptionRes(parsedOutput, context);
420
+ default:
421
+ const parsedBody = parsedOutput.body;
422
+ return throwDefaultError({
423
+ output,
424
+ parsedBody,
425
+ errorCode,
426
+ });
427
+ }
428
+ };
181
429
  const de_DisableControlCommand = async (output, context) => {
182
430
  if (output.statusCode !== 200 && output.statusCode >= 300) {
183
431
  return de_DisableControlCommandError(output, context);
@@ -375,6 +623,98 @@ const de_GetEnabledControlCommandError = async (output, context) => {
375
623
  });
376
624
  }
377
625
  };
626
+ const de_GetLandingZoneCommand = async (output, context) => {
627
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
628
+ return de_GetLandingZoneCommandError(output, context);
629
+ }
630
+ const contents = (0, smithy_client_1.map)({
631
+ $metadata: deserializeMetadata(output),
632
+ });
633
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
634
+ const doc = (0, smithy_client_1.take)(data, {
635
+ landingZone: (_) => de_LandingZoneDetail(_, context),
636
+ });
637
+ Object.assign(contents, doc);
638
+ return contents;
639
+ };
640
+ exports.de_GetLandingZoneCommand = de_GetLandingZoneCommand;
641
+ const de_GetLandingZoneCommandError = async (output, context) => {
642
+ const parsedOutput = {
643
+ ...output,
644
+ body: await parseErrorBody(output.body, context),
645
+ };
646
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
647
+ switch (errorCode) {
648
+ case "AccessDeniedException":
649
+ case "com.amazonaws.controltower#AccessDeniedException":
650
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
651
+ case "InternalServerException":
652
+ case "com.amazonaws.controltower#InternalServerException":
653
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
654
+ case "ResourceNotFoundException":
655
+ case "com.amazonaws.controltower#ResourceNotFoundException":
656
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
657
+ case "ThrottlingException":
658
+ case "com.amazonaws.controltower#ThrottlingException":
659
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
660
+ case "ValidationException":
661
+ case "com.amazonaws.controltower#ValidationException":
662
+ throw await de_ValidationExceptionRes(parsedOutput, context);
663
+ default:
664
+ const parsedBody = parsedOutput.body;
665
+ return throwDefaultError({
666
+ output,
667
+ parsedBody,
668
+ errorCode,
669
+ });
670
+ }
671
+ };
672
+ const de_GetLandingZoneOperationCommand = async (output, context) => {
673
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
674
+ return de_GetLandingZoneOperationCommandError(output, context);
675
+ }
676
+ const contents = (0, smithy_client_1.map)({
677
+ $metadata: deserializeMetadata(output),
678
+ });
679
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
680
+ const doc = (0, smithy_client_1.take)(data, {
681
+ operationDetails: (_) => de_LandingZoneOperationDetail(_, context),
682
+ });
683
+ Object.assign(contents, doc);
684
+ return contents;
685
+ };
686
+ exports.de_GetLandingZoneOperationCommand = de_GetLandingZoneOperationCommand;
687
+ const de_GetLandingZoneOperationCommandError = async (output, context) => {
688
+ const parsedOutput = {
689
+ ...output,
690
+ body: await parseErrorBody(output.body, context),
691
+ };
692
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
693
+ switch (errorCode) {
694
+ case "AccessDeniedException":
695
+ case "com.amazonaws.controltower#AccessDeniedException":
696
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
697
+ case "InternalServerException":
698
+ case "com.amazonaws.controltower#InternalServerException":
699
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
700
+ case "ResourceNotFoundException":
701
+ case "com.amazonaws.controltower#ResourceNotFoundException":
702
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
703
+ case "ThrottlingException":
704
+ case "com.amazonaws.controltower#ThrottlingException":
705
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
706
+ case "ValidationException":
707
+ case "com.amazonaws.controltower#ValidationException":
708
+ throw await de_ValidationExceptionRes(parsedOutput, context);
709
+ default:
710
+ const parsedBody = parsedOutput.body;
711
+ return throwDefaultError({
712
+ output,
713
+ parsedBody,
714
+ errorCode,
715
+ });
716
+ }
717
+ };
378
718
  const de_ListEnabledControlsCommand = async (output, context) => {
379
719
  if (output.statusCode !== 200 && output.statusCode >= 300) {
380
720
  return de_ListEnabledControlsCommandError(output, context);
@@ -422,6 +762,50 @@ const de_ListEnabledControlsCommandError = async (output, context) => {
422
762
  });
423
763
  }
424
764
  };
765
+ const de_ListLandingZonesCommand = async (output, context) => {
766
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
767
+ return de_ListLandingZonesCommandError(output, context);
768
+ }
769
+ const contents = (0, smithy_client_1.map)({
770
+ $metadata: deserializeMetadata(output),
771
+ });
772
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
773
+ const doc = (0, smithy_client_1.take)(data, {
774
+ landingZones: smithy_client_1._json,
775
+ nextToken: smithy_client_1.expectString,
776
+ });
777
+ Object.assign(contents, doc);
778
+ return contents;
779
+ };
780
+ exports.de_ListLandingZonesCommand = de_ListLandingZonesCommand;
781
+ const de_ListLandingZonesCommandError = 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 "AccessDeniedException":
789
+ case "com.amazonaws.controltower#AccessDeniedException":
790
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
791
+ case "InternalServerException":
792
+ case "com.amazonaws.controltower#InternalServerException":
793
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
794
+ case "ThrottlingException":
795
+ case "com.amazonaws.controltower#ThrottlingException":
796
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
797
+ case "ValidationException":
798
+ case "com.amazonaws.controltower#ValidationException":
799
+ throw await de_ValidationExceptionRes(parsedOutput, context);
800
+ default:
801
+ const parsedBody = parsedOutput.body;
802
+ return throwDefaultError({
803
+ output,
804
+ parsedBody,
805
+ errorCode,
806
+ });
807
+ }
808
+ };
425
809
  const de_ListTagsForResourceCommand = async (output, context) => {
426
810
  if (output.statusCode !== 200 && output.statusCode >= 300) {
427
811
  return de_ListTagsForResourceCommandError(output, context);
@@ -462,6 +846,55 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
462
846
  });
463
847
  }
464
848
  };
849
+ const de_ResetLandingZoneCommand = async (output, context) => {
850
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
851
+ return de_ResetLandingZoneCommandError(output, context);
852
+ }
853
+ const contents = (0, smithy_client_1.map)({
854
+ $metadata: deserializeMetadata(output),
855
+ });
856
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
857
+ const doc = (0, smithy_client_1.take)(data, {
858
+ operationIdentifier: smithy_client_1.expectString,
859
+ });
860
+ Object.assign(contents, doc);
861
+ return contents;
862
+ };
863
+ exports.de_ResetLandingZoneCommand = de_ResetLandingZoneCommand;
864
+ const de_ResetLandingZoneCommandError = async (output, context) => {
865
+ const parsedOutput = {
866
+ ...output,
867
+ body: await parseErrorBody(output.body, context),
868
+ };
869
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
870
+ switch (errorCode) {
871
+ case "AccessDeniedException":
872
+ case "com.amazonaws.controltower#AccessDeniedException":
873
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
874
+ case "ConflictException":
875
+ case "com.amazonaws.controltower#ConflictException":
876
+ throw await de_ConflictExceptionRes(parsedOutput, context);
877
+ case "InternalServerException":
878
+ case "com.amazonaws.controltower#InternalServerException":
879
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
880
+ case "ResourceNotFoundException":
881
+ case "com.amazonaws.controltower#ResourceNotFoundException":
882
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
883
+ case "ThrottlingException":
884
+ case "com.amazonaws.controltower#ThrottlingException":
885
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
886
+ case "ValidationException":
887
+ case "com.amazonaws.controltower#ValidationException":
888
+ throw await de_ValidationExceptionRes(parsedOutput, context);
889
+ default:
890
+ const parsedBody = parsedOutput.body;
891
+ return throwDefaultError({
892
+ output,
893
+ parsedBody,
894
+ errorCode,
895
+ });
896
+ }
897
+ };
465
898
  const de_TagResourceCommand = async (output, context) => {
466
899
  if (output.statusCode !== 204 && output.statusCode >= 300) {
467
900
  return de_TagResourceCommandError(output, context);
@@ -534,6 +967,55 @@ const de_UntagResourceCommandError = async (output, context) => {
534
967
  });
535
968
  }
536
969
  };
970
+ const de_UpdateLandingZoneCommand = async (output, context) => {
971
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
972
+ return de_UpdateLandingZoneCommandError(output, context);
973
+ }
974
+ const contents = (0, smithy_client_1.map)({
975
+ $metadata: deserializeMetadata(output),
976
+ });
977
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
978
+ const doc = (0, smithy_client_1.take)(data, {
979
+ operationIdentifier: smithy_client_1.expectString,
980
+ });
981
+ Object.assign(contents, doc);
982
+ return contents;
983
+ };
984
+ exports.de_UpdateLandingZoneCommand = de_UpdateLandingZoneCommand;
985
+ const de_UpdateLandingZoneCommandError = async (output, context) => {
986
+ const parsedOutput = {
987
+ ...output,
988
+ body: await parseErrorBody(output.body, context),
989
+ };
990
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
991
+ switch (errorCode) {
992
+ case "AccessDeniedException":
993
+ case "com.amazonaws.controltower#AccessDeniedException":
994
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
995
+ case "ConflictException":
996
+ case "com.amazonaws.controltower#ConflictException":
997
+ throw await de_ConflictExceptionRes(parsedOutput, context);
998
+ case "InternalServerException":
999
+ case "com.amazonaws.controltower#InternalServerException":
1000
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
1001
+ case "ResourceNotFoundException":
1002
+ case "com.amazonaws.controltower#ResourceNotFoundException":
1003
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1004
+ case "ThrottlingException":
1005
+ case "com.amazonaws.controltower#ThrottlingException":
1006
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1007
+ case "ValidationException":
1008
+ case "com.amazonaws.controltower#ValidationException":
1009
+ throw await de_ValidationExceptionRes(parsedOutput, context);
1010
+ default:
1011
+ const parsedBody = parsedOutput.body;
1012
+ return throwDefaultError({
1013
+ output,
1014
+ parsedBody,
1015
+ errorCode,
1016
+ });
1017
+ }
1018
+ };
537
1019
  const throwDefaultError = (0, smithy_client_1.withBaseException)(ControlTowerServiceException_1.ControlTowerServiceException);
538
1020
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
539
1021
  const contents = (0, smithy_client_1.map)({});
@@ -633,6 +1115,9 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
633
1115
  });
634
1116
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
635
1117
  };
1118
+ const se_Manifest = (input, context) => {
1119
+ return input;
1120
+ };
636
1121
  const de_ControlOperation = (output, context) => {
637
1122
  return (0, smithy_client_1.take)(output, {
638
1123
  endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
@@ -642,6 +1127,28 @@ const de_ControlOperation = (output, context) => {
642
1127
  statusMessage: smithy_client_1.expectString,
643
1128
  });
644
1129
  };
1130
+ const de_LandingZoneDetail = (output, context) => {
1131
+ return (0, smithy_client_1.take)(output, {
1132
+ arn: smithy_client_1.expectString,
1133
+ driftStatus: smithy_client_1._json,
1134
+ latestAvailableVersion: smithy_client_1.expectString,
1135
+ manifest: (_) => de_Manifest(_, context),
1136
+ status: smithy_client_1.expectString,
1137
+ version: smithy_client_1.expectString,
1138
+ });
1139
+ };
1140
+ const de_LandingZoneOperationDetail = (output, context) => {
1141
+ return (0, smithy_client_1.take)(output, {
1142
+ endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1143
+ operationType: smithy_client_1.expectString,
1144
+ startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1145
+ status: smithy_client_1.expectString,
1146
+ statusMessage: smithy_client_1.expectString,
1147
+ });
1148
+ };
1149
+ const de_Manifest = (output, context) => {
1150
+ return output;
1151
+ };
645
1152
  const deserializeMetadata = (output) => ({
646
1153
  httpStatusCode: output.statusCode,
647
1154
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -1,22 +1,36 @@
1
1
  import { createAggregatedClient } from "@smithy/smithy-client";
2
+ import { CreateLandingZoneCommand, } from "./commands/CreateLandingZoneCommand";
3
+ import { DeleteLandingZoneCommand, } from "./commands/DeleteLandingZoneCommand";
2
4
  import { DisableControlCommand, } from "./commands/DisableControlCommand";
3
5
  import { EnableControlCommand, } from "./commands/EnableControlCommand";
4
6
  import { GetControlOperationCommand, } from "./commands/GetControlOperationCommand";
5
7
  import { GetEnabledControlCommand, } from "./commands/GetEnabledControlCommand";
8
+ import { GetLandingZoneCommand, } from "./commands/GetLandingZoneCommand";
9
+ import { GetLandingZoneOperationCommand, } from "./commands/GetLandingZoneOperationCommand";
6
10
  import { ListEnabledControlsCommand, } from "./commands/ListEnabledControlsCommand";
11
+ import { ListLandingZonesCommand, } from "./commands/ListLandingZonesCommand";
7
12
  import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
13
+ import { ResetLandingZoneCommand, } from "./commands/ResetLandingZoneCommand";
8
14
  import { TagResourceCommand } from "./commands/TagResourceCommand";
9
15
  import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
16
+ import { UpdateLandingZoneCommand, } from "./commands/UpdateLandingZoneCommand";
10
17
  import { ControlTowerClient } from "./ControlTowerClient";
11
18
  const commands = {
19
+ CreateLandingZoneCommand,
20
+ DeleteLandingZoneCommand,
12
21
  DisableControlCommand,
13
22
  EnableControlCommand,
14
23
  GetControlOperationCommand,
15
24
  GetEnabledControlCommand,
25
+ GetLandingZoneCommand,
26
+ GetLandingZoneOperationCommand,
16
27
  ListEnabledControlsCommand,
28
+ ListLandingZonesCommand,
17
29
  ListTagsForResourceCommand,
30
+ ResetLandingZoneCommand,
18
31
  TagResourceCommand,
19
32
  UntagResourceCommand,
33
+ UpdateLandingZoneCommand,
20
34
  };
21
35
  export class ControlTower extends ControlTowerClient {
22
36
  }
@@ -0,0 +1,47 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { de_CreateLandingZoneCommand, se_CreateLandingZoneCommand } from "../protocols/Aws_restJson1";
6
+ export { $Command };
7
+ export class CreateLandingZoneCommand extends $Command {
8
+ static getEndpointParameterInstructions() {
9
+ return {
10
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
11
+ Endpoint: { type: "builtInParams", name: "endpoint" },
12
+ Region: { type: "builtInParams", name: "region" },
13
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
14
+ };
15
+ }
16
+ constructor(input) {
17
+ super();
18
+ this.input = input;
19
+ }
20
+ resolveMiddleware(clientStack, configuration, options) {
21
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
22
+ this.middlewareStack.use(getEndpointPlugin(configuration, CreateLandingZoneCommand.getEndpointParameterInstructions()));
23
+ const stack = clientStack.concat(this.middlewareStack);
24
+ const { logger } = configuration;
25
+ const clientName = "ControlTowerClient";
26
+ const commandName = "CreateLandingZoneCommand";
27
+ const handlerExecutionContext = {
28
+ logger,
29
+ clientName,
30
+ commandName,
31
+ inputFilterSensitiveLog: (_) => _,
32
+ outputFilterSensitiveLog: (_) => _,
33
+ [SMITHY_CONTEXT_KEY]: {
34
+ service: "AWSControlTowerApis",
35
+ operation: "CreateLandingZone",
36
+ },
37
+ };
38
+ const { requestHandler } = configuration;
39
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
40
+ }
41
+ serialize(input, context) {
42
+ return se_CreateLandingZoneCommand(input, context);
43
+ }
44
+ deserialize(output, context) {
45
+ return de_CreateLandingZoneCommand(output, context);
46
+ }
47
+ }