@aws-sdk/client-acm-pca 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 (51) hide show
  1. package/dist-cjs/index.js +902 -988
  2. package/dist-cjs/runtimeConfig.shared.js +7 -0
  3. package/dist-es/ACMPCAClient.js +2 -0
  4. package/dist-es/commands/CreateCertificateAuthorityAuditReportCommand.js +3 -9
  5. package/dist-es/commands/CreateCertificateAuthorityCommand.js +3 -9
  6. package/dist-es/commands/CreatePermissionCommand.js +3 -9
  7. package/dist-es/commands/DeleteCertificateAuthorityCommand.js +3 -9
  8. package/dist-es/commands/DeletePermissionCommand.js +3 -9
  9. package/dist-es/commands/DeletePolicyCommand.js +3 -9
  10. package/dist-es/commands/DescribeCertificateAuthorityAuditReportCommand.js +3 -9
  11. package/dist-es/commands/DescribeCertificateAuthorityCommand.js +3 -9
  12. package/dist-es/commands/GetCertificateAuthorityCertificateCommand.js +3 -9
  13. package/dist-es/commands/GetCertificateAuthorityCsrCommand.js +3 -9
  14. package/dist-es/commands/GetCertificateCommand.js +3 -9
  15. package/dist-es/commands/GetPolicyCommand.js +3 -9
  16. package/dist-es/commands/ImportCertificateAuthorityCertificateCommand.js +3 -9
  17. package/dist-es/commands/IssueCertificateCommand.js +3 -9
  18. package/dist-es/commands/ListCertificateAuthoritiesCommand.js +3 -9
  19. package/dist-es/commands/ListPermissionsCommand.js +3 -9
  20. package/dist-es/commands/ListTagsCommand.js +3 -9
  21. package/dist-es/commands/PutPolicyCommand.js +3 -9
  22. package/dist-es/commands/RestoreCertificateAuthorityCommand.js +3 -9
  23. package/dist-es/commands/RevokeCertificateCommand.js +3 -9
  24. package/dist-es/commands/TagCertificateAuthorityCommand.js +3 -9
  25. package/dist-es/commands/UntagCertificateAuthorityCommand.js +3 -9
  26. package/dist-es/commands/UpdateCertificateAuthorityCommand.js +3 -9
  27. package/dist-es/models/models_0.js +6 -0
  28. package/dist-es/runtimeConfig.shared.js +7 -0
  29. package/dist-es/schemas/schemas_0.js +792 -0
  30. package/dist-types/ACMPCAClient.d.ts +10 -1
  31. package/dist-types/commands/CreateCertificateAuthorityCommand.d.ts +2 -2
  32. package/dist-types/commands/DescribeCertificateAuthorityCommand.d.ts +2 -2
  33. package/dist-types/commands/IssueCertificateCommand.d.ts +1 -1
  34. package/dist-types/commands/ListCertificateAuthoritiesCommand.d.ts +2 -2
  35. package/dist-types/models/models_0.d.ts +6 -0
  36. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  37. package/dist-types/runtimeConfig.d.ts +1 -0
  38. package/dist-types/runtimeConfig.native.d.ts +1 -0
  39. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  40. package/dist-types/schemas/schemas_0.d.ts +116 -0
  41. package/dist-types/ts3.4/ACMPCAClient.d.ts +4 -0
  42. package/dist-types/ts3.4/models/models_0.d.ts +6 -0
  43. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  44. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  45. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  46. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  47. package/dist-types/ts3.4/schemas/schemas_0.d.ts +121 -0
  48. package/package.json +5 -5
  49. package/dist-es/protocols/Aws_json1_1.js +0 -774
  50. package/dist-types/protocols/Aws_json1_1.d.ts +0 -209
  51. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +0 -281
