@aws-sdk/client-organizations 3.927.0 → 3.928.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 (81) hide show
  1. package/dist-cjs/index.js +1881 -2595
  2. package/dist-cjs/runtimeConfig.shared.js +7 -0
  3. package/dist-es/OrganizationsClient.js +2 -0
  4. package/dist-es/commands/AcceptHandshakeCommand.js +3 -10
  5. package/dist-es/commands/AttachPolicyCommand.js +3 -9
  6. package/dist-es/commands/CancelHandshakeCommand.js +3 -10
  7. package/dist-es/commands/CloseAccountCommand.js +3 -9
  8. package/dist-es/commands/CreateAccountCommand.js +3 -10
  9. package/dist-es/commands/CreateGovCloudAccountCommand.js +3 -10
  10. package/dist-es/commands/CreateOrganizationCommand.js +3 -10
  11. package/dist-es/commands/CreateOrganizationalUnitCommand.js +3 -9
  12. package/dist-es/commands/CreatePolicyCommand.js +3 -9
  13. package/dist-es/commands/DeclineHandshakeCommand.js +3 -10
  14. package/dist-es/commands/DeleteOrganizationCommand.js +3 -9
  15. package/dist-es/commands/DeleteOrganizationalUnitCommand.js +3 -9
  16. package/dist-es/commands/DeletePolicyCommand.js +3 -9
  17. package/dist-es/commands/DeleteResourcePolicyCommand.js +3 -9
  18. package/dist-es/commands/DeregisterDelegatedAdministratorCommand.js +3 -9
  19. package/dist-es/commands/DescribeAccountCommand.js +3 -10
  20. package/dist-es/commands/DescribeCreateAccountStatusCommand.js +3 -10
  21. package/dist-es/commands/DescribeEffectivePolicyCommand.js +3 -9
  22. package/dist-es/commands/DescribeHandshakeCommand.js +3 -10
  23. package/dist-es/commands/DescribeOrganizationCommand.js +3 -10
  24. package/dist-es/commands/DescribeOrganizationalUnitCommand.js +3 -9
  25. package/dist-es/commands/DescribePolicyCommand.js +3 -9
  26. package/dist-es/commands/DescribeResourcePolicyCommand.js +3 -9
  27. package/dist-es/commands/DetachPolicyCommand.js +3 -9
  28. package/dist-es/commands/DisableAWSServiceAccessCommand.js +3 -9
  29. package/dist-es/commands/DisablePolicyTypeCommand.js +3 -9
  30. package/dist-es/commands/EnableAWSServiceAccessCommand.js +3 -9
  31. package/dist-es/commands/EnableAllFeaturesCommand.js +3 -10
  32. package/dist-es/commands/EnablePolicyTypeCommand.js +3 -9
  33. package/dist-es/commands/InviteAccountToOrganizationCommand.js +3 -10
  34. package/dist-es/commands/LeaveOrganizationCommand.js +3 -9
  35. package/dist-es/commands/ListAWSServiceAccessForOrganizationCommand.js +3 -9
  36. package/dist-es/commands/ListAccountsCommand.js +3 -10
  37. package/dist-es/commands/ListAccountsForParentCommand.js +3 -10
  38. package/dist-es/commands/ListAccountsWithInvalidEffectivePolicyCommand.js +3 -10
  39. package/dist-es/commands/ListChildrenCommand.js +3 -9
  40. package/dist-es/commands/ListCreateAccountStatusCommand.js +3 -10
  41. package/dist-es/commands/ListDelegatedAdministratorsCommand.js +3 -10
  42. package/dist-es/commands/ListDelegatedServicesForAccountCommand.js +3 -9
  43. package/dist-es/commands/ListEffectivePolicyValidationErrorsCommand.js +3 -9
  44. package/dist-es/commands/ListHandshakesForAccountCommand.js +3 -10
  45. package/dist-es/commands/ListHandshakesForOrganizationCommand.js +3 -10
  46. package/dist-es/commands/ListOrganizationalUnitsForParentCommand.js +3 -9
  47. package/dist-es/commands/ListParentsCommand.js +3 -9
  48. package/dist-es/commands/ListPoliciesCommand.js +3 -9
  49. package/dist-es/commands/ListPoliciesForTargetCommand.js +3 -9
  50. package/dist-es/commands/ListRootsCommand.js +3 -9
  51. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  52. package/dist-es/commands/ListTargetsForPolicyCommand.js +3 -9
  53. package/dist-es/commands/MoveAccountCommand.js +3 -9
  54. package/dist-es/commands/PutResourcePolicyCommand.js +3 -9
  55. package/dist-es/commands/RegisterDelegatedAdministratorCommand.js +3 -9
  56. package/dist-es/commands/RemoveAccountFromOrganizationCommand.js +3 -9
  57. package/dist-es/commands/TagResourceCommand.js +3 -9
  58. package/dist-es/commands/UntagResourceCommand.js +3 -9
  59. package/dist-es/commands/UpdateOrganizationalUnitCommand.js +3 -9
  60. package/dist-es/commands/UpdatePolicyCommand.js +3 -9
  61. package/dist-es/models/models_0.js +0 -132
  62. package/dist-es/runtimeConfig.shared.js +7 -0
  63. package/dist-es/schemas/schemas_0.js +1627 -0
  64. package/dist-types/OrganizationsClient.d.ts +10 -1
  65. package/dist-types/models/models_0.d.ts +0 -116
  66. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  67. package/dist-types/runtimeConfig.d.ts +1 -0
  68. package/dist-types/runtimeConfig.native.d.ts +1 -0
  69. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  70. package/dist-types/schemas/schemas_0.d.ts +249 -0
  71. package/dist-types/ts3.4/OrganizationsClient.d.ts +4 -0
  72. package/dist-types/ts3.4/models/models_0.d.ts +0 -81
  73. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  74. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  75. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  76. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  77. package/dist-types/ts3.4/schemas/schemas_0.d.ts +255 -0
  78. package/package.json +5 -5
  79. package/dist-es/protocols/Aws_json1_1.js +0 -1899
  80. package/dist-types/protocols/Aws_json1_1.d.ts +0 -515
  81. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +0 -689
