@aws-sdk/client-ram 3.489.0 → 3.495.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 (61) hide show
  1. package/dist-cjs/RAM.js +1 -79
  2. package/dist-cjs/RAMClient.js +1 -43
  3. package/dist-cjs/commands/AcceptResourceShareInvitationCommand.js +1 -28
  4. package/dist-cjs/commands/AssociateResourceShareCommand.js +1 -28
  5. package/dist-cjs/commands/AssociateResourceSharePermissionCommand.js +1 -28
  6. package/dist-cjs/commands/CreatePermissionCommand.js +1 -28
  7. package/dist-cjs/commands/CreatePermissionVersionCommand.js +1 -28
  8. package/dist-cjs/commands/CreateResourceShareCommand.js +1 -28
  9. package/dist-cjs/commands/DeletePermissionCommand.js +1 -28
  10. package/dist-cjs/commands/DeletePermissionVersionCommand.js +1 -28
  11. package/dist-cjs/commands/DeleteResourceShareCommand.js +1 -28
  12. package/dist-cjs/commands/DisassociateResourceShareCommand.js +1 -28
  13. package/dist-cjs/commands/DisassociateResourceSharePermissionCommand.js +1 -28
  14. package/dist-cjs/commands/EnableSharingWithAwsOrganizationCommand.js +1 -28
  15. package/dist-cjs/commands/GetPermissionCommand.js +1 -28
  16. package/dist-cjs/commands/GetResourcePoliciesCommand.js +1 -28
  17. package/dist-cjs/commands/GetResourceShareAssociationsCommand.js +1 -28
  18. package/dist-cjs/commands/GetResourceShareInvitationsCommand.js +1 -28
  19. package/dist-cjs/commands/GetResourceSharesCommand.js +1 -28
  20. package/dist-cjs/commands/ListPendingInvitationResourcesCommand.js +1 -28
  21. package/dist-cjs/commands/ListPermissionAssociationsCommand.js +1 -28
  22. package/dist-cjs/commands/ListPermissionVersionsCommand.js +1 -28
  23. package/dist-cjs/commands/ListPermissionsCommand.js +1 -28
  24. package/dist-cjs/commands/ListPrincipalsCommand.js +1 -28
  25. package/dist-cjs/commands/ListReplacePermissionAssociationsWorkCommand.js +1 -28
  26. package/dist-cjs/commands/ListResourceSharePermissionsCommand.js +1 -28
  27. package/dist-cjs/commands/ListResourceTypesCommand.js +1 -28
  28. package/dist-cjs/commands/ListResourcesCommand.js +1 -28
  29. package/dist-cjs/commands/PromotePermissionCreatedFromPolicyCommand.js +1 -28
  30. package/dist-cjs/commands/PromoteResourceShareCreatedFromPolicyCommand.js +1 -28
  31. package/dist-cjs/commands/RejectResourceShareInvitationCommand.js +1 -28
  32. package/dist-cjs/commands/ReplacePermissionAssociationsCommand.js +1 -28
  33. package/dist-cjs/commands/SetDefaultPermissionVersionCommand.js +1 -28
  34. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  35. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  36. package/dist-cjs/commands/UpdateResourceShareCommand.js +1 -28
  37. package/dist-cjs/commands/index.js +1 -37
  38. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  39. package/dist-cjs/extensionConfiguration.js +1 -2
  40. package/dist-cjs/index.js +4539 -11
  41. package/dist-cjs/models/RAMServiceException.js +1 -12
  42. package/dist-cjs/models/index.js +1 -4
  43. package/dist-cjs/models/models_0.js +1 -442
  44. package/dist-cjs/pagination/GetResourcePoliciesPaginator.js +1 -7
  45. package/dist-cjs/pagination/GetResourceShareAssociationsPaginator.js +1 -7
  46. package/dist-cjs/pagination/GetResourceShareInvitationsPaginator.js +1 -7
  47. package/dist-cjs/pagination/GetResourceSharesPaginator.js +1 -7
  48. package/dist-cjs/pagination/Interfaces.js +1 -2
  49. package/dist-cjs/pagination/ListPendingInvitationResourcesPaginator.js +1 -7
  50. package/dist-cjs/pagination/ListPermissionAssociationsPaginator.js +1 -7
  51. package/dist-cjs/pagination/ListPermissionVersionsPaginator.js +1 -7
  52. package/dist-cjs/pagination/ListPermissionsPaginator.js +1 -7
  53. package/dist-cjs/pagination/ListPrincipalsPaginator.js +1 -7
  54. package/dist-cjs/pagination/ListReplacePermissionAssociationsWorkPaginator.js +1 -7
  55. package/dist-cjs/pagination/ListResourceSharePermissionsPaginator.js +1 -7
  56. package/dist-cjs/pagination/ListResourceTypesPaginator.js +1 -7
  57. package/dist-cjs/pagination/ListResourcesPaginator.js +1 -7
  58. package/dist-cjs/pagination/index.js +1 -17
  59. package/dist-cjs/protocols/Aws_restJson1.js +1 -3027
  60. package/dist-cjs/runtimeExtensions.js +1 -22
  61. package/package.json +40 -40
