@aws-sdk/client-rolesanywhere 3.927.0 → 3.929.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 (54) hide show
  1. package/dist-cjs/index.js +843 -1264
  2. package/dist-cjs/runtimeConfig.shared.js +2 -0
  3. package/dist-es/RolesAnywhereClient.js +2 -0
  4. package/dist-es/commands/CreateProfileCommand.js +3 -10
  5. package/dist-es/commands/CreateTrustAnchorCommand.js +3 -10
  6. package/dist-es/commands/DeleteAttributeMappingCommand.js +3 -9
  7. package/dist-es/commands/DeleteCrlCommand.js +3 -9
  8. package/dist-es/commands/DeleteProfileCommand.js +3 -9
  9. package/dist-es/commands/DeleteTrustAnchorCommand.js +3 -9
  10. package/dist-es/commands/DisableCrlCommand.js +3 -9
  11. package/dist-es/commands/DisableProfileCommand.js +3 -9
  12. package/dist-es/commands/DisableTrustAnchorCommand.js +3 -9
  13. package/dist-es/commands/EnableCrlCommand.js +3 -9
  14. package/dist-es/commands/EnableProfileCommand.js +3 -9
  15. package/dist-es/commands/EnableTrustAnchorCommand.js +3 -9
  16. package/dist-es/commands/GetCrlCommand.js +3 -9
  17. package/dist-es/commands/GetProfileCommand.js +3 -9
  18. package/dist-es/commands/GetSubjectCommand.js +3 -9
  19. package/dist-es/commands/GetTrustAnchorCommand.js +3 -9
  20. package/dist-es/commands/ImportCrlCommand.js +3 -10
  21. package/dist-es/commands/ListCrlsCommand.js +3 -9
  22. package/dist-es/commands/ListProfilesCommand.js +3 -9
  23. package/dist-es/commands/ListSubjectsCommand.js +3 -9
  24. package/dist-es/commands/ListTagsForResourceCommand.js +3 -10
  25. package/dist-es/commands/ListTrustAnchorsCommand.js +3 -9
  26. package/dist-es/commands/PutAttributeMappingCommand.js +3 -9
  27. package/dist-es/commands/PutNotificationSettingsCommand.js +3 -9
  28. package/dist-es/commands/ResetNotificationSettingsCommand.js +3 -9
  29. package/dist-es/commands/TagResourceCommand.js +3 -10
  30. package/dist-es/commands/UntagResourceCommand.js +3 -10
  31. package/dist-es/commands/UpdateCrlCommand.js +3 -9
  32. package/dist-es/commands/UpdateProfileCommand.js +3 -9
  33. package/dist-es/commands/UpdateTrustAnchorCommand.js +3 -9
  34. package/dist-es/models/models_0.js +0 -31
  35. package/dist-es/runtimeConfig.shared.js +2 -0
  36. package/dist-es/schemas/schemas_0.js +776 -0
  37. package/dist-types/RolesAnywhereClient.d.ts +10 -1
  38. package/dist-types/models/models_0.d.ts +0 -28
  39. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  40. package/dist-types/runtimeConfig.d.ts +1 -0
  41. package/dist-types/runtimeConfig.native.d.ts +1 -0
  42. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  43. package/dist-types/schemas/schemas_0.d.ts +103 -0
  44. package/dist-types/ts3.4/RolesAnywhereClient.d.ts +4 -0
  45. package/dist-types/ts3.4/models/models_0.d.ts +0 -19
  46. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  47. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  48. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  49. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  50. package/dist-types/ts3.4/schemas/schemas_0.d.ts +109 -0
  51. package/package.json +5 -5
  52. package/dist-es/protocols/Aws_restJson1.js +0 -1009
  53. package/dist-types/protocols/Aws_restJson1.d.ts +0 -272
  54. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -365
