@aws-sdk/client-rolesanywhere 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 (46) hide show
  1. package/dist-cjs/RolesAnywhere.js +1 -67
  2. package/dist-cjs/RolesAnywhereClient.js +1 -43
  3. package/dist-cjs/commands/CreateProfileCommand.js +1 -29
  4. package/dist-cjs/commands/CreateTrustAnchorCommand.js +1 -29
  5. package/dist-cjs/commands/DeleteCrlCommand.js +1 -28
  6. package/dist-cjs/commands/DeleteProfileCommand.js +1 -28
  7. package/dist-cjs/commands/DeleteTrustAnchorCommand.js +1 -28
  8. package/dist-cjs/commands/DisableCrlCommand.js +1 -28
  9. package/dist-cjs/commands/DisableProfileCommand.js +1 -28
  10. package/dist-cjs/commands/DisableTrustAnchorCommand.js +1 -28
  11. package/dist-cjs/commands/EnableCrlCommand.js +1 -28
  12. package/dist-cjs/commands/EnableProfileCommand.js +1 -28
  13. package/dist-cjs/commands/EnableTrustAnchorCommand.js +1 -28
  14. package/dist-cjs/commands/GetCrlCommand.js +1 -28
  15. package/dist-cjs/commands/GetProfileCommand.js +1 -28
  16. package/dist-cjs/commands/GetSubjectCommand.js +1 -28
  17. package/dist-cjs/commands/GetTrustAnchorCommand.js +1 -28
  18. package/dist-cjs/commands/ImportCrlCommand.js +1 -29
  19. package/dist-cjs/commands/ListCrlsCommand.js +1 -28
  20. package/dist-cjs/commands/ListProfilesCommand.js +1 -28
  21. package/dist-cjs/commands/ListSubjectsCommand.js +1 -28
  22. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -29
  23. package/dist-cjs/commands/ListTrustAnchorsCommand.js +1 -28
  24. package/dist-cjs/commands/PutNotificationSettingsCommand.js +1 -28
  25. package/dist-cjs/commands/ResetNotificationSettingsCommand.js +1 -28
  26. package/dist-cjs/commands/TagResourceCommand.js +1 -29
  27. package/dist-cjs/commands/UntagResourceCommand.js +1 -29
  28. package/dist-cjs/commands/UpdateCrlCommand.js +1 -28
  29. package/dist-cjs/commands/UpdateProfileCommand.js +1 -28
  30. package/dist-cjs/commands/UpdateTrustAnchorCommand.js +1 -28
  31. package/dist-cjs/commands/index.js +1 -31
  32. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  33. package/dist-cjs/extensionConfiguration.js +1 -2
  34. package/dist-cjs/index.js +2499 -11
  35. package/dist-cjs/models/RolesAnywhereServiceException.js +1 -12
  36. package/dist-cjs/models/index.js +1 -4
  37. package/dist-cjs/models/models_0.js +1 -116
  38. package/dist-cjs/pagination/Interfaces.js +1 -2
  39. package/dist-cjs/pagination/ListCrlsPaginator.js +1 -7
  40. package/dist-cjs/pagination/ListProfilesPaginator.js +1 -7
  41. package/dist-cjs/pagination/ListSubjectsPaginator.js +1 -7
  42. package/dist-cjs/pagination/ListTrustAnchorsPaginator.js +1 -7
  43. package/dist-cjs/pagination/index.js +1 -8
  44. package/dist-cjs/protocols/Aws_restJson1.js +1 -1666
  45. package/dist-cjs/runtimeExtensions.js +1 -22
  46. package/package.json +40 -40