@@ -1,3027 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_GetResourceShareInvitationsCommand = exports.de_GetResourceShareAssociationsCommand = exports.de_GetResourcePoliciesCommand = exports.de_GetPermissionCommand = exports.de_EnableSharingWithAwsOrganizationCommand = exports.de_DisassociateResourceSharePermissionCommand = exports.de_DisassociateResourceShareCommand = exports.de_DeleteResourceShareCommand = exports.de_DeletePermissionVersionCommand = exports.de_DeletePermissionCommand = exports.de_CreateResourceShareCommand = exports.de_CreatePermissionVersionCommand = exports.de_CreatePermissionCommand = exports.de_AssociateResourceSharePermissionCommand = exports.de_AssociateResourceShareCommand = exports.de_AcceptResourceShareInvitationCommand = exports.se_UpdateResourceShareCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_SetDefaultPermissionVersionCommand = exports.se_ReplacePermissionAssociationsCommand = exports.se_RejectResourceShareInvitationCommand = exports.se_PromoteResourceShareCreatedFromPolicyCommand = exports.se_PromotePermissionCreatedFromPolicyCommand = exports.se_ListResourceTypesCommand = exports.se_ListResourceSharePermissionsCommand = exports.se_ListResourcesCommand = exports.se_ListReplacePermissionAssociationsWorkCommand = exports.se_ListPrincipalsCommand = exports.se_ListPermissionVersionsCommand = exports.se_ListPermissionsCommand = exports.se_ListPermissionAssociationsCommand = exports.se_ListPendingInvitationResourcesCommand = exports.se_GetResourceSharesCommand = exports.se_GetResourceShareInvitationsCommand = exports.se_GetResourceShareAssociationsCommand = exports.se_GetResourcePoliciesCommand = exports.se_GetPermissionCommand = exports.se_EnableSharingWithAwsOrganizationCommand = exports.se_DisassociateResourceSharePermissionCommand = exports.se_DisassociateResourceShareCommand = exports.se_DeleteResourceShareCommand = exports.se_DeletePermissionVersionCommand = exports.se_DeletePermissionCommand = exports.se_CreateResourceShareCommand = exports.se_CreatePermissionVersionCommand = exports.se_CreatePermissionCommand = exports.se_AssociateResourceSharePermissionCommand = exports.se_AssociateResourceShareCommand = exports.se_AcceptResourceShareInvitationCommand = void 0;
4
- exports.de_UpdateResourceShareCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_SetDefaultPermissionVersionCommand = exports.de_ReplacePermissionAssociationsCommand = exports.de_RejectResourceShareInvitationCommand = exports.de_PromoteResourceShareCreatedFromPolicyCommand = exports.de_PromotePermissionCreatedFromPolicyCommand = exports.de_ListResourceTypesCommand = exports.de_ListResourceSharePermissionsCommand = exports.de_ListResourcesCommand = exports.de_ListReplacePermissionAssociationsWorkCommand = exports.de_ListPrincipalsCommand = exports.de_ListPermissionVersionsCommand = exports.de_ListPermissionsCommand = exports.de_ListPermissionAssociationsCommand = exports.de_ListPendingInvitationResourcesCommand = exports.de_GetResourceSharesCommand = void 0;
5
- const core_1 = require("@smithy/core");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const models_0_1 = require("../models/models_0");
8
- const RAMServiceException_1 = require("../models/RAMServiceException");
9
- const se_AcceptResourceShareInvitationCommand = async (input, context) => {
10
- const b = (0, core_1.requestBuilder)(input, context);
11
- const headers = {
12
- "content-type": "application/json",
13
- };
14
- b.bp("/acceptresourceshareinvitation");
15
- let body;
16
- body = JSON.stringify((0, smithy_client_1.take)(input, {
17
- clientToken: [],
18
- resourceShareInvitationArn: [],
19
- }));
20
- b.m("POST").h(headers).b(body);
21
- return b.build();
22
- };
23
- exports.se_AcceptResourceShareInvitationCommand = se_AcceptResourceShareInvitationCommand;
24
- const se_AssociateResourceShareCommand = async (input, context) => {
25
- const b = (0, core_1.requestBuilder)(input, context);
26
- const headers = {
27
- "content-type": "application/json",
28
- };
29
- b.bp("/associateresourceshare");
30
- let body;
31
- body = JSON.stringify((0, smithy_client_1.take)(input, {
32
- clientToken: [],
33
- principals: (_) => (0, smithy_client_1._json)(_),
34
- resourceArns: (_) => (0, smithy_client_1._json)(_),
35
- resourceShareArn: [],
36
- sources: (_) => (0, smithy_client_1._json)(_),
37
- }));
38
- b.m("POST").h(headers).b(body);
39
- return b.build();
40
- };
41
- exports.se_AssociateResourceShareCommand = se_AssociateResourceShareCommand;
42
- const se_AssociateResourceSharePermissionCommand = async (input, context) => {
43
- const b = (0, core_1.requestBuilder)(input, context);
44
- const headers = {
45
- "content-type": "application/json",
46
- };
47
- b.bp("/associateresourcesharepermission");
48
- let body;
49
- body = JSON.stringify((0, smithy_client_1.take)(input, {
50
- clientToken: [],
51
- permissionArn: [],
52
- permissionVersion: [],
53
- replace: [],
54
- resourceShareArn: [],
55
- }));
56
- b.m("POST").h(headers).b(body);
57
- return b.build();
58
- };
59
- exports.se_AssociateResourceSharePermissionCommand = se_AssociateResourceSharePermissionCommand;
60
- const se_CreatePermissionCommand = async (input, context) => {
61
- const b = (0, core_1.requestBuilder)(input, context);
62
- const headers = {
63
- "content-type": "application/json",
64
- };
65
- b.bp("/createpermission");
66
- let body;
67
- body = JSON.stringify((0, smithy_client_1.take)(input, {
68
- clientToken: [],
69
- name: [],
70
- policyTemplate: [],
71
- resourceType: [],
72
- tags: (_) => (0, smithy_client_1._json)(_),
73
- }));
74
- b.m("POST").h(headers).b(body);
75
- return b.build();
76
- };
77
- exports.se_CreatePermissionCommand = se_CreatePermissionCommand;
78
- const se_CreatePermissionVersionCommand = async (input, context) => {
79
- const b = (0, core_1.requestBuilder)(input, context);
80
- const headers = {
81
- "content-type": "application/json",
82
- };
83
- b.bp("/createpermissionversion");
84
- let body;
85
- body = JSON.stringify((0, smithy_client_1.take)(input, {
86
- clientToken: [],
87
- permissionArn: [],
88
- policyTemplate: [],
89
- }));
90
- b.m("POST").h(headers).b(body);
91
- return b.build();
92
- };
93
- exports.se_CreatePermissionVersionCommand = se_CreatePermissionVersionCommand;
94
- const se_CreateResourceShareCommand = async (input, context) => {
95
- const b = (0, core_1.requestBuilder)(input, context);
96
- const headers = {
97
- "content-type": "application/json",
98
- };
99
- b.bp("/createresourceshare");
100
- let body;
101
- body = JSON.stringify((0, smithy_client_1.take)(input, {
102
- allowExternalPrincipals: [],
103
- clientToken: [],
104
- name: [],
105
- permissionArns: (_) => (0, smithy_client_1._json)(_),
106
- principals: (_) => (0, smithy_client_1._json)(_),
107
- resourceArns: (_) => (0, smithy_client_1._json)(_),
108
- sources: (_) => (0, smithy_client_1._json)(_),
109
- tags: (_) => (0, smithy_client_1._json)(_),
110
- }));
111
- b.m("POST").h(headers).b(body);
112
- return b.build();
113
- };
114
- exports.se_CreateResourceShareCommand = se_CreateResourceShareCommand;
115
- const se_DeletePermissionCommand = async (input, context) => {
116
- const b = (0, core_1.requestBuilder)(input, context);
117
- const headers = {};
118
- b.bp("/deletepermission");
119
- const query = (0, smithy_client_1.map)({
120
- [_pA]: [, (0, smithy_client_1.expectNonNull)(input[_pA], `permissionArn`)],
121
- [_cT]: [, input[_cT]],
122
- });
123
- let body;
124
- b.m("DELETE").h(headers).q(query).b(body);
125
- return b.build();
126
- };
127
- exports.se_DeletePermissionCommand = se_DeletePermissionCommand;
128
- const se_DeletePermissionVersionCommand = async (input, context) => {
129
- const b = (0, core_1.requestBuilder)(input, context);
130
- const headers = {};
131
- b.bp("/deletepermissionversion");
132
- const query = (0, smithy_client_1.map)({
133
- [_pA]: [, (0, smithy_client_1.expectNonNull)(input[_pA], `permissionArn`)],
134
- [_pV]: [(0, smithy_client_1.expectNonNull)(input.permissionVersion, `permissionVersion`) != null, () => input[_pV].toString()],
135
- [_cT]: [, input[_cT]],
136
- });
137
- let body;
138
- b.m("DELETE").h(headers).q(query).b(body);
139
- return b.build();
140
- };
141
- exports.se_DeletePermissionVersionCommand = se_DeletePermissionVersionCommand;
142
- const se_DeleteResourceShareCommand = async (input, context) => {
143
- const b = (0, core_1.requestBuilder)(input, context);
144
- const headers = {};
145
- b.bp("/deleteresourceshare");
146
- const query = (0, smithy_client_1.map)({
147
- [_rSA]: [, (0, smithy_client_1.expectNonNull)(input[_rSA], `resourceShareArn`)],
148
- [_cT]: [, input[_cT]],
149
- });
150
- let body;
151
- b.m("DELETE").h(headers).q(query).b(body);
152
- return b.build();
153
- };
154
- exports.se_DeleteResourceShareCommand = se_DeleteResourceShareCommand;
155
- const se_DisassociateResourceShareCommand = async (input, context) => {
156
- const b = (0, core_1.requestBuilder)(input, context);
157
- const headers = {
158
- "content-type": "application/json",
159
- };
160
- b.bp("/disassociateresourceshare");
161
- let body;
162
- body = JSON.stringify((0, smithy_client_1.take)(input, {
163
- clientToken: [],
164
- principals: (_) => (0, smithy_client_1._json)(_),
165
- resourceArns: (_) => (0, smithy_client_1._json)(_),
166
- resourceShareArn: [],
167
- sources: (_) => (0, smithy_client_1._json)(_),
168
- }));
169
- b.m("POST").h(headers).b(body);
170
- return b.build();
171
- };
172
- exports.se_DisassociateResourceShareCommand = se_DisassociateResourceShareCommand;
173
- const se_DisassociateResourceSharePermissionCommand = async (input, context) => {
174
- const b = (0, core_1.requestBuilder)(input, context);
175
- const headers = {
176
- "content-type": "application/json",
177
- };
178
- b.bp("/disassociateresourcesharepermission");
179
- let body;
180
- body = JSON.stringify((0, smithy_client_1.take)(input, {
181
- clientToken: [],
182
- permissionArn: [],
183
- resourceShareArn: [],
184
- }));
185
- b.m("POST").h(headers).b(body);
186
- return b.build();
187
- };
188
- exports.se_DisassociateResourceSharePermissionCommand = se_DisassociateResourceSharePermissionCommand;
189
- const se_EnableSharingWithAwsOrganizationCommand = async (input, context) => {
190
- const b = (0, core_1.requestBuilder)(input, context);
191
- const headers = {
192
- "content-type": "application/json",
193
- };
194
- b.bp("/enablesharingwithawsorganization");
195
- let body;
196
- body = "";
197
- b.m("POST").h(headers).b(body);
198
- return b.build();
199
- };
200
- exports.se_EnableSharingWithAwsOrganizationCommand = se_EnableSharingWithAwsOrganizationCommand;
201
- const se_GetPermissionCommand = async (input, context) => {
202
- const b = (0, core_1.requestBuilder)(input, context);
203
- const headers = {
204
- "content-type": "application/json",
205
- };
206
- b.bp("/getpermission");
207
- let body;
208
- body = JSON.stringify((0, smithy_client_1.take)(input, {
209
- permissionArn: [],
210
- permissionVersion: [],
211
- }));
212
- b.m("POST").h(headers).b(body);
213
- return b.build();
214
- };
215
- exports.se_GetPermissionCommand = se_GetPermissionCommand;
216
- const se_GetResourcePoliciesCommand = async (input, context) => {
217
- const b = (0, core_1.requestBuilder)(input, context);
218
- const headers = {
219
- "content-type": "application/json",
220
- };
221
- b.bp("/getresourcepolicies");
222
- let body;
223
- body = JSON.stringify((0, smithy_client_1.take)(input, {
224
- maxResults: [],
225
- nextToken: [],
226
- principal: [],
227
- resourceArns: (_) => (0, smithy_client_1._json)(_),
228
- }));
229
- b.m("POST").h(headers).b(body);
230
- return b.build();
231
- };
232
- exports.se_GetResourcePoliciesCommand = se_GetResourcePoliciesCommand;
233
- const se_GetResourceShareAssociationsCommand = async (input, context) => {
234
- const b = (0, core_1.requestBuilder)(input, context);
235
- const headers = {
236
- "content-type": "application/json",
237
- };
238
- b.bp("/getresourceshareassociations");
239
- let body;
240
- body = JSON.stringify((0, smithy_client_1.take)(input, {
241
- associationStatus: [],
242
- associationType: [],
243
- maxResults: [],
244
- nextToken: [],
245
- principal: [],
246
- resourceArn: [],
247
- resourceShareArns: (_) => (0, smithy_client_1._json)(_),
248
- }));
249
- b.m("POST").h(headers).b(body);
250
- return b.build();
251
- };
252
- exports.se_GetResourceShareAssociationsCommand = se_GetResourceShareAssociationsCommand;
253
- const se_GetResourceShareInvitationsCommand = async (input, context) => {
254
- const b = (0, core_1.requestBuilder)(input, context);
255
- const headers = {
256
- "content-type": "application/json",
257
- };
258
- b.bp("/getresourceshareinvitations");
259
- let body;
260
- body = JSON.stringify((0, smithy_client_1.take)(input, {
261
- maxResults: [],
262
- nextToken: [],
263
- resourceShareArns: (_) => (0, smithy_client_1._json)(_),
264
- resourceShareInvitationArns: (_) => (0, smithy_client_1._json)(_),
265
- }));
266
- b.m("POST").h(headers).b(body);
267
- return b.build();
268
- };
269
- exports.se_GetResourceShareInvitationsCommand = se_GetResourceShareInvitationsCommand;
270
- const se_GetResourceSharesCommand = async (input, context) => {
271
- const b = (0, core_1.requestBuilder)(input, context);
272
- const headers = {
273
- "content-type": "application/json",
274
- };
275
- b.bp("/getresourceshares");
276
- let body;
277
- body = JSON.stringify((0, smithy_client_1.take)(input, {
278
- maxResults: [],
279
- name: [],
280
- nextToken: [],
281
- permissionArn: [],
282
- permissionVersion: [],
283
- resourceOwner: [],
284
- resourceShareArns: (_) => (0, smithy_client_1._json)(_),
285
- resourceShareStatus: [],
286
- tagFilters: (_) => (0, smithy_client_1._json)(_),
287
- }));
288
- b.m("POST").h(headers).b(body);
289
- return b.build();
290
- };
291
- exports.se_GetResourceSharesCommand = se_GetResourceSharesCommand;
292
- const se_ListPendingInvitationResourcesCommand = async (input, context) => {
293
- const b = (0, core_1.requestBuilder)(input, context);
294
- const headers = {
295
- "content-type": "application/json",
296
- };
297
- b.bp("/listpendinginvitationresources");
298
- let body;
299
- body = JSON.stringify((0, smithy_client_1.take)(input, {
300
- maxResults: [],
301
- nextToken: [],
302
- resourceRegionScope: [],
303
- resourceShareInvitationArn: [],
304
- }));
305
- b.m("POST").h(headers).b(body);
306
- return b.build();
307
- };
308
- exports.se_ListPendingInvitationResourcesCommand = se_ListPendingInvitationResourcesCommand;
309
- const se_ListPermissionAssociationsCommand = async (input, context) => {
310
- const b = (0, core_1.requestBuilder)(input, context);
311
- const headers = {
312
- "content-type": "application/json",
313
- };
314
- b.bp("/listpermissionassociations");
315
- let body;
316
- body = JSON.stringify((0, smithy_client_1.take)(input, {
317
- associationStatus: [],
318
- defaultVersion: [],
319
- featureSet: [],
320
- maxResults: [],
321
- nextToken: [],
322
- permissionArn: [],
323
- permissionVersion: [],
324
- resourceType: [],
325
- }));
326
- b.m("POST").h(headers).b(body);
327
- return b.build();
328
- };
329
- exports.se_ListPermissionAssociationsCommand = se_ListPermissionAssociationsCommand;
330
- const se_ListPermissionsCommand = async (input, context) => {
331
- const b = (0, core_1.requestBuilder)(input, context);
332
- const headers = {
333
- "content-type": "application/json",
334
- };
335
- b.bp("/listpermissions");
336
- let body;
337
- body = JSON.stringify((0, smithy_client_1.take)(input, {
338
- maxResults: [],
339
- nextToken: [],
340
- permissionType: [],
341
- resourceType: [],
342
- }));
343
- b.m("POST").h(headers).b(body);
344
- return b.build();
345
- };
346
- exports.se_ListPermissionsCommand = se_ListPermissionsCommand;
347
- const se_ListPermissionVersionsCommand = async (input, context) => {
348
- const b = (0, core_1.requestBuilder)(input, context);
349
- const headers = {
350
- "content-type": "application/json",
351
- };
352
- b.bp("/listpermissionversions");
353
- let body;
354
- body = JSON.stringify((0, smithy_client_1.take)(input, {
355
- maxResults: [],
356
- nextToken: [],
357
- permissionArn: [],
358
- }));
359
- b.m("POST").h(headers).b(body);
360
- return b.build();
361
- };
362
- exports.se_ListPermissionVersionsCommand = se_ListPermissionVersionsCommand;
363
- const se_ListPrincipalsCommand = async (input, context) => {
364
- const b = (0, core_1.requestBuilder)(input, context);
365
- const headers = {
366
- "content-type": "application/json",
367
- };
368
- b.bp("/listprincipals");
369
- let body;
370
- body = JSON.stringify((0, smithy_client_1.take)(input, {
371
- maxResults: [],
372
- nextToken: [],
373
- principals: (_) => (0, smithy_client_1._json)(_),
374
- resourceArn: [],
375
- resourceOwner: [],
376
- resourceShareArns: (_) => (0, smithy_client_1._json)(_),
377
- resourceType: [],
378
- }));
379
- b.m("POST").h(headers).b(body);
380
- return b.build();
381
- };
382
- exports.se_ListPrincipalsCommand = se_ListPrincipalsCommand;
383
- const se_ListReplacePermissionAssociationsWorkCommand = async (input, context) => {
384
- const b = (0, core_1.requestBuilder)(input, context);
385
- const headers = {
386
- "content-type": "application/json",
387
- };
388
- b.bp("/listreplacepermissionassociationswork");
389
- let body;
390
- body = JSON.stringify((0, smithy_client_1.take)(input, {
391
- maxResults: [],
392
- nextToken: [],
393
- status: [],
394
- workIds: (_) => (0, smithy_client_1._json)(_),
395
- }));
396
- b.m("POST").h(headers).b(body);
397
- return b.build();
398
- };
399
- exports.se_ListReplacePermissionAssociationsWorkCommand = se_ListReplacePermissionAssociationsWorkCommand;
400
- const se_ListResourcesCommand = async (input, context) => {
401
- const b = (0, core_1.requestBuilder)(input, context);
402
- const headers = {
403
- "content-type": "application/json",
404
- };
405
- b.bp("/listresources");
406
- let body;
407
- body = JSON.stringify((0, smithy_client_1.take)(input, {
408
- maxResults: [],
409
- nextToken: [],
410
- principal: [],
411
- resourceArns: (_) => (0, smithy_client_1._json)(_),
412
- resourceOwner: [],
413
- resourceRegionScope: [],
414
- resourceShareArns: (_) => (0, smithy_client_1._json)(_),
415
- resourceType: [],
416
- }));
417
- b.m("POST").h(headers).b(body);
418
- return b.build();
419
- };
420
- exports.se_ListResourcesCommand = se_ListResourcesCommand;
421
- const se_ListResourceSharePermissionsCommand = async (input, context) => {
422
- const b = (0, core_1.requestBuilder)(input, context);
423
- const headers = {
424
- "content-type": "application/json",
425
- };
426
- b.bp("/listresourcesharepermissions");
427
- let body;
428
- body = JSON.stringify((0, smithy_client_1.take)(input, {
429
- maxResults: [],
430
- nextToken: [],
431
- resourceShareArn: [],
432
- }));
433
- b.m("POST").h(headers).b(body);
434
- return b.build();
435
- };
436
- exports.se_ListResourceSharePermissionsCommand = se_ListResourceSharePermissionsCommand;
437
- const se_ListResourceTypesCommand = async (input, context) => {
438
- const b = (0, core_1.requestBuilder)(input, context);
439
- const headers = {
440
- "content-type": "application/json",
441
- };
442
- b.bp("/listresourcetypes");
443
- let body;
444
- body = JSON.stringify((0, smithy_client_1.take)(input, {
445
- maxResults: [],
446
- nextToken: [],
447
- resourceRegionScope: [],
448
- }));
449
- b.m("POST").h(headers).b(body);
450
- return b.build();
451
- };
452
- exports.se_ListResourceTypesCommand = se_ListResourceTypesCommand;
453
- const se_PromotePermissionCreatedFromPolicyCommand = async (input, context) => {
454
- const b = (0, core_1.requestBuilder)(input, context);
455
- const headers = {
456
- "content-type": "application/json",
457
- };
458
- b.bp("/promotepermissioncreatedfrompolicy");
459
- let body;
460
- body = JSON.stringify((0, smithy_client_1.take)(input, {
461
- clientToken: [],
462
- name: [],
463
- permissionArn: [],
464
- }));
465
- b.m("POST").h(headers).b(body);
466
- return b.build();
467
- };
468
- exports.se_PromotePermissionCreatedFromPolicyCommand = se_PromotePermissionCreatedFromPolicyCommand;
469
- const se_PromoteResourceShareCreatedFromPolicyCommand = async (input, context) => {
470
- const b = (0, core_1.requestBuilder)(input, context);
471
- const headers = {};
472
- b.bp("/promoteresourcesharecreatedfrompolicy");
473
- const query = (0, smithy_client_1.map)({
474
- [_rSA]: [, (0, smithy_client_1.expectNonNull)(input[_rSA], `resourceShareArn`)],
475
- });
476
- let body;
477
- b.m("POST").h(headers).q(query).b(body);
478
- return b.build();
479
- };
480
- exports.se_PromoteResourceShareCreatedFromPolicyCommand = se_PromoteResourceShareCreatedFromPolicyCommand;
481
- const se_RejectResourceShareInvitationCommand = async (input, context) => {
482
- const b = (0, core_1.requestBuilder)(input, context);
483
- const headers = {
484
- "content-type": "application/json",
485
- };
486
- b.bp("/rejectresourceshareinvitation");
487
- let body;
488
- body = JSON.stringify((0, smithy_client_1.take)(input, {
489
- clientToken: [],
490
- resourceShareInvitationArn: [],
491
- }));
492
- b.m("POST").h(headers).b(body);
493
- return b.build();
494
- };
495
- exports.se_RejectResourceShareInvitationCommand = se_RejectResourceShareInvitationCommand;
496
- const se_ReplacePermissionAssociationsCommand = async (input, context) => {
497
- const b = (0, core_1.requestBuilder)(input, context);
498
- const headers = {
499
- "content-type": "application/json",
500
- };
501
- b.bp("/replacepermissionassociations");
502
- let body;
503
- body = JSON.stringify((0, smithy_client_1.take)(input, {
504
- clientToken: [],
505
- fromPermissionArn: [],
506
- fromPermissionVersion: [],
507
- toPermissionArn: [],
508
- }));
509
- b.m("POST").h(headers).b(body);
510
- return b.build();
511
- };
512
- exports.se_ReplacePermissionAssociationsCommand = se_ReplacePermissionAssociationsCommand;
513
- const se_SetDefaultPermissionVersionCommand = async (input, context) => {
514
- const b = (0, core_1.requestBuilder)(input, context);
515
- const headers = {
516
- "content-type": "application/json",
517
- };
518
- b.bp("/setdefaultpermissionversion");
519
- let body;
520
- body = JSON.stringify((0, smithy_client_1.take)(input, {
521
- clientToken: [],
522
- permissionArn: [],
523
- permissionVersion: [],
524
- }));
525
- b.m("POST").h(headers).b(body);
526
- return b.build();
527
- };
528
- exports.se_SetDefaultPermissionVersionCommand = se_SetDefaultPermissionVersionCommand;
529
- const se_TagResourceCommand = async (input, context) => {
530
- const b = (0, core_1.requestBuilder)(input, context);
531
- const headers = {
532
- "content-type": "application/json",
533
- };
534
- b.bp("/tagresource");
535
- let body;
536
- body = JSON.stringify((0, smithy_client_1.take)(input, {
537
- resourceArn: [],
538
- resourceShareArn: [],
539
- tags: (_) => (0, smithy_client_1._json)(_),
540
- }));
541
- b.m("POST").h(headers).b(body);
542
- return b.build();
543
- };
544
- exports.se_TagResourceCommand = se_TagResourceCommand;
545
- const se_UntagResourceCommand = async (input, context) => {
546
- const b = (0, core_1.requestBuilder)(input, context);
547
- const headers = {
548
- "content-type": "application/json",
549
- };
550
- b.bp("/untagresource");
551
- let body;
552
- body = JSON.stringify((0, smithy_client_1.take)(input, {
553
- resourceArn: [],
554
- resourceShareArn: [],
555
- tagKeys: (_) => (0, smithy_client_1._json)(_),
556
- }));
557
- b.m("POST").h(headers).b(body);
558
- return b.build();
559
- };
560
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
561
- const se_UpdateResourceShareCommand = async (input, context) => {
562
- const b = (0, core_1.requestBuilder)(input, context);
563
- const headers = {
564
- "content-type": "application/json",
565
- };
566
- b.bp("/updateresourceshare");
567
- let body;
568
- body = JSON.stringify((0, smithy_client_1.take)(input, {
569
- allowExternalPrincipals: [],
570
- clientToken: [],
571
- name: [],
572
- resourceShareArn: [],
573
- }));
574
- b.m("POST").h(headers).b(body);
575
- return b.build();
576
- };
577
- exports.se_UpdateResourceShareCommand = se_UpdateResourceShareCommand;
578
- const de_AcceptResourceShareInvitationCommand = async (output, context) => {
579
- if (output.statusCode !== 200 && output.statusCode >= 300) {
580
- return de_AcceptResourceShareInvitationCommandError(output, context);
581
- }
582
- const contents = (0, smithy_client_1.map)({
583
- $metadata: deserializeMetadata(output),
584
- });
585
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
586
- const doc = (0, smithy_client_1.take)(data, {
587
- clientToken: smithy_client_1.expectString,
588
- resourceShareInvitation: (_) => de_ResourceShareInvitation(_, context),
589
- });
590
- Object.assign(contents, doc);
591
- return contents;
592
- };
593
- exports.de_AcceptResourceShareInvitationCommand = de_AcceptResourceShareInvitationCommand;
594
- const de_AcceptResourceShareInvitationCommandError = async (output, context) => {
595
- const parsedOutput = {
596
- ...output,
597
- body: await parseErrorBody(output.body, context),
598
- };
599
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
600
- switch (errorCode) {
601
- case "IdempotentParameterMismatchException":
602
- case "com.amazonaws.ram#IdempotentParameterMismatchException":
603
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
604
- case "InvalidClientTokenException":
605
- case "com.amazonaws.ram#InvalidClientTokenException":
606
- throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
607
- case "MalformedArnException":
608
- case "com.amazonaws.ram#MalformedArnException":
609
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
610
- case "OperationNotPermittedException":
611
- case "com.amazonaws.ram#OperationNotPermittedException":
612
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
613
- case "ResourceShareInvitationAlreadyAcceptedException":
614
- case "com.amazonaws.ram#ResourceShareInvitationAlreadyAcceptedException":
615
- throw await de_ResourceShareInvitationAlreadyAcceptedExceptionRes(parsedOutput, context);
616
- case "ResourceShareInvitationAlreadyRejectedException":
617
- case "com.amazonaws.ram#ResourceShareInvitationAlreadyRejectedException":
618
- throw await de_ResourceShareInvitationAlreadyRejectedExceptionRes(parsedOutput, context);
619
- case "ResourceShareInvitationArnNotFoundException":
620
- case "com.amazonaws.ram#ResourceShareInvitationArnNotFoundException":
621
- throw await de_ResourceShareInvitationArnNotFoundExceptionRes(parsedOutput, context);
622
- case "ResourceShareInvitationExpiredException":
623
- case "com.amazonaws.ram#ResourceShareInvitationExpiredException":
624
- throw await de_ResourceShareInvitationExpiredExceptionRes(parsedOutput, context);
625
- case "ServerInternalException":
626
- case "com.amazonaws.ram#ServerInternalException":
627
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
628
- case "ServiceUnavailableException":
629
- case "com.amazonaws.ram#ServiceUnavailableException":
630
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
631
- default:
632
- const parsedBody = parsedOutput.body;
633
- return throwDefaultError({
634
- output,
635
- parsedBody,
636
- errorCode,
637
- });
638
- }
639
- };
640
- const de_AssociateResourceShareCommand = async (output, context) => {
641
- if (output.statusCode !== 200 && output.statusCode >= 300) {
642
- return de_AssociateResourceShareCommandError(output, context);
643
- }
644
- const contents = (0, smithy_client_1.map)({
645
- $metadata: deserializeMetadata(output),
646
- });
647
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
648
- const doc = (0, smithy_client_1.take)(data, {
649
- clientToken: smithy_client_1.expectString,
650
- resourceShareAssociations: (_) => de_ResourceShareAssociationList(_, context),
651
- });
652
- Object.assign(contents, doc);
653
- return contents;
654
- };
655
- exports.de_AssociateResourceShareCommand = de_AssociateResourceShareCommand;
656
- const de_AssociateResourceShareCommandError = async (output, context) => {
657
- const parsedOutput = {
658
- ...output,
659
- body: await parseErrorBody(output.body, context),
660
- };
661
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
662
- switch (errorCode) {
663
- case "IdempotentParameterMismatchException":
664
- case "com.amazonaws.ram#IdempotentParameterMismatchException":
665
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
666
- case "InvalidClientTokenException":
667
- case "com.amazonaws.ram#InvalidClientTokenException":
668
- throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
669
- case "InvalidParameterException":
670
- case "com.amazonaws.ram#InvalidParameterException":
671
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
672
- case "InvalidStateTransitionException":
673
- case "com.amazonaws.ram#InvalidStateTransitionException":
674
- throw await de_InvalidStateTransitionExceptionRes(parsedOutput, context);
675
- case "MalformedArnException":
676
- case "com.amazonaws.ram#MalformedArnException":
677
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
678
- case "OperationNotPermittedException":
679
- case "com.amazonaws.ram#OperationNotPermittedException":
680
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
681
- case "ResourceShareLimitExceededException":
682
- case "com.amazonaws.ram#ResourceShareLimitExceededException":
683
- throw await de_ResourceShareLimitExceededExceptionRes(parsedOutput, context);
684
- case "ServerInternalException":
685
- case "com.amazonaws.ram#ServerInternalException":
686
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
687
- case "ServiceUnavailableException":
688
- case "com.amazonaws.ram#ServiceUnavailableException":
689
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
690
- case "ThrottlingException":
691
- case "com.amazonaws.ram#ThrottlingException":
692
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
693
- case "UnknownResourceException":
694
- case "com.amazonaws.ram#UnknownResourceException":
695
- throw await de_UnknownResourceExceptionRes(parsedOutput, context);
696
- default:
697
- const parsedBody = parsedOutput.body;
698
- return throwDefaultError({
699
- output,
700
- parsedBody,
701
- errorCode,
702
- });
703
- }
704
- };
705
- const de_AssociateResourceSharePermissionCommand = async (output, context) => {
706
- if (output.statusCode !== 200 && output.statusCode >= 300) {
707
- return de_AssociateResourceSharePermissionCommandError(output, context);
708
- }
709
- const contents = (0, smithy_client_1.map)({
710
- $metadata: deserializeMetadata(output),
711
- });
712
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
713
- const doc = (0, smithy_client_1.take)(data, {
714
- clientToken: smithy_client_1.expectString,
715
- returnValue: smithy_client_1.expectBoolean,
716
- });
717
- Object.assign(contents, doc);
718
- return contents;
719
- };
720
- exports.de_AssociateResourceSharePermissionCommand = de_AssociateResourceSharePermissionCommand;
721
- const de_AssociateResourceSharePermissionCommandError = async (output, context) => {
722
- const parsedOutput = {
723
- ...output,
724
- body: await parseErrorBody(output.body, context),
725
- };
726
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
727
- switch (errorCode) {
728
- case "InvalidClientTokenException":
729
- case "com.amazonaws.ram#InvalidClientTokenException":
730
- throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
731
- case "InvalidParameterException":
732
- case "com.amazonaws.ram#InvalidParameterException":
733
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
734
- case "MalformedArnException":
735
- case "com.amazonaws.ram#MalformedArnException":
736
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
737
- case "OperationNotPermittedException":
738
- case "com.amazonaws.ram#OperationNotPermittedException":
739
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
740
- case "ServerInternalException":
741
- case "com.amazonaws.ram#ServerInternalException":
742
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
743
- case "ServiceUnavailableException":
744
- case "com.amazonaws.ram#ServiceUnavailableException":
745
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
746
- case "UnknownResourceException":
747
- case "com.amazonaws.ram#UnknownResourceException":
748
- throw await de_UnknownResourceExceptionRes(parsedOutput, context);
749
- default:
750
- const parsedBody = parsedOutput.body;
751
- return throwDefaultError({
752
- output,
753
- parsedBody,
754
- errorCode,
755
- });
756
- }
757
- };
758
- const de_CreatePermissionCommand = async (output, context) => {
759
- if (output.statusCode !== 200 && output.statusCode >= 300) {
760
- return de_CreatePermissionCommandError(output, context);
761
- }
762
- const contents = (0, smithy_client_1.map)({
763
- $metadata: deserializeMetadata(output),
764
- });
765
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
766
- const doc = (0, smithy_client_1.take)(data, {
767
- clientToken: smithy_client_1.expectString,
768
- permission: (_) => de_ResourceSharePermissionSummary(_, context),
769
- });
770
- Object.assign(contents, doc);
771
- return contents;
772
- };
773
- exports.de_CreatePermissionCommand = de_CreatePermissionCommand;
774
- const de_CreatePermissionCommandError = async (output, context) => {
775
- const parsedOutput = {
776
- ...output,
777
- body: await parseErrorBody(output.body, context),
778
- };
779
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
780
- switch (errorCode) {
781
- case "IdempotentParameterMismatchException":
782
- case "com.amazonaws.ram#IdempotentParameterMismatchException":
783
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
784
- case "InvalidClientTokenException":
785
- case "com.amazonaws.ram#InvalidClientTokenException":
786
- throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
787
- case "InvalidParameterException":
788
- case "com.amazonaws.ram#InvalidParameterException":
789
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
790
- case "InvalidPolicyException":
791
- case "com.amazonaws.ram#InvalidPolicyException":
792
- throw await de_InvalidPolicyExceptionRes(parsedOutput, context);
793
- case "MalformedPolicyTemplateException":
794
- case "com.amazonaws.ram#MalformedPolicyTemplateException":
795
- throw await de_MalformedPolicyTemplateExceptionRes(parsedOutput, context);
796
- case "OperationNotPermittedException":
797
- case "com.amazonaws.ram#OperationNotPermittedException":
798
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
799
- case "PermissionAlreadyExistsException":
800
- case "com.amazonaws.ram#PermissionAlreadyExistsException":
801
- throw await de_PermissionAlreadyExistsExceptionRes(parsedOutput, context);
802
- case "PermissionLimitExceededException":
803
- case "com.amazonaws.ram#PermissionLimitExceededException":
804
- throw await de_PermissionLimitExceededExceptionRes(parsedOutput, context);
805
- case "ServerInternalException":
806
- case "com.amazonaws.ram#ServerInternalException":
807
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
808
- case "ServiceUnavailableException":
809
- case "com.amazonaws.ram#ServiceUnavailableException":
810
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
811
- default:
812
- const parsedBody = parsedOutput.body;
813
- return throwDefaultError({
814
- output,
815
- parsedBody,
816
- errorCode,
817
- });
818
- }
819
- };
820
- const de_CreatePermissionVersionCommand = async (output, context) => {
821
- if (output.statusCode !== 200 && output.statusCode >= 300) {
822
- return de_CreatePermissionVersionCommandError(output, context);
823
- }
824
- const contents = (0, smithy_client_1.map)({
825
- $metadata: deserializeMetadata(output),
826
- });
827
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
828
- const doc = (0, smithy_client_1.take)(data, {
829
- clientToken: smithy_client_1.expectString,
830
- permission: (_) => de_ResourceSharePermissionDetail(_, context),
831
- });
832
- Object.assign(contents, doc);
833
- return contents;
834
- };
835
- exports.de_CreatePermissionVersionCommand = de_CreatePermissionVersionCommand;
836
- const de_CreatePermissionVersionCommandError = async (output, context) => {
837
- const parsedOutput = {
838
- ...output,
839
- body: await parseErrorBody(output.body, context),
840
- };
841
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
842
- switch (errorCode) {
843
- case "IdempotentParameterMismatchException":
844
- case "com.amazonaws.ram#IdempotentParameterMismatchException":
845
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
846
- case "InvalidClientTokenException":
847
- case "com.amazonaws.ram#InvalidClientTokenException":
848
- throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
849
- case "InvalidParameterException":
850
- case "com.amazonaws.ram#InvalidParameterException":
851
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
852
- case "InvalidPolicyException":
853
- case "com.amazonaws.ram#InvalidPolicyException":
854
- throw await de_InvalidPolicyExceptionRes(parsedOutput, context);
855
- case "MalformedArnException":
856
- case "com.amazonaws.ram#MalformedArnException":
857
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
858
- case "MalformedPolicyTemplateException":
859
- case "com.amazonaws.ram#MalformedPolicyTemplateException":
860
- throw await de_MalformedPolicyTemplateExceptionRes(parsedOutput, context);
861
- case "PermissionVersionsLimitExceededException":
862
- case "com.amazonaws.ram#PermissionVersionsLimitExceededException":
863
- throw await de_PermissionVersionsLimitExceededExceptionRes(parsedOutput, context);
864
- case "ServerInternalException":
865
- case "com.amazonaws.ram#ServerInternalException":
866
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
867
- case "ServiceUnavailableException":
868
- case "com.amazonaws.ram#ServiceUnavailableException":
869
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
870
- case "UnknownResourceException":
871
- case "com.amazonaws.ram#UnknownResourceException":
872
- throw await de_UnknownResourceExceptionRes(parsedOutput, context);
873
- default:
874
- const parsedBody = parsedOutput.body;
875
- return throwDefaultError({
876
- output,
877
- parsedBody,
878
- errorCode,
879
- });
880
- }
881
- };
882
- const de_CreateResourceShareCommand = async (output, context) => {
883
- if (output.statusCode !== 200 && output.statusCode >= 300) {
884
- return de_CreateResourceShareCommandError(output, context);
885
- }
886
- const contents = (0, smithy_client_1.map)({
887
- $metadata: deserializeMetadata(output),
888
- });
889
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
890
- const doc = (0, smithy_client_1.take)(data, {
891
- clientToken: smithy_client_1.expectString,
892
- resourceShare: (_) => de_ResourceShare(_, context),
893
- });
894
- Object.assign(contents, doc);
895
- return contents;
896
- };
897
- exports.de_CreateResourceShareCommand = de_CreateResourceShareCommand;
898
- const de_CreateResourceShareCommandError = async (output, context) => {
899
- const parsedOutput = {
900
- ...output,
901
- body: await parseErrorBody(output.body, context),
902
- };
903
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
904
- switch (errorCode) {
905
- case "IdempotentParameterMismatchException":
906
- case "com.amazonaws.ram#IdempotentParameterMismatchException":
907
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
908
- case "InvalidClientTokenException":
909
- case "com.amazonaws.ram#InvalidClientTokenException":
910
- throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
911
- case "InvalidParameterException":
912
- case "com.amazonaws.ram#InvalidParameterException":
913
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
914
- case "InvalidStateTransitionException":
915
- case "com.amazonaws.ram#InvalidStateTransitionException":
916
- throw await de_InvalidStateTransitionExceptionRes(parsedOutput, context);
917
- case "MalformedArnException":
918
- case "com.amazonaws.ram#MalformedArnException":
919
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
920
- case "OperationNotPermittedException":
921
- case "com.amazonaws.ram#OperationNotPermittedException":
922
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
923
- case "ResourceShareLimitExceededException":
924
- case "com.amazonaws.ram#ResourceShareLimitExceededException":
925
- throw await de_ResourceShareLimitExceededExceptionRes(parsedOutput, context);
926
- case "ServerInternalException":
927
- case "com.amazonaws.ram#ServerInternalException":
928
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
929
- case "ServiceUnavailableException":
930
- case "com.amazonaws.ram#ServiceUnavailableException":
931
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
932
- case "TagLimitExceededException":
933
- case "com.amazonaws.ram#TagLimitExceededException":
934
- throw await de_TagLimitExceededExceptionRes(parsedOutput, context);
935
- case "TagPolicyViolationException":
936
- case "com.amazonaws.ram#TagPolicyViolationException":
937
- throw await de_TagPolicyViolationExceptionRes(parsedOutput, context);
938
- case "UnknownResourceException":
939
- case "com.amazonaws.ram#UnknownResourceException":
940
- throw await de_UnknownResourceExceptionRes(parsedOutput, context);
941
- default:
942
- const parsedBody = parsedOutput.body;
943
- return throwDefaultError({
944
- output,
945
- parsedBody,
946
- errorCode,
947
- });
948
- }
949
- };
950
- const de_DeletePermissionCommand = async (output, context) => {
951
- if (output.statusCode !== 200 && output.statusCode >= 300) {
952
- return de_DeletePermissionCommandError(output, context);
953
- }
954
- const contents = (0, smithy_client_1.map)({
955
- $metadata: deserializeMetadata(output),
956
- });
957
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
958
- const doc = (0, smithy_client_1.take)(data, {
959
- clientToken: smithy_client_1.expectString,
960
- permissionStatus: smithy_client_1.expectString,
961
- returnValue: smithy_client_1.expectBoolean,
962
- });
963
- Object.assign(contents, doc);
964
- return contents;
965
- };
966
- exports.de_DeletePermissionCommand = de_DeletePermissionCommand;
967
- const de_DeletePermissionCommandError = async (output, context) => {
968
- const parsedOutput = {
969
- ...output,
970
- body: await parseErrorBody(output.body, context),
971
- };
972
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
973
- switch (errorCode) {
974
- case "IdempotentParameterMismatchException":
975
- case "com.amazonaws.ram#IdempotentParameterMismatchException":
976
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
977
- case "InvalidClientTokenException":
978
- case "com.amazonaws.ram#InvalidClientTokenException":
979
- throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
980
- case "MalformedArnException":
981
- case "com.amazonaws.ram#MalformedArnException":
982
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
983
- case "OperationNotPermittedException":
984
- case "com.amazonaws.ram#OperationNotPermittedException":
985
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
986
- case "ServerInternalException":
987
- case "com.amazonaws.ram#ServerInternalException":
988
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
989
- case "ServiceUnavailableException":
990
- case "com.amazonaws.ram#ServiceUnavailableException":
991
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
992
- case "UnknownResourceException":
993
- case "com.amazonaws.ram#UnknownResourceException":
994
- throw await de_UnknownResourceExceptionRes(parsedOutput, context);
995
- default:
996
- const parsedBody = parsedOutput.body;
997
- return throwDefaultError({
998
- output,
999
- parsedBody,
1000
- errorCode,
1001
- });
1002
- }
1003
- };
1004
- const de_DeletePermissionVersionCommand = async (output, context) => {
1005
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1006
- return de_DeletePermissionVersionCommandError(output, context);
1007
- }
1008
- const contents = (0, smithy_client_1.map)({
1009
- $metadata: deserializeMetadata(output),
1010
- });
1011
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1012
- const doc = (0, smithy_client_1.take)(data, {
1013
- clientToken: smithy_client_1.expectString,
1014
- permissionStatus: smithy_client_1.expectString,
1015
- returnValue: smithy_client_1.expectBoolean,
1016
- });
1017
- Object.assign(contents, doc);
1018
- return contents;
1019
- };
1020
- exports.de_DeletePermissionVersionCommand = de_DeletePermissionVersionCommand;
1021
- const de_DeletePermissionVersionCommandError = async (output, context) => {
1022
- const parsedOutput = {
1023
- ...output,
1024
- body: await parseErrorBody(output.body, context),
1025
- };
1026
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1027
- switch (errorCode) {
1028
- case "IdempotentParameterMismatchException":
1029
- case "com.amazonaws.ram#IdempotentParameterMismatchException":
1030
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
1031
- case "InvalidClientTokenException":
1032
- case "com.amazonaws.ram#InvalidClientTokenException":
1033
- throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
1034
- case "InvalidParameterException":
1035
- case "com.amazonaws.ram#InvalidParameterException":
1036
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1037
- case "MalformedArnException":
1038
- case "com.amazonaws.ram#MalformedArnException":
1039
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
1040
- case "OperationNotPermittedException":
1041
- case "com.amazonaws.ram#OperationNotPermittedException":
1042
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1043
- case "ServerInternalException":
1044
- case "com.amazonaws.ram#ServerInternalException":
1045
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
1046
- case "ServiceUnavailableException":
1047
- case "com.amazonaws.ram#ServiceUnavailableException":
1048
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1049
- case "UnknownResourceException":
1050
- case "com.amazonaws.ram#UnknownResourceException":
1051
- throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1052
- default:
1053
- const parsedBody = parsedOutput.body;
1054
- return throwDefaultError({
1055
- output,
1056
- parsedBody,
1057
- errorCode,
1058
- });
1059
- }
1060
- };
1061
- const de_DeleteResourceShareCommand = async (output, context) => {
1062
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1063
- return de_DeleteResourceShareCommandError(output, context);
1064
- }
1065
- const contents = (0, smithy_client_1.map)({
1066
- $metadata: deserializeMetadata(output),
1067
- });
1068
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1069
- const doc = (0, smithy_client_1.take)(data, {
1070
- clientToken: smithy_client_1.expectString,
1071
- returnValue: smithy_client_1.expectBoolean,
1072
- });
1073
- Object.assign(contents, doc);
1074
- return contents;
1075
- };
1076
- exports.de_DeleteResourceShareCommand = de_DeleteResourceShareCommand;
1077
- const de_DeleteResourceShareCommandError = async (output, context) => {
1078
- const parsedOutput = {
1079
- ...output,
1080
- body: await parseErrorBody(output.body, context),
1081
- };
1082
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1083
- switch (errorCode) {
1084
- case "IdempotentParameterMismatchException":
1085
- case "com.amazonaws.ram#IdempotentParameterMismatchException":
1086
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
1087
- case "InvalidClientTokenException":
1088
- case "com.amazonaws.ram#InvalidClientTokenException":
1089
- throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
1090
- case "InvalidParameterException":
1091
- case "com.amazonaws.ram#InvalidParameterException":
1092
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1093
- case "InvalidStateTransitionException":
1094
- case "com.amazonaws.ram#InvalidStateTransitionException":
1095
- throw await de_InvalidStateTransitionExceptionRes(parsedOutput, context);
1096
- case "MalformedArnException":
1097
- case "com.amazonaws.ram#MalformedArnException":
1098
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
1099
- case "OperationNotPermittedException":
1100
- case "com.amazonaws.ram#OperationNotPermittedException":
1101
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1102
- case "ServerInternalException":
1103
- case "com.amazonaws.ram#ServerInternalException":
1104
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
1105
- case "ServiceUnavailableException":
1106
- case "com.amazonaws.ram#ServiceUnavailableException":
1107
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1108
- case "UnknownResourceException":
1109
- case "com.amazonaws.ram#UnknownResourceException":
1110
- throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1111
- default:
1112
- const parsedBody = parsedOutput.body;
1113
- return throwDefaultError({
1114
- output,
1115
- parsedBody,
1116
- errorCode,
1117
- });
1118
- }
1119
- };
1120
- const de_DisassociateResourceShareCommand = async (output, context) => {
1121
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1122
- return de_DisassociateResourceShareCommandError(output, context);
1123
- }
1124
- const contents = (0, smithy_client_1.map)({
1125
- $metadata: deserializeMetadata(output),
1126
- });
1127
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1128
- const doc = (0, smithy_client_1.take)(data, {
1129
- clientToken: smithy_client_1.expectString,
1130
- resourceShareAssociations: (_) => de_ResourceShareAssociationList(_, context),
1131
- });
1132
- Object.assign(contents, doc);
1133
- return contents;
1134
- };
1135
- exports.de_DisassociateResourceShareCommand = de_DisassociateResourceShareCommand;
1136
- const de_DisassociateResourceShareCommandError = async (output, context) => {
1137
- const parsedOutput = {
1138
- ...output,
1139
- body: await parseErrorBody(output.body, context),
1140
- };
1141
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1142
- switch (errorCode) {
1143
- case "IdempotentParameterMismatchException":
1144
- case "com.amazonaws.ram#IdempotentParameterMismatchException":
1145
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
1146
- case "InvalidClientTokenException":
1147
- case "com.amazonaws.ram#InvalidClientTokenException":
1148
- throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
1149
- case "InvalidParameterException":
1150
- case "com.amazonaws.ram#InvalidParameterException":
1151
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1152
- case "InvalidStateTransitionException":
1153
- case "com.amazonaws.ram#InvalidStateTransitionException":
1154
- throw await de_InvalidStateTransitionExceptionRes(parsedOutput, context);
1155
- case "MalformedArnException":
1156
- case "com.amazonaws.ram#MalformedArnException":
1157
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
1158
- case "OperationNotPermittedException":
1159
- case "com.amazonaws.ram#OperationNotPermittedException":
1160
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1161
- case "ResourceShareLimitExceededException":
1162
- case "com.amazonaws.ram#ResourceShareLimitExceededException":
1163
- throw await de_ResourceShareLimitExceededExceptionRes(parsedOutput, context);
1164
- case "ServerInternalException":
1165
- case "com.amazonaws.ram#ServerInternalException":
1166
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
1167
- case "ServiceUnavailableException":
1168
- case "com.amazonaws.ram#ServiceUnavailableException":
1169
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1170
- case "UnknownResourceException":
1171
- case "com.amazonaws.ram#UnknownResourceException":
1172
- throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1173
- default:
1174
- const parsedBody = parsedOutput.body;
1175
- return throwDefaultError({
1176
- output,
1177
- parsedBody,
1178
- errorCode,
1179
- });
1180
- }
1181
- };
1182
- const de_DisassociateResourceSharePermissionCommand = async (output, context) => {
1183
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1184
- return de_DisassociateResourceSharePermissionCommandError(output, context);
1185
- }
1186
- const contents = (0, smithy_client_1.map)({
1187
- $metadata: deserializeMetadata(output),
1188
- });
1189
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1190
- const doc = (0, smithy_client_1.take)(data, {
1191
- clientToken: smithy_client_1.expectString,
1192
- returnValue: smithy_client_1.expectBoolean,
1193
- });
1194
- Object.assign(contents, doc);
1195
- return contents;
1196
- };
1197
- exports.de_DisassociateResourceSharePermissionCommand = de_DisassociateResourceSharePermissionCommand;
1198
- const de_DisassociateResourceSharePermissionCommandError = async (output, context) => {
1199
- const parsedOutput = {
1200
- ...output,
1201
- body: await parseErrorBody(output.body, context),
1202
- };
1203
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1204
- switch (errorCode) {
1205
- case "InvalidClientTokenException":
1206
- case "com.amazonaws.ram#InvalidClientTokenException":
1207
- throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
1208
- case "InvalidParameterException":
1209
- case "com.amazonaws.ram#InvalidParameterException":
1210
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1211
- case "InvalidStateTransitionException":
1212
- case "com.amazonaws.ram#InvalidStateTransitionException":
1213
- throw await de_InvalidStateTransitionExceptionRes(parsedOutput, context);
1214
- case "MalformedArnException":
1215
- case "com.amazonaws.ram#MalformedArnException":
1216
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
1217
- case "OperationNotPermittedException":
1218
- case "com.amazonaws.ram#OperationNotPermittedException":
1219
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1220
- case "ServerInternalException":
1221
- case "com.amazonaws.ram#ServerInternalException":
1222
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
1223
- case "ServiceUnavailableException":
1224
- case "com.amazonaws.ram#ServiceUnavailableException":
1225
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1226
- case "UnknownResourceException":
1227
- case "com.amazonaws.ram#UnknownResourceException":
1228
- throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1229
- default:
1230
- const parsedBody = parsedOutput.body;
1231
- return throwDefaultError({
1232
- output,
1233
- parsedBody,
1234
- errorCode,
1235
- });
1236
- }
1237
- };
1238
- const de_EnableSharingWithAwsOrganizationCommand = async (output, context) => {
1239
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1240
- return de_EnableSharingWithAwsOrganizationCommandError(output, context);
1241
- }
1242
- const contents = (0, smithy_client_1.map)({
1243
- $metadata: deserializeMetadata(output),
1244
- });
1245
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1246
- const doc = (0, smithy_client_1.take)(data, {
1247
- returnValue: smithy_client_1.expectBoolean,
1248
- });
1249
- Object.assign(contents, doc);
1250
- return contents;
1251
- };
1252
- exports.de_EnableSharingWithAwsOrganizationCommand = de_EnableSharingWithAwsOrganizationCommand;
1253
- const de_EnableSharingWithAwsOrganizationCommandError = async (output, context) => {
1254
- const parsedOutput = {
1255
- ...output,
1256
- body: await parseErrorBody(output.body, context),
1257
- };
1258
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1259
- switch (errorCode) {
1260
- case "OperationNotPermittedException":
1261
- case "com.amazonaws.ram#OperationNotPermittedException":
1262
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1263
- case "ServerInternalException":
1264
- case "com.amazonaws.ram#ServerInternalException":
1265
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
1266
- case "ServiceUnavailableException":
1267
- case "com.amazonaws.ram#ServiceUnavailableException":
1268
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1269
- default:
1270
- const parsedBody = parsedOutput.body;
1271
- return throwDefaultError({
1272
- output,
1273
- parsedBody,
1274
- errorCode,
1275
- });
1276
- }
1277
- };
1278
- const de_GetPermissionCommand = async (output, context) => {
1279
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1280
- return de_GetPermissionCommandError(output, context);
1281
- }
1282
- const contents = (0, smithy_client_1.map)({
1283
- $metadata: deserializeMetadata(output),
1284
- });
1285
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1286
- const doc = (0, smithy_client_1.take)(data, {
1287
- permission: (_) => de_ResourceSharePermissionDetail(_, context),
1288
- });
1289
- Object.assign(contents, doc);
1290
- return contents;
1291
- };
1292
- exports.de_GetPermissionCommand = de_GetPermissionCommand;
1293
- const de_GetPermissionCommandError = async (output, context) => {
1294
- const parsedOutput = {
1295
- ...output,
1296
- body: await parseErrorBody(output.body, context),
1297
- };
1298
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1299
- switch (errorCode) {
1300
- case "InvalidParameterException":
1301
- case "com.amazonaws.ram#InvalidParameterException":
1302
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1303
- case "MalformedArnException":
1304
- case "com.amazonaws.ram#MalformedArnException":
1305
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
1306
- case "OperationNotPermittedException":
1307
- case "com.amazonaws.ram#OperationNotPermittedException":
1308
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1309
- case "ServerInternalException":
1310
- case "com.amazonaws.ram#ServerInternalException":
1311
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
1312
- case "ServiceUnavailableException":
1313
- case "com.amazonaws.ram#ServiceUnavailableException":
1314
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1315
- case "UnknownResourceException":
1316
- case "com.amazonaws.ram#UnknownResourceException":
1317
- throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1318
- default:
1319
- const parsedBody = parsedOutput.body;
1320
- return throwDefaultError({
1321
- output,
1322
- parsedBody,
1323
- errorCode,
1324
- });
1325
- }
1326
- };
1327
- const de_GetResourcePoliciesCommand = async (output, context) => {
1328
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1329
- return de_GetResourcePoliciesCommandError(output, context);
1330
- }
1331
- const contents = (0, smithy_client_1.map)({
1332
- $metadata: deserializeMetadata(output),
1333
- });
1334
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1335
- const doc = (0, smithy_client_1.take)(data, {
1336
- nextToken: smithy_client_1.expectString,
1337
- policies: smithy_client_1._json,
1338
- });
1339
- Object.assign(contents, doc);
1340
- return contents;
1341
- };
1342
- exports.de_GetResourcePoliciesCommand = de_GetResourcePoliciesCommand;
1343
- const de_GetResourcePoliciesCommandError = async (output, context) => {
1344
- const parsedOutput = {
1345
- ...output,
1346
- body: await parseErrorBody(output.body, context),
1347
- };
1348
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1349
- switch (errorCode) {
1350
- case "InvalidNextTokenException":
1351
- case "com.amazonaws.ram#InvalidNextTokenException":
1352
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1353
- case "InvalidParameterException":
1354
- case "com.amazonaws.ram#InvalidParameterException":
1355
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1356
- case "MalformedArnException":
1357
- case "com.amazonaws.ram#MalformedArnException":
1358
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
1359
- case "ResourceArnNotFoundException":
1360
- case "com.amazonaws.ram#ResourceArnNotFoundException":
1361
- throw await de_ResourceArnNotFoundExceptionRes(parsedOutput, context);
1362
- case "ServerInternalException":
1363
- case "com.amazonaws.ram#ServerInternalException":
1364
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
1365
- case "ServiceUnavailableException":
1366
- case "com.amazonaws.ram#ServiceUnavailableException":
1367
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1368
- default:
1369
- const parsedBody = parsedOutput.body;
1370
- return throwDefaultError({
1371
- output,
1372
- parsedBody,
1373
- errorCode,
1374
- });
1375
- }
1376
- };
1377
- const de_GetResourceShareAssociationsCommand = async (output, context) => {
1378
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1379
- return de_GetResourceShareAssociationsCommandError(output, context);
1380
- }
1381
- const contents = (0, smithy_client_1.map)({
1382
- $metadata: deserializeMetadata(output),
1383
- });
1384
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1385
- const doc = (0, smithy_client_1.take)(data, {
1386
- nextToken: smithy_client_1.expectString,
1387
- resourceShareAssociations: (_) => de_ResourceShareAssociationList(_, context),
1388
- });
1389
- Object.assign(contents, doc);
1390
- return contents;
1391
- };
1392
- exports.de_GetResourceShareAssociationsCommand = de_GetResourceShareAssociationsCommand;
1393
- const de_GetResourceShareAssociationsCommandError = async (output, context) => {
1394
- const parsedOutput = {
1395
- ...output,
1396
- body: await parseErrorBody(output.body, context),
1397
- };
1398
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1399
- switch (errorCode) {
1400
- case "InvalidNextTokenException":
1401
- case "com.amazonaws.ram#InvalidNextTokenException":
1402
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1403
- case "InvalidParameterException":
1404
- case "com.amazonaws.ram#InvalidParameterException":
1405
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1406
- case "MalformedArnException":
1407
- case "com.amazonaws.ram#MalformedArnException":
1408
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
1409
- case "OperationNotPermittedException":
1410
- case "com.amazonaws.ram#OperationNotPermittedException":
1411
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1412
- case "ServerInternalException":
1413
- case "com.amazonaws.ram#ServerInternalException":
1414
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
1415
- case "ServiceUnavailableException":
1416
- case "com.amazonaws.ram#ServiceUnavailableException":
1417
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1418
- case "UnknownResourceException":
1419
- case "com.amazonaws.ram#UnknownResourceException":
1420
- throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1421
- default:
1422
- const parsedBody = parsedOutput.body;
1423
- return throwDefaultError({
1424
- output,
1425
- parsedBody,
1426
- errorCode,
1427
- });
1428
- }
1429
- };
1430
- const de_GetResourceShareInvitationsCommand = async (output, context) => {
1431
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1432
- return de_GetResourceShareInvitationsCommandError(output, context);
1433
- }
1434
- const contents = (0, smithy_client_1.map)({
1435
- $metadata: deserializeMetadata(output),
1436
- });
1437
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1438
- const doc = (0, smithy_client_1.take)(data, {
1439
- nextToken: smithy_client_1.expectString,
1440
- resourceShareInvitations: (_) => de_ResourceShareInvitationList(_, context),
1441
- });
1442
- Object.assign(contents, doc);
1443
- return contents;
1444
- };
1445
- exports.de_GetResourceShareInvitationsCommand = de_GetResourceShareInvitationsCommand;
1446
- const de_GetResourceShareInvitationsCommandError = async (output, context) => {
1447
- const parsedOutput = {
1448
- ...output,
1449
- body: await parseErrorBody(output.body, context),
1450
- };
1451
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1452
- switch (errorCode) {
1453
- case "InvalidMaxResultsException":
1454
- case "com.amazonaws.ram#InvalidMaxResultsException":
1455
- throw await de_InvalidMaxResultsExceptionRes(parsedOutput, context);
1456
- case "InvalidNextTokenException":
1457
- case "com.amazonaws.ram#InvalidNextTokenException":
1458
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1459
- case "InvalidParameterException":
1460
- case "com.amazonaws.ram#InvalidParameterException":
1461
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1462
- case "MalformedArnException":
1463
- case "com.amazonaws.ram#MalformedArnException":
1464
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
1465
- case "ResourceShareInvitationArnNotFoundException":
1466
- case "com.amazonaws.ram#ResourceShareInvitationArnNotFoundException":
1467
- throw await de_ResourceShareInvitationArnNotFoundExceptionRes(parsedOutput, context);
1468
- case "ServerInternalException":
1469
- case "com.amazonaws.ram#ServerInternalException":
1470
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
1471
- case "ServiceUnavailableException":
1472
- case "com.amazonaws.ram#ServiceUnavailableException":
1473
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1474
- case "UnknownResourceException":
1475
- case "com.amazonaws.ram#UnknownResourceException":
1476
- throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1477
- default:
1478
- const parsedBody = parsedOutput.body;
1479
- return throwDefaultError({
1480
- output,
1481
- parsedBody,
1482
- errorCode,
1483
- });
1484
- }
1485
- };
1486
- const de_GetResourceSharesCommand = async (output, context) => {
1487
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1488
- return de_GetResourceSharesCommandError(output, context);
1489
- }
1490
- const contents = (0, smithy_client_1.map)({
1491
- $metadata: deserializeMetadata(output),
1492
- });
1493
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1494
- const doc = (0, smithy_client_1.take)(data, {
1495
- nextToken: smithy_client_1.expectString,
1496
- resourceShares: (_) => de_ResourceShareList(_, context),
1497
- });
1498
- Object.assign(contents, doc);
1499
- return contents;
1500
- };
1501
- exports.de_GetResourceSharesCommand = de_GetResourceSharesCommand;
1502
- const de_GetResourceSharesCommandError = async (output, context) => {
1503
- const parsedOutput = {
1504
- ...output,
1505
- body: await parseErrorBody(output.body, context),
1506
- };
1507
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1508
- switch (errorCode) {
1509
- case "InvalidNextTokenException":
1510
- case "com.amazonaws.ram#InvalidNextTokenException":
1511
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1512
- case "InvalidParameterException":
1513
- case "com.amazonaws.ram#InvalidParameterException":
1514
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1515
- case "MalformedArnException":
1516
- case "com.amazonaws.ram#MalformedArnException":
1517
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
1518
- case "ServerInternalException":
1519
- case "com.amazonaws.ram#ServerInternalException":
1520
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
1521
- case "ServiceUnavailableException":
1522
- case "com.amazonaws.ram#ServiceUnavailableException":
1523
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1524
- case "UnknownResourceException":
1525
- case "com.amazonaws.ram#UnknownResourceException":
1526
- throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1527
- default:
1528
- const parsedBody = parsedOutput.body;
1529
- return throwDefaultError({
1530
- output,
1531
- parsedBody,
1532
- errorCode,
1533
- });
1534
- }
1535
- };
1536
- const de_ListPendingInvitationResourcesCommand = async (output, context) => {
1537
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1538
- return de_ListPendingInvitationResourcesCommandError(output, context);
1539
- }
1540
- const contents = (0, smithy_client_1.map)({
1541
- $metadata: deserializeMetadata(output),
1542
- });
1543
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1544
- const doc = (0, smithy_client_1.take)(data, {
1545
- nextToken: smithy_client_1.expectString,
1546
- resources: (_) => de_ResourceList(_, context),
1547
- });
1548
- Object.assign(contents, doc);
1549
- return contents;
1550
- };
1551
- exports.de_ListPendingInvitationResourcesCommand = de_ListPendingInvitationResourcesCommand;
1552
- const de_ListPendingInvitationResourcesCommandError = async (output, context) => {
1553
- const parsedOutput = {
1554
- ...output,
1555
- body: await parseErrorBody(output.body, context),
1556
- };
1557
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1558
- switch (errorCode) {
1559
- case "InvalidNextTokenException":
1560
- case "com.amazonaws.ram#InvalidNextTokenException":
1561
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1562
- case "InvalidParameterException":
1563
- case "com.amazonaws.ram#InvalidParameterException":
1564
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1565
- case "MalformedArnException":
1566
- case "com.amazonaws.ram#MalformedArnException":
1567
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
1568
- case "MissingRequiredParameterException":
1569
- case "com.amazonaws.ram#MissingRequiredParameterException":
1570
- throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
1571
- case "ResourceShareInvitationAlreadyRejectedException":
1572
- case "com.amazonaws.ram#ResourceShareInvitationAlreadyRejectedException":
1573
- throw await de_ResourceShareInvitationAlreadyRejectedExceptionRes(parsedOutput, context);
1574
- case "ResourceShareInvitationArnNotFoundException":
1575
- case "com.amazonaws.ram#ResourceShareInvitationArnNotFoundException":
1576
- throw await de_ResourceShareInvitationArnNotFoundExceptionRes(parsedOutput, context);
1577
- case "ResourceShareInvitationExpiredException":
1578
- case "com.amazonaws.ram#ResourceShareInvitationExpiredException":
1579
- throw await de_ResourceShareInvitationExpiredExceptionRes(parsedOutput, context);
1580
- case "ServerInternalException":
1581
- case "com.amazonaws.ram#ServerInternalException":
1582
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
1583
- case "ServiceUnavailableException":
1584
- case "com.amazonaws.ram#ServiceUnavailableException":
1585
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1586
- default:
1587
- const parsedBody = parsedOutput.body;
1588
- return throwDefaultError({
1589
- output,
1590
- parsedBody,
1591
- errorCode,
1592
- });
1593
- }
1594
- };
1595
- const de_ListPermissionAssociationsCommand = async (output, context) => {
1596
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1597
- return de_ListPermissionAssociationsCommandError(output, context);
1598
- }
1599
- const contents = (0, smithy_client_1.map)({
1600
- $metadata: deserializeMetadata(output),
1601
- });
1602
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1603
- const doc = (0, smithy_client_1.take)(data, {
1604
- nextToken: smithy_client_1.expectString,
1605
- permissions: (_) => de_AssociatedPermissionList(_, context),
1606
- });
1607
- Object.assign(contents, doc);
1608
- return contents;
1609
- };
1610
- exports.de_ListPermissionAssociationsCommand = de_ListPermissionAssociationsCommand;
1611
- const de_ListPermissionAssociationsCommandError = async (output, context) => {
1612
- const parsedOutput = {
1613
- ...output,
1614
- body: await parseErrorBody(output.body, context),
1615
- };
1616
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1617
- switch (errorCode) {
1618
- case "InvalidNextTokenException":
1619
- case "com.amazonaws.ram#InvalidNextTokenException":
1620
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1621
- case "InvalidParameterException":
1622
- case "com.amazonaws.ram#InvalidParameterException":
1623
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1624
- case "MalformedArnException":
1625
- case "com.amazonaws.ram#MalformedArnException":
1626
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
1627
- case "ServerInternalException":
1628
- case "com.amazonaws.ram#ServerInternalException":
1629
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
1630
- case "ServiceUnavailableException":
1631
- case "com.amazonaws.ram#ServiceUnavailableException":
1632
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1633
- default:
1634
- const parsedBody = parsedOutput.body;
1635
- return throwDefaultError({
1636
- output,
1637
- parsedBody,
1638
- errorCode,
1639
- });
1640
- }
1641
- };
1642
- const de_ListPermissionsCommand = async (output, context) => {
1643
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1644
- return de_ListPermissionsCommandError(output, context);
1645
- }
1646
- const contents = (0, smithy_client_1.map)({
1647
- $metadata: deserializeMetadata(output),
1648
- });
1649
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1650
- const doc = (0, smithy_client_1.take)(data, {
1651
- nextToken: smithy_client_1.expectString,
1652
- permissions: (_) => de_ResourceSharePermissionList(_, context),
1653
- });
1654
- Object.assign(contents, doc);
1655
- return contents;
1656
- };
1657
- exports.de_ListPermissionsCommand = de_ListPermissionsCommand;
1658
- const de_ListPermissionsCommandError = async (output, context) => {
1659
- const parsedOutput = {
1660
- ...output,
1661
- body: await parseErrorBody(output.body, context),
1662
- };
1663
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1664
- switch (errorCode) {
1665
- case "InvalidNextTokenException":
1666
- case "com.amazonaws.ram#InvalidNextTokenException":
1667
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1668
- case "InvalidParameterException":
1669
- case "com.amazonaws.ram#InvalidParameterException":
1670
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1671
- case "OperationNotPermittedException":
1672
- case "com.amazonaws.ram#OperationNotPermittedException":
1673
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1674
- case "ServerInternalException":
1675
- case "com.amazonaws.ram#ServerInternalException":
1676
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
1677
- case "ServiceUnavailableException":
1678
- case "com.amazonaws.ram#ServiceUnavailableException":
1679
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1680
- default:
1681
- const parsedBody = parsedOutput.body;
1682
- return throwDefaultError({
1683
- output,
1684
- parsedBody,
1685
- errorCode,
1686
- });
1687
- }
1688
- };
1689
- const de_ListPermissionVersionsCommand = async (output, context) => {
1690
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1691
- return de_ListPermissionVersionsCommandError(output, context);
1692
- }
1693
- const contents = (0, smithy_client_1.map)({
1694
- $metadata: deserializeMetadata(output),
1695
- });
1696
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1697
- const doc = (0, smithy_client_1.take)(data, {
1698
- nextToken: smithy_client_1.expectString,
1699
- permissions: (_) => de_ResourceSharePermissionList(_, context),
1700
- });
1701
- Object.assign(contents, doc);
1702
- return contents;
1703
- };
1704
- exports.de_ListPermissionVersionsCommand = de_ListPermissionVersionsCommand;
1705
- const de_ListPermissionVersionsCommandError = async (output, context) => {
1706
- const parsedOutput = {
1707
- ...output,
1708
- body: await parseErrorBody(output.body, context),
1709
- };
1710
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1711
- switch (errorCode) {
1712
- case "InvalidNextTokenException":
1713
- case "com.amazonaws.ram#InvalidNextTokenException":
1714
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1715
- case "InvalidParameterException":
1716
- case "com.amazonaws.ram#InvalidParameterException":
1717
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1718
- case "MalformedArnException":
1719
- case "com.amazonaws.ram#MalformedArnException":
1720
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
1721
- case "OperationNotPermittedException":
1722
- case "com.amazonaws.ram#OperationNotPermittedException":
1723
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1724
- case "ServerInternalException":
1725
- case "com.amazonaws.ram#ServerInternalException":
1726
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
1727
- case "ServiceUnavailableException":
1728
- case "com.amazonaws.ram#ServiceUnavailableException":
1729
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1730
- case "UnknownResourceException":
1731
- case "com.amazonaws.ram#UnknownResourceException":
1732
- throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1733
- default:
1734
- const parsedBody = parsedOutput.body;
1735
- return throwDefaultError({
1736
- output,
1737
- parsedBody,
1738
- errorCode,
1739
- });
1740
- }
1741
- };
1742
- const de_ListPrincipalsCommand = async (output, context) => {
1743
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1744
- return de_ListPrincipalsCommandError(output, context);
1745
- }
1746
- const contents = (0, smithy_client_1.map)({
1747
- $metadata: deserializeMetadata(output),
1748
- });
1749
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1750
- const doc = (0, smithy_client_1.take)(data, {
1751
- nextToken: smithy_client_1.expectString,
1752
- principals: (_) => de_PrincipalList(_, context),
1753
- });
1754
- Object.assign(contents, doc);
1755
- return contents;
1756
- };
1757
- exports.de_ListPrincipalsCommand = de_ListPrincipalsCommand;
1758
- const de_ListPrincipalsCommandError = async (output, context) => {
1759
- const parsedOutput = {
1760
- ...output,
1761
- body: await parseErrorBody(output.body, context),
1762
- };
1763
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1764
- switch (errorCode) {
1765
- case "InvalidNextTokenException":
1766
- case "com.amazonaws.ram#InvalidNextTokenException":
1767
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1768
- case "InvalidParameterException":
1769
- case "com.amazonaws.ram#InvalidParameterException":
1770
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1771
- case "MalformedArnException":
1772
- case "com.amazonaws.ram#MalformedArnException":
1773
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
1774
- case "ServerInternalException":
1775
- case "com.amazonaws.ram#ServerInternalException":
1776
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
1777
- case "ServiceUnavailableException":
1778
- case "com.amazonaws.ram#ServiceUnavailableException":
1779
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1780
- case "UnknownResourceException":
1781
- case "com.amazonaws.ram#UnknownResourceException":
1782
- throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1783
- default:
1784
- const parsedBody = parsedOutput.body;
1785
- return throwDefaultError({
1786
- output,
1787
- parsedBody,
1788
- errorCode,
1789
- });
1790
- }
1791
- };
1792
- const de_ListReplacePermissionAssociationsWorkCommand = async (output, context) => {
1793
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1794
- return de_ListReplacePermissionAssociationsWorkCommandError(output, context);
1795
- }
1796
- const contents = (0, smithy_client_1.map)({
1797
- $metadata: deserializeMetadata(output),
1798
- });
1799
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1800
- const doc = (0, smithy_client_1.take)(data, {
1801
- nextToken: smithy_client_1.expectString,
1802
- replacePermissionAssociationsWorks: (_) => de_ReplacePermissionAssociationsWorkList(_, context),
1803
- });
1804
- Object.assign(contents, doc);
1805
- return contents;
1806
- };
1807
- exports.de_ListReplacePermissionAssociationsWorkCommand = de_ListReplacePermissionAssociationsWorkCommand;
1808
- const de_ListReplacePermissionAssociationsWorkCommandError = async (output, context) => {
1809
- const parsedOutput = {
1810
- ...output,
1811
- body: await parseErrorBody(output.body, context),
1812
- };
1813
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1814
- switch (errorCode) {
1815
- case "InvalidNextTokenException":
1816
- case "com.amazonaws.ram#InvalidNextTokenException":
1817
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1818
- case "InvalidParameterException":
1819
- case "com.amazonaws.ram#InvalidParameterException":
1820
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1821
- case "ServerInternalException":
1822
- case "com.amazonaws.ram#ServerInternalException":
1823
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
1824
- case "ServiceUnavailableException":
1825
- case "com.amazonaws.ram#ServiceUnavailableException":
1826
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1827
- default:
1828
- const parsedBody = parsedOutput.body;
1829
- return throwDefaultError({
1830
- output,
1831
- parsedBody,
1832
- errorCode,
1833
- });
1834
- }
1835
- };
1836
- const de_ListResourcesCommand = async (output, context) => {
1837
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1838
- return de_ListResourcesCommandError(output, context);
1839
- }
1840
- const contents = (0, smithy_client_1.map)({
1841
- $metadata: deserializeMetadata(output),
1842
- });
1843
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1844
- const doc = (0, smithy_client_1.take)(data, {
1845
- nextToken: smithy_client_1.expectString,
1846
- resources: (_) => de_ResourceList(_, context),
1847
- });
1848
- Object.assign(contents, doc);
1849
- return contents;
1850
- };
1851
- exports.de_ListResourcesCommand = de_ListResourcesCommand;
1852
- const de_ListResourcesCommandError = async (output, context) => {
1853
- const parsedOutput = {
1854
- ...output,
1855
- body: await parseErrorBody(output.body, context),
1856
- };
1857
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1858
- switch (errorCode) {
1859
- case "InvalidNextTokenException":
1860
- case "com.amazonaws.ram#InvalidNextTokenException":
1861
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1862
- case "InvalidParameterException":
1863
- case "com.amazonaws.ram#InvalidParameterException":
1864
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1865
- case "InvalidResourceTypeException":
1866
- case "com.amazonaws.ram#InvalidResourceTypeException":
1867
- throw await de_InvalidResourceTypeExceptionRes(parsedOutput, context);
1868
- case "MalformedArnException":
1869
- case "com.amazonaws.ram#MalformedArnException":
1870
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
1871
- case "ServerInternalException":
1872
- case "com.amazonaws.ram#ServerInternalException":
1873
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
1874
- case "ServiceUnavailableException":
1875
- case "com.amazonaws.ram#ServiceUnavailableException":
1876
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1877
- case "UnknownResourceException":
1878
- case "com.amazonaws.ram#UnknownResourceException":
1879
- throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1880
- default:
1881
- const parsedBody = parsedOutput.body;
1882
- return throwDefaultError({
1883
- output,
1884
- parsedBody,
1885
- errorCode,
1886
- });
1887
- }
1888
- };
1889
- const de_ListResourceSharePermissionsCommand = async (output, context) => {
1890
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1891
- return de_ListResourceSharePermissionsCommandError(output, context);
1892
- }
1893
- const contents = (0, smithy_client_1.map)({
1894
- $metadata: deserializeMetadata(output),
1895
- });
1896
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1897
- const doc = (0, smithy_client_1.take)(data, {
1898
- nextToken: smithy_client_1.expectString,
1899
- permissions: (_) => de_ResourceSharePermissionList(_, context),
1900
- });
1901
- Object.assign(contents, doc);
1902
- return contents;
1903
- };
1904
- exports.de_ListResourceSharePermissionsCommand = de_ListResourceSharePermissionsCommand;
1905
- const de_ListResourceSharePermissionsCommandError = async (output, context) => {
1906
- const parsedOutput = {
1907
- ...output,
1908
- body: await parseErrorBody(output.body, context),
1909
- };
1910
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1911
- switch (errorCode) {
1912
- case "InvalidNextTokenException":
1913
- case "com.amazonaws.ram#InvalidNextTokenException":
1914
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1915
- case "InvalidParameterException":
1916
- case "com.amazonaws.ram#InvalidParameterException":
1917
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1918
- case "MalformedArnException":
1919
- case "com.amazonaws.ram#MalformedArnException":
1920
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
1921
- case "OperationNotPermittedException":
1922
- case "com.amazonaws.ram#OperationNotPermittedException":
1923
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1924
- case "ServerInternalException":
1925
- case "com.amazonaws.ram#ServerInternalException":
1926
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
1927
- case "ServiceUnavailableException":
1928
- case "com.amazonaws.ram#ServiceUnavailableException":
1929
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1930
- case "UnknownResourceException":
1931
- case "com.amazonaws.ram#UnknownResourceException":
1932
- throw await de_UnknownResourceExceptionRes(parsedOutput, context);
1933
- default:
1934
- const parsedBody = parsedOutput.body;
1935
- return throwDefaultError({
1936
- output,
1937
- parsedBody,
1938
- errorCode,
1939
- });
1940
- }
1941
- };
1942
- const de_ListResourceTypesCommand = async (output, context) => {
1943
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1944
- return de_ListResourceTypesCommandError(output, context);
1945
- }
1946
- const contents = (0, smithy_client_1.map)({
1947
- $metadata: deserializeMetadata(output),
1948
- });
1949
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1950
- const doc = (0, smithy_client_1.take)(data, {
1951
- nextToken: smithy_client_1.expectString,
1952
- resourceTypes: smithy_client_1._json,
1953
- });
1954
- Object.assign(contents, doc);
1955
- return contents;
1956
- };
1957
- exports.de_ListResourceTypesCommand = de_ListResourceTypesCommand;
1958
- const de_ListResourceTypesCommandError = async (output, context) => {
1959
- const parsedOutput = {
1960
- ...output,
1961
- body: await parseErrorBody(output.body, context),
1962
- };
1963
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1964
- switch (errorCode) {
1965
- case "InvalidNextTokenException":
1966
- case "com.amazonaws.ram#InvalidNextTokenException":
1967
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
1968
- case "InvalidParameterException":
1969
- case "com.amazonaws.ram#InvalidParameterException":
1970
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1971
- case "ServerInternalException":
1972
- case "com.amazonaws.ram#ServerInternalException":
1973
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
1974
- case "ServiceUnavailableException":
1975
- case "com.amazonaws.ram#ServiceUnavailableException":
1976
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1977
- default:
1978
- const parsedBody = parsedOutput.body;
1979
- return throwDefaultError({
1980
- output,
1981
- parsedBody,
1982
- errorCode,
1983
- });
1984
- }
1985
- };
1986
- const de_PromotePermissionCreatedFromPolicyCommand = async (output, context) => {
1987
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1988
- return de_PromotePermissionCreatedFromPolicyCommandError(output, context);
1989
- }
1990
- const contents = (0, smithy_client_1.map)({
1991
- $metadata: deserializeMetadata(output),
1992
- });
1993
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1994
- const doc = (0, smithy_client_1.take)(data, {
1995
- clientToken: smithy_client_1.expectString,
1996
- permission: (_) => de_ResourceSharePermissionSummary(_, context),
1997
- });
1998
- Object.assign(contents, doc);
1999
- return contents;
2000
- };
2001
- exports.de_PromotePermissionCreatedFromPolicyCommand = de_PromotePermissionCreatedFromPolicyCommand;
2002
- const de_PromotePermissionCreatedFromPolicyCommandError = async (output, context) => {
2003
- const parsedOutput = {
2004
- ...output,
2005
- body: await parseErrorBody(output.body, context),
2006
- };
2007
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2008
- switch (errorCode) {
2009
- case "InvalidParameterException":
2010
- case "com.amazonaws.ram#InvalidParameterException":
2011
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2012
- case "MalformedArnException":
2013
- case "com.amazonaws.ram#MalformedArnException":
2014
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
2015
- case "MissingRequiredParameterException":
2016
- case "com.amazonaws.ram#MissingRequiredParameterException":
2017
- throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
2018
- case "OperationNotPermittedException":
2019
- case "com.amazonaws.ram#OperationNotPermittedException":
2020
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
2021
- case "ServerInternalException":
2022
- case "com.amazonaws.ram#ServerInternalException":
2023
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
2024
- case "ServiceUnavailableException":
2025
- case "com.amazonaws.ram#ServiceUnavailableException":
2026
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2027
- case "UnknownResourceException":
2028
- case "com.amazonaws.ram#UnknownResourceException":
2029
- throw await de_UnknownResourceExceptionRes(parsedOutput, context);
2030
- default:
2031
- const parsedBody = parsedOutput.body;
2032
- return throwDefaultError({
2033
- output,
2034
- parsedBody,
2035
- errorCode,
2036
- });
2037
- }
2038
- };
2039
- const de_PromoteResourceShareCreatedFromPolicyCommand = async (output, context) => {
2040
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2041
- return de_PromoteResourceShareCreatedFromPolicyCommandError(output, context);
2042
- }
2043
- const contents = (0, smithy_client_1.map)({
2044
- $metadata: deserializeMetadata(output),
2045
- });
2046
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2047
- const doc = (0, smithy_client_1.take)(data, {
2048
- returnValue: smithy_client_1.expectBoolean,
2049
- });
2050
- Object.assign(contents, doc);
2051
- return contents;
2052
- };
2053
- exports.de_PromoteResourceShareCreatedFromPolicyCommand = de_PromoteResourceShareCreatedFromPolicyCommand;
2054
- const de_PromoteResourceShareCreatedFromPolicyCommandError = async (output, context) => {
2055
- const parsedOutput = {
2056
- ...output,
2057
- body: await parseErrorBody(output.body, context),
2058
- };
2059
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2060
- switch (errorCode) {
2061
- case "InvalidParameterException":
2062
- case "com.amazonaws.ram#InvalidParameterException":
2063
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2064
- case "InvalidStateTransitionException":
2065
- case "com.amazonaws.ram#InvalidStateTransitionException":
2066
- throw await de_InvalidStateTransitionExceptionRes(parsedOutput, context);
2067
- case "MalformedArnException":
2068
- case "com.amazonaws.ram#MalformedArnException":
2069
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
2070
- case "MissingRequiredParameterException":
2071
- case "com.amazonaws.ram#MissingRequiredParameterException":
2072
- throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
2073
- case "OperationNotPermittedException":
2074
- case "com.amazonaws.ram#OperationNotPermittedException":
2075
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
2076
- case "ResourceShareLimitExceededException":
2077
- case "com.amazonaws.ram#ResourceShareLimitExceededException":
2078
- throw await de_ResourceShareLimitExceededExceptionRes(parsedOutput, context);
2079
- case "ServerInternalException":
2080
- case "com.amazonaws.ram#ServerInternalException":
2081
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
2082
- case "ServiceUnavailableException":
2083
- case "com.amazonaws.ram#ServiceUnavailableException":
2084
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2085
- case "UnknownResourceException":
2086
- case "com.amazonaws.ram#UnknownResourceException":
2087
- throw await de_UnknownResourceExceptionRes(parsedOutput, context);
2088
- case "UnmatchedPolicyPermissionException":
2089
- case "com.amazonaws.ram#UnmatchedPolicyPermissionException":
2090
- throw await de_UnmatchedPolicyPermissionExceptionRes(parsedOutput, context);
2091
- default:
2092
- const parsedBody = parsedOutput.body;
2093
- return throwDefaultError({
2094
- output,
2095
- parsedBody,
2096
- errorCode,
2097
- });
2098
- }
2099
- };
2100
- const de_RejectResourceShareInvitationCommand = async (output, context) => {
2101
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2102
- return de_RejectResourceShareInvitationCommandError(output, context);
2103
- }
2104
- const contents = (0, smithy_client_1.map)({
2105
- $metadata: deserializeMetadata(output),
2106
- });
2107
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2108
- const doc = (0, smithy_client_1.take)(data, {
2109
- clientToken: smithy_client_1.expectString,
2110
- resourceShareInvitation: (_) => de_ResourceShareInvitation(_, context),
2111
- });
2112
- Object.assign(contents, doc);
2113
- return contents;
2114
- };
2115
- exports.de_RejectResourceShareInvitationCommand = de_RejectResourceShareInvitationCommand;
2116
- const de_RejectResourceShareInvitationCommandError = async (output, context) => {
2117
- const parsedOutput = {
2118
- ...output,
2119
- body: await parseErrorBody(output.body, context),
2120
- };
2121
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2122
- switch (errorCode) {
2123
- case "IdempotentParameterMismatchException":
2124
- case "com.amazonaws.ram#IdempotentParameterMismatchException":
2125
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
2126
- case "InvalidClientTokenException":
2127
- case "com.amazonaws.ram#InvalidClientTokenException":
2128
- throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
2129
- case "MalformedArnException":
2130
- case "com.amazonaws.ram#MalformedArnException":
2131
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
2132
- case "OperationNotPermittedException":
2133
- case "com.amazonaws.ram#OperationNotPermittedException":
2134
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
2135
- case "ResourceShareInvitationAlreadyAcceptedException":
2136
- case "com.amazonaws.ram#ResourceShareInvitationAlreadyAcceptedException":
2137
- throw await de_ResourceShareInvitationAlreadyAcceptedExceptionRes(parsedOutput, context);
2138
- case "ResourceShareInvitationAlreadyRejectedException":
2139
- case "com.amazonaws.ram#ResourceShareInvitationAlreadyRejectedException":
2140
- throw await de_ResourceShareInvitationAlreadyRejectedExceptionRes(parsedOutput, context);
2141
- case "ResourceShareInvitationArnNotFoundException":
2142
- case "com.amazonaws.ram#ResourceShareInvitationArnNotFoundException":
2143
- throw await de_ResourceShareInvitationArnNotFoundExceptionRes(parsedOutput, context);
2144
- case "ResourceShareInvitationExpiredException":
2145
- case "com.amazonaws.ram#ResourceShareInvitationExpiredException":
2146
- throw await de_ResourceShareInvitationExpiredExceptionRes(parsedOutput, context);
2147
- case "ServerInternalException":
2148
- case "com.amazonaws.ram#ServerInternalException":
2149
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
2150
- case "ServiceUnavailableException":
2151
- case "com.amazonaws.ram#ServiceUnavailableException":
2152
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2153
- default:
2154
- const parsedBody = parsedOutput.body;
2155
- return throwDefaultError({
2156
- output,
2157
- parsedBody,
2158
- errorCode,
2159
- });
2160
- }
2161
- };
2162
- const de_ReplacePermissionAssociationsCommand = async (output, context) => {
2163
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2164
- return de_ReplacePermissionAssociationsCommandError(output, context);
2165
- }
2166
- const contents = (0, smithy_client_1.map)({
2167
- $metadata: deserializeMetadata(output),
2168
- });
2169
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2170
- const doc = (0, smithy_client_1.take)(data, {
2171
- clientToken: smithy_client_1.expectString,
2172
- replacePermissionAssociationsWork: (_) => de_ReplacePermissionAssociationsWork(_, context),
2173
- });
2174
- Object.assign(contents, doc);
2175
- return contents;
2176
- };
2177
- exports.de_ReplacePermissionAssociationsCommand = de_ReplacePermissionAssociationsCommand;
2178
- const de_ReplacePermissionAssociationsCommandError = async (output, context) => {
2179
- const parsedOutput = {
2180
- ...output,
2181
- body: await parseErrorBody(output.body, context),
2182
- };
2183
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2184
- switch (errorCode) {
2185
- case "IdempotentParameterMismatchException":
2186
- case "com.amazonaws.ram#IdempotentParameterMismatchException":
2187
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
2188
- case "InvalidClientTokenException":
2189
- case "com.amazonaws.ram#InvalidClientTokenException":
2190
- throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
2191
- case "InvalidParameterException":
2192
- case "com.amazonaws.ram#InvalidParameterException":
2193
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2194
- case "MalformedArnException":
2195
- case "com.amazonaws.ram#MalformedArnException":
2196
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
2197
- case "OperationNotPermittedException":
2198
- case "com.amazonaws.ram#OperationNotPermittedException":
2199
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
2200
- case "ServerInternalException":
2201
- case "com.amazonaws.ram#ServerInternalException":
2202
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
2203
- case "ServiceUnavailableException":
2204
- case "com.amazonaws.ram#ServiceUnavailableException":
2205
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2206
- case "UnknownResourceException":
2207
- case "com.amazonaws.ram#UnknownResourceException":
2208
- throw await de_UnknownResourceExceptionRes(parsedOutput, context);
2209
- default:
2210
- const parsedBody = parsedOutput.body;
2211
- return throwDefaultError({
2212
- output,
2213
- parsedBody,
2214
- errorCode,
2215
- });
2216
- }
2217
- };
2218
- const de_SetDefaultPermissionVersionCommand = async (output, context) => {
2219
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2220
- return de_SetDefaultPermissionVersionCommandError(output, context);
2221
- }
2222
- const contents = (0, smithy_client_1.map)({
2223
- $metadata: deserializeMetadata(output),
2224
- });
2225
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2226
- const doc = (0, smithy_client_1.take)(data, {
2227
- clientToken: smithy_client_1.expectString,
2228
- returnValue: smithy_client_1.expectBoolean,
2229
- });
2230
- Object.assign(contents, doc);
2231
- return contents;
2232
- };
2233
- exports.de_SetDefaultPermissionVersionCommand = de_SetDefaultPermissionVersionCommand;
2234
- const de_SetDefaultPermissionVersionCommandError = async (output, context) => {
2235
- const parsedOutput = {
2236
- ...output,
2237
- body: await parseErrorBody(output.body, context),
2238
- };
2239
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2240
- switch (errorCode) {
2241
- case "IdempotentParameterMismatchException":
2242
- case "com.amazonaws.ram#IdempotentParameterMismatchException":
2243
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
2244
- case "InvalidClientTokenException":
2245
- case "com.amazonaws.ram#InvalidClientTokenException":
2246
- throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
2247
- case "InvalidParameterException":
2248
- case "com.amazonaws.ram#InvalidParameterException":
2249
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2250
- case "MalformedArnException":
2251
- case "com.amazonaws.ram#MalformedArnException":
2252
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
2253
- case "ServerInternalException":
2254
- case "com.amazonaws.ram#ServerInternalException":
2255
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
2256
- case "ServiceUnavailableException":
2257
- case "com.amazonaws.ram#ServiceUnavailableException":
2258
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2259
- case "UnknownResourceException":
2260
- case "com.amazonaws.ram#UnknownResourceException":
2261
- throw await de_UnknownResourceExceptionRes(parsedOutput, context);
2262
- default:
2263
- const parsedBody = parsedOutput.body;
2264
- return throwDefaultError({
2265
- output,
2266
- parsedBody,
2267
- errorCode,
2268
- });
2269
- }
2270
- };
2271
- const de_TagResourceCommand = async (output, context) => {
2272
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2273
- return de_TagResourceCommandError(output, context);
2274
- }
2275
- const contents = (0, smithy_client_1.map)({
2276
- $metadata: deserializeMetadata(output),
2277
- });
2278
- await (0, smithy_client_1.collectBody)(output.body, context);
2279
- return contents;
2280
- };
2281
- exports.de_TagResourceCommand = de_TagResourceCommand;
2282
- const de_TagResourceCommandError = async (output, context) => {
2283
- const parsedOutput = {
2284
- ...output,
2285
- body: await parseErrorBody(output.body, context),
2286
- };
2287
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2288
- switch (errorCode) {
2289
- case "InvalidParameterException":
2290
- case "com.amazonaws.ram#InvalidParameterException":
2291
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2292
- case "MalformedArnException":
2293
- case "com.amazonaws.ram#MalformedArnException":
2294
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
2295
- case "ResourceArnNotFoundException":
2296
- case "com.amazonaws.ram#ResourceArnNotFoundException":
2297
- throw await de_ResourceArnNotFoundExceptionRes(parsedOutput, context);
2298
- case "ServerInternalException":
2299
- case "com.amazonaws.ram#ServerInternalException":
2300
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
2301
- case "ServiceUnavailableException":
2302
- case "com.amazonaws.ram#ServiceUnavailableException":
2303
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2304
- case "TagLimitExceededException":
2305
- case "com.amazonaws.ram#TagLimitExceededException":
2306
- throw await de_TagLimitExceededExceptionRes(parsedOutput, context);
2307
- case "TagPolicyViolationException":
2308
- case "com.amazonaws.ram#TagPolicyViolationException":
2309
- throw await de_TagPolicyViolationExceptionRes(parsedOutput, context);
2310
- case "UnknownResourceException":
2311
- case "com.amazonaws.ram#UnknownResourceException":
2312
- throw await de_UnknownResourceExceptionRes(parsedOutput, context);
2313
- default:
2314
- const parsedBody = parsedOutput.body;
2315
- return throwDefaultError({
2316
- output,
2317
- parsedBody,
2318
- errorCode,
2319
- });
2320
- }
2321
- };
2322
- const de_UntagResourceCommand = async (output, context) => {
2323
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2324
- return de_UntagResourceCommandError(output, context);
2325
- }
2326
- const contents = (0, smithy_client_1.map)({
2327
- $metadata: deserializeMetadata(output),
2328
- });
2329
- await (0, smithy_client_1.collectBody)(output.body, context);
2330
- return contents;
2331
- };
2332
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
2333
- const de_UntagResourceCommandError = async (output, context) => {
2334
- const parsedOutput = {
2335
- ...output,
2336
- body: await parseErrorBody(output.body, context),
2337
- };
2338
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2339
- switch (errorCode) {
2340
- case "InvalidParameterException":
2341
- case "com.amazonaws.ram#InvalidParameterException":
2342
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2343
- case "MalformedArnException":
2344
- case "com.amazonaws.ram#MalformedArnException":
2345
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
2346
- case "ServerInternalException":
2347
- case "com.amazonaws.ram#ServerInternalException":
2348
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
2349
- case "ServiceUnavailableException":
2350
- case "com.amazonaws.ram#ServiceUnavailableException":
2351
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2352
- case "UnknownResourceException":
2353
- case "com.amazonaws.ram#UnknownResourceException":
2354
- throw await de_UnknownResourceExceptionRes(parsedOutput, context);
2355
- default:
2356
- const parsedBody = parsedOutput.body;
2357
- return throwDefaultError({
2358
- output,
2359
- parsedBody,
2360
- errorCode,
2361
- });
2362
- }
2363
- };
2364
- const de_UpdateResourceShareCommand = async (output, context) => {
2365
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2366
- return de_UpdateResourceShareCommandError(output, context);
2367
- }
2368
- const contents = (0, smithy_client_1.map)({
2369
- $metadata: deserializeMetadata(output),
2370
- });
2371
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
2372
- const doc = (0, smithy_client_1.take)(data, {
2373
- clientToken: smithy_client_1.expectString,
2374
- resourceShare: (_) => de_ResourceShare(_, context),
2375
- });
2376
- Object.assign(contents, doc);
2377
- return contents;
2378
- };
2379
- exports.de_UpdateResourceShareCommand = de_UpdateResourceShareCommand;
2380
- const de_UpdateResourceShareCommandError = async (output, context) => {
2381
- const parsedOutput = {
2382
- ...output,
2383
- body: await parseErrorBody(output.body, context),
2384
- };
2385
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2386
- switch (errorCode) {
2387
- case "IdempotentParameterMismatchException":
2388
- case "com.amazonaws.ram#IdempotentParameterMismatchException":
2389
- throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
2390
- case "InvalidClientTokenException":
2391
- case "com.amazonaws.ram#InvalidClientTokenException":
2392
- throw await de_InvalidClientTokenExceptionRes(parsedOutput, context);
2393
- case "InvalidParameterException":
2394
- case "com.amazonaws.ram#InvalidParameterException":
2395
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2396
- case "MalformedArnException":
2397
- case "com.amazonaws.ram#MalformedArnException":
2398
- throw await de_MalformedArnExceptionRes(parsedOutput, context);
2399
- case "MissingRequiredParameterException":
2400
- case "com.amazonaws.ram#MissingRequiredParameterException":
2401
- throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
2402
- case "OperationNotPermittedException":
2403
- case "com.amazonaws.ram#OperationNotPermittedException":
2404
- throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
2405
- case "ServerInternalException":
2406
- case "com.amazonaws.ram#ServerInternalException":
2407
- throw await de_ServerInternalExceptionRes(parsedOutput, context);
2408
- case "ServiceUnavailableException":
2409
- case "com.amazonaws.ram#ServiceUnavailableException":
2410
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2411
- case "UnknownResourceException":
2412
- case "com.amazonaws.ram#UnknownResourceException":
2413
- throw await de_UnknownResourceExceptionRes(parsedOutput, context);
2414
- default:
2415
- const parsedBody = parsedOutput.body;
2416
- return throwDefaultError({
2417
- output,
2418
- parsedBody,
2419
- errorCode,
2420
- });
2421
- }
2422
- };
2423
- const throwDefaultError = (0, smithy_client_1.withBaseException)(RAMServiceException_1.RAMServiceException);
2424
- const de_IdempotentParameterMismatchExceptionRes = async (parsedOutput, context) => {
2425
- const contents = (0, smithy_client_1.map)({});
2426
- const data = parsedOutput.body;
2427
- const doc = (0, smithy_client_1.take)(data, {
2428
- message: smithy_client_1.expectString,
2429
- });
2430
- Object.assign(contents, doc);
2431
- const exception = new models_0_1.IdempotentParameterMismatchException({
2432
- $metadata: deserializeMetadata(parsedOutput),
2433
- ...contents,
2434
- });
2435
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2436
- };
2437
- const de_InvalidClientTokenExceptionRes = async (parsedOutput, context) => {
2438
- const contents = (0, smithy_client_1.map)({});
2439
- const data = parsedOutput.body;
2440
- const doc = (0, smithy_client_1.take)(data, {
2441
- message: smithy_client_1.expectString,
2442
- });
2443
- Object.assign(contents, doc);
2444
- const exception = new models_0_1.InvalidClientTokenException({
2445
- $metadata: deserializeMetadata(parsedOutput),
2446
- ...contents,
2447
- });
2448
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2449
- };
2450
- const de_InvalidMaxResultsExceptionRes = async (parsedOutput, context) => {
2451
- const contents = (0, smithy_client_1.map)({});
2452
- const data = parsedOutput.body;
2453
- const doc = (0, smithy_client_1.take)(data, {
2454
- message: smithy_client_1.expectString,
2455
- });
2456
- Object.assign(contents, doc);
2457
- const exception = new models_0_1.InvalidMaxResultsException({
2458
- $metadata: deserializeMetadata(parsedOutput),
2459
- ...contents,
2460
- });
2461
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2462
- };
2463
- const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
2464
- const contents = (0, smithy_client_1.map)({});
2465
- const data = parsedOutput.body;
2466
- const doc = (0, smithy_client_1.take)(data, {
2467
- message: smithy_client_1.expectString,
2468
- });
2469
- Object.assign(contents, doc);
2470
- const exception = new models_0_1.InvalidNextTokenException({
2471
- $metadata: deserializeMetadata(parsedOutput),
2472
- ...contents,
2473
- });
2474
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2475
- };
2476
- const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
2477
- const contents = (0, smithy_client_1.map)({});
2478
- const data = parsedOutput.body;
2479
- const doc = (0, smithy_client_1.take)(data, {
2480
- message: smithy_client_1.expectString,
2481
- });
2482
- Object.assign(contents, doc);
2483
- const exception = new models_0_1.InvalidParameterException({
2484
- $metadata: deserializeMetadata(parsedOutput),
2485
- ...contents,
2486
- });
2487
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2488
- };
2489
- const de_InvalidPolicyExceptionRes = async (parsedOutput, context) => {
2490
- const contents = (0, smithy_client_1.map)({});
2491
- const data = parsedOutput.body;
2492
- const doc = (0, smithy_client_1.take)(data, {
2493
- message: smithy_client_1.expectString,
2494
- });
2495
- Object.assign(contents, doc);
2496
- const exception = new models_0_1.InvalidPolicyException({
2497
- $metadata: deserializeMetadata(parsedOutput),
2498
- ...contents,
2499
- });
2500
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2501
- };
2502
- const de_InvalidResourceTypeExceptionRes = async (parsedOutput, context) => {
2503
- const contents = (0, smithy_client_1.map)({});
2504
- const data = parsedOutput.body;
2505
- const doc = (0, smithy_client_1.take)(data, {
2506
- message: smithy_client_1.expectString,
2507
- });
2508
- Object.assign(contents, doc);
2509
- const exception = new models_0_1.InvalidResourceTypeException({
2510
- $metadata: deserializeMetadata(parsedOutput),
2511
- ...contents,
2512
- });
2513
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2514
- };
2515
- const de_InvalidStateTransitionExceptionRes = async (parsedOutput, context) => {
2516
- const contents = (0, smithy_client_1.map)({});
2517
- const data = parsedOutput.body;
2518
- const doc = (0, smithy_client_1.take)(data, {
2519
- message: smithy_client_1.expectString,
2520
- });
2521
- Object.assign(contents, doc);
2522
- const exception = new models_0_1.InvalidStateTransitionException({
2523
- $metadata: deserializeMetadata(parsedOutput),
2524
- ...contents,
2525
- });
2526
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2527
- };
2528
- const de_MalformedArnExceptionRes = async (parsedOutput, context) => {
2529
- const contents = (0, smithy_client_1.map)({});
2530
- const data = parsedOutput.body;
2531
- const doc = (0, smithy_client_1.take)(data, {
2532
- message: smithy_client_1.expectString,
2533
- });
2534
- Object.assign(contents, doc);
2535
- const exception = new models_0_1.MalformedArnException({
2536
- $metadata: deserializeMetadata(parsedOutput),
2537
- ...contents,
2538
- });
2539
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2540
- };
2541
- const de_MalformedPolicyTemplateExceptionRes = async (parsedOutput, context) => {
2542
- const contents = (0, smithy_client_1.map)({});
2543
- const data = parsedOutput.body;
2544
- const doc = (0, smithy_client_1.take)(data, {
2545
- message: smithy_client_1.expectString,
2546
- });
2547
- Object.assign(contents, doc);
2548
- const exception = new models_0_1.MalformedPolicyTemplateException({
2549
- $metadata: deserializeMetadata(parsedOutput),
2550
- ...contents,
2551
- });
2552
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2553
- };
2554
- const de_MissingRequiredParameterExceptionRes = async (parsedOutput, context) => {
2555
- const contents = (0, smithy_client_1.map)({});
2556
- const data = parsedOutput.body;
2557
- const doc = (0, smithy_client_1.take)(data, {
2558
- message: smithy_client_1.expectString,
2559
- });
2560
- Object.assign(contents, doc);
2561
- const exception = new models_0_1.MissingRequiredParameterException({
2562
- $metadata: deserializeMetadata(parsedOutput),
2563
- ...contents,
2564
- });
2565
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2566
- };
2567
- const de_OperationNotPermittedExceptionRes = async (parsedOutput, context) => {
2568
- const contents = (0, smithy_client_1.map)({});
2569
- const data = parsedOutput.body;
2570
- const doc = (0, smithy_client_1.take)(data, {
2571
- message: smithy_client_1.expectString,
2572
- });
2573
- Object.assign(contents, doc);
2574
- const exception = new models_0_1.OperationNotPermittedException({
2575
- $metadata: deserializeMetadata(parsedOutput),
2576
- ...contents,
2577
- });
2578
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2579
- };
2580
- const de_PermissionAlreadyExistsExceptionRes = async (parsedOutput, context) => {
2581
- const contents = (0, smithy_client_1.map)({});
2582
- const data = parsedOutput.body;
2583
- const doc = (0, smithy_client_1.take)(data, {
2584
- message: smithy_client_1.expectString,
2585
- });
2586
- Object.assign(contents, doc);
2587
- const exception = new models_0_1.PermissionAlreadyExistsException({
2588
- $metadata: deserializeMetadata(parsedOutput),
2589
- ...contents,
2590
- });
2591
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2592
- };
2593
- const de_PermissionLimitExceededExceptionRes = async (parsedOutput, context) => {
2594
- const contents = (0, smithy_client_1.map)({});
2595
- const data = parsedOutput.body;
2596
- const doc = (0, smithy_client_1.take)(data, {
2597
- message: smithy_client_1.expectString,
2598
- });
2599
- Object.assign(contents, doc);
2600
- const exception = new models_0_1.PermissionLimitExceededException({
2601
- $metadata: deserializeMetadata(parsedOutput),
2602
- ...contents,
2603
- });
2604
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2605
- };
2606
- const de_PermissionVersionsLimitExceededExceptionRes = async (parsedOutput, context) => {
2607
- const contents = (0, smithy_client_1.map)({});
2608
- const data = parsedOutput.body;
2609
- const doc = (0, smithy_client_1.take)(data, {
2610
- message: smithy_client_1.expectString,
2611
- });
2612
- Object.assign(contents, doc);
2613
- const exception = new models_0_1.PermissionVersionsLimitExceededException({
2614
- $metadata: deserializeMetadata(parsedOutput),
2615
- ...contents,
2616
- });
2617
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2618
- };
2619
- const de_ResourceArnNotFoundExceptionRes = async (parsedOutput, context) => {
2620
- const contents = (0, smithy_client_1.map)({});
2621
- const data = parsedOutput.body;
2622
- const doc = (0, smithy_client_1.take)(data, {
2623
- message: smithy_client_1.expectString,
2624
- });
2625
- Object.assign(contents, doc);
2626
- const exception = new models_0_1.ResourceArnNotFoundException({
2627
- $metadata: deserializeMetadata(parsedOutput),
2628
- ...contents,
2629
- });
2630
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2631
- };
2632
- const de_ResourceShareInvitationAlreadyAcceptedExceptionRes = async (parsedOutput, context) => {
2633
- const contents = (0, smithy_client_1.map)({});
2634
- const data = parsedOutput.body;
2635
- const doc = (0, smithy_client_1.take)(data, {
2636
- message: smithy_client_1.expectString,
2637
- });
2638
- Object.assign(contents, doc);
2639
- const exception = new models_0_1.ResourceShareInvitationAlreadyAcceptedException({
2640
- $metadata: deserializeMetadata(parsedOutput),
2641
- ...contents,
2642
- });
2643
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2644
- };
2645
- const de_ResourceShareInvitationAlreadyRejectedExceptionRes = async (parsedOutput, context) => {
2646
- const contents = (0, smithy_client_1.map)({});
2647
- const data = parsedOutput.body;
2648
- const doc = (0, smithy_client_1.take)(data, {
2649
- message: smithy_client_1.expectString,
2650
- });
2651
- Object.assign(contents, doc);
2652
- const exception = new models_0_1.ResourceShareInvitationAlreadyRejectedException({
2653
- $metadata: deserializeMetadata(parsedOutput),
2654
- ...contents,
2655
- });
2656
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2657
- };
2658
- const de_ResourceShareInvitationArnNotFoundExceptionRes = async (parsedOutput, context) => {
2659
- const contents = (0, smithy_client_1.map)({});
2660
- const data = parsedOutput.body;
2661
- const doc = (0, smithy_client_1.take)(data, {
2662
- message: smithy_client_1.expectString,
2663
- });
2664
- Object.assign(contents, doc);
2665
- const exception = new models_0_1.ResourceShareInvitationArnNotFoundException({
2666
- $metadata: deserializeMetadata(parsedOutput),
2667
- ...contents,
2668
- });
2669
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2670
- };
2671
- const de_ResourceShareInvitationExpiredExceptionRes = async (parsedOutput, context) => {
2672
- const contents = (0, smithy_client_1.map)({});
2673
- const data = parsedOutput.body;
2674
- const doc = (0, smithy_client_1.take)(data, {
2675
- message: smithy_client_1.expectString,
2676
- });
2677
- Object.assign(contents, doc);
2678
- const exception = new models_0_1.ResourceShareInvitationExpiredException({
2679
- $metadata: deserializeMetadata(parsedOutput),
2680
- ...contents,
2681
- });
2682
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2683
- };
2684
- const de_ResourceShareLimitExceededExceptionRes = async (parsedOutput, context) => {
2685
- const contents = (0, smithy_client_1.map)({});
2686
- const data = parsedOutput.body;
2687
- const doc = (0, smithy_client_1.take)(data, {
2688
- message: smithy_client_1.expectString,
2689
- });
2690
- Object.assign(contents, doc);
2691
- const exception = new models_0_1.ResourceShareLimitExceededException({
2692
- $metadata: deserializeMetadata(parsedOutput),
2693
- ...contents,
2694
- });
2695
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2696
- };
2697
- const de_ServerInternalExceptionRes = async (parsedOutput, context) => {
2698
- const contents = (0, smithy_client_1.map)({});
2699
- const data = parsedOutput.body;
2700
- const doc = (0, smithy_client_1.take)(data, {
2701
- message: smithy_client_1.expectString,
2702
- });
2703
- Object.assign(contents, doc);
2704
- const exception = new models_0_1.ServerInternalException({
2705
- $metadata: deserializeMetadata(parsedOutput),
2706
- ...contents,
2707
- });
2708
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2709
- };
2710
- const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
2711
- const contents = (0, smithy_client_1.map)({});
2712
- const data = parsedOutput.body;
2713
- const doc = (0, smithy_client_1.take)(data, {
2714
- message: smithy_client_1.expectString,
2715
- });
2716
- Object.assign(contents, doc);
2717
- const exception = new models_0_1.ServiceUnavailableException({
2718
- $metadata: deserializeMetadata(parsedOutput),
2719
- ...contents,
2720
- });
2721
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2722
- };
2723
- const de_TagLimitExceededExceptionRes = async (parsedOutput, context) => {
2724
- const contents = (0, smithy_client_1.map)({});
2725
- const data = parsedOutput.body;
2726
- const doc = (0, smithy_client_1.take)(data, {
2727
- message: smithy_client_1.expectString,
2728
- });
2729
- Object.assign(contents, doc);
2730
- const exception = new models_0_1.TagLimitExceededException({
2731
- $metadata: deserializeMetadata(parsedOutput),
2732
- ...contents,
2733
- });
2734
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2735
- };
2736
- const de_TagPolicyViolationExceptionRes = async (parsedOutput, context) => {
2737
- const contents = (0, smithy_client_1.map)({});
2738
- const data = parsedOutput.body;
2739
- const doc = (0, smithy_client_1.take)(data, {
2740
- message: smithy_client_1.expectString,
2741
- });
2742
- Object.assign(contents, doc);
2743
- const exception = new models_0_1.TagPolicyViolationException({
2744
- $metadata: deserializeMetadata(parsedOutput),
2745
- ...contents,
2746
- });
2747
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2748
- };
2749
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
2750
- const contents = (0, smithy_client_1.map)({});
2751
- const data = parsedOutput.body;
2752
- const doc = (0, smithy_client_1.take)(data, {
2753
- message: smithy_client_1.expectString,
2754
- });
2755
- Object.assign(contents, doc);
2756
- const exception = new models_0_1.ThrottlingException({
2757
- $metadata: deserializeMetadata(parsedOutput),
2758
- ...contents,
2759
- });
2760
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2761
- };
2762
- const de_UnknownResourceExceptionRes = async (parsedOutput, context) => {
2763
- const contents = (0, smithy_client_1.map)({});
2764
- const data = parsedOutput.body;
2765
- const doc = (0, smithy_client_1.take)(data, {
2766
- message: smithy_client_1.expectString,
2767
- });
2768
- Object.assign(contents, doc);
2769
- const exception = new models_0_1.UnknownResourceException({
2770
- $metadata: deserializeMetadata(parsedOutput),
2771
- ...contents,
2772
- });
2773
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2774
- };
2775
- const de_UnmatchedPolicyPermissionExceptionRes = async (parsedOutput, context) => {
2776
- const contents = (0, smithy_client_1.map)({});
2777
- const data = parsedOutput.body;
2778
- const doc = (0, smithy_client_1.take)(data, {
2779
- message: smithy_client_1.expectString,
2780
- });
2781
- Object.assign(contents, doc);
2782
- const exception = new models_0_1.UnmatchedPolicyPermissionException({
2783
- $metadata: deserializeMetadata(parsedOutput),
2784
- ...contents,
2785
- });
2786
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2787
- };
2788
- const de_AssociatedPermission = (output, context) => {
2789
- return (0, smithy_client_1.take)(output, {
2790
- arn: smithy_client_1.expectString,
2791
- defaultVersion: smithy_client_1.expectBoolean,
2792
- featureSet: smithy_client_1.expectString,
2793
- lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2794
- permissionVersion: smithy_client_1.expectString,
2795
- resourceShareArn: smithy_client_1.expectString,
2796
- resourceType: smithy_client_1.expectString,
2797
- status: smithy_client_1.expectString,
2798
- });
2799
- };
2800
- const de_AssociatedPermissionList = (output, context) => {
2801
- const retVal = (output || [])
2802
- .filter((e) => e != null)
2803
- .map((entry) => {
2804
- return de_AssociatedPermission(entry, context);
2805
- });
2806
- return retVal;
2807
- };
2808
- const de_Principal = (output, context) => {
2809
- return (0, smithy_client_1.take)(output, {
2810
- creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2811
- external: smithy_client_1.expectBoolean,
2812
- id: smithy_client_1.expectString,
2813
- lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2814
- resourceShareArn: smithy_client_1.expectString,
2815
- });
2816
- };
2817
- const de_PrincipalList = (output, context) => {
2818
- const retVal = (output || [])
2819
- .filter((e) => e != null)
2820
- .map((entry) => {
2821
- return de_Principal(entry, context);
2822
- });
2823
- return retVal;
2824
- };
2825
- const de_ReplacePermissionAssociationsWork = (output, context) => {
2826
- return (0, smithy_client_1.take)(output, {
2827
- creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2828
- fromPermissionArn: smithy_client_1.expectString,
2829
- fromPermissionVersion: smithy_client_1.expectString,
2830
- id: smithy_client_1.expectString,
2831
- lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2832
- status: smithy_client_1.expectString,
2833
- statusMessage: smithy_client_1.expectString,
2834
- toPermissionArn: smithy_client_1.expectString,
2835
- toPermissionVersion: smithy_client_1.expectString,
2836
- });
2837
- };
2838
- const de_ReplacePermissionAssociationsWorkList = (output, context) => {
2839
- const retVal = (output || [])
2840
- .filter((e) => e != null)
2841
- .map((entry) => {
2842
- return de_ReplacePermissionAssociationsWork(entry, context);
2843
- });
2844
- return retVal;
2845
- };
2846
- const de_Resource = (output, context) => {
2847
- return (0, smithy_client_1.take)(output, {
2848
- arn: smithy_client_1.expectString,
2849
- creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2850
- lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2851
- resourceGroupArn: smithy_client_1.expectString,
2852
- resourceRegionScope: smithy_client_1.expectString,
2853
- resourceShareArn: smithy_client_1.expectString,
2854
- status: smithy_client_1.expectString,
2855
- statusMessage: smithy_client_1.expectString,
2856
- type: smithy_client_1.expectString,
2857
- });
2858
- };
2859
- const de_ResourceList = (output, context) => {
2860
- const retVal = (output || [])
2861
- .filter((e) => e != null)
2862
- .map((entry) => {
2863
- return de_Resource(entry, context);
2864
- });
2865
- return retVal;
2866
- };
2867
- const de_ResourceShare = (output, context) => {
2868
- return (0, smithy_client_1.take)(output, {
2869
- allowExternalPrincipals: smithy_client_1.expectBoolean,
2870
- creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2871
- featureSet: smithy_client_1.expectString,
2872
- lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2873
- name: smithy_client_1.expectString,
2874
- owningAccountId: smithy_client_1.expectString,
2875
- resourceShareArn: smithy_client_1.expectString,
2876
- status: smithy_client_1.expectString,
2877
- statusMessage: smithy_client_1.expectString,
2878
- tags: smithy_client_1._json,
2879
- });
2880
- };
2881
- const de_ResourceShareAssociation = (output, context) => {
2882
- return (0, smithy_client_1.take)(output, {
2883
- associatedEntity: smithy_client_1.expectString,
2884
- associationType: smithy_client_1.expectString,
2885
- creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2886
- external: smithy_client_1.expectBoolean,
2887
- lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2888
- resourceShareArn: smithy_client_1.expectString,
2889
- resourceShareName: smithy_client_1.expectString,
2890
- status: smithy_client_1.expectString,
2891
- statusMessage: smithy_client_1.expectString,
2892
- });
2893
- };
2894
- const de_ResourceShareAssociationList = (output, context) => {
2895
- const retVal = (output || [])
2896
- .filter((e) => e != null)
2897
- .map((entry) => {
2898
- return de_ResourceShareAssociation(entry, context);
2899
- });
2900
- return retVal;
2901
- };
2902
- const de_ResourceShareInvitation = (output, context) => {
2903
- return (0, smithy_client_1.take)(output, {
2904
- invitationTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2905
- receiverAccountId: smithy_client_1.expectString,
2906
- receiverArn: smithy_client_1.expectString,
2907
- resourceShareArn: smithy_client_1.expectString,
2908
- resourceShareAssociations: (_) => de_ResourceShareAssociationList(_, context),
2909
- resourceShareInvitationArn: smithy_client_1.expectString,
2910
- resourceShareName: smithy_client_1.expectString,
2911
- senderAccountId: smithy_client_1.expectString,
2912
- status: smithy_client_1.expectString,
2913
- });
2914
- };
2915
- const de_ResourceShareInvitationList = (output, context) => {
2916
- const retVal = (output || [])
2917
- .filter((e) => e != null)
2918
- .map((entry) => {
2919
- return de_ResourceShareInvitation(entry, context);
2920
- });
2921
- return retVal;
2922
- };
2923
- const de_ResourceShareList = (output, context) => {
2924
- const retVal = (output || [])
2925
- .filter((e) => e != null)
2926
- .map((entry) => {
2927
- return de_ResourceShare(entry, context);
2928
- });
2929
- return retVal;
2930
- };
2931
- const de_ResourceSharePermissionDetail = (output, context) => {
2932
- return (0, smithy_client_1.take)(output, {
2933
- arn: smithy_client_1.expectString,
2934
- creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2935
- defaultVersion: smithy_client_1.expectBoolean,
2936
- featureSet: smithy_client_1.expectString,
2937
- isResourceTypeDefault: smithy_client_1.expectBoolean,
2938
- lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2939
- name: smithy_client_1.expectString,
2940
- permission: smithy_client_1.expectString,
2941
- permissionType: smithy_client_1.expectString,
2942
- resourceType: smithy_client_1.expectString,
2943
- status: smithy_client_1.expectString,
2944
- tags: smithy_client_1._json,
2945
- version: smithy_client_1.expectString,
2946
- });
2947
- };
2948
- const de_ResourceSharePermissionList = (output, context) => {
2949
- const retVal = (output || [])
2950
- .filter((e) => e != null)
2951
- .map((entry) => {
2952
- return de_ResourceSharePermissionSummary(entry, context);
2953
- });
2954
- return retVal;
2955
- };
2956
- const de_ResourceSharePermissionSummary = (output, context) => {
2957
- return (0, smithy_client_1.take)(output, {
2958
- arn: smithy_client_1.expectString,
2959
- creationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2960
- defaultVersion: smithy_client_1.expectBoolean,
2961
- featureSet: smithy_client_1.expectString,
2962
- isResourceTypeDefault: smithy_client_1.expectBoolean,
2963
- lastUpdatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2964
- name: smithy_client_1.expectString,
2965
- permissionType: smithy_client_1.expectString,
2966
- resourceType: smithy_client_1.expectString,
2967
- status: smithy_client_1.expectString,
2968
- tags: smithy_client_1._json,
2969
- version: smithy_client_1.expectString,
2970
- });
2971
- };
2972
- const deserializeMetadata = (output) => ({
2973
- httpStatusCode: output.statusCode,
2974
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
2975
- extendedRequestId: output.headers["x-amz-id-2"],
2976
- cfId: output.headers["x-amz-cf-id"],
2977
- });
2978
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
2979
- const isSerializableHeaderValue = (value) => value !== undefined &&
2980
- value !== null &&
2981
- value !== "" &&
2982
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
2983
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
2984
- const _cT = "clientToken";
2985
- const _pA = "permissionArn";
2986
- const _pV = "permissionVersion";
2987
- const _rSA = "resourceShareArn";
2988
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2989
- if (encoded.length) {
2990
- return JSON.parse(encoded);
2991
- }
2992
- return {};
2993
- });
2994
- const parseErrorBody = async (errorBody, context) => {
2995
- const value = await parseBody(errorBody, context);
2996
- value.message = value.message ?? value.Message;
2997
- return value;
2998
- };
2999
- const loadRestJsonErrorCode = (output, data) => {
3000
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
3001
- const sanitizeErrorCode = (rawValue) => {
3002
- let cleanValue = rawValue;
3003
- if (typeof cleanValue === "number") {
3004
- cleanValue = cleanValue.toString();
3005
- }
3006
- if (cleanValue.indexOf(",") >= 0) {
3007
- cleanValue = cleanValue.split(",")[0];
3008
- }
3009
- if (cleanValue.indexOf(":") >= 0) {
3010
- cleanValue = cleanValue.split(":")[0];
3011
- }
3012
- if (cleanValue.indexOf("#") >= 0) {
3013
- cleanValue = cleanValue.split("#")[1];
3014
- }
3015
- return cleanValue;
3016
- };
3017
- const headerKey = findKey(output.headers, "x-amzn-errortype");
3018
- if (headerKey !== undefined) {
3019
- return sanitizeErrorCode(output.headers[headerKey]);
3020
- }
3021
- if (data.code !== undefined) {
3022
- return sanitizeErrorCode(data.code);
3023
- }
3024
- if (data["__type"] !== undefined) {
3025
- return sanitizeErrorCode(data["__type"]);
3026
- }
3027
- };
1
+ module.exports = require("../index.js");