@@ -1,1009 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { requestBuilder as rb } from "@smithy/core";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, take, withBaseException, } from "@smithy/smithy-client";
4
- import { AccessDeniedException, ResourceNotFoundException, TooManyTagsException, ValidationException, } from "../models/models_0";
5
- import { RolesAnywhereServiceException as __BaseException } from "../models/RolesAnywhereServiceException";
6
- export const se_CreateProfileCommand = async (input, context) => {
7
- const b = rb(input, context);
8
- const headers = {
9
- "content-type": "application/json",
10
- };
11
- b.bp("/profiles");
12
- let body;
13
- body = JSON.stringify(take(input, {
14
- acceptRoleSessionName: [],
15
- durationSeconds: [],
16
- enabled: [],
17
- managedPolicyArns: (_) => _json(_),
18
- name: [],
19
- requireInstanceProperties: [],
20
- roleArns: (_) => _json(_),
21
- sessionPolicy: [],
22
- tags: (_) => _json(_),
23
- }));
24
- b.m("POST").h(headers).b(body);
25
- return b.build();
26
- };
27
- export const se_CreateTrustAnchorCommand = async (input, context) => {
28
- const b = rb(input, context);
29
- const headers = {
30
- "content-type": "application/json",
31
- };
32
- b.bp("/trustanchors");
33
- let body;
34
- body = JSON.stringify(take(input, {
35
- enabled: [],
36
- name: [],
37
- notificationSettings: (_) => _json(_),
38
- source: (_) => _json(_),
39
- tags: (_) => _json(_),
40
- }));
41
- b.m("POST").h(headers).b(body);
42
- return b.build();
43
- };
44
- export const se_DeleteAttributeMappingCommand = async (input, context) => {
45
- const b = rb(input, context);
46
- const headers = {};
47
- b.bp("/profiles/{profileId}/mappings");
48
- b.p("profileId", () => input.profileId, "{profileId}", false);
49
- const query = map({
50
- [_cF]: [, __expectNonNull(input[_cF], `certificateField`)],
51
- [_s]: [() => input.specifiers !== void 0, () => input[_s] || []],
52
- });
53
- let body;
54
- b.m("DELETE").h(headers).q(query).b(body);
55
- return b.build();
56
- };
57
- export const se_DeleteCrlCommand = async (input, context) => {
58
- const b = rb(input, context);
59
- const headers = {};
60
- b.bp("/crl/{crlId}");
61
- b.p("crlId", () => input.crlId, "{crlId}", false);
62
- let body;
63
- b.m("DELETE").h(headers).b(body);
64
- return b.build();
65
- };
66
- export const se_DeleteProfileCommand = async (input, context) => {
67
- const b = rb(input, context);
68
- const headers = {};
69
- b.bp("/profile/{profileId}");
70
- b.p("profileId", () => input.profileId, "{profileId}", false);
71
- let body;
72
- b.m("DELETE").h(headers).b(body);
73
- return b.build();
74
- };
75
- export const se_DeleteTrustAnchorCommand = async (input, context) => {
76
- const b = rb(input, context);
77
- const headers = {};
78
- b.bp("/trustanchor/{trustAnchorId}");
79
- b.p("trustAnchorId", () => input.trustAnchorId, "{trustAnchorId}", false);
80
- let body;
81
- b.m("DELETE").h(headers).b(body);
82
- return b.build();
83
- };
84
- export const se_DisableCrlCommand = async (input, context) => {
85
- const b = rb(input, context);
86
- const headers = {};
87
- b.bp("/crl/{crlId}/disable");
88
- b.p("crlId", () => input.crlId, "{crlId}", false);
89
- let body;
90
- b.m("POST").h(headers).b(body);
91
- return b.build();
92
- };
93
- export const se_DisableProfileCommand = async (input, context) => {
94
- const b = rb(input, context);
95
- const headers = {};
96
- b.bp("/profile/{profileId}/disable");
97
- b.p("profileId", () => input.profileId, "{profileId}", false);
98
- let body;
99
- b.m("POST").h(headers).b(body);
100
- return b.build();
101
- };
102
- export const se_DisableTrustAnchorCommand = async (input, context) => {
103
- const b = rb(input, context);
104
- const headers = {};
105
- b.bp("/trustanchor/{trustAnchorId}/disable");
106
- b.p("trustAnchorId", () => input.trustAnchorId, "{trustAnchorId}", false);
107
- let body;
108
- b.m("POST").h(headers).b(body);
109
- return b.build();
110
- };
111
- export const se_EnableCrlCommand = async (input, context) => {
112
- const b = rb(input, context);
113
- const headers = {};
114
- b.bp("/crl/{crlId}/enable");
115
- b.p("crlId", () => input.crlId, "{crlId}", false);
116
- let body;
117
- b.m("POST").h(headers).b(body);
118
- return b.build();
119
- };
120
- export const se_EnableProfileCommand = async (input, context) => {
121
- const b = rb(input, context);
122
- const headers = {};
123
- b.bp("/profile/{profileId}/enable");
124
- b.p("profileId", () => input.profileId, "{profileId}", false);
125
- let body;
126
- b.m("POST").h(headers).b(body);
127
- return b.build();
128
- };
129
- export const se_EnableTrustAnchorCommand = async (input, context) => {
130
- const b = rb(input, context);
131
- const headers = {};
132
- b.bp("/trustanchor/{trustAnchorId}/enable");
133
- b.p("trustAnchorId", () => input.trustAnchorId, "{trustAnchorId}", false);
134
- let body;
135
- b.m("POST").h(headers).b(body);
136
- return b.build();
137
- };
138
- export const se_GetCrlCommand = async (input, context) => {
139
- const b = rb(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
- export const se_GetProfileCommand = async (input, context) => {
148
- const b = rb(input, context);
149
- const headers = {};
150
- b.bp("/profile/{profileId}");
151
- b.p("profileId", () => input.profileId, "{profileId}", false);
152
- let body;
153
- b.m("GET").h(headers).b(body);
154
- return b.build();
155
- };
156
- export const se_GetSubjectCommand = async (input, context) => {
157
- const b = rb(input, context);
158
- const headers = {};
159
- b.bp("/subject/{subjectId}");
160
- b.p("subjectId", () => input.subjectId, "{subjectId}", false);
161
- let body;
162
- b.m("GET").h(headers).b(body);
163
- return b.build();
164
- };
165
- export const se_GetTrustAnchorCommand = async (input, context) => {
166
- const b = rb(input, context);
167
- const headers = {};
168
- b.bp("/trustanchor/{trustAnchorId}");
169
- b.p("trustAnchorId", () => input.trustAnchorId, "{trustAnchorId}", false);
170
- let body;
171
- b.m("GET").h(headers).b(body);
172
- return b.build();
173
- };
174
- export const se_ImportCrlCommand = async (input, context) => {
175
- const b = rb(input, context);
176
- const headers = {
177
- "content-type": "application/json",
178
- };
179
- b.bp("/crls");
180
- let body;
181
- body = JSON.stringify(take(input, {
182
- crlData: (_) => context.base64Encoder(_),
183
- enabled: [],
184
- name: [],
185
- tags: (_) => _json(_),
186
- trustAnchorArn: [],
187
- }));
188
- b.m("POST").h(headers).b(body);
189
- return b.build();
190
- };
191
- export const se_ListCrlsCommand = async (input, context) => {
192
- const b = rb(input, context);
193
- const headers = {};
194
- b.bp("/crls");
195
- const query = map({
196
- [_nT]: [, input[_nT]],
197
- [_pS]: [() => input.pageSize !== void 0, () => input[_pS].toString()],
198
- });
199
- let body;
200
- b.m("GET").h(headers).q(query).b(body);
201
- return b.build();
202
- };
203
- export const se_ListProfilesCommand = async (input, context) => {
204
- const b = rb(input, context);
205
- const headers = {};
206
- b.bp("/profiles");
207
- const query = map({
208
- [_nT]: [, input[_nT]],
209
- [_pS]: [() => input.pageSize !== void 0, () => input[_pS].toString()],
210
- });
211
- let body;
212
- b.m("GET").h(headers).q(query).b(body);
213
- return b.build();
214
- };
215
- export const se_ListSubjectsCommand = async (input, context) => {
216
- const b = rb(input, context);
217
- const headers = {};
218
- b.bp("/subjects");
219
- const query = map({
220
- [_nT]: [, input[_nT]],
221
- [_pS]: [() => input.pageSize !== void 0, () => input[_pS].toString()],
222
- });
223
- let body;
224
- b.m("GET").h(headers).q(query).b(body);
225
- return b.build();
226
- };
227
- export const se_ListTagsForResourceCommand = async (input, context) => {
228
- const b = rb(input, context);
229
- const headers = {};
230
- b.bp("/ListTagsForResource");
231
- const query = map({
232
- [_rA]: [, __expectNonNull(input[_rA], `resourceArn`)],
233
- });
234
- let body;
235
- b.m("GET").h(headers).q(query).b(body);
236
- return b.build();
237
- };
238
- export const se_ListTrustAnchorsCommand = async (input, context) => {
239
- const b = rb(input, context);
240
- const headers = {};
241
- b.bp("/trustanchors");
242
- const query = map({
243
- [_nT]: [, input[_nT]],
244
- [_pS]: [() => input.pageSize !== void 0, () => input[_pS].toString()],
245
- });
246
- let body;
247
- b.m("GET").h(headers).q(query).b(body);
248
- return b.build();
249
- };
250
- export const se_PutAttributeMappingCommand = async (input, context) => {
251
- const b = rb(input, context);
252
- const headers = {
253
- "content-type": "application/json",
254
- };
255
- b.bp("/profiles/{profileId}/mappings");
256
- b.p("profileId", () => input.profileId, "{profileId}", false);
257
- let body;
258
- body = JSON.stringify(take(input, {
259
- certificateField: [],
260
- mappingRules: (_) => _json(_),
261
- }));
262
- b.m("PUT").h(headers).b(body);
263
- return b.build();
264
- };
265
- export const se_PutNotificationSettingsCommand = async (input, context) => {
266
- const b = rb(input, context);
267
- const headers = {
268
- "content-type": "application/json",
269
- };
270
- b.bp("/put-notifications-settings");
271
- let body;
272
- body = JSON.stringify(take(input, {
273
- notificationSettings: (_) => _json(_),
274
- trustAnchorId: [],
275
- }));
276
- b.m("PATCH").h(headers).b(body);
277
- return b.build();
278
- };
279
- export const se_ResetNotificationSettingsCommand = async (input, context) => {
280
- const b = rb(input, context);
281
- const headers = {
282
- "content-type": "application/json",
283
- };
284
- b.bp("/reset-notifications-settings");
285
- let body;
286
- body = JSON.stringify(take(input, {
287
- notificationSettingKeys: (_) => _json(_),
288
- trustAnchorId: [],
289
- }));
290
- b.m("PATCH").h(headers).b(body);
291
- return b.build();
292
- };
293
- export const se_TagResourceCommand = async (input, context) => {
294
- const b = rb(input, context);
295
- const headers = {
296
- "content-type": "application/json",
297
- };
298
- b.bp("/TagResource");
299
- let body;
300
- body = JSON.stringify(take(input, {
301
- resourceArn: [],
302
- tags: (_) => _json(_),
303
- }));
304
- b.m("POST").h(headers).b(body);
305
- return b.build();
306
- };
307
- export const se_UntagResourceCommand = async (input, context) => {
308
- const b = rb(input, context);
309
- const headers = {
310
- "content-type": "application/json",
311
- };
312
- b.bp("/UntagResource");
313
- let body;
314
- body = JSON.stringify(take(input, {
315
- resourceArn: [],
316
- tagKeys: (_) => _json(_),
317
- }));
318
- b.m("POST").h(headers).b(body);
319
- return b.build();
320
- };
321
- export const se_UpdateCrlCommand = async (input, context) => {
322
- const b = rb(input, context);
323
- const headers = {
324
- "content-type": "application/json",
325
- };
326
- b.bp("/crl/{crlId}");
327
- b.p("crlId", () => input.crlId, "{crlId}", false);
328
- let body;
329
- body = JSON.stringify(take(input, {
330
- crlData: (_) => context.base64Encoder(_),
331
- name: [],
332
- }));
333
- b.m("PATCH").h(headers).b(body);
334
- return b.build();
335
- };
336
- export const se_UpdateProfileCommand = async (input, context) => {
337
- const b = rb(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(take(input, {
345
- acceptRoleSessionName: [],
346
- durationSeconds: [],
347
- managedPolicyArns: (_) => _json(_),
348
- name: [],
349
- roleArns: (_) => _json(_),
350
- sessionPolicy: [],
351
- }));
352
- b.m("PATCH").h(headers).b(body);
353
- return b.build();
354
- };
355
- export const se_UpdateTrustAnchorCommand = async (input, context) => {
356
- const b = rb(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(take(input, {
364
- name: [],
365
- source: (_) => _json(_),
366
- }));
367
- b.m("PATCH").h(headers).b(body);
368
- return b.build();
369
- };
370
- export const de_CreateProfileCommand = async (output, context) => {
371
- if (output.statusCode !== 201 && output.statusCode >= 300) {
372
- return de_CommandError(output, context);
373
- }
374
- const contents = map({
375
- $metadata: deserializeMetadata(output),
376
- });
377
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
378
- const doc = take(data, {
379
- profile: (_) => de_ProfileDetail(_, context),
380
- });
381
- Object.assign(contents, doc);
382
- return contents;
383
- };
384
- export const de_CreateTrustAnchorCommand = async (output, context) => {
385
- if (output.statusCode !== 201 && output.statusCode >= 300) {
386
- return de_CommandError(output, context);
387
- }
388
- const contents = map({
389
- $metadata: deserializeMetadata(output),
390
- });
391
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
392
- const doc = take(data, {
393
- trustAnchor: (_) => de_TrustAnchorDetail(_, context),
394
- });
395
- Object.assign(contents, doc);
396
- return contents;
397
- };
398
- export const de_DeleteAttributeMappingCommand = async (output, context) => {
399
- if (output.statusCode !== 200 && output.statusCode >= 300) {
400
- return de_CommandError(output, context);
401
- }
402
- const contents = map({
403
- $metadata: deserializeMetadata(output),
404
- });
405
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
406
- const doc = take(data, {
407
- profile: (_) => de_ProfileDetail(_, context),
408
- });
409
- Object.assign(contents, doc);
410
- return contents;
411
- };
412
- export const de_DeleteCrlCommand = async (output, context) => {
413
- if (output.statusCode !== 200 && output.statusCode >= 300) {
414
- return de_CommandError(output, context);
415
- }
416
- const contents = map({
417
- $metadata: deserializeMetadata(output),
418
- });
419
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
420
- const doc = take(data, {
421
- crl: (_) => de_CrlDetail(_, context),
422
- });
423
- Object.assign(contents, doc);
424
- return contents;
425
- };
426
- export const de_DeleteProfileCommand = async (output, context) => {
427
- if (output.statusCode !== 200 && output.statusCode >= 300) {
428
- return de_CommandError(output, context);
429
- }
430
- const contents = map({
431
- $metadata: deserializeMetadata(output),
432
- });
433
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
434
- const doc = take(data, {
435
- profile: (_) => de_ProfileDetail(_, context),
436
- });
437
- Object.assign(contents, doc);
438
- return contents;
439
- };
440
- export const de_DeleteTrustAnchorCommand = async (output, context) => {
441
- if (output.statusCode !== 200 && output.statusCode >= 300) {
442
- return de_CommandError(output, context);
443
- }
444
- const contents = map({
445
- $metadata: deserializeMetadata(output),
446
- });
447
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
448
- const doc = take(data, {
449
- trustAnchor: (_) => de_TrustAnchorDetail(_, context),
450
- });
451
- Object.assign(contents, doc);
452
- return contents;
453
- };
454
- export const de_DisableCrlCommand = async (output, context) => {
455
- if (output.statusCode !== 200 && output.statusCode >= 300) {
456
- return de_CommandError(output, context);
457
- }
458
- const contents = map({
459
- $metadata: deserializeMetadata(output),
460
- });
461
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
462
- const doc = take(data, {
463
- crl: (_) => de_CrlDetail(_, context),
464
- });
465
- Object.assign(contents, doc);
466
- return contents;
467
- };
468
- export const de_DisableProfileCommand = async (output, context) => {
469
- if (output.statusCode !== 200 && output.statusCode >= 300) {
470
- return de_CommandError(output, context);
471
- }
472
- const contents = map({
473
- $metadata: deserializeMetadata(output),
474
- });
475
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
476
- const doc = take(data, {
477
- profile: (_) => de_ProfileDetail(_, context),
478
- });
479
- Object.assign(contents, doc);
480
- return contents;
481
- };
482
- export const de_DisableTrustAnchorCommand = async (output, context) => {
483
- if (output.statusCode !== 200 && output.statusCode >= 300) {
484
- return de_CommandError(output, context);
485
- }
486
- const contents = map({
487
- $metadata: deserializeMetadata(output),
488
- });
489
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
490
- const doc = take(data, {
491
- trustAnchor: (_) => de_TrustAnchorDetail(_, context),
492
- });
493
- Object.assign(contents, doc);
494
- return contents;
495
- };
496
- export const de_EnableCrlCommand = async (output, context) => {
497
- if (output.statusCode !== 200 && output.statusCode >= 300) {
498
- return de_CommandError(output, context);
499
- }
500
- const contents = map({
501
- $metadata: deserializeMetadata(output),
502
- });
503
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
504
- const doc = take(data, {
505
- crl: (_) => de_CrlDetail(_, context),
506
- });
507
- Object.assign(contents, doc);
508
- return contents;
509
- };
510
- export const de_EnableProfileCommand = async (output, context) => {
511
- if (output.statusCode !== 200 && output.statusCode >= 300) {
512
- return de_CommandError(output, context);
513
- }
514
- const contents = map({
515
- $metadata: deserializeMetadata(output),
516
- });
517
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
518
- const doc = take(data, {
519
- profile: (_) => de_ProfileDetail(_, context),
520
- });
521
- Object.assign(contents, doc);
522
- return contents;
523
- };
524
- export const de_EnableTrustAnchorCommand = async (output, context) => {
525
- if (output.statusCode !== 200 && output.statusCode >= 300) {
526
- return de_CommandError(output, context);
527
- }
528
- const contents = map({
529
- $metadata: deserializeMetadata(output),
530
- });
531
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
532
- const doc = take(data, {
533
- trustAnchor: (_) => de_TrustAnchorDetail(_, context),
534
- });
535
- Object.assign(contents, doc);
536
- return contents;
537
- };
538
- export const de_GetCrlCommand = async (output, context) => {
539
- if (output.statusCode !== 200 && output.statusCode >= 300) {
540
- return de_CommandError(output, context);
541
- }
542
- const contents = map({
543
- $metadata: deserializeMetadata(output),
544
- });
545
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
546
- const doc = take(data, {
547
- crl: (_) => de_CrlDetail(_, context),
548
- });
549
- Object.assign(contents, doc);
550
- return contents;
551
- };
552
- export const de_GetProfileCommand = async (output, context) => {
553
- if (output.statusCode !== 200 && output.statusCode >= 300) {
554
- return de_CommandError(output, context);
555
- }
556
- const contents = map({
557
- $metadata: deserializeMetadata(output),
558
- });
559
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
560
- const doc = take(data, {
561
- profile: (_) => de_ProfileDetail(_, context),
562
- });
563
- Object.assign(contents, doc);
564
- return contents;
565
- };
566
- export const de_GetSubjectCommand = async (output, context) => {
567
- if (output.statusCode !== 200 && output.statusCode >= 300) {
568
- return de_CommandError(output, context);
569
- }
570
- const contents = map({
571
- $metadata: deserializeMetadata(output),
572
- });
573
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
574
- const doc = take(data, {
575
- subject: (_) => de_SubjectDetail(_, context),
576
- });
577
- Object.assign(contents, doc);
578
- return contents;
579
- };
580
- export const de_GetTrustAnchorCommand = async (output, context) => {
581
- if (output.statusCode !== 200 && output.statusCode >= 300) {
582
- return de_CommandError(output, context);
583
- }
584
- const contents = map({
585
- $metadata: deserializeMetadata(output),
586
- });
587
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
588
- const doc = take(data, {
589
- trustAnchor: (_) => de_TrustAnchorDetail(_, context),
590
- });
591
- Object.assign(contents, doc);
592
- return contents;
593
- };
594
- export const de_ImportCrlCommand = async (output, context) => {
595
- if (output.statusCode !== 201 && output.statusCode >= 300) {
596
- return de_CommandError(output, context);
597
- }
598
- const contents = map({
599
- $metadata: deserializeMetadata(output),
600
- });
601
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
602
- const doc = take(data, {
603
- crl: (_) => de_CrlDetail(_, context),
604
- });
605
- Object.assign(contents, doc);
606
- return contents;
607
- };
608
- export const de_ListCrlsCommand = async (output, context) => {
609
- if (output.statusCode !== 200 && output.statusCode >= 300) {
610
- return de_CommandError(output, context);
611
- }
612
- const contents = map({
613
- $metadata: deserializeMetadata(output),
614
- });
615
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
616
- const doc = take(data, {
617
- crls: (_) => de_CrlDetails(_, context),
618
- nextToken: __expectString,
619
- });
620
- Object.assign(contents, doc);
621
- return contents;
622
- };
623
- export const de_ListProfilesCommand = async (output, context) => {
624
- if (output.statusCode !== 200 && output.statusCode >= 300) {
625
- return de_CommandError(output, context);
626
- }
627
- const contents = map({
628
- $metadata: deserializeMetadata(output),
629
- });
630
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
631
- const doc = take(data, {
632
- nextToken: __expectString,
633
- profiles: (_) => de_ProfileDetails(_, context),
634
- });
635
- Object.assign(contents, doc);
636
- return contents;
637
- };
638
- export const de_ListSubjectsCommand = async (output, context) => {
639
- if (output.statusCode !== 200 && output.statusCode >= 300) {
640
- return de_CommandError(output, context);
641
- }
642
- const contents = map({
643
- $metadata: deserializeMetadata(output),
644
- });
645
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
646
- const doc = take(data, {
647
- nextToken: __expectString,
648
- subjects: (_) => de_SubjectSummaries(_, context),
649
- });
650
- Object.assign(contents, doc);
651
- return contents;
652
- };
653
- export const de_ListTagsForResourceCommand = async (output, context) => {
654
- if (output.statusCode !== 200 && output.statusCode >= 300) {
655
- return de_CommandError(output, context);
656
- }
657
- const contents = map({
658
- $metadata: deserializeMetadata(output),
659
- });
660
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
661
- const doc = take(data, {
662
- tags: _json,
663
- });
664
- Object.assign(contents, doc);
665
- return contents;
666
- };
667
- export const de_ListTrustAnchorsCommand = async (output, context) => {
668
- if (output.statusCode !== 200 && output.statusCode >= 300) {
669
- return de_CommandError(output, context);
670
- }
671
- const contents = map({
672
- $metadata: deserializeMetadata(output),
673
- });
674
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
675
- const doc = take(data, {
676
- nextToken: __expectString,
677
- trustAnchors: (_) => de_TrustAnchorDetails(_, context),
678
- });
679
- Object.assign(contents, doc);
680
- return contents;
681
- };
682
- export const de_PutAttributeMappingCommand = async (output, context) => {
683
- if (output.statusCode !== 200 && output.statusCode >= 300) {
684
- return de_CommandError(output, context);
685
- }
686
- const contents = map({
687
- $metadata: deserializeMetadata(output),
688
- });
689
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
690
- const doc = take(data, {
691
- profile: (_) => de_ProfileDetail(_, context),
692
- });
693
- Object.assign(contents, doc);
694
- return contents;
695
- };
696
- export const de_PutNotificationSettingsCommand = async (output, context) => {
697
- if (output.statusCode !== 200 && output.statusCode >= 300) {
698
- return de_CommandError(output, context);
699
- }
700
- const contents = map({
701
- $metadata: deserializeMetadata(output),
702
- });
703
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
704
- const doc = take(data, {
705
- trustAnchor: (_) => de_TrustAnchorDetail(_, context),
706
- });
707
- Object.assign(contents, doc);
708
- return contents;
709
- };
710
- export const de_ResetNotificationSettingsCommand = async (output, context) => {
711
- if (output.statusCode !== 200 && output.statusCode >= 300) {
712
- return de_CommandError(output, context);
713
- }
714
- const contents = map({
715
- $metadata: deserializeMetadata(output),
716
- });
717
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
718
- const doc = take(data, {
719
- trustAnchor: (_) => de_TrustAnchorDetail(_, context),
720
- });
721
- Object.assign(contents, doc);
722
- return contents;
723
- };
724
- export const de_TagResourceCommand = async (output, context) => {
725
- if (output.statusCode !== 201 && output.statusCode >= 300) {
726
- return de_CommandError(output, context);
727
- }
728
- const contents = map({
729
- $metadata: deserializeMetadata(output),
730
- });
731
- await collectBody(output.body, context);
732
- return contents;
733
- };
734
- export const de_UntagResourceCommand = async (output, context) => {
735
- if (output.statusCode !== 200 && output.statusCode >= 300) {
736
- return de_CommandError(output, context);
737
- }
738
- const contents = map({
739
- $metadata: deserializeMetadata(output),
740
- });
741
- await collectBody(output.body, context);
742
- return contents;
743
- };
744
- export const de_UpdateCrlCommand = async (output, context) => {
745
- if (output.statusCode !== 200 && output.statusCode >= 300) {
746
- return de_CommandError(output, context);
747
- }
748
- const contents = map({
749
- $metadata: deserializeMetadata(output),
750
- });
751
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
752
- const doc = take(data, {
753
- crl: (_) => de_CrlDetail(_, context),
754
- });
755
- Object.assign(contents, doc);
756
- return contents;
757
- };
758
- export const de_UpdateProfileCommand = async (output, context) => {
759
- if (output.statusCode !== 200 && output.statusCode >= 300) {
760
- return de_CommandError(output, context);
761
- }
762
- const contents = map({
763
- $metadata: deserializeMetadata(output),
764
- });
765
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
766
- const doc = take(data, {
767
- profile: (_) => de_ProfileDetail(_, context),
768
- });
769
- Object.assign(contents, doc);
770
- return contents;
771
- };
772
- export const de_UpdateTrustAnchorCommand = async (output, context) => {
773
- if (output.statusCode !== 200 && output.statusCode >= 300) {
774
- return de_CommandError(output, context);
775
- }
776
- const contents = map({
777
- $metadata: deserializeMetadata(output),
778
- });
779
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
780
- const doc = take(data, {
781
- trustAnchor: (_) => de_TrustAnchorDetail(_, context),
782
- });
783
- Object.assign(contents, doc);
784
- return contents;
785
- };
786
- const de_CommandError = async (output, context) => {
787
- const parsedOutput = {
788
- ...output,
789
- body: await parseErrorBody(output.body, context),
790
- };
791
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
792
- switch (errorCode) {
793
- case "AccessDeniedException":
794
- case "com.amazonaws.rolesanywhere#AccessDeniedException":
795
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
796
- case "ValidationException":
797
- case "com.amazonaws.rolesanywhere#ValidationException":
798
- throw await de_ValidationExceptionRes(parsedOutput, context);
799
- case "ResourceNotFoundException":
800
- case "com.amazonaws.rolesanywhere#ResourceNotFoundException":
801
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
802
- case "TooManyTagsException":
803
- case "com.amazonaws.rolesanywhere#TooManyTagsException":
804
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
805
- default:
806
- const parsedBody = parsedOutput.body;
807
- return throwDefaultError({
808
- output,
809
- parsedBody,
810
- errorCode,
811
- });
812
- }
813
- };
814
- const throwDefaultError = withBaseException(__BaseException);
815
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
816
- const contents = map({});
817
- const data = parsedOutput.body;
818
- const doc = take(data, {
819
- message: __expectString,
820
- });
821
- Object.assign(contents, doc);
822
- const exception = new AccessDeniedException({
823
- $metadata: deserializeMetadata(parsedOutput),
824
- ...contents,
825
- });
826
- return __decorateServiceException(exception, parsedOutput.body);
827
- };
828
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
829
- const contents = map({});
830
- const data = parsedOutput.body;
831
- const doc = take(data, {
832
- message: __expectString,
833
- });
834
- Object.assign(contents, doc);
835
- const exception = new ResourceNotFoundException({
836
- $metadata: deserializeMetadata(parsedOutput),
837
- ...contents,
838
- });
839
- return __decorateServiceException(exception, parsedOutput.body);
840
- };
841
- const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
842
- const contents = map({});
843
- const data = parsedOutput.body;
844
- const doc = take(data, {
845
- message: __expectString,
846
- });
847
- Object.assign(contents, doc);
848
- const exception = new TooManyTagsException({
849
- $metadata: deserializeMetadata(parsedOutput),
850
- ...contents,
851
- });
852
- return __decorateServiceException(exception, parsedOutput.body);
853
- };
854
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
855
- const contents = map({});
856
- const data = parsedOutput.body;
857
- const doc = take(data, {
858
- message: __expectString,
859
- });
860
- Object.assign(contents, doc);
861
- const exception = new ValidationException({
862
- $metadata: deserializeMetadata(parsedOutput),
863
- ...contents,
864
- });
865
- return __decorateServiceException(exception, parsedOutput.body);
866
- };
867
- const de_CredentialSummaries = (output, context) => {
868
- const retVal = (output || [])
869
- .filter((e) => e != null)
870
- .map((entry) => {
871
- return de_CredentialSummary(entry, context);
872
- });
873
- return retVal;
874
- };
875
- const de_CredentialSummary = (output, context) => {
876
- return take(output, {
877
- enabled: __expectBoolean,
878
- failed: __expectBoolean,
879
- issuer: __expectString,
880
- seenAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
881
- serialNumber: __expectString,
882
- x509CertificateData: __expectString,
883
- });
884
- };
885
- const de_CrlDetail = (output, context) => {
886
- return take(output, {
887
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
888
- crlArn: __expectString,
889
- crlData: context.base64Decoder,
890
- crlId: __expectString,
891
- enabled: __expectBoolean,
892
- name: __expectString,
893
- trustAnchorArn: __expectString,
894
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
895
- });
896
- };
897
- const de_CrlDetails = (output, context) => {
898
- const retVal = (output || [])
899
- .filter((e) => e != null)
900
- .map((entry) => {
901
- return de_CrlDetail(entry, context);
902
- });
903
- return retVal;
904
- };
905
- const de_InstanceProperties = (output, context) => {
906
- const retVal = (output || [])
907
- .filter((e) => e != null)
908
- .map((entry) => {
909
- return de_InstanceProperty(entry, context);
910
- });
911
- return retVal;
912
- };
913
- const de_InstanceProperty = (output, context) => {
914
- return take(output, {
915
- failed: __expectBoolean,
916
- properties: _json,
917
- seenAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
918
- });
919
- };
920
- const de_ProfileDetail = (output, context) => {
921
- return take(output, {
922
- acceptRoleSessionName: __expectBoolean,
923
- attributeMappings: _json,
924
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
925
- createdBy: __expectString,
926
- durationSeconds: __expectInt32,
927
- enabled: __expectBoolean,
928
- managedPolicyArns: _json,
929
- name: __expectString,
930
- profileArn: __expectString,
931
- profileId: __expectString,
932
- requireInstanceProperties: __expectBoolean,
933
- roleArns: _json,
934
- sessionPolicy: __expectString,
935
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
936
- });
937
- };
938
- const de_ProfileDetails = (output, context) => {
939
- const retVal = (output || [])
940
- .filter((e) => e != null)
941
- .map((entry) => {
942
- return de_ProfileDetail(entry, context);
943
- });
944
- return retVal;
945
- };
946
- const de_SubjectDetail = (output, context) => {
947
- return take(output, {
948
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
949
- credentials: (_) => de_CredentialSummaries(_, context),
950
- enabled: __expectBoolean,
951
- instanceProperties: (_) => de_InstanceProperties(_, context),
952
- lastSeenAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
953
- subjectArn: __expectString,
954
- subjectId: __expectString,
955
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
956
- x509Subject: __expectString,
957
- });
958
- };
959
- const de_SubjectSummaries = (output, context) => {
960
- const retVal = (output || [])
961
- .filter((e) => e != null)
962
- .map((entry) => {
963
- return de_SubjectSummary(entry, context);
964
- });
965
- return retVal;
966
- };
967
- const de_SubjectSummary = (output, context) => {
968
- return take(output, {
969
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
970
- enabled: __expectBoolean,
971
- lastSeenAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
972
- subjectArn: __expectString,
973
- subjectId: __expectString,
974
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
975
- x509Subject: __expectString,
976
- });
977
- };
978
- const de_TrustAnchorDetail = (output, context) => {
979
- return take(output, {
980
- createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
981
- enabled: __expectBoolean,
982
- name: __expectString,
983
- notificationSettings: _json,
984
- source: _json,
985
- trustAnchorArn: __expectString,
986
- trustAnchorId: __expectString,
987
- updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
988
- });
989
- };
990
- const de_TrustAnchorDetails = (output, context) => {
991
- const retVal = (output || [])
992
- .filter((e) => e != null)
993
- .map((entry) => {
994
- return de_TrustAnchorDetail(entry, context);
995
- });
996
- return retVal;
997
- };
998
- const deserializeMetadata = (output) => ({
999
- httpStatusCode: output.statusCode,
1000
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1001
- extendedRequestId: output.headers["x-amz-id-2"],
1002
- cfId: output.headers["x-amz-cf-id"],
1003
- });
1004
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1005
- const _cF = "certificateField";
1006
- const _nT = "nextToken";
1007
- const _pS = "pageSize";
1008
- const _rA = "resourceArn";
1009
- const _s = "specifiers";