@@ -1,1666 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_PutNotificationSettingsCommand = exports.de_ListTrustAnchorsCommand = exports.de_ListTagsForResourceCommand = exports.de_ListSubjectsCommand = exports.de_ListProfilesCommand = exports.de_ListCrlsCommand = exports.de_ImportCrlCommand = exports.de_GetTrustAnchorCommand = exports.de_GetSubjectCommand = exports.de_GetProfileCommand = exports.de_GetCrlCommand = exports.de_EnableTrustAnchorCommand = exports.de_EnableProfileCommand = exports.de_EnableCrlCommand = exports.de_DisableTrustAnchorCommand = exports.de_DisableProfileCommand = exports.de_DisableCrlCommand = exports.de_DeleteTrustAnchorCommand = exports.de_DeleteProfileCommand = exports.de_DeleteCrlCommand = exports.de_CreateTrustAnchorCommand = exports.de_CreateProfileCommand = exports.se_UpdateTrustAnchorCommand = exports.se_UpdateProfileCommand = exports.se_UpdateCrlCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ResetNotificationSettingsCommand = exports.se_PutNotificationSettingsCommand = exports.se_ListTrustAnchorsCommand = exports.se_ListTagsForResourceCommand = exports.se_ListSubjectsCommand = exports.se_ListProfilesCommand = exports.se_ListCrlsCommand = exports.se_ImportCrlCommand = exports.se_GetTrustAnchorCommand = exports.se_GetSubjectCommand = exports.se_GetProfileCommand = exports.se_GetCrlCommand = exports.se_EnableTrustAnchorCommand = exports.se_EnableProfileCommand = exports.se_EnableCrlCommand = exports.se_DisableTrustAnchorCommand = exports.se_DisableProfileCommand = exports.se_DisableCrlCommand = exports.se_DeleteTrustAnchorCommand = exports.se_DeleteProfileCommand = exports.se_DeleteCrlCommand = exports.se_CreateTrustAnchorCommand = exports.se_CreateProfileCommand = void 0;
4
- exports.de_UpdateTrustAnchorCommand = exports.de_UpdateProfileCommand = exports.de_UpdateCrlCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ResetNotificationSettingsCommand = 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 RolesAnywhereServiceException_1 = require("../models/RolesAnywhereServiceException");
9
- const se_CreateProfileCommand = async (input, context) => {
10
- const b = (0, core_1.requestBuilder)(input, context);
11
- const headers = {
12
- "content-type": "application/json",
13
- };
14
- b.bp("/profiles");
15
- let body;
16
- body = JSON.stringify((0, smithy_client_1.take)(input, {
17
- durationSeconds: [],
18
- enabled: [],
19
- managedPolicyArns: (_) => (0, smithy_client_1._json)(_),
20
- name: [],
21
- requireInstanceProperties: [],
22
- roleArns: (_) => (0, smithy_client_1._json)(_),
23
- sessionPolicy: [],
24
- tags: (_) => (0, smithy_client_1._json)(_),
25
- }));
26
- b.m("POST").h(headers).b(body);
27
- return b.build();
28
- };
29
- exports.se_CreateProfileCommand = se_CreateProfileCommand;
30
- const se_CreateTrustAnchorCommand = async (input, context) => {
31
- const b = (0, core_1.requestBuilder)(input, context);
32
- const headers = {
33
- "content-type": "application/json",
34
- };
35
- b.bp("/trustanchors");
36
- let body;
37
- body = JSON.stringify((0, smithy_client_1.take)(input, {
38
- enabled: [],
39
- name: [],
40
- notificationSettings: (_) => (0, smithy_client_1._json)(_),
41
- source: (_) => (0, smithy_client_1._json)(_),
42
- tags: (_) => (0, smithy_client_1._json)(_),
43
- }));
44
- b.m("POST").h(headers).b(body);
45
- return b.build();
46
- };
47
- exports.se_CreateTrustAnchorCommand = se_CreateTrustAnchorCommand;
48
- const se_DeleteCrlCommand = async (input, context) => {
49
- const b = (0, core_1.requestBuilder)(input, context);
50
- const headers = {};
51
- b.bp("/crl/{crlId}");
52
- b.p("crlId", () => input.crlId, "{crlId}", false);
53
- let body;
54
- b.m("DELETE").h(headers).b(body);
55
- return b.build();
56
- };
57
- exports.se_DeleteCrlCommand = se_DeleteCrlCommand;
58
- const se_DeleteProfileCommand = async (input, context) => {
59
- const b = (0, core_1.requestBuilder)(input, context);
60
- const headers = {};
61
- b.bp("/profile/{profileId}");
62
- b.p("profileId", () => input.profileId, "{profileId}", false);
63
- let body;
64
- b.m("DELETE").h(headers).b(body);
65
- return b.build();
66
- };
67
- exports.se_DeleteProfileCommand = se_DeleteProfileCommand;
68
- const se_DeleteTrustAnchorCommand = async (input, context) => {
69
- const b = (0, core_1.requestBuilder)(input, context);
70
- const headers = {};
71
- b.bp("/trustanchor/{trustAnchorId}");
72
- b.p("trustAnchorId", () => input.trustAnchorId, "{trustAnchorId}", false);
73
- let body;
74
- b.m("DELETE").h(headers).b(body);
75
- return b.build();
76
- };
77
- exports.se_DeleteTrustAnchorCommand = se_DeleteTrustAnchorCommand;
78
- const se_DisableCrlCommand = async (input, context) => {
79
- const b = (0, core_1.requestBuilder)(input, context);
80
- const headers = {};
81
- b.bp("/crl/{crlId}/disable");
82
- b.p("crlId", () => input.crlId, "{crlId}", false);
83
- let body;
84
- b.m("POST").h(headers).b(body);
85
- return b.build();
86
- };
87
- exports.se_DisableCrlCommand = se_DisableCrlCommand;
88
- const se_DisableProfileCommand = async (input, context) => {
89
- const b = (0, core_1.requestBuilder)(input, context);
90
- const headers = {};
91
- b.bp("/profile/{profileId}/disable");
92
- b.p("profileId", () => input.profileId, "{profileId}", false);
93
- let body;
94
- b.m("POST").h(headers).b(body);
95
- return b.build();
96
- };
97
- exports.se_DisableProfileCommand = se_DisableProfileCommand;
98
- const se_DisableTrustAnchorCommand = async (input, context) => {
99
- const b = (0, core_1.requestBuilder)(input, context);
100
- const headers = {};
101
- b.bp("/trustanchor/{trustAnchorId}/disable");
102
- b.p("trustAnchorId", () => input.trustAnchorId, "{trustAnchorId}", false);
103
- let body;
104
- b.m("POST").h(headers).b(body);
105
- return b.build();
106
- };
107
- exports.se_DisableTrustAnchorCommand = se_DisableTrustAnchorCommand;
108
- const se_EnableCrlCommand = async (input, context) => {
109
- const b = (0, core_1.requestBuilder)(input, context);
110
- const headers = {};
111
- b.bp("/crl/{crlId}/enable");
112
- b.p("crlId", () => input.crlId, "{crlId}", false);
113
- let body;
114
- b.m("POST").h(headers).b(body);
115
- return b.build();
116
- };
117
- exports.se_EnableCrlCommand = se_EnableCrlCommand;
118
- const se_EnableProfileCommand = async (input, context) => {
119
- const b = (0, core_1.requestBuilder)(input, context);
120
- const headers = {};
121
- b.bp("/profile/{profileId}/enable");
122
- b.p("profileId", () => input.profileId, "{profileId}", false);
123
- let body;
124
- b.m("POST").h(headers).b(body);
125
- return b.build();
126
- };
127
- exports.se_EnableProfileCommand = se_EnableProfileCommand;
128
- const se_EnableTrustAnchorCommand = async (input, context) => {
129
- const b = (0, core_1.requestBuilder)(input, context);
130
- const headers = {};
131
- b.bp("/trustanchor/{trustAnchorId}/enable");
132
- b.p("trustAnchorId", () => input.trustAnchorId, "{trustAnchorId}", false);
133
- let body;
134
- b.m("POST").h(headers).b(body);
135
- return b.build();
136
- };
137
- exports.se_EnableTrustAnchorCommand = se_EnableTrustAnchorCommand;
138
- const se_GetCrlCommand = async (input, context) => {
139
- const b = (0, core_1.requestBuilder)(input, context);
140
- const headers = {};
141
- b.bp("/crl/{crlId}");
142
- b.p("crlId", () => input.crlId, "{crlId}", false);
143
- let body;
144
- b.m("GET").h(headers).b(body);
145
- return b.build();
146
- };
147
- exports.se_GetCrlCommand = se_GetCrlCommand;
148
- const se_GetProfileCommand = async (input, context) => {
149
- const b = (0, core_1.requestBuilder)(input, context);
150
- const headers = {};
151
- b.bp("/profile/{profileId}");
152
- b.p("profileId", () => input.profileId, "{profileId}", false);
153
- let body;
154
- b.m("GET").h(headers).b(body);
155
- return b.build();
156
- };
157
- exports.se_GetProfileCommand = se_GetProfileCommand;
158
- const se_GetSubjectCommand = async (input, context) => {
159
- const b = (0, core_1.requestBuilder)(input, context);
160
- const headers = {};
161
- b.bp("/subject/{subjectId}");
162
- b.p("subjectId", () => input.subjectId, "{subjectId}", false);
163
- let body;
164
- b.m("GET").h(headers).b(body);
165
- return b.build();
166
- };
167
- exports.se_GetSubjectCommand = se_GetSubjectCommand;
168
- const se_GetTrustAnchorCommand = async (input, context) => {
169
- const b = (0, core_1.requestBuilder)(input, context);
170
- const headers = {};
171
- b.bp("/trustanchor/{trustAnchorId}");
172
- b.p("trustAnchorId", () => input.trustAnchorId, "{trustAnchorId}", false);
173
- let body;
174
- b.m("GET").h(headers).b(body);
175
- return b.build();
176
- };
177
- exports.se_GetTrustAnchorCommand = se_GetTrustAnchorCommand;
178
- const se_ImportCrlCommand = async (input, context) => {
179
- const b = (0, core_1.requestBuilder)(input, context);
180
- const headers = {
181
- "content-type": "application/json",
182
- };
183
- b.bp("/crls");
184
- let body;
185
- body = JSON.stringify((0, smithy_client_1.take)(input, {
186
- crlData: (_) => context.base64Encoder(_),
187
- enabled: [],
188
- name: [],
189
- tags: (_) => (0, smithy_client_1._json)(_),
190
- trustAnchorArn: [],
191
- }));
192
- b.m("POST").h(headers).b(body);
193
- return b.build();
194
- };
195
- exports.se_ImportCrlCommand = se_ImportCrlCommand;
196
- const se_ListCrlsCommand = async (input, context) => {
197
- const b = (0, core_1.requestBuilder)(input, context);
198
- const headers = {};
199
- b.bp("/crls");
200
- const query = (0, smithy_client_1.map)({
201
- [_nT]: [, input[_nT]],
202
- [_pS]: [() => input.pageSize !== void 0, () => input[_pS].toString()],
203
- });
204
- let body;
205
- b.m("GET").h(headers).q(query).b(body);
206
- return b.build();
207
- };
208
- exports.se_ListCrlsCommand = se_ListCrlsCommand;
209
- const se_ListProfilesCommand = async (input, context) => {
210
- const b = (0, core_1.requestBuilder)(input, context);
211
- const headers = {};
212
- b.bp("/profiles");
213
- const query = (0, smithy_client_1.map)({
214
- [_nT]: [, input[_nT]],
215
- [_pS]: [() => input.pageSize !== void 0, () => input[_pS].toString()],
216
- });
217
- let body;
218
- b.m("GET").h(headers).q(query).b(body);
219
- return b.build();
220
- };
221
- exports.se_ListProfilesCommand = se_ListProfilesCommand;
222
- const se_ListSubjectsCommand = async (input, context) => {
223
- const b = (0, core_1.requestBuilder)(input, context);
224
- const headers = {};
225
- b.bp("/subjects");
226
- const query = (0, smithy_client_1.map)({
227
- [_nT]: [, input[_nT]],
228
- [_pS]: [() => input.pageSize !== void 0, () => input[_pS].toString()],
229
- });
230
- let body;
231
- b.m("GET").h(headers).q(query).b(body);
232
- return b.build();
233
- };
234
- exports.se_ListSubjectsCommand = se_ListSubjectsCommand;
235
- const se_ListTagsForResourceCommand = async (input, context) => {
236
- const b = (0, core_1.requestBuilder)(input, context);
237
- const headers = {};
238
- b.bp("/ListTagsForResource");
239
- const query = (0, smithy_client_1.map)({
240
- [_rA]: [, (0, smithy_client_1.expectNonNull)(input[_rA], `resourceArn`)],
241
- });
242
- let body;
243
- b.m("GET").h(headers).q(query).b(body);
244
- return b.build();
245
- };
246
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
247
- const se_ListTrustAnchorsCommand = async (input, context) => {
248
- const b = (0, core_1.requestBuilder)(input, context);
249
- const headers = {};
250
- b.bp("/trustanchors");
251
- const query = (0, smithy_client_1.map)({
252
- [_nT]: [, input[_nT]],
253
- [_pS]: [() => input.pageSize !== void 0, () => input[_pS].toString()],
254
- });
255
- let body;
256
- b.m("GET").h(headers).q(query).b(body);
257
- return b.build();
258
- };
259
- exports.se_ListTrustAnchorsCommand = se_ListTrustAnchorsCommand;
260
- const se_PutNotificationSettingsCommand = async (input, context) => {
261
- const b = (0, core_1.requestBuilder)(input, context);
262
- const headers = {
263
- "content-type": "application/json",
264
- };
265
- b.bp("/put-notifications-settings");
266
- let body;
267
- body = JSON.stringify((0, smithy_client_1.take)(input, {
268
- notificationSettings: (_) => (0, smithy_client_1._json)(_),
269
- trustAnchorId: [],
270
- }));
271
- b.m("PATCH").h(headers).b(body);
272
- return b.build();
273
- };
274
- exports.se_PutNotificationSettingsCommand = se_PutNotificationSettingsCommand;
275
- const se_ResetNotificationSettingsCommand = async (input, context) => {
276
- const b = (0, core_1.requestBuilder)(input, context);
277
- const headers = {
278
- "content-type": "application/json",
279
- };
280
- b.bp("/reset-notifications-settings");
281
- let body;
282
- body = JSON.stringify((0, smithy_client_1.take)(input, {
283
- notificationSettingKeys: (_) => (0, smithy_client_1._json)(_),
284
- trustAnchorId: [],
285
- }));
286
- b.m("PATCH").h(headers).b(body);
287
- return b.build();
288
- };
289
- exports.se_ResetNotificationSettingsCommand = se_ResetNotificationSettingsCommand;
290
- const se_TagResourceCommand = async (input, context) => {
291
- const b = (0, core_1.requestBuilder)(input, context);
292
- const headers = {
293
- "content-type": "application/json",
294
- };
295
- b.bp("/TagResource");
296
- let body;
297
- body = JSON.stringify((0, smithy_client_1.take)(input, {
298
- resourceArn: [],
299
- tags: (_) => (0, smithy_client_1._json)(_),
300
- }));
301
- b.m("POST").h(headers).b(body);
302
- return b.build();
303
- };
304
- exports.se_TagResourceCommand = se_TagResourceCommand;
305
- const se_UntagResourceCommand = async (input, context) => {
306
- const b = (0, core_1.requestBuilder)(input, context);
307
- const headers = {
308
- "content-type": "application/json",
309
- };
310
- b.bp("/UntagResource");
311
- let body;
312
- body = JSON.stringify((0, smithy_client_1.take)(input, {
313
- resourceArn: [],
314
- tagKeys: (_) => (0, smithy_client_1._json)(_),
315
- }));
316
- b.m("POST").h(headers).b(body);
317
- return b.build();
318
- };
319
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
320
- const se_UpdateCrlCommand = async (input, context) => {
321
- const b = (0, core_1.requestBuilder)(input, context);
322
- const headers = {
323
- "content-type": "application/json",
324
- };
325
- b.bp("/crl/{crlId}");
326
- b.p("crlId", () => input.crlId, "{crlId}", false);
327
- let body;
328
- body = JSON.stringify((0, smithy_client_1.take)(input, {
329
- crlData: (_) => context.base64Encoder(_),
330
- name: [],
331
- }));
332
- b.m("PATCH").h(headers).b(body);
333
- return b.build();
334
- };
335
- exports.se_UpdateCrlCommand = se_UpdateCrlCommand;
336
- const se_UpdateProfileCommand = async (input, context) => {
337
- const b = (0, core_1.requestBuilder)(input, context);
338
- const headers = {
339
- "content-type": "application/json",
340
- };
341
- b.bp("/profile/{profileId}");
342
- b.p("profileId", () => input.profileId, "{profileId}", false);
343
- let body;
344
- body = JSON.stringify((0, smithy_client_1.take)(input, {
345
- durationSeconds: [],
346
- managedPolicyArns: (_) => (0, smithy_client_1._json)(_),
347
- name: [],
348
- roleArns: (_) => (0, smithy_client_1._json)(_),
349
- sessionPolicy: [],
350
- }));
351
- b.m("PATCH").h(headers).b(body);
352
- return b.build();
353
- };
354
- exports.se_UpdateProfileCommand = se_UpdateProfileCommand;
355
- const se_UpdateTrustAnchorCommand = async (input, context) => {
356
- const b = (0, core_1.requestBuilder)(input, context);
357
- const headers = {
358
- "content-type": "application/json",
359
- };
360
- b.bp("/trustanchor/{trustAnchorId}");
361
- b.p("trustAnchorId", () => input.trustAnchorId, "{trustAnchorId}", false);
362
- let body;
363
- body = JSON.stringify((0, smithy_client_1.take)(input, {
364
- name: [],
365
- source: (_) => (0, smithy_client_1._json)(_),
366
- }));
367
- b.m("PATCH").h(headers).b(body);
368
- return b.build();
369
- };
370
- exports.se_UpdateTrustAnchorCommand = se_UpdateTrustAnchorCommand;
371
- const de_CreateProfileCommand = async (output, context) => {
372
- if (output.statusCode !== 201 && output.statusCode >= 300) {
373
- return de_CreateProfileCommandError(output, context);
374
- }
375
- const contents = (0, smithy_client_1.map)({
376
- $metadata: deserializeMetadata(output),
377
- });
378
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
379
- const doc = (0, smithy_client_1.take)(data, {
380
- profile: (_) => de_ProfileDetail(_, context),
381
- });
382
- Object.assign(contents, doc);
383
- return contents;
384
- };
385
- exports.de_CreateProfileCommand = de_CreateProfileCommand;
386
- const de_CreateProfileCommandError = async (output, context) => {
387
- const parsedOutput = {
388
- ...output,
389
- body: await parseErrorBody(output.body, context),
390
- };
391
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
392
- switch (errorCode) {
393
- case "AccessDeniedException":
394
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
395
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
396
- case "ValidationException":
397
- case "com.amazonaws.rolesanywhere#ValidationException":
398
- throw await de_ValidationExceptionRes(parsedOutput, context);
399
- default:
400
- const parsedBody = parsedOutput.body;
401
- return throwDefaultError({
402
- output,
403
- parsedBody,
404
- errorCode,
405
- });
406
- }
407
- };
408
- const de_CreateTrustAnchorCommand = async (output, context) => {
409
- if (output.statusCode !== 201 && output.statusCode >= 300) {
410
- return de_CreateTrustAnchorCommandError(output, context);
411
- }
412
- const contents = (0, smithy_client_1.map)({
413
- $metadata: deserializeMetadata(output),
414
- });
415
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
416
- const doc = (0, smithy_client_1.take)(data, {
417
- trustAnchor: (_) => de_TrustAnchorDetail(_, context),
418
- });
419
- Object.assign(contents, doc);
420
- return contents;
421
- };
422
- exports.de_CreateTrustAnchorCommand = de_CreateTrustAnchorCommand;
423
- const de_CreateTrustAnchorCommandError = async (output, context) => {
424
- const parsedOutput = {
425
- ...output,
426
- body: await parseErrorBody(output.body, context),
427
- };
428
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
429
- switch (errorCode) {
430
- case "AccessDeniedException":
431
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
432
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
433
- case "ValidationException":
434
- case "com.amazonaws.rolesanywhere#ValidationException":
435
- throw await de_ValidationExceptionRes(parsedOutput, context);
436
- default:
437
- const parsedBody = parsedOutput.body;
438
- return throwDefaultError({
439
- output,
440
- parsedBody,
441
- errorCode,
442
- });
443
- }
444
- };
445
- const de_DeleteCrlCommand = async (output, context) => {
446
- if (output.statusCode !== 200 && output.statusCode >= 300) {
447
- return de_DeleteCrlCommandError(output, context);
448
- }
449
- const contents = (0, smithy_client_1.map)({
450
- $metadata: deserializeMetadata(output),
451
- });
452
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
453
- const doc = (0, smithy_client_1.take)(data, {
454
- crl: (_) => de_CrlDetail(_, context),
455
- });
456
- Object.assign(contents, doc);
457
- return contents;
458
- };
459
- exports.de_DeleteCrlCommand = de_DeleteCrlCommand;
460
- const de_DeleteCrlCommandError = async (output, context) => {
461
- const parsedOutput = {
462
- ...output,
463
- body: await parseErrorBody(output.body, context),
464
- };
465
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
466
- switch (errorCode) {
467
- case "AccessDeniedException":
468
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
469
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
470
- case "ResourceNotFoundException":
471
- case "com.amazonaws.rolesanywhere#ResourceNotFoundException":
472
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
473
- default:
474
- const parsedBody = parsedOutput.body;
475
- return throwDefaultError({
476
- output,
477
- parsedBody,
478
- errorCode,
479
- });
480
- }
481
- };
482
- const de_DeleteProfileCommand = async (output, context) => {
483
- if (output.statusCode !== 200 && output.statusCode >= 300) {
484
- return de_DeleteProfileCommandError(output, context);
485
- }
486
- const contents = (0, smithy_client_1.map)({
487
- $metadata: deserializeMetadata(output),
488
- });
489
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
490
- const doc = (0, smithy_client_1.take)(data, {
491
- profile: (_) => de_ProfileDetail(_, context),
492
- });
493
- Object.assign(contents, doc);
494
- return contents;
495
- };
496
- exports.de_DeleteProfileCommand = de_DeleteProfileCommand;
497
- const de_DeleteProfileCommandError = async (output, context) => {
498
- const parsedOutput = {
499
- ...output,
500
- body: await parseErrorBody(output.body, context),
501
- };
502
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
503
- switch (errorCode) {
504
- case "AccessDeniedException":
505
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
506
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
507
- case "ResourceNotFoundException":
508
- case "com.amazonaws.rolesanywhere#ResourceNotFoundException":
509
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
510
- default:
511
- const parsedBody = parsedOutput.body;
512
- return throwDefaultError({
513
- output,
514
- parsedBody,
515
- errorCode,
516
- });
517
- }
518
- };
519
- const de_DeleteTrustAnchorCommand = async (output, context) => {
520
- if (output.statusCode !== 200 && output.statusCode >= 300) {
521
- return de_DeleteTrustAnchorCommandError(output, context);
522
- }
523
- const contents = (0, smithy_client_1.map)({
524
- $metadata: deserializeMetadata(output),
525
- });
526
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
527
- const doc = (0, smithy_client_1.take)(data, {
528
- trustAnchor: (_) => de_TrustAnchorDetail(_, context),
529
- });
530
- Object.assign(contents, doc);
531
- return contents;
532
- };
533
- exports.de_DeleteTrustAnchorCommand = de_DeleteTrustAnchorCommand;
534
- const de_DeleteTrustAnchorCommandError = async (output, context) => {
535
- const parsedOutput = {
536
- ...output,
537
- body: await parseErrorBody(output.body, context),
538
- };
539
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
540
- switch (errorCode) {
541
- case "AccessDeniedException":
542
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
543
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
544
- case "ResourceNotFoundException":
545
- case "com.amazonaws.rolesanywhere#ResourceNotFoundException":
546
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
547
- default:
548
- const parsedBody = parsedOutput.body;
549
- return throwDefaultError({
550
- output,
551
- parsedBody,
552
- errorCode,
553
- });
554
- }
555
- };
556
- const de_DisableCrlCommand = async (output, context) => {
557
- if (output.statusCode !== 200 && output.statusCode >= 300) {
558
- return de_DisableCrlCommandError(output, context);
559
- }
560
- const contents = (0, smithy_client_1.map)({
561
- $metadata: deserializeMetadata(output),
562
- });
563
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
564
- const doc = (0, smithy_client_1.take)(data, {
565
- crl: (_) => de_CrlDetail(_, context),
566
- });
567
- Object.assign(contents, doc);
568
- return contents;
569
- };
570
- exports.de_DisableCrlCommand = de_DisableCrlCommand;
571
- const de_DisableCrlCommandError = async (output, context) => {
572
- const parsedOutput = {
573
- ...output,
574
- body: await parseErrorBody(output.body, context),
575
- };
576
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
577
- switch (errorCode) {
578
- case "AccessDeniedException":
579
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
580
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
581
- case "ResourceNotFoundException":
582
- case "com.amazonaws.rolesanywhere#ResourceNotFoundException":
583
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
584
- default:
585
- const parsedBody = parsedOutput.body;
586
- return throwDefaultError({
587
- output,
588
- parsedBody,
589
- errorCode,
590
- });
591
- }
592
- };
593
- const de_DisableProfileCommand = async (output, context) => {
594
- if (output.statusCode !== 200 && output.statusCode >= 300) {
595
- return de_DisableProfileCommandError(output, context);
596
- }
597
- const contents = (0, smithy_client_1.map)({
598
- $metadata: deserializeMetadata(output),
599
- });
600
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
601
- const doc = (0, smithy_client_1.take)(data, {
602
- profile: (_) => de_ProfileDetail(_, context),
603
- });
604
- Object.assign(contents, doc);
605
- return contents;
606
- };
607
- exports.de_DisableProfileCommand = de_DisableProfileCommand;
608
- const de_DisableProfileCommandError = async (output, context) => {
609
- const parsedOutput = {
610
- ...output,
611
- body: await parseErrorBody(output.body, context),
612
- };
613
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
614
- switch (errorCode) {
615
- case "AccessDeniedException":
616
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
617
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
618
- case "ResourceNotFoundException":
619
- case "com.amazonaws.rolesanywhere#ResourceNotFoundException":
620
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
621
- default:
622
- const parsedBody = parsedOutput.body;
623
- return throwDefaultError({
624
- output,
625
- parsedBody,
626
- errorCode,
627
- });
628
- }
629
- };
630
- const de_DisableTrustAnchorCommand = async (output, context) => {
631
- if (output.statusCode !== 200 && output.statusCode >= 300) {
632
- return de_DisableTrustAnchorCommandError(output, context);
633
- }
634
- const contents = (0, smithy_client_1.map)({
635
- $metadata: deserializeMetadata(output),
636
- });
637
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
638
- const doc = (0, smithy_client_1.take)(data, {
639
- trustAnchor: (_) => de_TrustAnchorDetail(_, context),
640
- });
641
- Object.assign(contents, doc);
642
- return contents;
643
- };
644
- exports.de_DisableTrustAnchorCommand = de_DisableTrustAnchorCommand;
645
- const de_DisableTrustAnchorCommandError = async (output, context) => {
646
- const parsedOutput = {
647
- ...output,
648
- body: await parseErrorBody(output.body, context),
649
- };
650
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
651
- switch (errorCode) {
652
- case "AccessDeniedException":
653
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
654
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
655
- case "ResourceNotFoundException":
656
- case "com.amazonaws.rolesanywhere#ResourceNotFoundException":
657
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
658
- default:
659
- const parsedBody = parsedOutput.body;
660
- return throwDefaultError({
661
- output,
662
- parsedBody,
663
- errorCode,
664
- });
665
- }
666
- };
667
- const de_EnableCrlCommand = async (output, context) => {
668
- if (output.statusCode !== 200 && output.statusCode >= 300) {
669
- return de_EnableCrlCommandError(output, context);
670
- }
671
- const contents = (0, smithy_client_1.map)({
672
- $metadata: deserializeMetadata(output),
673
- });
674
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
675
- const doc = (0, smithy_client_1.take)(data, {
676
- crl: (_) => de_CrlDetail(_, context),
677
- });
678
- Object.assign(contents, doc);
679
- return contents;
680
- };
681
- exports.de_EnableCrlCommand = de_EnableCrlCommand;
682
- const de_EnableCrlCommandError = async (output, context) => {
683
- const parsedOutput = {
684
- ...output,
685
- body: await parseErrorBody(output.body, context),
686
- };
687
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
688
- switch (errorCode) {
689
- case "AccessDeniedException":
690
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
691
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
692
- case "ResourceNotFoundException":
693
- case "com.amazonaws.rolesanywhere#ResourceNotFoundException":
694
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
695
- default:
696
- const parsedBody = parsedOutput.body;
697
- return throwDefaultError({
698
- output,
699
- parsedBody,
700
- errorCode,
701
- });
702
- }
703
- };
704
- const de_EnableProfileCommand = async (output, context) => {
705
- if (output.statusCode !== 200 && output.statusCode >= 300) {
706
- return de_EnableProfileCommandError(output, context);
707
- }
708
- const contents = (0, smithy_client_1.map)({
709
- $metadata: deserializeMetadata(output),
710
- });
711
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
712
- const doc = (0, smithy_client_1.take)(data, {
713
- profile: (_) => de_ProfileDetail(_, context),
714
- });
715
- Object.assign(contents, doc);
716
- return contents;
717
- };
718
- exports.de_EnableProfileCommand = de_EnableProfileCommand;
719
- const de_EnableProfileCommandError = async (output, context) => {
720
- const parsedOutput = {
721
- ...output,
722
- body: await parseErrorBody(output.body, context),
723
- };
724
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
725
- switch (errorCode) {
726
- case "AccessDeniedException":
727
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
728
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
729
- case "ResourceNotFoundException":
730
- case "com.amazonaws.rolesanywhere#ResourceNotFoundException":
731
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
732
- default:
733
- const parsedBody = parsedOutput.body;
734
- return throwDefaultError({
735
- output,
736
- parsedBody,
737
- errorCode,
738
- });
739
- }
740
- };
741
- const de_EnableTrustAnchorCommand = async (output, context) => {
742
- if (output.statusCode !== 200 && output.statusCode >= 300) {
743
- return de_EnableTrustAnchorCommandError(output, context);
744
- }
745
- const contents = (0, smithy_client_1.map)({
746
- $metadata: deserializeMetadata(output),
747
- });
748
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
749
- const doc = (0, smithy_client_1.take)(data, {
750
- trustAnchor: (_) => de_TrustAnchorDetail(_, context),
751
- });
752
- Object.assign(contents, doc);
753
- return contents;
754
- };
755
- exports.de_EnableTrustAnchorCommand = de_EnableTrustAnchorCommand;
756
- const de_EnableTrustAnchorCommandError = async (output, context) => {
757
- const parsedOutput = {
758
- ...output,
759
- body: await parseErrorBody(output.body, context),
760
- };
761
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
762
- switch (errorCode) {
763
- case "AccessDeniedException":
764
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
765
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
766
- case "ResourceNotFoundException":
767
- case "com.amazonaws.rolesanywhere#ResourceNotFoundException":
768
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
769
- default:
770
- const parsedBody = parsedOutput.body;
771
- return throwDefaultError({
772
- output,
773
- parsedBody,
774
- errorCode,
775
- });
776
- }
777
- };
778
- const de_GetCrlCommand = async (output, context) => {
779
- if (output.statusCode !== 200 && output.statusCode >= 300) {
780
- return de_GetCrlCommandError(output, context);
781
- }
782
- const contents = (0, smithy_client_1.map)({
783
- $metadata: deserializeMetadata(output),
784
- });
785
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
786
- const doc = (0, smithy_client_1.take)(data, {
787
- crl: (_) => de_CrlDetail(_, context),
788
- });
789
- Object.assign(contents, doc);
790
- return contents;
791
- };
792
- exports.de_GetCrlCommand = de_GetCrlCommand;
793
- const de_GetCrlCommandError = async (output, context) => {
794
- const parsedOutput = {
795
- ...output,
796
- body: await parseErrorBody(output.body, context),
797
- };
798
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
799
- switch (errorCode) {
800
- case "ResourceNotFoundException":
801
- case "com.amazonaws.rolesanywhere#ResourceNotFoundException":
802
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
803
- default:
804
- const parsedBody = parsedOutput.body;
805
- return throwDefaultError({
806
- output,
807
- parsedBody,
808
- errorCode,
809
- });
810
- }
811
- };
812
- const de_GetProfileCommand = async (output, context) => {
813
- if (output.statusCode !== 200 && output.statusCode >= 300) {
814
- return de_GetProfileCommandError(output, context);
815
- }
816
- const contents = (0, smithy_client_1.map)({
817
- $metadata: deserializeMetadata(output),
818
- });
819
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
820
- const doc = (0, smithy_client_1.take)(data, {
821
- profile: (_) => de_ProfileDetail(_, context),
822
- });
823
- Object.assign(contents, doc);
824
- return contents;
825
- };
826
- exports.de_GetProfileCommand = de_GetProfileCommand;
827
- const de_GetProfileCommandError = async (output, context) => {
828
- const parsedOutput = {
829
- ...output,
830
- body: await parseErrorBody(output.body, context),
831
- };
832
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
833
- switch (errorCode) {
834
- case "AccessDeniedException":
835
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
836
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
837
- case "ResourceNotFoundException":
838
- case "com.amazonaws.rolesanywhere#ResourceNotFoundException":
839
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
840
- default:
841
- const parsedBody = parsedOutput.body;
842
- return throwDefaultError({
843
- output,
844
- parsedBody,
845
- errorCode,
846
- });
847
- }
848
- };
849
- const de_GetSubjectCommand = async (output, context) => {
850
- if (output.statusCode !== 200 && output.statusCode >= 300) {
851
- return de_GetSubjectCommandError(output, context);
852
- }
853
- const contents = (0, smithy_client_1.map)({
854
- $metadata: deserializeMetadata(output),
855
- });
856
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
857
- const doc = (0, smithy_client_1.take)(data, {
858
- subject: (_) => de_SubjectDetail(_, context),
859
- });
860
- Object.assign(contents, doc);
861
- return contents;
862
- };
863
- exports.de_GetSubjectCommand = de_GetSubjectCommand;
864
- const de_GetSubjectCommandError = async (output, context) => {
865
- const parsedOutput = {
866
- ...output,
867
- body: await parseErrorBody(output.body, context),
868
- };
869
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
870
- switch (errorCode) {
871
- case "AccessDeniedException":
872
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
873
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
874
- case "ResourceNotFoundException":
875
- case "com.amazonaws.rolesanywhere#ResourceNotFoundException":
876
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
877
- default:
878
- const parsedBody = parsedOutput.body;
879
- return throwDefaultError({
880
- output,
881
- parsedBody,
882
- errorCode,
883
- });
884
- }
885
- };
886
- const de_GetTrustAnchorCommand = async (output, context) => {
887
- if (output.statusCode !== 200 && output.statusCode >= 300) {
888
- return de_GetTrustAnchorCommandError(output, context);
889
- }
890
- const contents = (0, smithy_client_1.map)({
891
- $metadata: deserializeMetadata(output),
892
- });
893
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
894
- const doc = (0, smithy_client_1.take)(data, {
895
- trustAnchor: (_) => de_TrustAnchorDetail(_, context),
896
- });
897
- Object.assign(contents, doc);
898
- return contents;
899
- };
900
- exports.de_GetTrustAnchorCommand = de_GetTrustAnchorCommand;
901
- const de_GetTrustAnchorCommandError = async (output, context) => {
902
- const parsedOutput = {
903
- ...output,
904
- body: await parseErrorBody(output.body, context),
905
- };
906
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
907
- switch (errorCode) {
908
- case "AccessDeniedException":
909
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
910
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
911
- case "ResourceNotFoundException":
912
- case "com.amazonaws.rolesanywhere#ResourceNotFoundException":
913
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
914
- case "ValidationException":
915
- case "com.amazonaws.rolesanywhere#ValidationException":
916
- throw await de_ValidationExceptionRes(parsedOutput, context);
917
- default:
918
- const parsedBody = parsedOutput.body;
919
- return throwDefaultError({
920
- output,
921
- parsedBody,
922
- errorCode,
923
- });
924
- }
925
- };
926
- const de_ImportCrlCommand = async (output, context) => {
927
- if (output.statusCode !== 201 && output.statusCode >= 300) {
928
- return de_ImportCrlCommandError(output, context);
929
- }
930
- const contents = (0, smithy_client_1.map)({
931
- $metadata: deserializeMetadata(output),
932
- });
933
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
934
- const doc = (0, smithy_client_1.take)(data, {
935
- crl: (_) => de_CrlDetail(_, context),
936
- });
937
- Object.assign(contents, doc);
938
- return contents;
939
- };
940
- exports.de_ImportCrlCommand = de_ImportCrlCommand;
941
- const de_ImportCrlCommandError = async (output, context) => {
942
- const parsedOutput = {
943
- ...output,
944
- body: await parseErrorBody(output.body, context),
945
- };
946
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
947
- switch (errorCode) {
948
- case "AccessDeniedException":
949
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
950
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
951
- case "ValidationException":
952
- case "com.amazonaws.rolesanywhere#ValidationException":
953
- throw await de_ValidationExceptionRes(parsedOutput, context);
954
- default:
955
- const parsedBody = parsedOutput.body;
956
- return throwDefaultError({
957
- output,
958
- parsedBody,
959
- errorCode,
960
- });
961
- }
962
- };
963
- const de_ListCrlsCommand = async (output, context) => {
964
- if (output.statusCode !== 200 && output.statusCode >= 300) {
965
- return de_ListCrlsCommandError(output, context);
966
- }
967
- const contents = (0, smithy_client_1.map)({
968
- $metadata: deserializeMetadata(output),
969
- });
970
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
971
- const doc = (0, smithy_client_1.take)(data, {
972
- crls: (_) => de_CrlDetails(_, context),
973
- nextToken: smithy_client_1.expectString,
974
- });
975
- Object.assign(contents, doc);
976
- return contents;
977
- };
978
- exports.de_ListCrlsCommand = de_ListCrlsCommand;
979
- const de_ListCrlsCommandError = async (output, context) => {
980
- const parsedOutput = {
981
- ...output,
982
- body: await parseErrorBody(output.body, context),
983
- };
984
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
985
- switch (errorCode) {
986
- case "AccessDeniedException":
987
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
988
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
989
- case "ValidationException":
990
- case "com.amazonaws.rolesanywhere#ValidationException":
991
- throw await de_ValidationExceptionRes(parsedOutput, context);
992
- default:
993
- const parsedBody = parsedOutput.body;
994
- return throwDefaultError({
995
- output,
996
- parsedBody,
997
- errorCode,
998
- });
999
- }
1000
- };
1001
- const de_ListProfilesCommand = async (output, context) => {
1002
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1003
- return de_ListProfilesCommandError(output, context);
1004
- }
1005
- const contents = (0, smithy_client_1.map)({
1006
- $metadata: deserializeMetadata(output),
1007
- });
1008
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1009
- const doc = (0, smithy_client_1.take)(data, {
1010
- nextToken: smithy_client_1.expectString,
1011
- profiles: (_) => de_ProfileDetails(_, context),
1012
- });
1013
- Object.assign(contents, doc);
1014
- return contents;
1015
- };
1016
- exports.de_ListProfilesCommand = de_ListProfilesCommand;
1017
- const de_ListProfilesCommandError = async (output, context) => {
1018
- const parsedOutput = {
1019
- ...output,
1020
- body: await parseErrorBody(output.body, context),
1021
- };
1022
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1023
- switch (errorCode) {
1024
- case "AccessDeniedException":
1025
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
1026
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1027
- case "ValidationException":
1028
- case "com.amazonaws.rolesanywhere#ValidationException":
1029
- throw await de_ValidationExceptionRes(parsedOutput, context);
1030
- default:
1031
- const parsedBody = parsedOutput.body;
1032
- return throwDefaultError({
1033
- output,
1034
- parsedBody,
1035
- errorCode,
1036
- });
1037
- }
1038
- };
1039
- const de_ListSubjectsCommand = async (output, context) => {
1040
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1041
- return de_ListSubjectsCommandError(output, context);
1042
- }
1043
- const contents = (0, smithy_client_1.map)({
1044
- $metadata: deserializeMetadata(output),
1045
- });
1046
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1047
- const doc = (0, smithy_client_1.take)(data, {
1048
- nextToken: smithy_client_1.expectString,
1049
- subjects: (_) => de_SubjectSummaries(_, context),
1050
- });
1051
- Object.assign(contents, doc);
1052
- return contents;
1053
- };
1054
- exports.de_ListSubjectsCommand = de_ListSubjectsCommand;
1055
- const de_ListSubjectsCommandError = async (output, context) => {
1056
- const parsedOutput = {
1057
- ...output,
1058
- body: await parseErrorBody(output.body, context),
1059
- };
1060
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1061
- switch (errorCode) {
1062
- case "AccessDeniedException":
1063
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
1064
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1065
- case "ValidationException":
1066
- case "com.amazonaws.rolesanywhere#ValidationException":
1067
- throw await de_ValidationExceptionRes(parsedOutput, context);
1068
- default:
1069
- const parsedBody = parsedOutput.body;
1070
- return throwDefaultError({
1071
- output,
1072
- parsedBody,
1073
- errorCode,
1074
- });
1075
- }
1076
- };
1077
- const de_ListTagsForResourceCommand = async (output, context) => {
1078
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1079
- return de_ListTagsForResourceCommandError(output, context);
1080
- }
1081
- const contents = (0, smithy_client_1.map)({
1082
- $metadata: deserializeMetadata(output),
1083
- });
1084
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1085
- const doc = (0, smithy_client_1.take)(data, {
1086
- tags: smithy_client_1._json,
1087
- });
1088
- Object.assign(contents, doc);
1089
- return contents;
1090
- };
1091
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
1092
- const de_ListTagsForResourceCommandError = async (output, context) => {
1093
- const parsedOutput = {
1094
- ...output,
1095
- body: await parseErrorBody(output.body, context),
1096
- };
1097
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1098
- switch (errorCode) {
1099
- case "AccessDeniedException":
1100
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
1101
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1102
- case "ResourceNotFoundException":
1103
- case "com.amazonaws.rolesanywhere#ResourceNotFoundException":
1104
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1105
- case "ValidationException":
1106
- case "com.amazonaws.rolesanywhere#ValidationException":
1107
- throw await de_ValidationExceptionRes(parsedOutput, context);
1108
- default:
1109
- const parsedBody = parsedOutput.body;
1110
- return throwDefaultError({
1111
- output,
1112
- parsedBody,
1113
- errorCode,
1114
- });
1115
- }
1116
- };
1117
- const de_ListTrustAnchorsCommand = async (output, context) => {
1118
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1119
- return de_ListTrustAnchorsCommandError(output, context);
1120
- }
1121
- const contents = (0, smithy_client_1.map)({
1122
- $metadata: deserializeMetadata(output),
1123
- });
1124
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1125
- const doc = (0, smithy_client_1.take)(data, {
1126
- nextToken: smithy_client_1.expectString,
1127
- trustAnchors: (_) => de_TrustAnchorDetails(_, context),
1128
- });
1129
- Object.assign(contents, doc);
1130
- return contents;
1131
- };
1132
- exports.de_ListTrustAnchorsCommand = de_ListTrustAnchorsCommand;
1133
- const de_ListTrustAnchorsCommandError = async (output, context) => {
1134
- const parsedOutput = {
1135
- ...output,
1136
- body: await parseErrorBody(output.body, context),
1137
- };
1138
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1139
- switch (errorCode) {
1140
- case "AccessDeniedException":
1141
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
1142
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1143
- case "ValidationException":
1144
- case "com.amazonaws.rolesanywhere#ValidationException":
1145
- throw await de_ValidationExceptionRes(parsedOutput, context);
1146
- default:
1147
- const parsedBody = parsedOutput.body;
1148
- return throwDefaultError({
1149
- output,
1150
- parsedBody,
1151
- errorCode,
1152
- });
1153
- }
1154
- };
1155
- const de_PutNotificationSettingsCommand = async (output, context) => {
1156
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1157
- return de_PutNotificationSettingsCommandError(output, context);
1158
- }
1159
- const contents = (0, smithy_client_1.map)({
1160
- $metadata: deserializeMetadata(output),
1161
- });
1162
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1163
- const doc = (0, smithy_client_1.take)(data, {
1164
- trustAnchor: (_) => de_TrustAnchorDetail(_, context),
1165
- });
1166
- Object.assign(contents, doc);
1167
- return contents;
1168
- };
1169
- exports.de_PutNotificationSettingsCommand = de_PutNotificationSettingsCommand;
1170
- const de_PutNotificationSettingsCommandError = async (output, context) => {
1171
- const parsedOutput = {
1172
- ...output,
1173
- body: await parseErrorBody(output.body, context),
1174
- };
1175
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1176
- switch (errorCode) {
1177
- case "AccessDeniedException":
1178
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
1179
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1180
- case "ResourceNotFoundException":
1181
- case "com.amazonaws.rolesanywhere#ResourceNotFoundException":
1182
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1183
- case "ValidationException":
1184
- case "com.amazonaws.rolesanywhere#ValidationException":
1185
- throw await de_ValidationExceptionRes(parsedOutput, context);
1186
- default:
1187
- const parsedBody = parsedOutput.body;
1188
- return throwDefaultError({
1189
- output,
1190
- parsedBody,
1191
- errorCode,
1192
- });
1193
- }
1194
- };
1195
- const de_ResetNotificationSettingsCommand = async (output, context) => {
1196
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1197
- return de_ResetNotificationSettingsCommandError(output, context);
1198
- }
1199
- const contents = (0, smithy_client_1.map)({
1200
- $metadata: deserializeMetadata(output),
1201
- });
1202
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1203
- const doc = (0, smithy_client_1.take)(data, {
1204
- trustAnchor: (_) => de_TrustAnchorDetail(_, context),
1205
- });
1206
- Object.assign(contents, doc);
1207
- return contents;
1208
- };
1209
- exports.de_ResetNotificationSettingsCommand = de_ResetNotificationSettingsCommand;
1210
- const de_ResetNotificationSettingsCommandError = async (output, context) => {
1211
- const parsedOutput = {
1212
- ...output,
1213
- body: await parseErrorBody(output.body, context),
1214
- };
1215
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1216
- switch (errorCode) {
1217
- case "AccessDeniedException":
1218
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
1219
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1220
- case "ResourceNotFoundException":
1221
- case "com.amazonaws.rolesanywhere#ResourceNotFoundException":
1222
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1223
- case "ValidationException":
1224
- case "com.amazonaws.rolesanywhere#ValidationException":
1225
- throw await de_ValidationExceptionRes(parsedOutput, context);
1226
- default:
1227
- const parsedBody = parsedOutput.body;
1228
- return throwDefaultError({
1229
- output,
1230
- parsedBody,
1231
- errorCode,
1232
- });
1233
- }
1234
- };
1235
- const de_TagResourceCommand = async (output, context) => {
1236
- if (output.statusCode !== 201 && output.statusCode >= 300) {
1237
- return de_TagResourceCommandError(output, context);
1238
- }
1239
- const contents = (0, smithy_client_1.map)({
1240
- $metadata: deserializeMetadata(output),
1241
- });
1242
- await (0, smithy_client_1.collectBody)(output.body, context);
1243
- return contents;
1244
- };
1245
- exports.de_TagResourceCommand = de_TagResourceCommand;
1246
- const de_TagResourceCommandError = async (output, context) => {
1247
- const parsedOutput = {
1248
- ...output,
1249
- body: await parseErrorBody(output.body, context),
1250
- };
1251
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1252
- switch (errorCode) {
1253
- case "AccessDeniedException":
1254
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
1255
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1256
- case "ResourceNotFoundException":
1257
- case "com.amazonaws.rolesanywhere#ResourceNotFoundException":
1258
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1259
- case "TooManyTagsException":
1260
- case "com.amazonaws.rolesanywhere#TooManyTagsException":
1261
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1262
- case "ValidationException":
1263
- case "com.amazonaws.rolesanywhere#ValidationException":
1264
- throw await de_ValidationExceptionRes(parsedOutput, context);
1265
- default:
1266
- const parsedBody = parsedOutput.body;
1267
- return throwDefaultError({
1268
- output,
1269
- parsedBody,
1270
- errorCode,
1271
- });
1272
- }
1273
- };
1274
- const de_UntagResourceCommand = async (output, context) => {
1275
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1276
- return de_UntagResourceCommandError(output, context);
1277
- }
1278
- const contents = (0, smithy_client_1.map)({
1279
- $metadata: deserializeMetadata(output),
1280
- });
1281
- await (0, smithy_client_1.collectBody)(output.body, context);
1282
- return contents;
1283
- };
1284
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
1285
- const de_UntagResourceCommandError = async (output, context) => {
1286
- const parsedOutput = {
1287
- ...output,
1288
- body: await parseErrorBody(output.body, context),
1289
- };
1290
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1291
- switch (errorCode) {
1292
- case "AccessDeniedException":
1293
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
1294
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1295
- case "ResourceNotFoundException":
1296
- case "com.amazonaws.rolesanywhere#ResourceNotFoundException":
1297
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1298
- case "ValidationException":
1299
- case "com.amazonaws.rolesanywhere#ValidationException":
1300
- throw await de_ValidationExceptionRes(parsedOutput, context);
1301
- default:
1302
- const parsedBody = parsedOutput.body;
1303
- return throwDefaultError({
1304
- output,
1305
- parsedBody,
1306
- errorCode,
1307
- });
1308
- }
1309
- };
1310
- const de_UpdateCrlCommand = async (output, context) => {
1311
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1312
- return de_UpdateCrlCommandError(output, context);
1313
- }
1314
- const contents = (0, smithy_client_1.map)({
1315
- $metadata: deserializeMetadata(output),
1316
- });
1317
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1318
- const doc = (0, smithy_client_1.take)(data, {
1319
- crl: (_) => de_CrlDetail(_, context),
1320
- });
1321
- Object.assign(contents, doc);
1322
- return contents;
1323
- };
1324
- exports.de_UpdateCrlCommand = de_UpdateCrlCommand;
1325
- const de_UpdateCrlCommandError = async (output, context) => {
1326
- const parsedOutput = {
1327
- ...output,
1328
- body: await parseErrorBody(output.body, context),
1329
- };
1330
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1331
- switch (errorCode) {
1332
- case "AccessDeniedException":
1333
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
1334
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1335
- case "ResourceNotFoundException":
1336
- case "com.amazonaws.rolesanywhere#ResourceNotFoundException":
1337
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1338
- case "ValidationException":
1339
- case "com.amazonaws.rolesanywhere#ValidationException":
1340
- throw await de_ValidationExceptionRes(parsedOutput, context);
1341
- default:
1342
- const parsedBody = parsedOutput.body;
1343
- return throwDefaultError({
1344
- output,
1345
- parsedBody,
1346
- errorCode,
1347
- });
1348
- }
1349
- };
1350
- const de_UpdateProfileCommand = async (output, context) => {
1351
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1352
- return de_UpdateProfileCommandError(output, context);
1353
- }
1354
- const contents = (0, smithy_client_1.map)({
1355
- $metadata: deserializeMetadata(output),
1356
- });
1357
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1358
- const doc = (0, smithy_client_1.take)(data, {
1359
- profile: (_) => de_ProfileDetail(_, context),
1360
- });
1361
- Object.assign(contents, doc);
1362
- return contents;
1363
- };
1364
- exports.de_UpdateProfileCommand = de_UpdateProfileCommand;
1365
- const de_UpdateProfileCommandError = async (output, context) => {
1366
- const parsedOutput = {
1367
- ...output,
1368
- body: await parseErrorBody(output.body, context),
1369
- };
1370
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1371
- switch (errorCode) {
1372
- case "AccessDeniedException":
1373
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
1374
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1375
- case "ResourceNotFoundException":
1376
- case "com.amazonaws.rolesanywhere#ResourceNotFoundException":
1377
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1378
- case "ValidationException":
1379
- case "com.amazonaws.rolesanywhere#ValidationException":
1380
- throw await de_ValidationExceptionRes(parsedOutput, context);
1381
- default:
1382
- const parsedBody = parsedOutput.body;
1383
- return throwDefaultError({
1384
- output,
1385
- parsedBody,
1386
- errorCode,
1387
- });
1388
- }
1389
- };
1390
- const de_UpdateTrustAnchorCommand = async (output, context) => {
1391
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1392
- return de_UpdateTrustAnchorCommandError(output, context);
1393
- }
1394
- const contents = (0, smithy_client_1.map)({
1395
- $metadata: deserializeMetadata(output),
1396
- });
1397
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1398
- const doc = (0, smithy_client_1.take)(data, {
1399
- trustAnchor: (_) => de_TrustAnchorDetail(_, context),
1400
- });
1401
- Object.assign(contents, doc);
1402
- return contents;
1403
- };
1404
- exports.de_UpdateTrustAnchorCommand = de_UpdateTrustAnchorCommand;
1405
- const de_UpdateTrustAnchorCommandError = async (output, context) => {
1406
- const parsedOutput = {
1407
- ...output,
1408
- body: await parseErrorBody(output.body, context),
1409
- };
1410
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1411
- switch (errorCode) {
1412
- case "AccessDeniedException":
1413
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
1414
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1415
- case "ResourceNotFoundException":
1416
- case "com.amazonaws.rolesanywhere#ResourceNotFoundException":
1417
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1418
- case "ValidationException":
1419
- case "com.amazonaws.rolesanywhere#ValidationException":
1420
- throw await de_ValidationExceptionRes(parsedOutput, context);
1421
- default:
1422
- const parsedBody = parsedOutput.body;
1423
- return throwDefaultError({
1424
- output,
1425
- parsedBody,
1426
- errorCode,
1427
- });
1428
- }
1429
- };
1430
- const throwDefaultError = (0, smithy_client_1.withBaseException)(RolesAnywhereServiceException_1.RolesAnywhereServiceException);
1431
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
1432
- const contents = (0, smithy_client_1.map)({});
1433
- const data = parsedOutput.body;
1434
- const doc = (0, smithy_client_1.take)(data, {
1435
- message: smithy_client_1.expectString,
1436
- });
1437
- Object.assign(contents, doc);
1438
- const exception = new models_0_1.AccessDeniedException({
1439
- $metadata: deserializeMetadata(parsedOutput),
1440
- ...contents,
1441
- });
1442
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1443
- };
1444
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1445
- const contents = (0, smithy_client_1.map)({});
1446
- const data = parsedOutput.body;
1447
- const doc = (0, smithy_client_1.take)(data, {
1448
- message: smithy_client_1.expectString,
1449
- });
1450
- Object.assign(contents, doc);
1451
- const exception = new models_0_1.ResourceNotFoundException({
1452
- $metadata: deserializeMetadata(parsedOutput),
1453
- ...contents,
1454
- });
1455
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1456
- };
1457
- const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
1458
- const contents = (0, smithy_client_1.map)({});
1459
- const data = parsedOutput.body;
1460
- const doc = (0, smithy_client_1.take)(data, {
1461
- message: smithy_client_1.expectString,
1462
- });
1463
- Object.assign(contents, doc);
1464
- const exception = new models_0_1.TooManyTagsException({
1465
- $metadata: deserializeMetadata(parsedOutput),
1466
- ...contents,
1467
- });
1468
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1469
- };
1470
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
1471
- const contents = (0, smithy_client_1.map)({});
1472
- const data = parsedOutput.body;
1473
- const doc = (0, smithy_client_1.take)(data, {
1474
- message: smithy_client_1.expectString,
1475
- });
1476
- Object.assign(contents, doc);
1477
- const exception = new models_0_1.ValidationException({
1478
- $metadata: deserializeMetadata(parsedOutput),
1479
- ...contents,
1480
- });
1481
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1482
- };
1483
- const de_CredentialSummaries = (output, context) => {
1484
- const retVal = (output || [])
1485
- .filter((e) => e != null)
1486
- .map((entry) => {
1487
- return de_CredentialSummary(entry, context);
1488
- });
1489
- return retVal;
1490
- };
1491
- const de_CredentialSummary = (output, context) => {
1492
- return (0, smithy_client_1.take)(output, {
1493
- enabled: smithy_client_1.expectBoolean,
1494
- failed: smithy_client_1.expectBoolean,
1495
- issuer: smithy_client_1.expectString,
1496
- seenAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1497
- serialNumber: smithy_client_1.expectString,
1498
- x509CertificateData: smithy_client_1.expectString,
1499
- });
1500
- };
1501
- const de_CrlDetail = (output, context) => {
1502
- return (0, smithy_client_1.take)(output, {
1503
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1504
- crlArn: smithy_client_1.expectString,
1505
- crlData: context.base64Decoder,
1506
- crlId: smithy_client_1.expectString,
1507
- enabled: smithy_client_1.expectBoolean,
1508
- name: smithy_client_1.expectString,
1509
- trustAnchorArn: smithy_client_1.expectString,
1510
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1511
- });
1512
- };
1513
- const de_CrlDetails = (output, context) => {
1514
- const retVal = (output || [])
1515
- .filter((e) => e != null)
1516
- .map((entry) => {
1517
- return de_CrlDetail(entry, context);
1518
- });
1519
- return retVal;
1520
- };
1521
- const de_InstanceProperties = (output, context) => {
1522
- const retVal = (output || [])
1523
- .filter((e) => e != null)
1524
- .map((entry) => {
1525
- return de_InstanceProperty(entry, context);
1526
- });
1527
- return retVal;
1528
- };
1529
- const de_InstanceProperty = (output, context) => {
1530
- return (0, smithy_client_1.take)(output, {
1531
- failed: smithy_client_1.expectBoolean,
1532
- properties: smithy_client_1._json,
1533
- seenAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1534
- });
1535
- };
1536
- const de_ProfileDetail = (output, context) => {
1537
- return (0, smithy_client_1.take)(output, {
1538
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1539
- createdBy: smithy_client_1.expectString,
1540
- durationSeconds: smithy_client_1.expectInt32,
1541
- enabled: smithy_client_1.expectBoolean,
1542
- managedPolicyArns: smithy_client_1._json,
1543
- name: smithy_client_1.expectString,
1544
- profileArn: smithy_client_1.expectString,
1545
- profileId: smithy_client_1.expectString,
1546
- requireInstanceProperties: smithy_client_1.expectBoolean,
1547
- roleArns: smithy_client_1._json,
1548
- sessionPolicy: smithy_client_1.expectString,
1549
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1550
- });
1551
- };
1552
- const de_ProfileDetails = (output, context) => {
1553
- const retVal = (output || [])
1554
- .filter((e) => e != null)
1555
- .map((entry) => {
1556
- return de_ProfileDetail(entry, context);
1557
- });
1558
- return retVal;
1559
- };
1560
- const de_SubjectDetail = (output, context) => {
1561
- return (0, smithy_client_1.take)(output, {
1562
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1563
- credentials: (_) => de_CredentialSummaries(_, context),
1564
- enabled: smithy_client_1.expectBoolean,
1565
- instanceProperties: (_) => de_InstanceProperties(_, context),
1566
- lastSeenAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1567
- subjectArn: smithy_client_1.expectString,
1568
- subjectId: smithy_client_1.expectString,
1569
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1570
- x509Subject: smithy_client_1.expectString,
1571
- });
1572
- };
1573
- const de_SubjectSummaries = (output, context) => {
1574
- const retVal = (output || [])
1575
- .filter((e) => e != null)
1576
- .map((entry) => {
1577
- return de_SubjectSummary(entry, context);
1578
- });
1579
- return retVal;
1580
- };
1581
- const de_SubjectSummary = (output, context) => {
1582
- return (0, smithy_client_1.take)(output, {
1583
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1584
- enabled: smithy_client_1.expectBoolean,
1585
- lastSeenAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1586
- subjectArn: smithy_client_1.expectString,
1587
- subjectId: smithy_client_1.expectString,
1588
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1589
- x509Subject: smithy_client_1.expectString,
1590
- });
1591
- };
1592
- const de_TrustAnchorDetail = (output, context) => {
1593
- return (0, smithy_client_1.take)(output, {
1594
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1595
- enabled: smithy_client_1.expectBoolean,
1596
- name: smithy_client_1.expectString,
1597
- notificationSettings: smithy_client_1._json,
1598
- source: smithy_client_1._json,
1599
- trustAnchorArn: smithy_client_1.expectString,
1600
- trustAnchorId: smithy_client_1.expectString,
1601
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
1602
- });
1603
- };
1604
- const de_TrustAnchorDetails = (output, context) => {
1605
- const retVal = (output || [])
1606
- .filter((e) => e != null)
1607
- .map((entry) => {
1608
- return de_TrustAnchorDetail(entry, context);
1609
- });
1610
- return retVal;
1611
- };
1612
- const deserializeMetadata = (output) => ({
1613
- httpStatusCode: output.statusCode,
1614
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1615
- extendedRequestId: output.headers["x-amz-id-2"],
1616
- cfId: output.headers["x-amz-cf-id"],
1617
- });
1618
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
1619
- const isSerializableHeaderValue = (value) => value !== undefined &&
1620
- value !== null &&
1621
- value !== "" &&
1622
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1623
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1624
- const _nT = "nextToken";
1625
- const _pS = "pageSize";
1626
- const _rA = "resourceArn";
1627
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1628
- if (encoded.length) {
1629
- return JSON.parse(encoded);
1630
- }
1631
- return {};
1632
- });
1633
- const parseErrorBody = async (errorBody, context) => {
1634
- const value = await parseBody(errorBody, context);
1635
- value.message = value.message ?? value.Message;
1636
- return value;
1637
- };
1638
- const loadRestJsonErrorCode = (output, data) => {
1639
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1640
- const sanitizeErrorCode = (rawValue) => {
1641
- let cleanValue = rawValue;
1642
- if (typeof cleanValue === "number") {
1643
- cleanValue = cleanValue.toString();
1644
- }
1645
- if (cleanValue.indexOf(",") >= 0) {
1646
- cleanValue = cleanValue.split(",")[0];
1647
- }
1648
- if (cleanValue.indexOf(":") >= 0) {
1649
- cleanValue = cleanValue.split(":")[0];
1650
- }
1651
- if (cleanValue.indexOf("#") >= 0) {
1652
- cleanValue = cleanValue.split("#")[1];
1653
- }
1654
- return cleanValue;
1655
- };
1656
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1657
- if (headerKey !== undefined) {
1658
- return sanitizeErrorCode(output.headers[headerKey]);
1659
- }
1660
- if (data.code !== undefined) {
1661
- return sanitizeErrorCode(data.code);
1662
- }
1663
- if (data["__type"] !== undefined) {
1664
- return sanitizeErrorCode(data["__type"]);
1665
- }
1666
- };
1
+ module.exports = require("../index.js");