@@ -1,1899 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
4
- import { AccessDeniedException, AccessDeniedForDependencyException, AccountAlreadyClosedException, AccountAlreadyRegisteredException, AccountNotFoundException, AccountNotRegisteredException, AccountOwnerNotVerifiedException, AlreadyInOrganizationException, AWSOrganizationsNotInUseException, ChildNotFoundException, ConcurrentModificationException, ConflictException, ConstraintViolationException, CreateAccountStatusNotFoundException, DestinationParentNotFoundException, DuplicateAccountException, DuplicateHandshakeException, DuplicateOrganizationalUnitException, DuplicatePolicyAttachmentException, DuplicatePolicyException, EffectivePolicyNotFoundException, FinalizingOrganizationException, HandshakeAlreadyInStateException, HandshakeConstraintViolationException, HandshakeNotFoundException, InvalidHandshakeTransitionException, InvalidInputException, MalformedPolicyDocumentException, MasterCannotLeaveOrganizationException, OrganizationalUnitNotEmptyException, OrganizationalUnitNotFoundException, OrganizationNotEmptyException, ParentNotFoundException, PolicyChangesInProgressException, PolicyInUseException, PolicyNotAttachedException, PolicyNotFoundException, PolicyTypeAlreadyEnabledException, PolicyTypeNotAvailableForOrganizationException, PolicyTypeNotEnabledException, ResourcePolicyNotFoundException, RootNotFoundException, ServiceException, SourceParentNotFoundException, TargetNotFoundException, TooManyRequestsException, UnsupportedAPIEndpointException, } from "../models/models_0";
5
- import { OrganizationsServiceException as __BaseException } from "../models/OrganizationsServiceException";
6
- export const se_AcceptHandshakeCommand = async (input, context) => {
7
- const headers = sharedHeaders("AcceptHandshake");
8
- let body;
9
- body = JSON.stringify(_json(input));
10
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
11
- };
12
- export const se_AttachPolicyCommand = async (input, context) => {
13
- const headers = sharedHeaders("AttachPolicy");
14
- let body;
15
- body = JSON.stringify(_json(input));
16
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
- };
18
- export const se_CancelHandshakeCommand = async (input, context) => {
19
- const headers = sharedHeaders("CancelHandshake");
20
- let body;
21
- body = JSON.stringify(_json(input));
22
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
- };
24
- export const se_CloseAccountCommand = async (input, context) => {
25
- const headers = sharedHeaders("CloseAccount");
26
- let body;
27
- body = JSON.stringify(_json(input));
28
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
29
- };
30
- export const se_CreateAccountCommand = async (input, context) => {
31
- const headers = sharedHeaders("CreateAccount");
32
- let body;
33
- body = JSON.stringify(_json(input));
34
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
- };
36
- export const se_CreateGovCloudAccountCommand = async (input, context) => {
37
- const headers = sharedHeaders("CreateGovCloudAccount");
38
- let body;
39
- body = JSON.stringify(_json(input));
40
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
- };
42
- export const se_CreateOrganizationCommand = async (input, context) => {
43
- const headers = sharedHeaders("CreateOrganization");
44
- let body;
45
- body = JSON.stringify(_json(input));
46
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
47
- };
48
- export const se_CreateOrganizationalUnitCommand = async (input, context) => {
49
- const headers = sharedHeaders("CreateOrganizationalUnit");
50
- let body;
51
- body = JSON.stringify(_json(input));
52
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
53
- };
54
- export const se_CreatePolicyCommand = async (input, context) => {
55
- const headers = sharedHeaders("CreatePolicy");
56
- let body;
57
- body = JSON.stringify(_json(input));
58
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
- };
60
- export const se_DeclineHandshakeCommand = async (input, context) => {
61
- const headers = sharedHeaders("DeclineHandshake");
62
- let body;
63
- body = JSON.stringify(_json(input));
64
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
65
- };
66
- export const se_DeleteOrganizationCommand = async (input, context) => {
67
- const headers = sharedHeaders("DeleteOrganization");
68
- const body = "{}";
69
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
70
- };
71
- export const se_DeleteOrganizationalUnitCommand = async (input, context) => {
72
- const headers = sharedHeaders("DeleteOrganizationalUnit");
73
- let body;
74
- body = JSON.stringify(_json(input));
75
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
- };
77
- export const se_DeletePolicyCommand = async (input, context) => {
78
- const headers = sharedHeaders("DeletePolicy");
79
- let body;
80
- body = JSON.stringify(_json(input));
81
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
82
- };
83
- export const se_DeleteResourcePolicyCommand = async (input, context) => {
84
- const headers = sharedHeaders("DeleteResourcePolicy");
85
- const body = "{}";
86
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
87
- };
88
- export const se_DeregisterDelegatedAdministratorCommand = async (input, context) => {
89
- const headers = sharedHeaders("DeregisterDelegatedAdministrator");
90
- let body;
91
- body = JSON.stringify(_json(input));
92
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
93
- };
94
- export const se_DescribeAccountCommand = async (input, context) => {
95
- const headers = sharedHeaders("DescribeAccount");
96
- let body;
97
- body = JSON.stringify(_json(input));
98
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
99
- };
100
- export const se_DescribeCreateAccountStatusCommand = async (input, context) => {
101
- const headers = sharedHeaders("DescribeCreateAccountStatus");
102
- let body;
103
- body = JSON.stringify(_json(input));
104
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
105
- };
106
- export const se_DescribeEffectivePolicyCommand = async (input, context) => {
107
- const headers = sharedHeaders("DescribeEffectivePolicy");
108
- let body;
109
- body = JSON.stringify(_json(input));
110
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
111
- };
112
- export const se_DescribeHandshakeCommand = async (input, context) => {
113
- const headers = sharedHeaders("DescribeHandshake");
114
- let body;
115
- body = JSON.stringify(_json(input));
116
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
117
- };
118
- export const se_DescribeOrganizationCommand = async (input, context) => {
119
- const headers = sharedHeaders("DescribeOrganization");
120
- const body = "{}";
121
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
122
- };
123
- export const se_DescribeOrganizationalUnitCommand = async (input, context) => {
124
- const headers = sharedHeaders("DescribeOrganizationalUnit");
125
- let body;
126
- body = JSON.stringify(_json(input));
127
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
128
- };
129
- export const se_DescribePolicyCommand = async (input, context) => {
130
- const headers = sharedHeaders("DescribePolicy");
131
- let body;
132
- body = JSON.stringify(_json(input));
133
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
134
- };
135
- export const se_DescribeResourcePolicyCommand = async (input, context) => {
136
- const headers = sharedHeaders("DescribeResourcePolicy");
137
- const body = "{}";
138
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
139
- };
140
- export const se_DetachPolicyCommand = async (input, context) => {
141
- const headers = sharedHeaders("DetachPolicy");
142
- let body;
143
- body = JSON.stringify(_json(input));
144
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
145
- };
146
- export const se_DisableAWSServiceAccessCommand = async (input, context) => {
147
- const headers = sharedHeaders("DisableAWSServiceAccess");
148
- let body;
149
- body = JSON.stringify(_json(input));
150
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
151
- };
152
- export const se_DisablePolicyTypeCommand = async (input, context) => {
153
- const headers = sharedHeaders("DisablePolicyType");
154
- let body;
155
- body = JSON.stringify(_json(input));
156
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
157
- };
158
- export const se_EnableAllFeaturesCommand = async (input, context) => {
159
- const headers = sharedHeaders("EnableAllFeatures");
160
- let body;
161
- body = JSON.stringify(_json(input));
162
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
163
- };
164
- export const se_EnableAWSServiceAccessCommand = async (input, context) => {
165
- const headers = sharedHeaders("EnableAWSServiceAccess");
166
- let body;
167
- body = JSON.stringify(_json(input));
168
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
169
- };
170
- export const se_EnablePolicyTypeCommand = async (input, context) => {
171
- const headers = sharedHeaders("EnablePolicyType");
172
- let body;
173
- body = JSON.stringify(_json(input));
174
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
- };
176
- export const se_InviteAccountToOrganizationCommand = async (input, context) => {
177
- const headers = sharedHeaders("InviteAccountToOrganization");
178
- let body;
179
- body = JSON.stringify(_json(input));
180
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
181
- };
182
- export const se_LeaveOrganizationCommand = async (input, context) => {
183
- const headers = sharedHeaders("LeaveOrganization");
184
- const body = "{}";
185
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
186
- };
187
- export const se_ListAccountsCommand = async (input, context) => {
188
- const headers = sharedHeaders("ListAccounts");
189
- let body;
190
- body = JSON.stringify(_json(input));
191
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
192
- };
193
- export const se_ListAccountsForParentCommand = async (input, context) => {
194
- const headers = sharedHeaders("ListAccountsForParent");
195
- let body;
196
- body = JSON.stringify(_json(input));
197
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
198
- };
199
- export const se_ListAccountsWithInvalidEffectivePolicyCommand = async (input, context) => {
200
- const headers = sharedHeaders("ListAccountsWithInvalidEffectivePolicy");
201
- let body;
202
- body = JSON.stringify(_json(input));
203
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
204
- };
205
- export const se_ListAWSServiceAccessForOrganizationCommand = async (input, context) => {
206
- const headers = sharedHeaders("ListAWSServiceAccessForOrganization");
207
- let body;
208
- body = JSON.stringify(_json(input));
209
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
210
- };
211
- export const se_ListChildrenCommand = async (input, context) => {
212
- const headers = sharedHeaders("ListChildren");
213
- let body;
214
- body = JSON.stringify(_json(input));
215
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
216
- };
217
- export const se_ListCreateAccountStatusCommand = async (input, context) => {
218
- const headers = sharedHeaders("ListCreateAccountStatus");
219
- let body;
220
- body = JSON.stringify(_json(input));
221
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
222
- };
223
- export const se_ListDelegatedAdministratorsCommand = async (input, context) => {
224
- const headers = sharedHeaders("ListDelegatedAdministrators");
225
- let body;
226
- body = JSON.stringify(_json(input));
227
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
228
- };
229
- export const se_ListDelegatedServicesForAccountCommand = async (input, context) => {
230
- const headers = sharedHeaders("ListDelegatedServicesForAccount");
231
- let body;
232
- body = JSON.stringify(_json(input));
233
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
234
- };
235
- export const se_ListEffectivePolicyValidationErrorsCommand = async (input, context) => {
236
- const headers = sharedHeaders("ListEffectivePolicyValidationErrors");
237
- let body;
238
- body = JSON.stringify(_json(input));
239
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
240
- };
241
- export const se_ListHandshakesForAccountCommand = async (input, context) => {
242
- const headers = sharedHeaders("ListHandshakesForAccount");
243
- let body;
244
- body = JSON.stringify(_json(input));
245
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
246
- };
247
- export const se_ListHandshakesForOrganizationCommand = async (input, context) => {
248
- const headers = sharedHeaders("ListHandshakesForOrganization");
249
- let body;
250
- body = JSON.stringify(_json(input));
251
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
252
- };
253
- export const se_ListOrganizationalUnitsForParentCommand = async (input, context) => {
254
- const headers = sharedHeaders("ListOrganizationalUnitsForParent");
255
- let body;
256
- body = JSON.stringify(_json(input));
257
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
258
- };
259
- export const se_ListParentsCommand = async (input, context) => {
260
- const headers = sharedHeaders("ListParents");
261
- let body;
262
- body = JSON.stringify(_json(input));
263
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
264
- };
265
- export const se_ListPoliciesCommand = async (input, context) => {
266
- const headers = sharedHeaders("ListPolicies");
267
- let body;
268
- body = JSON.stringify(_json(input));
269
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
270
- };
271
- export const se_ListPoliciesForTargetCommand = async (input, context) => {
272
- const headers = sharedHeaders("ListPoliciesForTarget");
273
- let body;
274
- body = JSON.stringify(_json(input));
275
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
276
- };
277
- export const se_ListRootsCommand = async (input, context) => {
278
- const headers = sharedHeaders("ListRoots");
279
- let body;
280
- body = JSON.stringify(_json(input));
281
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
282
- };
283
- export const se_ListTagsForResourceCommand = async (input, context) => {
284
- const headers = sharedHeaders("ListTagsForResource");
285
- let body;
286
- body = JSON.stringify(_json(input));
287
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
288
- };
289
- export const se_ListTargetsForPolicyCommand = async (input, context) => {
290
- const headers = sharedHeaders("ListTargetsForPolicy");
291
- let body;
292
- body = JSON.stringify(_json(input));
293
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
294
- };
295
- export const se_MoveAccountCommand = async (input, context) => {
296
- const headers = sharedHeaders("MoveAccount");
297
- let body;
298
- body = JSON.stringify(_json(input));
299
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
300
- };
301
- export const se_PutResourcePolicyCommand = async (input, context) => {
302
- const headers = sharedHeaders("PutResourcePolicy");
303
- let body;
304
- body = JSON.stringify(_json(input));
305
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
306
- };
307
- export const se_RegisterDelegatedAdministratorCommand = async (input, context) => {
308
- const headers = sharedHeaders("RegisterDelegatedAdministrator");
309
- let body;
310
- body = JSON.stringify(_json(input));
311
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
312
- };
313
- export const se_RemoveAccountFromOrganizationCommand = async (input, context) => {
314
- const headers = sharedHeaders("RemoveAccountFromOrganization");
315
- let body;
316
- body = JSON.stringify(_json(input));
317
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
318
- };
319
- export const se_TagResourceCommand = async (input, context) => {
320
- const headers = sharedHeaders("TagResource");
321
- let body;
322
- body = JSON.stringify(_json(input));
323
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
324
- };
325
- export const se_UntagResourceCommand = async (input, context) => {
326
- const headers = sharedHeaders("UntagResource");
327
- let body;
328
- body = JSON.stringify(_json(input));
329
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
330
- };
331
- export const se_UpdateOrganizationalUnitCommand = async (input, context) => {
332
- const headers = sharedHeaders("UpdateOrganizationalUnit");
333
- let body;
334
- body = JSON.stringify(_json(input));
335
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
336
- };
337
- export const se_UpdatePolicyCommand = async (input, context) => {
338
- const headers = sharedHeaders("UpdatePolicy");
339
- let body;
340
- body = JSON.stringify(_json(input));
341
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
342
- };
343
- export const de_AcceptHandshakeCommand = async (output, context) => {
344
- if (output.statusCode >= 300) {
345
- return de_CommandError(output, context);
346
- }
347
- const data = await parseBody(output.body, context);
348
- let contents = {};
349
- contents = de_AcceptHandshakeResponse(data, context);
350
- const response = {
351
- $metadata: deserializeMetadata(output),
352
- ...contents,
353
- };
354
- return response;
355
- };
356
- export const de_AttachPolicyCommand = async (output, context) => {
357
- if (output.statusCode >= 300) {
358
- return de_CommandError(output, context);
359
- }
360
- await collectBody(output.body, context);
361
- const response = {
362
- $metadata: deserializeMetadata(output),
363
- };
364
- return response;
365
- };
366
- export const de_CancelHandshakeCommand = async (output, context) => {
367
- if (output.statusCode >= 300) {
368
- return de_CommandError(output, context);
369
- }
370
- const data = await parseBody(output.body, context);
371
- let contents = {};
372
- contents = de_CancelHandshakeResponse(data, context);
373
- const response = {
374
- $metadata: deserializeMetadata(output),
375
- ...contents,
376
- };
377
- return response;
378
- };
379
- export const de_CloseAccountCommand = async (output, context) => {
380
- if (output.statusCode >= 300) {
381
- return de_CommandError(output, context);
382
- }
383
- await collectBody(output.body, context);
384
- const response = {
385
- $metadata: deserializeMetadata(output),
386
- };
387
- return response;
388
- };
389
- export const de_CreateAccountCommand = async (output, context) => {
390
- if (output.statusCode >= 300) {
391
- return de_CommandError(output, context);
392
- }
393
- const data = await parseBody(output.body, context);
394
- let contents = {};
395
- contents = de_CreateAccountResponse(data, context);
396
- const response = {
397
- $metadata: deserializeMetadata(output),
398
- ...contents,
399
- };
400
- return response;
401
- };
402
- export const de_CreateGovCloudAccountCommand = async (output, context) => {
403
- if (output.statusCode >= 300) {
404
- return de_CommandError(output, context);
405
- }
406
- const data = await parseBody(output.body, context);
407
- let contents = {};
408
- contents = de_CreateGovCloudAccountResponse(data, context);
409
- const response = {
410
- $metadata: deserializeMetadata(output),
411
- ...contents,
412
- };
413
- return response;
414
- };
415
- export const de_CreateOrganizationCommand = async (output, context) => {
416
- if (output.statusCode >= 300) {
417
- return de_CommandError(output, context);
418
- }
419
- const data = await parseBody(output.body, context);
420
- let contents = {};
421
- contents = _json(data);
422
- const response = {
423
- $metadata: deserializeMetadata(output),
424
- ...contents,
425
- };
426
- return response;
427
- };
428
- export const de_CreateOrganizationalUnitCommand = async (output, context) => {
429
- if (output.statusCode >= 300) {
430
- return de_CommandError(output, context);
431
- }
432
- const data = await parseBody(output.body, context);
433
- let contents = {};
434
- contents = _json(data);
435
- const response = {
436
- $metadata: deserializeMetadata(output),
437
- ...contents,
438
- };
439
- return response;
440
- };
441
- export const de_CreatePolicyCommand = async (output, context) => {
442
- if (output.statusCode >= 300) {
443
- return de_CommandError(output, context);
444
- }
445
- const data = await parseBody(output.body, context);
446
- let contents = {};
447
- contents = _json(data);
448
- const response = {
449
- $metadata: deserializeMetadata(output),
450
- ...contents,
451
- };
452
- return response;
453
- };
454
- export const de_DeclineHandshakeCommand = async (output, context) => {
455
- if (output.statusCode >= 300) {
456
- return de_CommandError(output, context);
457
- }
458
- const data = await parseBody(output.body, context);
459
- let contents = {};
460
- contents = de_DeclineHandshakeResponse(data, context);
461
- const response = {
462
- $metadata: deserializeMetadata(output),
463
- ...contents,
464
- };
465
- return response;
466
- };
467
- export const de_DeleteOrganizationCommand = async (output, context) => {
468
- if (output.statusCode >= 300) {
469
- return de_CommandError(output, context);
470
- }
471
- await collectBody(output.body, context);
472
- const response = {
473
- $metadata: deserializeMetadata(output),
474
- };
475
- return response;
476
- };
477
- export const de_DeleteOrganizationalUnitCommand = async (output, context) => {
478
- if (output.statusCode >= 300) {
479
- return de_CommandError(output, context);
480
- }
481
- await collectBody(output.body, context);
482
- const response = {
483
- $metadata: deserializeMetadata(output),
484
- };
485
- return response;
486
- };
487
- export const de_DeletePolicyCommand = async (output, context) => {
488
- if (output.statusCode >= 300) {
489
- return de_CommandError(output, context);
490
- }
491
- await collectBody(output.body, context);
492
- const response = {
493
- $metadata: deserializeMetadata(output),
494
- };
495
- return response;
496
- };
497
- export const de_DeleteResourcePolicyCommand = async (output, context) => {
498
- if (output.statusCode >= 300) {
499
- return de_CommandError(output, context);
500
- }
501
- await collectBody(output.body, context);
502
- const response = {
503
- $metadata: deserializeMetadata(output),
504
- };
505
- return response;
506
- };
507
- export const de_DeregisterDelegatedAdministratorCommand = async (output, context) => {
508
- if (output.statusCode >= 300) {
509
- return de_CommandError(output, context);
510
- }
511
- await collectBody(output.body, context);
512
- const response = {
513
- $metadata: deserializeMetadata(output),
514
- };
515
- return response;
516
- };
517
- export const de_DescribeAccountCommand = async (output, context) => {
518
- if (output.statusCode >= 300) {
519
- return de_CommandError(output, context);
520
- }
521
- const data = await parseBody(output.body, context);
522
- let contents = {};
523
- contents = de_DescribeAccountResponse(data, context);
524
- const response = {
525
- $metadata: deserializeMetadata(output),
526
- ...contents,
527
- };
528
- return response;
529
- };
530
- export const de_DescribeCreateAccountStatusCommand = async (output, context) => {
531
- if (output.statusCode >= 300) {
532
- return de_CommandError(output, context);
533
- }
534
- const data = await parseBody(output.body, context);
535
- let contents = {};
536
- contents = de_DescribeCreateAccountStatusResponse(data, context);
537
- const response = {
538
- $metadata: deserializeMetadata(output),
539
- ...contents,
540
- };
541
- return response;
542
- };
543
- export const de_DescribeEffectivePolicyCommand = async (output, context) => {
544
- if (output.statusCode >= 300) {
545
- return de_CommandError(output, context);
546
- }
547
- const data = await parseBody(output.body, context);
548
- let contents = {};
549
- contents = de_DescribeEffectivePolicyResponse(data, context);
550
- const response = {
551
- $metadata: deserializeMetadata(output),
552
- ...contents,
553
- };
554
- return response;
555
- };
556
- export const de_DescribeHandshakeCommand = async (output, context) => {
557
- if (output.statusCode >= 300) {
558
- return de_CommandError(output, context);
559
- }
560
- const data = await parseBody(output.body, context);
561
- let contents = {};
562
- contents = de_DescribeHandshakeResponse(data, context);
563
- const response = {
564
- $metadata: deserializeMetadata(output),
565
- ...contents,
566
- };
567
- return response;
568
- };
569
- export const de_DescribeOrganizationCommand = async (output, context) => {
570
- if (output.statusCode >= 300) {
571
- return de_CommandError(output, context);
572
- }
573
- const data = await parseBody(output.body, context);
574
- let contents = {};
575
- contents = _json(data);
576
- const response = {
577
- $metadata: deserializeMetadata(output),
578
- ...contents,
579
- };
580
- return response;
581
- };
582
- export const de_DescribeOrganizationalUnitCommand = async (output, context) => {
583
- if (output.statusCode >= 300) {
584
- return de_CommandError(output, context);
585
- }
586
- const data = await parseBody(output.body, context);
587
- let contents = {};
588
- contents = _json(data);
589
- const response = {
590
- $metadata: deserializeMetadata(output),
591
- ...contents,
592
- };
593
- return response;
594
- };
595
- export const de_DescribePolicyCommand = async (output, context) => {
596
- if (output.statusCode >= 300) {
597
- return de_CommandError(output, context);
598
- }
599
- const data = await parseBody(output.body, context);
600
- let contents = {};
601
- contents = _json(data);
602
- const response = {
603
- $metadata: deserializeMetadata(output),
604
- ...contents,
605
- };
606
- return response;
607
- };
608
- export const de_DescribeResourcePolicyCommand = async (output, context) => {
609
- if (output.statusCode >= 300) {
610
- return de_CommandError(output, context);
611
- }
612
- const data = await parseBody(output.body, context);
613
- let contents = {};
614
- contents = _json(data);
615
- const response = {
616
- $metadata: deserializeMetadata(output),
617
- ...contents,
618
- };
619
- return response;
620
- };
621
- export const de_DetachPolicyCommand = async (output, context) => {
622
- if (output.statusCode >= 300) {
623
- return de_CommandError(output, context);
624
- }
625
- await collectBody(output.body, context);
626
- const response = {
627
- $metadata: deserializeMetadata(output),
628
- };
629
- return response;
630
- };
631
- export const de_DisableAWSServiceAccessCommand = async (output, context) => {
632
- if (output.statusCode >= 300) {
633
- return de_CommandError(output, context);
634
- }
635
- await collectBody(output.body, context);
636
- const response = {
637
- $metadata: deserializeMetadata(output),
638
- };
639
- return response;
640
- };
641
- export const de_DisablePolicyTypeCommand = async (output, context) => {
642
- if (output.statusCode >= 300) {
643
- return de_CommandError(output, context);
644
- }
645
- const data = await parseBody(output.body, context);
646
- let contents = {};
647
- contents = _json(data);
648
- const response = {
649
- $metadata: deserializeMetadata(output),
650
- ...contents,
651
- };
652
- return response;
653
- };
654
- export const de_EnableAllFeaturesCommand = async (output, context) => {
655
- if (output.statusCode >= 300) {
656
- return de_CommandError(output, context);
657
- }
658
- const data = await parseBody(output.body, context);
659
- let contents = {};
660
- contents = de_EnableAllFeaturesResponse(data, context);
661
- const response = {
662
- $metadata: deserializeMetadata(output),
663
- ...contents,
664
- };
665
- return response;
666
- };
667
- export const de_EnableAWSServiceAccessCommand = async (output, context) => {
668
- if (output.statusCode >= 300) {
669
- return de_CommandError(output, context);
670
- }
671
- await collectBody(output.body, context);
672
- const response = {
673
- $metadata: deserializeMetadata(output),
674
- };
675
- return response;
676
- };
677
- export const de_EnablePolicyTypeCommand = async (output, context) => {
678
- if (output.statusCode >= 300) {
679
- return de_CommandError(output, context);
680
- }
681
- const data = await parseBody(output.body, context);
682
- let contents = {};
683
- contents = _json(data);
684
- const response = {
685
- $metadata: deserializeMetadata(output),
686
- ...contents,
687
- };
688
- return response;
689
- };
690
- export const de_InviteAccountToOrganizationCommand = async (output, context) => {
691
- if (output.statusCode >= 300) {
692
- return de_CommandError(output, context);
693
- }
694
- const data = await parseBody(output.body, context);
695
- let contents = {};
696
- contents = de_InviteAccountToOrganizationResponse(data, context);
697
- const response = {
698
- $metadata: deserializeMetadata(output),
699
- ...contents,
700
- };
701
- return response;
702
- };
703
- export const de_LeaveOrganizationCommand = async (output, context) => {
704
- if (output.statusCode >= 300) {
705
- return de_CommandError(output, context);
706
- }
707
- await collectBody(output.body, context);
708
- const response = {
709
- $metadata: deserializeMetadata(output),
710
- };
711
- return response;
712
- };
713
- export const de_ListAccountsCommand = async (output, context) => {
714
- if (output.statusCode >= 300) {
715
- return de_CommandError(output, context);
716
- }
717
- const data = await parseBody(output.body, context);
718
- let contents = {};
719
- contents = de_ListAccountsResponse(data, context);
720
- const response = {
721
- $metadata: deserializeMetadata(output),
722
- ...contents,
723
- };
724
- return response;
725
- };
726
- export const de_ListAccountsForParentCommand = async (output, context) => {
727
- if (output.statusCode >= 300) {
728
- return de_CommandError(output, context);
729
- }
730
- const data = await parseBody(output.body, context);
731
- let contents = {};
732
- contents = de_ListAccountsForParentResponse(data, context);
733
- const response = {
734
- $metadata: deserializeMetadata(output),
735
- ...contents,
736
- };
737
- return response;
738
- };
739
- export const de_ListAccountsWithInvalidEffectivePolicyCommand = async (output, context) => {
740
- if (output.statusCode >= 300) {
741
- return de_CommandError(output, context);
742
- }
743
- const data = await parseBody(output.body, context);
744
- let contents = {};
745
- contents = de_ListAccountsWithInvalidEffectivePolicyResponse(data, context);
746
- const response = {
747
- $metadata: deserializeMetadata(output),
748
- ...contents,
749
- };
750
- return response;
751
- };
752
- export const de_ListAWSServiceAccessForOrganizationCommand = async (output, context) => {
753
- if (output.statusCode >= 300) {
754
- return de_CommandError(output, context);
755
- }
756
- const data = await parseBody(output.body, context);
757
- let contents = {};
758
- contents = de_ListAWSServiceAccessForOrganizationResponse(data, context);
759
- const response = {
760
- $metadata: deserializeMetadata(output),
761
- ...contents,
762
- };
763
- return response;
764
- };
765
- export const de_ListChildrenCommand = async (output, context) => {
766
- if (output.statusCode >= 300) {
767
- return de_CommandError(output, context);
768
- }
769
- const data = await parseBody(output.body, context);
770
- let contents = {};
771
- contents = _json(data);
772
- const response = {
773
- $metadata: deserializeMetadata(output),
774
- ...contents,
775
- };
776
- return response;
777
- };
778
- export const de_ListCreateAccountStatusCommand = async (output, context) => {
779
- if (output.statusCode >= 300) {
780
- return de_CommandError(output, context);
781
- }
782
- const data = await parseBody(output.body, context);
783
- let contents = {};
784
- contents = de_ListCreateAccountStatusResponse(data, context);
785
- const response = {
786
- $metadata: deserializeMetadata(output),
787
- ...contents,
788
- };
789
- return response;
790
- };
791
- export const de_ListDelegatedAdministratorsCommand = async (output, context) => {
792
- if (output.statusCode >= 300) {
793
- return de_CommandError(output, context);
794
- }
795
- const data = await parseBody(output.body, context);
796
- let contents = {};
797
- contents = de_ListDelegatedAdministratorsResponse(data, context);
798
- const response = {
799
- $metadata: deserializeMetadata(output),
800
- ...contents,
801
- };
802
- return response;
803
- };
804
- export const de_ListDelegatedServicesForAccountCommand = async (output, context) => {
805
- if (output.statusCode >= 300) {
806
- return de_CommandError(output, context);
807
- }
808
- const data = await parseBody(output.body, context);
809
- let contents = {};
810
- contents = de_ListDelegatedServicesForAccountResponse(data, context);
811
- const response = {
812
- $metadata: deserializeMetadata(output),
813
- ...contents,
814
- };
815
- return response;
816
- };
817
- export const de_ListEffectivePolicyValidationErrorsCommand = async (output, context) => {
818
- if (output.statusCode >= 300) {
819
- return de_CommandError(output, context);
820
- }
821
- const data = await parseBody(output.body, context);
822
- let contents = {};
823
- contents = de_ListEffectivePolicyValidationErrorsResponse(data, context);
824
- const response = {
825
- $metadata: deserializeMetadata(output),
826
- ...contents,
827
- };
828
- return response;
829
- };
830
- export const de_ListHandshakesForAccountCommand = async (output, context) => {
831
- if (output.statusCode >= 300) {
832
- return de_CommandError(output, context);
833
- }
834
- const data = await parseBody(output.body, context);
835
- let contents = {};
836
- contents = de_ListHandshakesForAccountResponse(data, context);
837
- const response = {
838
- $metadata: deserializeMetadata(output),
839
- ...contents,
840
- };
841
- return response;
842
- };
843
- export const de_ListHandshakesForOrganizationCommand = async (output, context) => {
844
- if (output.statusCode >= 300) {
845
- return de_CommandError(output, context);
846
- }
847
- const data = await parseBody(output.body, context);
848
- let contents = {};
849
- contents = de_ListHandshakesForOrganizationResponse(data, context);
850
- const response = {
851
- $metadata: deserializeMetadata(output),
852
- ...contents,
853
- };
854
- return response;
855
- };
856
- export const de_ListOrganizationalUnitsForParentCommand = async (output, context) => {
857
- if (output.statusCode >= 300) {
858
- return de_CommandError(output, context);
859
- }
860
- const data = await parseBody(output.body, context);
861
- let contents = {};
862
- contents = _json(data);
863
- const response = {
864
- $metadata: deserializeMetadata(output),
865
- ...contents,
866
- };
867
- return response;
868
- };
869
- export const de_ListParentsCommand = async (output, context) => {
870
- if (output.statusCode >= 300) {
871
- return de_CommandError(output, context);
872
- }
873
- const data = await parseBody(output.body, context);
874
- let contents = {};
875
- contents = _json(data);
876
- const response = {
877
- $metadata: deserializeMetadata(output),
878
- ...contents,
879
- };
880
- return response;
881
- };
882
- export const de_ListPoliciesCommand = async (output, context) => {
883
- if (output.statusCode >= 300) {
884
- return de_CommandError(output, context);
885
- }
886
- const data = await parseBody(output.body, context);
887
- let contents = {};
888
- contents = _json(data);
889
- const response = {
890
- $metadata: deserializeMetadata(output),
891
- ...contents,
892
- };
893
- return response;
894
- };
895
- export const de_ListPoliciesForTargetCommand = async (output, context) => {
896
- if (output.statusCode >= 300) {
897
- return de_CommandError(output, context);
898
- }
899
- const data = await parseBody(output.body, context);
900
- let contents = {};
901
- contents = _json(data);
902
- const response = {
903
- $metadata: deserializeMetadata(output),
904
- ...contents,
905
- };
906
- return response;
907
- };
908
- export const de_ListRootsCommand = async (output, context) => {
909
- if (output.statusCode >= 300) {
910
- return de_CommandError(output, context);
911
- }
912
- const data = await parseBody(output.body, context);
913
- let contents = {};
914
- contents = _json(data);
915
- const response = {
916
- $metadata: deserializeMetadata(output),
917
- ...contents,
918
- };
919
- return response;
920
- };
921
- export const de_ListTagsForResourceCommand = async (output, context) => {
922
- if (output.statusCode >= 300) {
923
- return de_CommandError(output, context);
924
- }
925
- const data = await parseBody(output.body, context);
926
- let contents = {};
927
- contents = _json(data);
928
- const response = {
929
- $metadata: deserializeMetadata(output),
930
- ...contents,
931
- };
932
- return response;
933
- };
934
- export const de_ListTargetsForPolicyCommand = async (output, context) => {
935
- if (output.statusCode >= 300) {
936
- return de_CommandError(output, context);
937
- }
938
- const data = await parseBody(output.body, context);
939
- let contents = {};
940
- contents = _json(data);
941
- const response = {
942
- $metadata: deserializeMetadata(output),
943
- ...contents,
944
- };
945
- return response;
946
- };
947
- export const de_MoveAccountCommand = async (output, context) => {
948
- if (output.statusCode >= 300) {
949
- return de_CommandError(output, context);
950
- }
951
- await collectBody(output.body, context);
952
- const response = {
953
- $metadata: deserializeMetadata(output),
954
- };
955
- return response;
956
- };
957
- export const de_PutResourcePolicyCommand = async (output, context) => {
958
- if (output.statusCode >= 300) {
959
- return de_CommandError(output, context);
960
- }
961
- const data = await parseBody(output.body, context);
962
- let contents = {};
963
- contents = _json(data);
964
- const response = {
965
- $metadata: deserializeMetadata(output),
966
- ...contents,
967
- };
968
- return response;
969
- };
970
- export const de_RegisterDelegatedAdministratorCommand = async (output, context) => {
971
- if (output.statusCode >= 300) {
972
- return de_CommandError(output, context);
973
- }
974
- await collectBody(output.body, context);
975
- const response = {
976
- $metadata: deserializeMetadata(output),
977
- };
978
- return response;
979
- };
980
- export const de_RemoveAccountFromOrganizationCommand = async (output, context) => {
981
- if (output.statusCode >= 300) {
982
- return de_CommandError(output, context);
983
- }
984
- await collectBody(output.body, context);
985
- const response = {
986
- $metadata: deserializeMetadata(output),
987
- };
988
- return response;
989
- };
990
- export const de_TagResourceCommand = async (output, context) => {
991
- if (output.statusCode >= 300) {
992
- return de_CommandError(output, context);
993
- }
994
- await collectBody(output.body, context);
995
- const response = {
996
- $metadata: deserializeMetadata(output),
997
- };
998
- return response;
999
- };
1000
- export const de_UntagResourceCommand = async (output, context) => {
1001
- if (output.statusCode >= 300) {
1002
- return de_CommandError(output, context);
1003
- }
1004
- await collectBody(output.body, context);
1005
- const response = {
1006
- $metadata: deserializeMetadata(output),
1007
- };
1008
- return response;
1009
- };
1010
- export const de_UpdateOrganizationalUnitCommand = async (output, context) => {
1011
- if (output.statusCode >= 300) {
1012
- return de_CommandError(output, context);
1013
- }
1014
- const data = await parseBody(output.body, context);
1015
- let contents = {};
1016
- contents = _json(data);
1017
- const response = {
1018
- $metadata: deserializeMetadata(output),
1019
- ...contents,
1020
- };
1021
- return response;
1022
- };
1023
- export const de_UpdatePolicyCommand = async (output, context) => {
1024
- if (output.statusCode >= 300) {
1025
- return de_CommandError(output, context);
1026
- }
1027
- const data = await parseBody(output.body, context);
1028
- let contents = {};
1029
- contents = _json(data);
1030
- const response = {
1031
- $metadata: deserializeMetadata(output),
1032
- ...contents,
1033
- };
1034
- return response;
1035
- };
1036
- const de_CommandError = async (output, context) => {
1037
- const parsedOutput = {
1038
- ...output,
1039
- body: await parseErrorBody(output.body, context),
1040
- };
1041
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1042
- switch (errorCode) {
1043
- case "AWSOrganizationsNotInUseException":
1044
- case "com.amazonaws.organizations#AWSOrganizationsNotInUseException":
1045
- throw await de_AWSOrganizationsNotInUseExceptionRes(parsedOutput, context);
1046
- case "AccessDeniedException":
1047
- case "com.amazonaws.organizations#AccessDeniedException":
1048
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1049
- case "AccessDeniedForDependencyException":
1050
- case "com.amazonaws.organizations#AccessDeniedForDependencyException":
1051
- throw await de_AccessDeniedForDependencyExceptionRes(parsedOutput, context);
1052
- case "ConcurrentModificationException":
1053
- case "com.amazonaws.organizations#ConcurrentModificationException":
1054
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1055
- case "HandshakeAlreadyInStateException":
1056
- case "com.amazonaws.organizations#HandshakeAlreadyInStateException":
1057
- throw await de_HandshakeAlreadyInStateExceptionRes(parsedOutput, context);
1058
- case "HandshakeConstraintViolationException":
1059
- case "com.amazonaws.organizations#HandshakeConstraintViolationException":
1060
- throw await de_HandshakeConstraintViolationExceptionRes(parsedOutput, context);
1061
- case "HandshakeNotFoundException":
1062
- case "com.amazonaws.organizations#HandshakeNotFoundException":
1063
- throw await de_HandshakeNotFoundExceptionRes(parsedOutput, context);
1064
- case "InvalidHandshakeTransitionException":
1065
- case "com.amazonaws.organizations#InvalidHandshakeTransitionException":
1066
- throw await de_InvalidHandshakeTransitionExceptionRes(parsedOutput, context);
1067
- case "InvalidInputException":
1068
- case "com.amazonaws.organizations#InvalidInputException":
1069
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
1070
- case "ServiceException":
1071
- case "com.amazonaws.organizations#ServiceException":
1072
- throw await de_ServiceExceptionRes(parsedOutput, context);
1073
- case "TooManyRequestsException":
1074
- case "com.amazonaws.organizations#TooManyRequestsException":
1075
- throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1076
- case "ConstraintViolationException":
1077
- case "com.amazonaws.organizations#ConstraintViolationException":
1078
- throw await de_ConstraintViolationExceptionRes(parsedOutput, context);
1079
- case "DuplicatePolicyAttachmentException":
1080
- case "com.amazonaws.organizations#DuplicatePolicyAttachmentException":
1081
- throw await de_DuplicatePolicyAttachmentExceptionRes(parsedOutput, context);
1082
- case "PolicyChangesInProgressException":
1083
- case "com.amazonaws.organizations#PolicyChangesInProgressException":
1084
- throw await de_PolicyChangesInProgressExceptionRes(parsedOutput, context);
1085
- case "PolicyNotFoundException":
1086
- case "com.amazonaws.organizations#PolicyNotFoundException":
1087
- throw await de_PolicyNotFoundExceptionRes(parsedOutput, context);
1088
- case "PolicyTypeNotEnabledException":
1089
- case "com.amazonaws.organizations#PolicyTypeNotEnabledException":
1090
- throw await de_PolicyTypeNotEnabledExceptionRes(parsedOutput, context);
1091
- case "TargetNotFoundException":
1092
- case "com.amazonaws.organizations#TargetNotFoundException":
1093
- throw await de_TargetNotFoundExceptionRes(parsedOutput, context);
1094
- case "UnsupportedAPIEndpointException":
1095
- case "com.amazonaws.organizations#UnsupportedAPIEndpointException":
1096
- throw await de_UnsupportedAPIEndpointExceptionRes(parsedOutput, context);
1097
- case "AccountAlreadyClosedException":
1098
- case "com.amazonaws.organizations#AccountAlreadyClosedException":
1099
- throw await de_AccountAlreadyClosedExceptionRes(parsedOutput, context);
1100
- case "AccountNotFoundException":
1101
- case "com.amazonaws.organizations#AccountNotFoundException":
1102
- throw await de_AccountNotFoundExceptionRes(parsedOutput, context);
1103
- case "ConflictException":
1104
- case "com.amazonaws.organizations#ConflictException":
1105
- throw await de_ConflictExceptionRes(parsedOutput, context);
1106
- case "FinalizingOrganizationException":
1107
- case "com.amazonaws.organizations#FinalizingOrganizationException":
1108
- throw await de_FinalizingOrganizationExceptionRes(parsedOutput, context);
1109
- case "AlreadyInOrganizationException":
1110
- case "com.amazonaws.organizations#AlreadyInOrganizationException":
1111
- throw await de_AlreadyInOrganizationExceptionRes(parsedOutput, context);
1112
- case "DuplicateOrganizationalUnitException":
1113
- case "com.amazonaws.organizations#DuplicateOrganizationalUnitException":
1114
- throw await de_DuplicateOrganizationalUnitExceptionRes(parsedOutput, context);
1115
- case "ParentNotFoundException":
1116
- case "com.amazonaws.organizations#ParentNotFoundException":
1117
- throw await de_ParentNotFoundExceptionRes(parsedOutput, context);
1118
- case "DuplicatePolicyException":
1119
- case "com.amazonaws.organizations#DuplicatePolicyException":
1120
- throw await de_DuplicatePolicyExceptionRes(parsedOutput, context);
1121
- case "MalformedPolicyDocumentException":
1122
- case "com.amazonaws.organizations#MalformedPolicyDocumentException":
1123
- throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
1124
- case "PolicyTypeNotAvailableForOrganizationException":
1125
- case "com.amazonaws.organizations#PolicyTypeNotAvailableForOrganizationException":
1126
- throw await de_PolicyTypeNotAvailableForOrganizationExceptionRes(parsedOutput, context);
1127
- case "OrganizationNotEmptyException":
1128
- case "com.amazonaws.organizations#OrganizationNotEmptyException":
1129
- throw await de_OrganizationNotEmptyExceptionRes(parsedOutput, context);
1130
- case "OrganizationalUnitNotEmptyException":
1131
- case "com.amazonaws.organizations#OrganizationalUnitNotEmptyException":
1132
- throw await de_OrganizationalUnitNotEmptyExceptionRes(parsedOutput, context);
1133
- case "OrganizationalUnitNotFoundException":
1134
- case "com.amazonaws.organizations#OrganizationalUnitNotFoundException":
1135
- throw await de_OrganizationalUnitNotFoundExceptionRes(parsedOutput, context);
1136
- case "PolicyInUseException":
1137
- case "com.amazonaws.organizations#PolicyInUseException":
1138
- throw await de_PolicyInUseExceptionRes(parsedOutput, context);
1139
- case "ResourcePolicyNotFoundException":
1140
- case "com.amazonaws.organizations#ResourcePolicyNotFoundException":
1141
- throw await de_ResourcePolicyNotFoundExceptionRes(parsedOutput, context);
1142
- case "AccountNotRegisteredException":
1143
- case "com.amazonaws.organizations#AccountNotRegisteredException":
1144
- throw await de_AccountNotRegisteredExceptionRes(parsedOutput, context);
1145
- case "CreateAccountStatusNotFoundException":
1146
- case "com.amazonaws.organizations#CreateAccountStatusNotFoundException":
1147
- throw await de_CreateAccountStatusNotFoundExceptionRes(parsedOutput, context);
1148
- case "EffectivePolicyNotFoundException":
1149
- case "com.amazonaws.organizations#EffectivePolicyNotFoundException":
1150
- throw await de_EffectivePolicyNotFoundExceptionRes(parsedOutput, context);
1151
- case "PolicyNotAttachedException":
1152
- case "com.amazonaws.organizations#PolicyNotAttachedException":
1153
- throw await de_PolicyNotAttachedExceptionRes(parsedOutput, context);
1154
- case "RootNotFoundException":
1155
- case "com.amazonaws.organizations#RootNotFoundException":
1156
- throw await de_RootNotFoundExceptionRes(parsedOutput, context);
1157
- case "PolicyTypeAlreadyEnabledException":
1158
- case "com.amazonaws.organizations#PolicyTypeAlreadyEnabledException":
1159
- throw await de_PolicyTypeAlreadyEnabledExceptionRes(parsedOutput, context);
1160
- case "AccountOwnerNotVerifiedException":
1161
- case "com.amazonaws.organizations#AccountOwnerNotVerifiedException":
1162
- throw await de_AccountOwnerNotVerifiedExceptionRes(parsedOutput, context);
1163
- case "DuplicateHandshakeException":
1164
- case "com.amazonaws.organizations#DuplicateHandshakeException":
1165
- throw await de_DuplicateHandshakeExceptionRes(parsedOutput, context);
1166
- case "MasterCannotLeaveOrganizationException":
1167
- case "com.amazonaws.organizations#MasterCannotLeaveOrganizationException":
1168
- throw await de_MasterCannotLeaveOrganizationExceptionRes(parsedOutput, context);
1169
- case "ChildNotFoundException":
1170
- case "com.amazonaws.organizations#ChildNotFoundException":
1171
- throw await de_ChildNotFoundExceptionRes(parsedOutput, context);
1172
- case "DestinationParentNotFoundException":
1173
- case "com.amazonaws.organizations#DestinationParentNotFoundException":
1174
- throw await de_DestinationParentNotFoundExceptionRes(parsedOutput, context);
1175
- case "DuplicateAccountException":
1176
- case "com.amazonaws.organizations#DuplicateAccountException":
1177
- throw await de_DuplicateAccountExceptionRes(parsedOutput, context);
1178
- case "SourceParentNotFoundException":
1179
- case "com.amazonaws.organizations#SourceParentNotFoundException":
1180
- throw await de_SourceParentNotFoundExceptionRes(parsedOutput, context);
1181
- case "AccountAlreadyRegisteredException":
1182
- case "com.amazonaws.organizations#AccountAlreadyRegisteredException":
1183
- throw await de_AccountAlreadyRegisteredExceptionRes(parsedOutput, context);
1184
- default:
1185
- const parsedBody = parsedOutput.body;
1186
- return throwDefaultError({
1187
- output,
1188
- parsedBody,
1189
- errorCode,
1190
- });
1191
- }
1192
- };
1193
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1194
- const body = parsedOutput.body;
1195
- const deserialized = _json(body);
1196
- const exception = new AccessDeniedException({
1197
- $metadata: deserializeMetadata(parsedOutput),
1198
- ...deserialized,
1199
- });
1200
- return __decorateServiceException(exception, body);
1201
- };
1202
- const de_AccessDeniedForDependencyExceptionRes = async (parsedOutput, context) => {
1203
- const body = parsedOutput.body;
1204
- const deserialized = _json(body);
1205
- const exception = new AccessDeniedForDependencyException({
1206
- $metadata: deserializeMetadata(parsedOutput),
1207
- ...deserialized,
1208
- });
1209
- return __decorateServiceException(exception, body);
1210
- };
1211
- const de_AccountAlreadyClosedExceptionRes = async (parsedOutput, context) => {
1212
- const body = parsedOutput.body;
1213
- const deserialized = _json(body);
1214
- const exception = new AccountAlreadyClosedException({
1215
- $metadata: deserializeMetadata(parsedOutput),
1216
- ...deserialized,
1217
- });
1218
- return __decorateServiceException(exception, body);
1219
- };
1220
- const de_AccountAlreadyRegisteredExceptionRes = async (parsedOutput, context) => {
1221
- const body = parsedOutput.body;
1222
- const deserialized = _json(body);
1223
- const exception = new AccountAlreadyRegisteredException({
1224
- $metadata: deserializeMetadata(parsedOutput),
1225
- ...deserialized,
1226
- });
1227
- return __decorateServiceException(exception, body);
1228
- };
1229
- const de_AccountNotFoundExceptionRes = async (parsedOutput, context) => {
1230
- const body = parsedOutput.body;
1231
- const deserialized = _json(body);
1232
- const exception = new AccountNotFoundException({
1233
- $metadata: deserializeMetadata(parsedOutput),
1234
- ...deserialized,
1235
- });
1236
- return __decorateServiceException(exception, body);
1237
- };
1238
- const de_AccountNotRegisteredExceptionRes = async (parsedOutput, context) => {
1239
- const body = parsedOutput.body;
1240
- const deserialized = _json(body);
1241
- const exception = new AccountNotRegisteredException({
1242
- $metadata: deserializeMetadata(parsedOutput),
1243
- ...deserialized,
1244
- });
1245
- return __decorateServiceException(exception, body);
1246
- };
1247
- const de_AccountOwnerNotVerifiedExceptionRes = async (parsedOutput, context) => {
1248
- const body = parsedOutput.body;
1249
- const deserialized = _json(body);
1250
- const exception = new AccountOwnerNotVerifiedException({
1251
- $metadata: deserializeMetadata(parsedOutput),
1252
- ...deserialized,
1253
- });
1254
- return __decorateServiceException(exception, body);
1255
- };
1256
- const de_AlreadyInOrganizationExceptionRes = async (parsedOutput, context) => {
1257
- const body = parsedOutput.body;
1258
- const deserialized = _json(body);
1259
- const exception = new AlreadyInOrganizationException({
1260
- $metadata: deserializeMetadata(parsedOutput),
1261
- ...deserialized,
1262
- });
1263
- return __decorateServiceException(exception, body);
1264
- };
1265
- const de_AWSOrganizationsNotInUseExceptionRes = async (parsedOutput, context) => {
1266
- const body = parsedOutput.body;
1267
- const deserialized = _json(body);
1268
- const exception = new AWSOrganizationsNotInUseException({
1269
- $metadata: deserializeMetadata(parsedOutput),
1270
- ...deserialized,
1271
- });
1272
- return __decorateServiceException(exception, body);
1273
- };
1274
- const de_ChildNotFoundExceptionRes = async (parsedOutput, context) => {
1275
- const body = parsedOutput.body;
1276
- const deserialized = _json(body);
1277
- const exception = new ChildNotFoundException({
1278
- $metadata: deserializeMetadata(parsedOutput),
1279
- ...deserialized,
1280
- });
1281
- return __decorateServiceException(exception, body);
1282
- };
1283
- const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
1284
- const body = parsedOutput.body;
1285
- const deserialized = _json(body);
1286
- const exception = new ConcurrentModificationException({
1287
- $metadata: deserializeMetadata(parsedOutput),
1288
- ...deserialized,
1289
- });
1290
- return __decorateServiceException(exception, body);
1291
- };
1292
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
1293
- const body = parsedOutput.body;
1294
- const deserialized = _json(body);
1295
- const exception = new ConflictException({
1296
- $metadata: deserializeMetadata(parsedOutput),
1297
- ...deserialized,
1298
- });
1299
- return __decorateServiceException(exception, body);
1300
- };
1301
- const de_ConstraintViolationExceptionRes = async (parsedOutput, context) => {
1302
- const body = parsedOutput.body;
1303
- const deserialized = _json(body);
1304
- const exception = new ConstraintViolationException({
1305
- $metadata: deserializeMetadata(parsedOutput),
1306
- ...deserialized,
1307
- });
1308
- return __decorateServiceException(exception, body);
1309
- };
1310
- const de_CreateAccountStatusNotFoundExceptionRes = async (parsedOutput, context) => {
1311
- const body = parsedOutput.body;
1312
- const deserialized = _json(body);
1313
- const exception = new CreateAccountStatusNotFoundException({
1314
- $metadata: deserializeMetadata(parsedOutput),
1315
- ...deserialized,
1316
- });
1317
- return __decorateServiceException(exception, body);
1318
- };
1319
- const de_DestinationParentNotFoundExceptionRes = async (parsedOutput, context) => {
1320
- const body = parsedOutput.body;
1321
- const deserialized = _json(body);
1322
- const exception = new DestinationParentNotFoundException({
1323
- $metadata: deserializeMetadata(parsedOutput),
1324
- ...deserialized,
1325
- });
1326
- return __decorateServiceException(exception, body);
1327
- };
1328
- const de_DuplicateAccountExceptionRes = async (parsedOutput, context) => {
1329
- const body = parsedOutput.body;
1330
- const deserialized = _json(body);
1331
- const exception = new DuplicateAccountException({
1332
- $metadata: deserializeMetadata(parsedOutput),
1333
- ...deserialized,
1334
- });
1335
- return __decorateServiceException(exception, body);
1336
- };
1337
- const de_DuplicateHandshakeExceptionRes = async (parsedOutput, context) => {
1338
- const body = parsedOutput.body;
1339
- const deserialized = _json(body);
1340
- const exception = new DuplicateHandshakeException({
1341
- $metadata: deserializeMetadata(parsedOutput),
1342
- ...deserialized,
1343
- });
1344
- return __decorateServiceException(exception, body);
1345
- };
1346
- const de_DuplicateOrganizationalUnitExceptionRes = async (parsedOutput, context) => {
1347
- const body = parsedOutput.body;
1348
- const deserialized = _json(body);
1349
- const exception = new DuplicateOrganizationalUnitException({
1350
- $metadata: deserializeMetadata(parsedOutput),
1351
- ...deserialized,
1352
- });
1353
- return __decorateServiceException(exception, body);
1354
- };
1355
- const de_DuplicatePolicyAttachmentExceptionRes = async (parsedOutput, context) => {
1356
- const body = parsedOutput.body;
1357
- const deserialized = _json(body);
1358
- const exception = new DuplicatePolicyAttachmentException({
1359
- $metadata: deserializeMetadata(parsedOutput),
1360
- ...deserialized,
1361
- });
1362
- return __decorateServiceException(exception, body);
1363
- };
1364
- const de_DuplicatePolicyExceptionRes = async (parsedOutput, context) => {
1365
- const body = parsedOutput.body;
1366
- const deserialized = _json(body);
1367
- const exception = new DuplicatePolicyException({
1368
- $metadata: deserializeMetadata(parsedOutput),
1369
- ...deserialized,
1370
- });
1371
- return __decorateServiceException(exception, body);
1372
- };
1373
- const de_EffectivePolicyNotFoundExceptionRes = async (parsedOutput, context) => {
1374
- const body = parsedOutput.body;
1375
- const deserialized = _json(body);
1376
- const exception = new EffectivePolicyNotFoundException({
1377
- $metadata: deserializeMetadata(parsedOutput),
1378
- ...deserialized,
1379
- });
1380
- return __decorateServiceException(exception, body);
1381
- };
1382
- const de_FinalizingOrganizationExceptionRes = async (parsedOutput, context) => {
1383
- const body = parsedOutput.body;
1384
- const deserialized = _json(body);
1385
- const exception = new FinalizingOrganizationException({
1386
- $metadata: deserializeMetadata(parsedOutput),
1387
- ...deserialized,
1388
- });
1389
- return __decorateServiceException(exception, body);
1390
- };
1391
- const de_HandshakeAlreadyInStateExceptionRes = async (parsedOutput, context) => {
1392
- const body = parsedOutput.body;
1393
- const deserialized = _json(body);
1394
- const exception = new HandshakeAlreadyInStateException({
1395
- $metadata: deserializeMetadata(parsedOutput),
1396
- ...deserialized,
1397
- });
1398
- return __decorateServiceException(exception, body);
1399
- };
1400
- const de_HandshakeConstraintViolationExceptionRes = async (parsedOutput, context) => {
1401
- const body = parsedOutput.body;
1402
- const deserialized = _json(body);
1403
- const exception = new HandshakeConstraintViolationException({
1404
- $metadata: deserializeMetadata(parsedOutput),
1405
- ...deserialized,
1406
- });
1407
- return __decorateServiceException(exception, body);
1408
- };
1409
- const de_HandshakeNotFoundExceptionRes = async (parsedOutput, context) => {
1410
- const body = parsedOutput.body;
1411
- const deserialized = _json(body);
1412
- const exception = new HandshakeNotFoundException({
1413
- $metadata: deserializeMetadata(parsedOutput),
1414
- ...deserialized,
1415
- });
1416
- return __decorateServiceException(exception, body);
1417
- };
1418
- const de_InvalidHandshakeTransitionExceptionRes = async (parsedOutput, context) => {
1419
- const body = parsedOutput.body;
1420
- const deserialized = _json(body);
1421
- const exception = new InvalidHandshakeTransitionException({
1422
- $metadata: deserializeMetadata(parsedOutput),
1423
- ...deserialized,
1424
- });
1425
- return __decorateServiceException(exception, body);
1426
- };
1427
- const de_InvalidInputExceptionRes = async (parsedOutput, context) => {
1428
- const body = parsedOutput.body;
1429
- const deserialized = _json(body);
1430
- const exception = new InvalidInputException({
1431
- $metadata: deserializeMetadata(parsedOutput),
1432
- ...deserialized,
1433
- });
1434
- return __decorateServiceException(exception, body);
1435
- };
1436
- const de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context) => {
1437
- const body = parsedOutput.body;
1438
- const deserialized = _json(body);
1439
- const exception = new MalformedPolicyDocumentException({
1440
- $metadata: deserializeMetadata(parsedOutput),
1441
- ...deserialized,
1442
- });
1443
- return __decorateServiceException(exception, body);
1444
- };
1445
- const de_MasterCannotLeaveOrganizationExceptionRes = async (parsedOutput, context) => {
1446
- const body = parsedOutput.body;
1447
- const deserialized = _json(body);
1448
- const exception = new MasterCannotLeaveOrganizationException({
1449
- $metadata: deserializeMetadata(parsedOutput),
1450
- ...deserialized,
1451
- });
1452
- return __decorateServiceException(exception, body);
1453
- };
1454
- const de_OrganizationalUnitNotEmptyExceptionRes = async (parsedOutput, context) => {
1455
- const body = parsedOutput.body;
1456
- const deserialized = _json(body);
1457
- const exception = new OrganizationalUnitNotEmptyException({
1458
- $metadata: deserializeMetadata(parsedOutput),
1459
- ...deserialized,
1460
- });
1461
- return __decorateServiceException(exception, body);
1462
- };
1463
- const de_OrganizationalUnitNotFoundExceptionRes = async (parsedOutput, context) => {
1464
- const body = parsedOutput.body;
1465
- const deserialized = _json(body);
1466
- const exception = new OrganizationalUnitNotFoundException({
1467
- $metadata: deserializeMetadata(parsedOutput),
1468
- ...deserialized,
1469
- });
1470
- return __decorateServiceException(exception, body);
1471
- };
1472
- const de_OrganizationNotEmptyExceptionRes = async (parsedOutput, context) => {
1473
- const body = parsedOutput.body;
1474
- const deserialized = _json(body);
1475
- const exception = new OrganizationNotEmptyException({
1476
- $metadata: deserializeMetadata(parsedOutput),
1477
- ...deserialized,
1478
- });
1479
- return __decorateServiceException(exception, body);
1480
- };
1481
- const de_ParentNotFoundExceptionRes = async (parsedOutput, context) => {
1482
- const body = parsedOutput.body;
1483
- const deserialized = _json(body);
1484
- const exception = new ParentNotFoundException({
1485
- $metadata: deserializeMetadata(parsedOutput),
1486
- ...deserialized,
1487
- });
1488
- return __decorateServiceException(exception, body);
1489
- };
1490
- const de_PolicyChangesInProgressExceptionRes = async (parsedOutput, context) => {
1491
- const body = parsedOutput.body;
1492
- const deserialized = _json(body);
1493
- const exception = new PolicyChangesInProgressException({
1494
- $metadata: deserializeMetadata(parsedOutput),
1495
- ...deserialized,
1496
- });
1497
- return __decorateServiceException(exception, body);
1498
- };
1499
- const de_PolicyInUseExceptionRes = async (parsedOutput, context) => {
1500
- const body = parsedOutput.body;
1501
- const deserialized = _json(body);
1502
- const exception = new PolicyInUseException({
1503
- $metadata: deserializeMetadata(parsedOutput),
1504
- ...deserialized,
1505
- });
1506
- return __decorateServiceException(exception, body);
1507
- };
1508
- const de_PolicyNotAttachedExceptionRes = async (parsedOutput, context) => {
1509
- const body = parsedOutput.body;
1510
- const deserialized = _json(body);
1511
- const exception = new PolicyNotAttachedException({
1512
- $metadata: deserializeMetadata(parsedOutput),
1513
- ...deserialized,
1514
- });
1515
- return __decorateServiceException(exception, body);
1516
- };
1517
- const de_PolicyNotFoundExceptionRes = async (parsedOutput, context) => {
1518
- const body = parsedOutput.body;
1519
- const deserialized = _json(body);
1520
- const exception = new PolicyNotFoundException({
1521
- $metadata: deserializeMetadata(parsedOutput),
1522
- ...deserialized,
1523
- });
1524
- return __decorateServiceException(exception, body);
1525
- };
1526
- const de_PolicyTypeAlreadyEnabledExceptionRes = async (parsedOutput, context) => {
1527
- const body = parsedOutput.body;
1528
- const deserialized = _json(body);
1529
- const exception = new PolicyTypeAlreadyEnabledException({
1530
- $metadata: deserializeMetadata(parsedOutput),
1531
- ...deserialized,
1532
- });
1533
- return __decorateServiceException(exception, body);
1534
- };
1535
- const de_PolicyTypeNotAvailableForOrganizationExceptionRes = async (parsedOutput, context) => {
1536
- const body = parsedOutput.body;
1537
- const deserialized = _json(body);
1538
- const exception = new PolicyTypeNotAvailableForOrganizationException({
1539
- $metadata: deserializeMetadata(parsedOutput),
1540
- ...deserialized,
1541
- });
1542
- return __decorateServiceException(exception, body);
1543
- };
1544
- const de_PolicyTypeNotEnabledExceptionRes = async (parsedOutput, context) => {
1545
- const body = parsedOutput.body;
1546
- const deserialized = _json(body);
1547
- const exception = new PolicyTypeNotEnabledException({
1548
- $metadata: deserializeMetadata(parsedOutput),
1549
- ...deserialized,
1550
- });
1551
- return __decorateServiceException(exception, body);
1552
- };
1553
- const de_ResourcePolicyNotFoundExceptionRes = async (parsedOutput, context) => {
1554
- const body = parsedOutput.body;
1555
- const deserialized = _json(body);
1556
- const exception = new ResourcePolicyNotFoundException({
1557
- $metadata: deserializeMetadata(parsedOutput),
1558
- ...deserialized,
1559
- });
1560
- return __decorateServiceException(exception, body);
1561
- };
1562
- const de_RootNotFoundExceptionRes = async (parsedOutput, context) => {
1563
- const body = parsedOutput.body;
1564
- const deserialized = _json(body);
1565
- const exception = new RootNotFoundException({
1566
- $metadata: deserializeMetadata(parsedOutput),
1567
- ...deserialized,
1568
- });
1569
- return __decorateServiceException(exception, body);
1570
- };
1571
- const de_ServiceExceptionRes = async (parsedOutput, context) => {
1572
- const body = parsedOutput.body;
1573
- const deserialized = _json(body);
1574
- const exception = new ServiceException({
1575
- $metadata: deserializeMetadata(parsedOutput),
1576
- ...deserialized,
1577
- });
1578
- return __decorateServiceException(exception, body);
1579
- };
1580
- const de_SourceParentNotFoundExceptionRes = async (parsedOutput, context) => {
1581
- const body = parsedOutput.body;
1582
- const deserialized = _json(body);
1583
- const exception = new SourceParentNotFoundException({
1584
- $metadata: deserializeMetadata(parsedOutput),
1585
- ...deserialized,
1586
- });
1587
- return __decorateServiceException(exception, body);
1588
- };
1589
- const de_TargetNotFoundExceptionRes = async (parsedOutput, context) => {
1590
- const body = parsedOutput.body;
1591
- const deserialized = _json(body);
1592
- const exception = new TargetNotFoundException({
1593
- $metadata: deserializeMetadata(parsedOutput),
1594
- ...deserialized,
1595
- });
1596
- return __decorateServiceException(exception, body);
1597
- };
1598
- const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
1599
- const body = parsedOutput.body;
1600
- const deserialized = _json(body);
1601
- const exception = new TooManyRequestsException({
1602
- $metadata: deserializeMetadata(parsedOutput),
1603
- ...deserialized,
1604
- });
1605
- return __decorateServiceException(exception, body);
1606
- };
1607
- const de_UnsupportedAPIEndpointExceptionRes = async (parsedOutput, context) => {
1608
- const body = parsedOutput.body;
1609
- const deserialized = _json(body);
1610
- const exception = new UnsupportedAPIEndpointException({
1611
- $metadata: deserializeMetadata(parsedOutput),
1612
- ...deserialized,
1613
- });
1614
- return __decorateServiceException(exception, body);
1615
- };
1616
- const de_AcceptHandshakeResponse = (output, context) => {
1617
- return take(output, {
1618
- Handshake: (_) => de_Handshake(_, context),
1619
- });
1620
- };
1621
- const de_Account = (output, context) => {
1622
- return take(output, {
1623
- Arn: __expectString,
1624
- Email: __expectString,
1625
- Id: __expectString,
1626
- JoinedMethod: __expectString,
1627
- JoinedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1628
- Name: __expectString,
1629
- State: __expectString,
1630
- Status: __expectString,
1631
- });
1632
- };
1633
- const de_Accounts = (output, context) => {
1634
- const retVal = (output || [])
1635
- .filter((e) => e != null)
1636
- .map((entry) => {
1637
- return de_Account(entry, context);
1638
- });
1639
- return retVal;
1640
- };
1641
- const de_CancelHandshakeResponse = (output, context) => {
1642
- return take(output, {
1643
- Handshake: (_) => de_Handshake(_, context),
1644
- });
1645
- };
1646
- const de_CreateAccountResponse = (output, context) => {
1647
- return take(output, {
1648
- CreateAccountStatus: (_) => de_CreateAccountStatus(_, context),
1649
- });
1650
- };
1651
- const de_CreateAccountStatus = (output, context) => {
1652
- return take(output, {
1653
- AccountId: __expectString,
1654
- AccountName: __expectString,
1655
- CompletedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1656
- FailureReason: __expectString,
1657
- GovCloudAccountId: __expectString,
1658
- Id: __expectString,
1659
- RequestedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1660
- State: __expectString,
1661
- });
1662
- };
1663
- const de_CreateAccountStatuses = (output, context) => {
1664
- const retVal = (output || [])
1665
- .filter((e) => e != null)
1666
- .map((entry) => {
1667
- return de_CreateAccountStatus(entry, context);
1668
- });
1669
- return retVal;
1670
- };
1671
- const de_CreateGovCloudAccountResponse = (output, context) => {
1672
- return take(output, {
1673
- CreateAccountStatus: (_) => de_CreateAccountStatus(_, context),
1674
- });
1675
- };
1676
- const de_DeclineHandshakeResponse = (output, context) => {
1677
- return take(output, {
1678
- Handshake: (_) => de_Handshake(_, context),
1679
- });
1680
- };
1681
- const de_DelegatedAdministrator = (output, context) => {
1682
- return take(output, {
1683
- Arn: __expectString,
1684
- DelegationEnabledDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1685
- Email: __expectString,
1686
- Id: __expectString,
1687
- JoinedMethod: __expectString,
1688
- JoinedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1689
- Name: __expectString,
1690
- State: __expectString,
1691
- Status: __expectString,
1692
- });
1693
- };
1694
- const de_DelegatedAdministrators = (output, context) => {
1695
- const retVal = (output || [])
1696
- .filter((e) => e != null)
1697
- .map((entry) => {
1698
- return de_DelegatedAdministrator(entry, context);
1699
- });
1700
- return retVal;
1701
- };
1702
- const de_DelegatedService = (output, context) => {
1703
- return take(output, {
1704
- DelegationEnabledDate: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1705
- ServicePrincipal: __expectString,
1706
- });
1707
- };
1708
- const de_DelegatedServices = (output, context) => {
1709
- const retVal = (output || [])
1710
- .filter((e) => e != null)
1711
- .map((entry) => {
1712
- return de_DelegatedService(entry, context);
1713
- });
1714
- return retVal;
1715
- };
1716
- const de_DescribeAccountResponse = (output, context) => {
1717
- return take(output, {
1718
- Account: (_) => de_Account(_, context),
1719
- });
1720
- };
1721
- const de_DescribeCreateAccountStatusResponse = (output, context) => {
1722
- return take(output, {
1723
- CreateAccountStatus: (_) => de_CreateAccountStatus(_, context),
1724
- });
1725
- };
1726
- const de_DescribeEffectivePolicyResponse = (output, context) => {
1727
- return take(output, {
1728
- EffectivePolicy: (_) => de_EffectivePolicy(_, context),
1729
- });
1730
- };
1731
- const de_DescribeHandshakeResponse = (output, context) => {
1732
- return take(output, {
1733
- Handshake: (_) => de_Handshake(_, context),
1734
- });
1735
- };
1736
- const de_EffectivePolicy = (output, context) => {
1737
- return take(output, {
1738
- LastUpdatedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1739
- PolicyContent: __expectString,
1740
- PolicyType: __expectString,
1741
- TargetId: __expectString,
1742
- });
1743
- };
1744
- const de_EnableAllFeaturesResponse = (output, context) => {
1745
- return take(output, {
1746
- Handshake: (_) => de_Handshake(_, context),
1747
- });
1748
- };
1749
- const de_EnabledServicePrincipal = (output, context) => {
1750
- return take(output, {
1751
- DateEnabled: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1752
- ServicePrincipal: __expectString,
1753
- });
1754
- };
1755
- const de_EnabledServicePrincipals = (output, context) => {
1756
- const retVal = (output || [])
1757
- .filter((e) => e != null)
1758
- .map((entry) => {
1759
- return de_EnabledServicePrincipal(entry, context);
1760
- });
1761
- return retVal;
1762
- };
1763
- const de_Handshake = (output, context) => {
1764
- return take(output, {
1765
- Action: __expectString,
1766
- Arn: __expectString,
1767
- ExpirationTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1768
- Id: __expectString,
1769
- Parties: _json,
1770
- RequestedTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1771
- Resources: (_) => de_HandshakeResources(_, context),
1772
- State: __expectString,
1773
- });
1774
- };
1775
- const de_HandshakeResource = (output, context) => {
1776
- return take(output, {
1777
- Resources: (_) => de_HandshakeResources(_, context),
1778
- Type: __expectString,
1779
- Value: __expectString,
1780
- });
1781
- };
1782
- const de_HandshakeResources = (output, context) => {
1783
- const retVal = (output || [])
1784
- .filter((e) => e != null)
1785
- .map((entry) => {
1786
- return de_HandshakeResource(entry, context);
1787
- });
1788
- return retVal;
1789
- };
1790
- const de_Handshakes = (output, context) => {
1791
- const retVal = (output || [])
1792
- .filter((e) => e != null)
1793
- .map((entry) => {
1794
- return de_Handshake(entry, context);
1795
- });
1796
- return retVal;
1797
- };
1798
- const de_InviteAccountToOrganizationResponse = (output, context) => {
1799
- return take(output, {
1800
- Handshake: (_) => de_Handshake(_, context),
1801
- });
1802
- };
1803
- const de_ListAccountsForParentResponse = (output, context) => {
1804
- return take(output, {
1805
- Accounts: (_) => de_Accounts(_, context),
1806
- NextToken: __expectString,
1807
- });
1808
- };
1809
- const de_ListAccountsResponse = (output, context) => {
1810
- return take(output, {
1811
- Accounts: (_) => de_Accounts(_, context),
1812
- NextToken: __expectString,
1813
- });
1814
- };
1815
- const de_ListAccountsWithInvalidEffectivePolicyResponse = (output, context) => {
1816
- return take(output, {
1817
- Accounts: (_) => de_Accounts(_, context),
1818
- NextToken: __expectString,
1819
- PolicyType: __expectString,
1820
- });
1821
- };
1822
- const de_ListAWSServiceAccessForOrganizationResponse = (output, context) => {
1823
- return take(output, {
1824
- EnabledServicePrincipals: (_) => de_EnabledServicePrincipals(_, context),
1825
- NextToken: __expectString,
1826
- });
1827
- };
1828
- const de_ListCreateAccountStatusResponse = (output, context) => {
1829
- return take(output, {
1830
- CreateAccountStatuses: (_) => de_CreateAccountStatuses(_, context),
1831
- NextToken: __expectString,
1832
- });
1833
- };
1834
- const de_ListDelegatedAdministratorsResponse = (output, context) => {
1835
- return take(output, {
1836
- DelegatedAdministrators: (_) => de_DelegatedAdministrators(_, context),
1837
- NextToken: __expectString,
1838
- });
1839
- };
1840
- const de_ListDelegatedServicesForAccountResponse = (output, context) => {
1841
- return take(output, {
1842
- DelegatedServices: (_) => de_DelegatedServices(_, context),
1843
- NextToken: __expectString,
1844
- });
1845
- };
1846
- const de_ListEffectivePolicyValidationErrorsResponse = (output, context) => {
1847
- return take(output, {
1848
- AccountId: __expectString,
1849
- EffectivePolicyValidationErrors: _json,
1850
- EvaluationTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1851
- NextToken: __expectString,
1852
- Path: __expectString,
1853
- PolicyType: __expectString,
1854
- });
1855
- };
1856
- const de_ListHandshakesForAccountResponse = (output, context) => {
1857
- return take(output, {
1858
- Handshakes: (_) => de_Handshakes(_, context),
1859
- NextToken: __expectString,
1860
- });
1861
- };
1862
- const de_ListHandshakesForOrganizationResponse = (output, context) => {
1863
- return take(output, {
1864
- Handshakes: (_) => de_Handshakes(_, context),
1865
- NextToken: __expectString,
1866
- });
1867
- };
1868
- const deserializeMetadata = (output) => ({
1869
- httpStatusCode: output.statusCode,
1870
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1871
- extendedRequestId: output.headers["x-amz-id-2"],
1872
- cfId: output.headers["x-amz-cf-id"],
1873
- });
1874
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1875
- const throwDefaultError = withBaseException(__BaseException);
1876
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1877
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1878
- const contents = {
1879
- protocol,
1880
- hostname,
1881
- port,
1882
- method: "POST",
1883
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
1884
- headers,
1885
- };
1886
- if (resolvedHostname !== undefined) {
1887
- contents.hostname = resolvedHostname;
1888
- }
1889
- if (body !== undefined) {
1890
- contents.body = body;
1891
- }
1892
- return new __HttpRequest(contents);
1893
- };
1894
- function sharedHeaders(operation) {
1895
- return {
1896
- "content-type": "application/x-amz-json-1.1",
1897
- "x-amz-target": `AWSOrganizationsV20161128.${operation}`,
1898
- };
1899
- }