@@ -1,774 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
4
- import { ACMPCAServiceException as __BaseException } from "../models/ACMPCAServiceException";
5
- import { CertificateMismatchException, ConcurrentModificationException, InvalidArgsException, InvalidArnException, InvalidNextTokenException, InvalidPolicyException, InvalidRequestException, InvalidStateException, InvalidTagException, LimitExceededException, LockoutPreventedException, MalformedCertificateException, MalformedCSRException, PermissionAlreadyExistsException, RequestAlreadyProcessedException, RequestFailedException, RequestInProgressException, ResourceNotFoundException, TooManyTagsException, } from "../models/models_0";
6
- export const se_CreateCertificateAuthorityCommand = async (input, context) => {
7
- const headers = sharedHeaders("CreateCertificateAuthority");
8
- let body;
9
- body = JSON.stringify(_json(input));
10
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
11
- };
12
- export const se_CreateCertificateAuthorityAuditReportCommand = async (input, context) => {
13
- const headers = sharedHeaders("CreateCertificateAuthorityAuditReport");
14
- let body;
15
- body = JSON.stringify(_json(input));
16
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
- };
18
- export const se_CreatePermissionCommand = async (input, context) => {
19
- const headers = sharedHeaders("CreatePermission");
20
- let body;
21
- body = JSON.stringify(_json(input));
22
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
- };
24
- export const se_DeleteCertificateAuthorityCommand = async (input, context) => {
25
- const headers = sharedHeaders("DeleteCertificateAuthority");
26
- let body;
27
- body = JSON.stringify(_json(input));
28
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
29
- };
30
- export const se_DeletePermissionCommand = async (input, context) => {
31
- const headers = sharedHeaders("DeletePermission");
32
- let body;
33
- body = JSON.stringify(_json(input));
34
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
- };
36
- export const se_DeletePolicyCommand = async (input, context) => {
37
- const headers = sharedHeaders("DeletePolicy");
38
- let body;
39
- body = JSON.stringify(_json(input));
40
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
- };
42
- export const se_DescribeCertificateAuthorityCommand = async (input, context) => {
43
- const headers = sharedHeaders("DescribeCertificateAuthority");
44
- let body;
45
- body = JSON.stringify(_json(input));
46
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
47
- };
48
- export const se_DescribeCertificateAuthorityAuditReportCommand = async (input, context) => {
49
- const headers = sharedHeaders("DescribeCertificateAuthorityAuditReport");
50
- let body;
51
- body = JSON.stringify(_json(input));
52
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
53
- };
54
- export const se_GetCertificateCommand = async (input, context) => {
55
- const headers = sharedHeaders("GetCertificate");
56
- let body;
57
- body = JSON.stringify(_json(input));
58
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
- };
60
- export const se_GetCertificateAuthorityCertificateCommand = async (input, context) => {
61
- const headers = sharedHeaders("GetCertificateAuthorityCertificate");
62
- let body;
63
- body = JSON.stringify(_json(input));
64
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
65
- };
66
- export const se_GetCertificateAuthorityCsrCommand = async (input, context) => {
67
- const headers = sharedHeaders("GetCertificateAuthorityCsr");
68
- let body;
69
- body = JSON.stringify(_json(input));
70
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
71
- };
72
- export const se_GetPolicyCommand = async (input, context) => {
73
- const headers = sharedHeaders("GetPolicy");
74
- let body;
75
- body = JSON.stringify(_json(input));
76
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
- };
78
- export const se_ImportCertificateAuthorityCertificateCommand = async (input, context) => {
79
- const headers = sharedHeaders("ImportCertificateAuthorityCertificate");
80
- let body;
81
- body = JSON.stringify(se_ImportCertificateAuthorityCertificateRequest(input, context));
82
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
83
- };
84
- export const se_IssueCertificateCommand = async (input, context) => {
85
- const headers = sharedHeaders("IssueCertificate");
86
- let body;
87
- body = JSON.stringify(se_IssueCertificateRequest(input, context));
88
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
89
- };
90
- export const se_ListCertificateAuthoritiesCommand = async (input, context) => {
91
- const headers = sharedHeaders("ListCertificateAuthorities");
92
- let body;
93
- body = JSON.stringify(_json(input));
94
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
95
- };
96
- export const se_ListPermissionsCommand = async (input, context) => {
97
- const headers = sharedHeaders("ListPermissions");
98
- let body;
99
- body = JSON.stringify(_json(input));
100
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
101
- };
102
- export const se_ListTagsCommand = async (input, context) => {
103
- const headers = sharedHeaders("ListTags");
104
- let body;
105
- body = JSON.stringify(_json(input));
106
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
107
- };
108
- export const se_PutPolicyCommand = async (input, context) => {
109
- const headers = sharedHeaders("PutPolicy");
110
- let body;
111
- body = JSON.stringify(_json(input));
112
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
- };
114
- export const se_RestoreCertificateAuthorityCommand = async (input, context) => {
115
- const headers = sharedHeaders("RestoreCertificateAuthority");
116
- let body;
117
- body = JSON.stringify(_json(input));
118
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
119
- };
120
- export const se_RevokeCertificateCommand = async (input, context) => {
121
- const headers = sharedHeaders("RevokeCertificate");
122
- let body;
123
- body = JSON.stringify(_json(input));
124
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
125
- };
126
- export const se_TagCertificateAuthorityCommand = async (input, context) => {
127
- const headers = sharedHeaders("TagCertificateAuthority");
128
- let body;
129
- body = JSON.stringify(_json(input));
130
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
131
- };
132
- export const se_UntagCertificateAuthorityCommand = async (input, context) => {
133
- const headers = sharedHeaders("UntagCertificateAuthority");
134
- let body;
135
- body = JSON.stringify(_json(input));
136
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
137
- };
138
- export const se_UpdateCertificateAuthorityCommand = async (input, context) => {
139
- const headers = sharedHeaders("UpdateCertificateAuthority");
140
- let body;
141
- body = JSON.stringify(_json(input));
142
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
143
- };
144
- export const de_CreateCertificateAuthorityCommand = async (output, context) => {
145
- if (output.statusCode >= 300) {
146
- return de_CommandError(output, context);
147
- }
148
- const data = await parseBody(output.body, context);
149
- let contents = {};
150
- contents = _json(data);
151
- const response = {
152
- $metadata: deserializeMetadata(output),
153
- ...contents,
154
- };
155
- return response;
156
- };
157
- export const de_CreateCertificateAuthorityAuditReportCommand = async (output, context) => {
158
- if (output.statusCode >= 300) {
159
- return de_CommandError(output, context);
160
- }
161
- const data = await parseBody(output.body, context);
162
- let contents = {};
163
- contents = _json(data);
164
- const response = {
165
- $metadata: deserializeMetadata(output),
166
- ...contents,
167
- };
168
- return response;
169
- };
170
- export const de_CreatePermissionCommand = async (output, context) => {
171
- if (output.statusCode >= 300) {
172
- return de_CommandError(output, context);
173
- }
174
- await collectBody(output.body, context);
175
- const response = {
176
- $metadata: deserializeMetadata(output),
177
- };
178
- return response;
179
- };
180
- export const de_DeleteCertificateAuthorityCommand = async (output, context) => {
181
- if (output.statusCode >= 300) {
182
- return de_CommandError(output, context);
183
- }
184
- await collectBody(output.body, context);
185
- const response = {
186
- $metadata: deserializeMetadata(output),
187
- };
188
- return response;
189
- };
190
- export const de_DeletePermissionCommand = async (output, context) => {
191
- if (output.statusCode >= 300) {
192
- return de_CommandError(output, context);
193
- }
194
- await collectBody(output.body, context);
195
- const response = {
196
- $metadata: deserializeMetadata(output),
197
- };
198
- return response;
199
- };
200
- export const de_DeletePolicyCommand = async (output, context) => {
201
- if (output.statusCode >= 300) {
202
- return de_CommandError(output, context);
203
- }
204
- await collectBody(output.body, context);
205
- const response = {
206
- $metadata: deserializeMetadata(output),
207
- };
208
- return response;
209
- };
210
- export const de_DescribeCertificateAuthorityCommand = async (output, context) => {
211
- if (output.statusCode >= 300) {
212
- return de_CommandError(output, context);
213
- }
214
- const data = await parseBody(output.body, context);
215
- let contents = {};
216
- contents = de_DescribeCertificateAuthorityResponse(data, context);
217
- const response = {
218
- $metadata: deserializeMetadata(output),
219
- ...contents,
220
- };
221
- return response;
222
- };
223
- export const de_DescribeCertificateAuthorityAuditReportCommand = async (output, context) => {
224
- if (output.statusCode >= 300) {
225
- return de_CommandError(output, context);
226
- }
227
- const data = await parseBody(output.body, context);
228
- let contents = {};
229
- contents = de_DescribeCertificateAuthorityAuditReportResponse(data, context);
230
- const response = {
231
- $metadata: deserializeMetadata(output),
232
- ...contents,
233
- };
234
- return response;
235
- };
236
- export const de_GetCertificateCommand = async (output, context) => {
237
- if (output.statusCode >= 300) {
238
- return de_CommandError(output, context);
239
- }
240
- const data = await parseBody(output.body, context);
241
- let contents = {};
242
- contents = _json(data);
243
- const response = {
244
- $metadata: deserializeMetadata(output),
245
- ...contents,
246
- };
247
- return response;
248
- };
249
- export const de_GetCertificateAuthorityCertificateCommand = async (output, context) => {
250
- if (output.statusCode >= 300) {
251
- return de_CommandError(output, context);
252
- }
253
- const data = await parseBody(output.body, context);
254
- let contents = {};
255
- contents = _json(data);
256
- const response = {
257
- $metadata: deserializeMetadata(output),
258
- ...contents,
259
- };
260
- return response;
261
- };
262
- export const de_GetCertificateAuthorityCsrCommand = async (output, context) => {
263
- if (output.statusCode >= 300) {
264
- return de_CommandError(output, context);
265
- }
266
- const data = await parseBody(output.body, context);
267
- let contents = {};
268
- contents = _json(data);
269
- const response = {
270
- $metadata: deserializeMetadata(output),
271
- ...contents,
272
- };
273
- return response;
274
- };
275
- export const de_GetPolicyCommand = async (output, context) => {
276
- if (output.statusCode >= 300) {
277
- return de_CommandError(output, context);
278
- }
279
- const data = await parseBody(output.body, context);
280
- let contents = {};
281
- contents = _json(data);
282
- const response = {
283
- $metadata: deserializeMetadata(output),
284
- ...contents,
285
- };
286
- return response;
287
- };
288
- export const de_ImportCertificateAuthorityCertificateCommand = async (output, context) => {
289
- if (output.statusCode >= 300) {
290
- return de_CommandError(output, context);
291
- }
292
- await collectBody(output.body, context);
293
- const response = {
294
- $metadata: deserializeMetadata(output),
295
- };
296
- return response;
297
- };
298
- export const de_IssueCertificateCommand = async (output, context) => {
299
- if (output.statusCode >= 300) {
300
- return de_CommandError(output, context);
301
- }
302
- const data = await parseBody(output.body, context);
303
- let contents = {};
304
- contents = _json(data);
305
- const response = {
306
- $metadata: deserializeMetadata(output),
307
- ...contents,
308
- };
309
- return response;
310
- };
311
- export const de_ListCertificateAuthoritiesCommand = async (output, context) => {
312
- if (output.statusCode >= 300) {
313
- return de_CommandError(output, context);
314
- }
315
- const data = await parseBody(output.body, context);
316
- let contents = {};
317
- contents = de_ListCertificateAuthoritiesResponse(data, context);
318
- const response = {
319
- $metadata: deserializeMetadata(output),
320
- ...contents,
321
- };
322
- return response;
323
- };
324
- export const de_ListPermissionsCommand = async (output, context) => {
325
- if (output.statusCode >= 300) {
326
- return de_CommandError(output, context);
327
- }
328
- const data = await parseBody(output.body, context);
329
- let contents = {};
330
- contents = de_ListPermissionsResponse(data, context);
331
- const response = {
332
- $metadata: deserializeMetadata(output),
333
- ...contents,
334
- };
335
- return response;
336
- };
337
- export const de_ListTagsCommand = async (output, context) => {
338
- if (output.statusCode >= 300) {
339
- return de_CommandError(output, context);
340
- }
341
- const data = await parseBody(output.body, context);
342
- let contents = {};
343
- contents = _json(data);
344
- const response = {
345
- $metadata: deserializeMetadata(output),
346
- ...contents,
347
- };
348
- return response;
349
- };
350
- export const de_PutPolicyCommand = async (output, context) => {
351
- if (output.statusCode >= 300) {
352
- return de_CommandError(output, context);
353
- }
354
- await collectBody(output.body, context);
355
- const response = {
356
- $metadata: deserializeMetadata(output),
357
- };
358
- return response;
359
- };
360
- export const de_RestoreCertificateAuthorityCommand = async (output, context) => {
361
- if (output.statusCode >= 300) {
362
- return de_CommandError(output, context);
363
- }
364
- await collectBody(output.body, context);
365
- const response = {
366
- $metadata: deserializeMetadata(output),
367
- };
368
- return response;
369
- };
370
- export const de_RevokeCertificateCommand = async (output, context) => {
371
- if (output.statusCode >= 300) {
372
- return de_CommandError(output, context);
373
- }
374
- await collectBody(output.body, context);
375
- const response = {
376
- $metadata: deserializeMetadata(output),
377
- };
378
- return response;
379
- };
380
- export const de_TagCertificateAuthorityCommand = async (output, context) => {
381
- if (output.statusCode >= 300) {
382
- return de_CommandError(output, context);
383
- }
384
- await collectBody(output.body, context);
385
- const response = {
386
- $metadata: deserializeMetadata(output),
387
- };
388
- return response;
389
- };
390
- export const de_UntagCertificateAuthorityCommand = async (output, context) => {
391
- if (output.statusCode >= 300) {
392
- return de_CommandError(output, context);
393
- }
394
- await collectBody(output.body, context);
395
- const response = {
396
- $metadata: deserializeMetadata(output),
397
- };
398
- return response;
399
- };
400
- export const de_UpdateCertificateAuthorityCommand = async (output, context) => {
401
- if (output.statusCode >= 300) {
402
- return de_CommandError(output, context);
403
- }
404
- await collectBody(output.body, context);
405
- const response = {
406
- $metadata: deserializeMetadata(output),
407
- };
408
- return response;
409
- };
410
- const de_CommandError = async (output, context) => {
411
- const parsedOutput = {
412
- ...output,
413
- body: await parseErrorBody(output.body, context),
414
- };
415
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
416
- switch (errorCode) {
417
- case "InvalidArgsException":
418
- case "com.amazonaws.acmpca#InvalidArgsException":
419
- throw await de_InvalidArgsExceptionRes(parsedOutput, context);
420
- case "InvalidPolicyException":
421
- case "com.amazonaws.acmpca#InvalidPolicyException":
422
- throw await de_InvalidPolicyExceptionRes(parsedOutput, context);
423
- case "InvalidTagException":
424
- case "com.amazonaws.acmpca#InvalidTagException":
425
- throw await de_InvalidTagExceptionRes(parsedOutput, context);
426
- case "LimitExceededException":
427
- case "com.amazonaws.acmpca#LimitExceededException":
428
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
429
- case "InvalidArnException":
430
- case "com.amazonaws.acmpca#InvalidArnException":
431
- throw await de_InvalidArnExceptionRes(parsedOutput, context);
432
- case "InvalidStateException":
433
- case "com.amazonaws.acmpca#InvalidStateException":
434
- throw await de_InvalidStateExceptionRes(parsedOutput, context);
435
- case "RequestFailedException":
436
- case "com.amazonaws.acmpca#RequestFailedException":
437
- throw await de_RequestFailedExceptionRes(parsedOutput, context);
438
- case "RequestInProgressException":
439
- case "com.amazonaws.acmpca#RequestInProgressException":
440
- throw await de_RequestInProgressExceptionRes(parsedOutput, context);
441
- case "ResourceNotFoundException":
442
- case "com.amazonaws.acmpca#ResourceNotFoundException":
443
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
444
- case "PermissionAlreadyExistsException":
445
- case "com.amazonaws.acmpca#PermissionAlreadyExistsException":
446
- throw await de_PermissionAlreadyExistsExceptionRes(parsedOutput, context);
447
- case "ConcurrentModificationException":
448
- case "com.amazonaws.acmpca#ConcurrentModificationException":
449
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
450
- case "LockoutPreventedException":
451
- case "com.amazonaws.acmpca#LockoutPreventedException":
452
- throw await de_LockoutPreventedExceptionRes(parsedOutput, context);
453
- case "CertificateMismatchException":
454
- case "com.amazonaws.acmpca#CertificateMismatchException":
455
- throw await de_CertificateMismatchExceptionRes(parsedOutput, context);
456
- case "InvalidRequestException":
457
- case "com.amazonaws.acmpca#InvalidRequestException":
458
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
459
- case "MalformedCertificateException":
460
- case "com.amazonaws.acmpca#MalformedCertificateException":
461
- throw await de_MalformedCertificateExceptionRes(parsedOutput, context);
462
- case "MalformedCSRException":
463
- case "com.amazonaws.acmpca#MalformedCSRException":
464
- throw await de_MalformedCSRExceptionRes(parsedOutput, context);
465
- case "InvalidNextTokenException":
466
- case "com.amazonaws.acmpca#InvalidNextTokenException":
467
- throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
468
- case "RequestAlreadyProcessedException":
469
- case "com.amazonaws.acmpca#RequestAlreadyProcessedException":
470
- throw await de_RequestAlreadyProcessedExceptionRes(parsedOutput, context);
471
- case "TooManyTagsException":
472
- case "com.amazonaws.acmpca#TooManyTagsException":
473
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
474
- default:
475
- const parsedBody = parsedOutput.body;
476
- return throwDefaultError({
477
- output,
478
- parsedBody,
479
- errorCode,
480
- });
481
- }
482
- };
483
- const de_CertificateMismatchExceptionRes = async (parsedOutput, context) => {
484
- const body = parsedOutput.body;
485
- const deserialized = _json(body);
486
- const exception = new CertificateMismatchException({
487
- $metadata: deserializeMetadata(parsedOutput),
488
- ...deserialized,
489
- });
490
- return __decorateServiceException(exception, body);
491
- };
492
- const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
493
- const body = parsedOutput.body;
494
- const deserialized = _json(body);
495
- const exception = new ConcurrentModificationException({
496
- $metadata: deserializeMetadata(parsedOutput),
497
- ...deserialized,
498
- });
499
- return __decorateServiceException(exception, body);
500
- };
501
- const de_InvalidArgsExceptionRes = async (parsedOutput, context) => {
502
- const body = parsedOutput.body;
503
- const deserialized = _json(body);
504
- const exception = new InvalidArgsException({
505
- $metadata: deserializeMetadata(parsedOutput),
506
- ...deserialized,
507
- });
508
- return __decorateServiceException(exception, body);
509
- };
510
- const de_InvalidArnExceptionRes = async (parsedOutput, context) => {
511
- const body = parsedOutput.body;
512
- const deserialized = _json(body);
513
- const exception = new InvalidArnException({
514
- $metadata: deserializeMetadata(parsedOutput),
515
- ...deserialized,
516
- });
517
- return __decorateServiceException(exception, body);
518
- };
519
- const de_InvalidNextTokenExceptionRes = async (parsedOutput, context) => {
520
- const body = parsedOutput.body;
521
- const deserialized = _json(body);
522
- const exception = new InvalidNextTokenException({
523
- $metadata: deserializeMetadata(parsedOutput),
524
- ...deserialized,
525
- });
526
- return __decorateServiceException(exception, body);
527
- };
528
- const de_InvalidPolicyExceptionRes = async (parsedOutput, context) => {
529
- const body = parsedOutput.body;
530
- const deserialized = _json(body);
531
- const exception = new InvalidPolicyException({
532
- $metadata: deserializeMetadata(parsedOutput),
533
- ...deserialized,
534
- });
535
- return __decorateServiceException(exception, body);
536
- };
537
- const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
538
- const body = parsedOutput.body;
539
- const deserialized = _json(body);
540
- const exception = new InvalidRequestException({
541
- $metadata: deserializeMetadata(parsedOutput),
542
- ...deserialized,
543
- });
544
- return __decorateServiceException(exception, body);
545
- };
546
- const de_InvalidStateExceptionRes = async (parsedOutput, context) => {
547
- const body = parsedOutput.body;
548
- const deserialized = _json(body);
549
- const exception = new InvalidStateException({
550
- $metadata: deserializeMetadata(parsedOutput),
551
- ...deserialized,
552
- });
553
- return __decorateServiceException(exception, body);
554
- };
555
- const de_InvalidTagExceptionRes = async (parsedOutput, context) => {
556
- const body = parsedOutput.body;
557
- const deserialized = _json(body);
558
- const exception = new InvalidTagException({
559
- $metadata: deserializeMetadata(parsedOutput),
560
- ...deserialized,
561
- });
562
- return __decorateServiceException(exception, body);
563
- };
564
- const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
565
- const body = parsedOutput.body;
566
- const deserialized = _json(body);
567
- const exception = new LimitExceededException({
568
- $metadata: deserializeMetadata(parsedOutput),
569
- ...deserialized,
570
- });
571
- return __decorateServiceException(exception, body);
572
- };
573
- const de_LockoutPreventedExceptionRes = async (parsedOutput, context) => {
574
- const body = parsedOutput.body;
575
- const deserialized = _json(body);
576
- const exception = new LockoutPreventedException({
577
- $metadata: deserializeMetadata(parsedOutput),
578
- ...deserialized,
579
- });
580
- return __decorateServiceException(exception, body);
581
- };
582
- const de_MalformedCertificateExceptionRes = async (parsedOutput, context) => {
583
- const body = parsedOutput.body;
584
- const deserialized = _json(body);
585
- const exception = new MalformedCertificateException({
586
- $metadata: deserializeMetadata(parsedOutput),
587
- ...deserialized,
588
- });
589
- return __decorateServiceException(exception, body);
590
- };
591
- const de_MalformedCSRExceptionRes = async (parsedOutput, context) => {
592
- const body = parsedOutput.body;
593
- const deserialized = _json(body);
594
- const exception = new MalformedCSRException({
595
- $metadata: deserializeMetadata(parsedOutput),
596
- ...deserialized,
597
- });
598
- return __decorateServiceException(exception, body);
599
- };
600
- const de_PermissionAlreadyExistsExceptionRes = async (parsedOutput, context) => {
601
- const body = parsedOutput.body;
602
- const deserialized = _json(body);
603
- const exception = new PermissionAlreadyExistsException({
604
- $metadata: deserializeMetadata(parsedOutput),
605
- ...deserialized,
606
- });
607
- return __decorateServiceException(exception, body);
608
- };
609
- const de_RequestAlreadyProcessedExceptionRes = async (parsedOutput, context) => {
610
- const body = parsedOutput.body;
611
- const deserialized = _json(body);
612
- const exception = new RequestAlreadyProcessedException({
613
- $metadata: deserializeMetadata(parsedOutput),
614
- ...deserialized,
615
- });
616
- return __decorateServiceException(exception, body);
617
- };
618
- const de_RequestFailedExceptionRes = async (parsedOutput, context) => {
619
- const body = parsedOutput.body;
620
- const deserialized = _json(body);
621
- const exception = new RequestFailedException({
622
- $metadata: deserializeMetadata(parsedOutput),
623
- ...deserialized,
624
- });
625
- return __decorateServiceException(exception, body);
626
- };
627
- const de_RequestInProgressExceptionRes = async (parsedOutput, context) => {
628
- const body = parsedOutput.body;
629
- const deserialized = _json(body);
630
- const exception = new RequestInProgressException({
631
- $metadata: deserializeMetadata(parsedOutput),
632
- ...deserialized,
633
- });
634
- return __decorateServiceException(exception, body);
635
- };
636
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
637
- const body = parsedOutput.body;
638
- const deserialized = _json(body);
639
- const exception = new ResourceNotFoundException({
640
- $metadata: deserializeMetadata(parsedOutput),
641
- ...deserialized,
642
- });
643
- return __decorateServiceException(exception, body);
644
- };
645
- const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
646
- const body = parsedOutput.body;
647
- const deserialized = _json(body);
648
- const exception = new TooManyTagsException({
649
- $metadata: deserializeMetadata(parsedOutput),
650
- ...deserialized,
651
- });
652
- return __decorateServiceException(exception, body);
653
- };
654
- const se_ImportCertificateAuthorityCertificateRequest = (input, context) => {
655
- return take(input, {
656
- Certificate: context.base64Encoder,
657
- CertificateAuthorityArn: [],
658
- CertificateChain: context.base64Encoder,
659
- });
660
- };
661
- const se_IssueCertificateRequest = (input, context) => {
662
- return take(input, {
663
- ApiPassthrough: _json,
664
- CertificateAuthorityArn: [],
665
- Csr: context.base64Encoder,
666
- IdempotencyToken: [],
667
- SigningAlgorithm: [],
668
- TemplateArn: [],
669
- Validity: _json,
670
- ValidityNotBefore: _json,
671
- });
672
- };
673
- const de_CertificateAuthorities = (output, context) => {
674
- const retVal = (output || [])
675
- .filter((e) => e != null)
676
- .map((entry) => {
677
- return de_CertificateAuthority(entry, context);
678
- });
679
- return retVal;
680
- };
681
- const de_CertificateAuthority = (output, context) => {
682
- return take(output, {
683
- Arn: __expectString,
684
- CertificateAuthorityConfiguration: _json,
685
- CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
686
- FailureReason: __expectString,
687
- KeyStorageSecurityStandard: __expectString,
688
- LastStateChangeAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
689
- NotAfter: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
690
- NotBefore: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
691
- OwnerAccount: __expectString,
692
- RestorableUntil: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
693
- RevocationConfiguration: _json,
694
- Serial: __expectString,
695
- Status: __expectString,
696
- Type: __expectString,
697
- UsageMode: __expectString,
698
- });
699
- };
700
- const de_DescribeCertificateAuthorityAuditReportResponse = (output, context) => {
701
- return take(output, {
702
- AuditReportStatus: __expectString,
703
- CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
704
- S3BucketName: __expectString,
705
- S3Key: __expectString,
706
- });
707
- };
708
- const de_DescribeCertificateAuthorityResponse = (output, context) => {
709
- return take(output, {
710
- CertificateAuthority: (_) => de_CertificateAuthority(_, context),
711
- });
712
- };
713
- const de_ListCertificateAuthoritiesResponse = (output, context) => {
714
- return take(output, {
715
- CertificateAuthorities: (_) => de_CertificateAuthorities(_, context),
716
- NextToken: __expectString,
717
- });
718
- };
719
- const de_ListPermissionsResponse = (output, context) => {
720
- return take(output, {
721
- NextToken: __expectString,
722
- Permissions: (_) => de_PermissionList(_, context),
723
- });
724
- };
725
- const de_Permission = (output, context) => {
726
- return take(output, {
727
- Actions: _json,
728
- CertificateAuthorityArn: __expectString,
729
- CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
730
- Policy: __expectString,
731
- Principal: __expectString,
732
- SourceAccount: __expectString,
733
- });
734
- };
735
- const de_PermissionList = (output, context) => {
736
- const retVal = (output || [])
737
- .filter((e) => e != null)
738
- .map((entry) => {
739
- return de_Permission(entry, context);
740
- });
741
- return retVal;
742
- };
743
- const deserializeMetadata = (output) => ({
744
- httpStatusCode: output.statusCode,
745
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
746
- extendedRequestId: output.headers["x-amz-id-2"],
747
- cfId: output.headers["x-amz-cf-id"],
748
- });
749
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
750
- const throwDefaultError = withBaseException(__BaseException);
751
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
752
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
753
- const contents = {
754
- protocol,
755
- hostname,
756
- port,
757
- method: "POST",
758
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
759
- headers,
760
- };
761
- if (resolvedHostname !== undefined) {
762
- contents.hostname = resolvedHostname;
763
- }
764
- if (body !== undefined) {
765
- contents.body = body;
766
- }
767
- return new __HttpRequest(contents);
768
- };
769
- function sharedHeaders(operation) {
770
- return {
771
- "content-type": "application/x-amz-json-1.1",
772
- "x-amz-target": `ACMPrivateCA.${operation}`,
773
- };
774
- }