@aws-sdk/client-acm-pca 3.32.0 → 3.36.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 (311) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/{dist/cjs → dist-cjs}/ACMPCA.js +0 -1
  3. package/{dist/cjs → dist-cjs}/ACMPCAClient.js +8 -9
  4. package/{dist/cjs → dist-cjs}/commands/CreateCertificateAuthorityAuditReportCommand.js +2 -3
  5. package/{dist/cjs → dist-cjs}/commands/CreateCertificateAuthorityCommand.js +2 -3
  6. package/{dist/cjs → dist-cjs}/commands/CreatePermissionCommand.js +2 -3
  7. package/{dist/cjs → dist-cjs}/commands/DeleteCertificateAuthorityCommand.js +2 -3
  8. package/{dist/cjs → dist-cjs}/commands/DeletePermissionCommand.js +2 -3
  9. package/{dist/cjs → dist-cjs}/commands/DeletePolicyCommand.js +2 -3
  10. package/{dist/cjs → dist-cjs}/commands/DescribeCertificateAuthorityAuditReportCommand.js +2 -3
  11. package/{dist/cjs → dist-cjs}/commands/DescribeCertificateAuthorityCommand.js +2 -3
  12. package/{dist/cjs → dist-cjs}/commands/GetCertificateAuthorityCertificateCommand.js +2 -3
  13. package/{dist/cjs → dist-cjs}/commands/GetCertificateAuthorityCsrCommand.js +2 -3
  14. package/{dist/cjs → dist-cjs}/commands/GetCertificateCommand.js +2 -3
  15. package/{dist/cjs → dist-cjs}/commands/GetPolicyCommand.js +2 -3
  16. package/{dist/cjs → dist-cjs}/commands/ImportCertificateAuthorityCertificateCommand.js +2 -3
  17. package/{dist/cjs → dist-cjs}/commands/IssueCertificateCommand.js +2 -3
  18. package/{dist/cjs → dist-cjs}/commands/ListCertificateAuthoritiesCommand.js +2 -3
  19. package/{dist/cjs → dist-cjs}/commands/ListPermissionsCommand.js +2 -3
  20. package/{dist/cjs → dist-cjs}/commands/ListTagsCommand.js +2 -3
  21. package/{dist/cjs → dist-cjs}/commands/PutPolicyCommand.js +2 -3
  22. package/{dist/cjs → dist-cjs}/commands/RestoreCertificateAuthorityCommand.js +2 -3
  23. package/{dist/cjs → dist-cjs}/commands/RevokeCertificateCommand.js +2 -3
  24. package/{dist/cjs → dist-cjs}/commands/TagCertificateAuthorityCommand.js +2 -3
  25. package/{dist/cjs → dist-cjs}/commands/UntagCertificateAuthorityCommand.js +2 -3
  26. package/{dist/cjs → dist-cjs}/commands/UpdateCertificateAuthorityCommand.js +2 -3
  27. package/{dist/cjs → dist-cjs}/endpoints.js +0 -1
  28. package/{dist/cjs → dist-cjs}/index.js +0 -1
  29. package/{dist/cjs → dist-cjs}/models/index.js +0 -1
  30. package/{dist/cjs → dist-cjs}/models/models_0.js +0 -1
  31. package/{dist/cjs → dist-cjs}/pagination/Interfaces.js +0 -1
  32. package/{dist/cjs → dist-cjs}/pagination/ListCertificateAuthoritiesPaginator.js +0 -1
  33. package/{dist/cjs → dist-cjs}/pagination/ListPermissionsPaginator.js +0 -1
  34. package/{dist/cjs → dist-cjs}/pagination/ListTagsPaginator.js +0 -1
  35. package/{dist/cjs → dist-cjs}/protocols/Aws_json1_1.js +0 -1
  36. package/{dist/cjs → dist-cjs}/runtimeConfig.browser.js +2 -2
  37. package/{dist/cjs → dist-cjs}/runtimeConfig.js +2 -2
  38. package/{dist/cjs → dist-cjs}/runtimeConfig.native.js +0 -1
  39. package/{dist/cjs → dist-cjs}/runtimeConfig.shared.js +1 -2
  40. package/{dist/cjs → dist-cjs}/waiters/waitForAuditReportCreated.js +4 -5
  41. package/{dist/cjs → dist-cjs}/waiters/waitForCertificateAuthorityCSRCreated.js +2 -3
  42. package/{dist/cjs → dist-cjs}/waiters/waitForCertificateIssued.js +2 -3
  43. package/{dist/es → dist-es}/ACMPCA.js +1 -22
  44. package/{dist/es → dist-es}/ACMPCAClient.js +2 -28
  45. package/dist-es/commands/CreateCertificateAuthorityAuditReportCommand.js +39 -0
  46. package/dist-es/commands/CreateCertificateAuthorityCommand.js +39 -0
  47. package/dist-es/commands/CreatePermissionCommand.js +39 -0
  48. package/dist-es/commands/DeleteCertificateAuthorityCommand.js +39 -0
  49. package/dist-es/commands/DeletePermissionCommand.js +39 -0
  50. package/dist-es/commands/DeletePolicyCommand.js +39 -0
  51. package/{dist/es → dist-es}/commands/DescribeCertificateAuthorityAuditReportCommand.js +4 -33
  52. package/dist-es/commands/DescribeCertificateAuthorityCommand.js +39 -0
  53. package/{dist/es → dist-es}/commands/GetCertificateAuthorityCertificateCommand.js +4 -33
  54. package/{dist/es → dist-es}/commands/GetCertificateAuthorityCsrCommand.js +4 -34
  55. package/dist-es/commands/GetCertificateCommand.js +39 -0
  56. package/dist-es/commands/GetPolicyCommand.js +39 -0
  57. package/dist-es/commands/ImportCertificateAuthorityCertificateCommand.js +39 -0
  58. package/{dist/es → dist-es}/commands/IssueCertificateCommand.js +4 -37
  59. package/{dist/es → dist-es}/commands/ListCertificateAuthoritiesCommand.js +4 -30
  60. package/dist-es/commands/ListPermissionsCommand.js +39 -0
  61. package/{dist/es → dist-es}/commands/ListTagsCommand.js +4 -33
  62. package/dist-es/commands/PutPolicyCommand.js +39 -0
  63. package/dist-es/commands/RestoreCertificateAuthorityCommand.js +39 -0
  64. package/dist-es/commands/RevokeCertificateCommand.js +39 -0
  65. package/dist-es/commands/TagCertificateAuthorityCommand.js +39 -0
  66. package/{dist/es → dist-es}/commands/UntagCertificateAuthorityCommand.js +4 -34
  67. package/dist-es/commands/UpdateCertificateAuthorityCommand.js +39 -0
  68. package/{dist/es → dist-es}/endpoints.js +1 -2
  69. package/{dist/types/index.d.ts → dist-es/index.js} +0 -0
  70. package/{dist/types/models/index.d.ts → dist-es/models/index.js} +0 -0
  71. package/{dist/es → dist-es}/models/models_0.js +0 -229
  72. package/dist-es/pagination/Interfaces.js +1 -0
  73. package/{dist/es → dist-es}/pagination/ListCertificateAuthoritiesPaginator.js +16 -29
  74. package/{dist/es → dist-es}/pagination/ListPermissionsPaginator.js +16 -29
  75. package/{dist/es → dist-es}/pagination/ListTagsPaginator.js +16 -29
  76. package/{dist/es → dist-es}/protocols/Aws_json1_1.js +622 -628
  77. package/{dist/es → dist-es}/runtimeConfig.browser.js +1 -5
  78. package/{dist/es → dist-es}/runtimeConfig.js +1 -5
  79. package/{dist/es → dist-es}/runtimeConfig.native.js +0 -4
  80. package/{dist/es → dist-es}/runtimeConfig.shared.js +1 -5
  81. package/{dist/es → dist-es}/waiters/waitForAuditReportCreated.js +10 -20
  82. package/{dist/es → dist-es}/waiters/waitForCertificateAuthorityCSRCreated.js +9 -19
  83. package/{dist/es → dist-es}/waiters/waitForCertificateIssued.js +9 -19
  84. package/{dist/types → dist-types}/ACMPCA.d.ts +1 -1
  85. package/{dist/types → dist-types}/ACMPCAClient.d.ts +8 -8
  86. package/{dist/types → dist-types}/commands/CreateCertificateAuthorityAuditReportCommand.d.ts +2 -2
  87. package/{dist/types → dist-types}/commands/CreateCertificateAuthorityCommand.d.ts +2 -2
  88. package/{dist/types → dist-types}/commands/CreatePermissionCommand.d.ts +2 -2
  89. package/{dist/types → dist-types}/commands/DeleteCertificateAuthorityCommand.d.ts +2 -2
  90. package/{dist/types → dist-types}/commands/DeletePermissionCommand.d.ts +2 -2
  91. package/{dist/types → dist-types}/commands/DeletePolicyCommand.d.ts +2 -2
  92. package/{dist/types → dist-types}/commands/DescribeCertificateAuthorityAuditReportCommand.d.ts +2 -2
  93. package/{dist/types → dist-types}/commands/DescribeCertificateAuthorityCommand.d.ts +2 -2
  94. package/{dist/types → dist-types}/commands/GetCertificateAuthorityCertificateCommand.d.ts +2 -2
  95. package/{dist/types → dist-types}/commands/GetCertificateAuthorityCsrCommand.d.ts +2 -2
  96. package/{dist/types → dist-types}/commands/GetCertificateCommand.d.ts +2 -2
  97. package/{dist/types → dist-types}/commands/GetPolicyCommand.d.ts +2 -2
  98. package/{dist/types → dist-types}/commands/ImportCertificateAuthorityCertificateCommand.d.ts +2 -2
  99. package/{dist/types → dist-types}/commands/IssueCertificateCommand.d.ts +2 -2
  100. package/{dist/types → dist-types}/commands/ListCertificateAuthoritiesCommand.d.ts +2 -2
  101. package/{dist/types → dist-types}/commands/ListPermissionsCommand.d.ts +2 -2
  102. package/{dist/types → dist-types}/commands/ListTagsCommand.d.ts +2 -2
  103. package/{dist/types → dist-types}/commands/PutPolicyCommand.d.ts +2 -2
  104. package/{dist/types → dist-types}/commands/RestoreCertificateAuthorityCommand.d.ts +2 -2
  105. package/{dist/types → dist-types}/commands/RevokeCertificateCommand.d.ts +2 -2
  106. package/{dist/types → dist-types}/commands/TagCertificateAuthorityCommand.d.ts +2 -2
  107. package/{dist/types → dist-types}/commands/UntagCertificateAuthorityCommand.d.ts +2 -2
  108. package/{dist/types → dist-types}/commands/UpdateCertificateAuthorityCommand.d.ts +2 -2
  109. package/{dist/types → dist-types}/endpoints.d.ts +0 -0
  110. package/{index.ts → dist-types/index.d.ts} +0 -0
  111. package/{models/index.ts → dist-types/models/index.d.ts} +0 -0
  112. package/{dist/types → dist-types}/models/models_0.d.ts +0 -0
  113. package/{dist/types → dist-types}/pagination/Interfaces.d.ts +1 -1
  114. package/{dist/types → dist-types}/pagination/ListCertificateAuthoritiesPaginator.d.ts +1 -1
  115. package/{dist/types → dist-types}/pagination/ListPermissionsPaginator.d.ts +1 -1
  116. package/{dist/types → dist-types}/pagination/ListTagsPaginator.d.ts +1 -1
  117. package/{dist/types → dist-types}/protocols/Aws_json1_1.d.ts +2 -2
  118. package/{dist/types/ts3.4 → dist-types}/runtimeConfig.browser.d.ts +37 -36
  119. package/{dist/types → dist-types}/runtimeConfig.d.ts +2 -1
  120. package/{dist/types/ts3.4 → dist-types}/runtimeConfig.native.d.ts +36 -35
  121. package/{dist/types → dist-types}/runtimeConfig.shared.d.ts +0 -0
  122. package/{dist/types → dist-types}/ts3.4/ACMPCA.d.ts +1 -1
  123. package/{dist/types → dist-types}/ts3.4/ACMPCAClient.d.ts +8 -8
  124. package/{dist/types → dist-types}/ts3.4/commands/CreateCertificateAuthorityAuditReportCommand.d.ts +2 -2
  125. package/{dist/types → dist-types}/ts3.4/commands/CreateCertificateAuthorityCommand.d.ts +2 -2
  126. package/{dist/types → dist-types}/ts3.4/commands/CreatePermissionCommand.d.ts +2 -2
  127. package/{dist/types → dist-types}/ts3.4/commands/DeleteCertificateAuthorityCommand.d.ts +2 -2
  128. package/{dist/types → dist-types}/ts3.4/commands/DeletePermissionCommand.d.ts +2 -2
  129. package/{dist/types → dist-types}/ts3.4/commands/DeletePolicyCommand.d.ts +2 -2
  130. package/{dist/types → dist-types}/ts3.4/commands/DescribeCertificateAuthorityAuditReportCommand.d.ts +2 -2
  131. package/{dist/types → dist-types}/ts3.4/commands/DescribeCertificateAuthorityCommand.d.ts +2 -2
  132. package/{dist/types → dist-types}/ts3.4/commands/GetCertificateAuthorityCertificateCommand.d.ts +2 -2
  133. package/{dist/types → dist-types}/ts3.4/commands/GetCertificateAuthorityCsrCommand.d.ts +2 -2
  134. package/{dist/types → dist-types}/ts3.4/commands/GetCertificateCommand.d.ts +2 -2
  135. package/{dist/types → dist-types}/ts3.4/commands/GetPolicyCommand.d.ts +2 -2
  136. package/{dist/types → dist-types}/ts3.4/commands/ImportCertificateAuthorityCertificateCommand.d.ts +2 -2
  137. package/{dist/types → dist-types}/ts3.4/commands/IssueCertificateCommand.d.ts +2 -2
  138. package/{dist/types → dist-types}/ts3.4/commands/ListCertificateAuthoritiesCommand.d.ts +2 -2
  139. package/{dist/types → dist-types}/ts3.4/commands/ListPermissionsCommand.d.ts +2 -2
  140. package/{dist/types → dist-types}/ts3.4/commands/ListTagsCommand.d.ts +2 -2
  141. package/{dist/types → dist-types}/ts3.4/commands/PutPolicyCommand.d.ts +2 -2
  142. package/{dist/types → dist-types}/ts3.4/commands/RestoreCertificateAuthorityCommand.d.ts +2 -2
  143. package/{dist/types → dist-types}/ts3.4/commands/RevokeCertificateCommand.d.ts +2 -2
  144. package/{dist/types → dist-types}/ts3.4/commands/TagCertificateAuthorityCommand.d.ts +2 -2
  145. package/{dist/types → dist-types}/ts3.4/commands/UntagCertificateAuthorityCommand.d.ts +2 -2
  146. package/{dist/types → dist-types}/ts3.4/commands/UpdateCertificateAuthorityCommand.d.ts +2 -2
  147. package/{dist/types → dist-types}/ts3.4/endpoints.d.ts +0 -0
  148. package/{dist/types → dist-types}/ts3.4/index.d.ts +0 -0
  149. package/{dist/types → dist-types}/ts3.4/models/index.d.ts +0 -0
  150. package/{dist/types → dist-types}/ts3.4/models/models_0.d.ts +0 -0
  151. package/{dist/types → dist-types}/ts3.4/pagination/Interfaces.d.ts +1 -1
  152. package/{dist/types → dist-types}/ts3.4/pagination/ListCertificateAuthoritiesPaginator.d.ts +1 -1
  153. package/{dist/types → dist-types}/ts3.4/pagination/ListPermissionsPaginator.d.ts +1 -1
  154. package/{dist/types → dist-types}/ts3.4/pagination/ListTagsPaginator.d.ts +1 -1
  155. package/{dist/types → dist-types}/ts3.4/protocols/Aws_json1_1.d.ts +2 -2
  156. package/{dist/types → dist-types/ts3.4}/runtimeConfig.browser.d.ts +37 -36
  157. package/{dist/types → dist-types}/ts3.4/runtimeConfig.d.ts +2 -1
  158. package/{dist/types → dist-types/ts3.4}/runtimeConfig.native.d.ts +36 -35
  159. package/{dist/types → dist-types}/ts3.4/runtimeConfig.shared.d.ts +0 -0
  160. package/{dist/types → dist-types}/ts3.4/waiters/waitForAuditReportCreated.d.ts +1 -1
  161. package/{dist/types → dist-types}/ts3.4/waiters/waitForCertificateAuthorityCSRCreated.d.ts +1 -1
  162. package/{dist/types → dist-types}/ts3.4/waiters/waitForCertificateIssued.d.ts +1 -1
  163. package/{dist/types → dist-types}/waiters/waitForAuditReportCreated.d.ts +1 -1
  164. package/{dist/types → dist-types}/waiters/waitForCertificateAuthorityCSRCreated.d.ts +1 -1
  165. package/{dist/types → dist-types}/waiters/waitForCertificateIssued.d.ts +1 -1
  166. package/package.json +53 -50
  167. package/ACMPCA.ts +0 -1322
  168. package/ACMPCAClient.ts +0 -360
  169. package/commands/CreateCertificateAuthorityAuditReportCommand.ts +0 -121
  170. package/commands/CreateCertificateAuthorityCommand.ts +0 -117
  171. package/commands/CreatePermissionCommand.ts +0 -120
  172. package/commands/DeleteCertificateAuthorityCommand.ts +0 -116
  173. package/commands/DeletePermissionCommand.ts +0 -122
  174. package/commands/DeletePolicyCommand.ts +0 -128
  175. package/commands/DescribeCertificateAuthorityAuditReportCommand.ts +0 -112
  176. package/commands/DescribeCertificateAuthorityCommand.ts +0 -139
  177. package/commands/GetCertificateAuthorityCertificateCommand.ts +0 -108
  178. package/commands/GetCertificateAuthorityCsrCommand.ts +0 -101
  179. package/commands/GetCertificateCommand.ts +0 -101
  180. package/commands/GetPolicyCommand.ts +0 -121
  181. package/commands/ImportCertificateAuthorityCertificateCommand.ts +0 -228
  182. package/commands/IssueCertificateCommand.ts +0 -101
  183. package/commands/ListCertificateAuthoritiesCommand.ts +0 -97
  184. package/commands/ListPermissionsCommand.ts +0 -121
  185. package/commands/ListTagsCommand.ts +0 -90
  186. package/commands/PutPolicyCommand.ts +0 -122
  187. package/commands/RestoreCertificateAuthorityCommand.ts +0 -107
  188. package/commands/RevokeCertificateCommand.ts +0 -113
  189. package/commands/TagCertificateAuthorityCommand.ts +0 -101
  190. package/commands/UntagCertificateAuthorityCommand.ts +0 -101
  191. package/commands/UpdateCertificateAuthorityCommand.ts +0 -107
  192. package/dist/cjs/ACMPCA.js.map +0 -1
  193. package/dist/cjs/ACMPCAClient.js.map +0 -1
  194. package/dist/cjs/commands/CreateCertificateAuthorityAuditReportCommand.js.map +0 -1
  195. package/dist/cjs/commands/CreateCertificateAuthorityCommand.js.map +0 -1
  196. package/dist/cjs/commands/CreatePermissionCommand.js.map +0 -1
  197. package/dist/cjs/commands/DeleteCertificateAuthorityCommand.js.map +0 -1
  198. package/dist/cjs/commands/DeletePermissionCommand.js.map +0 -1
  199. package/dist/cjs/commands/DeletePolicyCommand.js.map +0 -1
  200. package/dist/cjs/commands/DescribeCertificateAuthorityAuditReportCommand.js.map +0 -1
  201. package/dist/cjs/commands/DescribeCertificateAuthorityCommand.js.map +0 -1
  202. package/dist/cjs/commands/GetCertificateAuthorityCertificateCommand.js.map +0 -1
  203. package/dist/cjs/commands/GetCertificateAuthorityCsrCommand.js.map +0 -1
  204. package/dist/cjs/commands/GetCertificateCommand.js.map +0 -1
  205. package/dist/cjs/commands/GetPolicyCommand.js.map +0 -1
  206. package/dist/cjs/commands/ImportCertificateAuthorityCertificateCommand.js.map +0 -1
  207. package/dist/cjs/commands/IssueCertificateCommand.js.map +0 -1
  208. package/dist/cjs/commands/ListCertificateAuthoritiesCommand.js.map +0 -1
  209. package/dist/cjs/commands/ListPermissionsCommand.js.map +0 -1
  210. package/dist/cjs/commands/ListTagsCommand.js.map +0 -1
  211. package/dist/cjs/commands/PutPolicyCommand.js.map +0 -1
  212. package/dist/cjs/commands/RestoreCertificateAuthorityCommand.js.map +0 -1
  213. package/dist/cjs/commands/RevokeCertificateCommand.js.map +0 -1
  214. package/dist/cjs/commands/TagCertificateAuthorityCommand.js.map +0 -1
  215. package/dist/cjs/commands/UntagCertificateAuthorityCommand.js.map +0 -1
  216. package/dist/cjs/commands/UpdateCertificateAuthorityCommand.js.map +0 -1
  217. package/dist/cjs/endpoints.js.map +0 -1
  218. package/dist/cjs/index.js.map +0 -1
  219. package/dist/cjs/models/index.js.map +0 -1
  220. package/dist/cjs/models/models_0.js.map +0 -1
  221. package/dist/cjs/package.json +0 -92
  222. package/dist/cjs/pagination/Interfaces.js.map +0 -1
  223. package/dist/cjs/pagination/ListCertificateAuthoritiesPaginator.js.map +0 -1
  224. package/dist/cjs/pagination/ListPermissionsPaginator.js.map +0 -1
  225. package/dist/cjs/pagination/ListTagsPaginator.js.map +0 -1
  226. package/dist/cjs/protocols/Aws_json1_1.js.map +0 -1
  227. package/dist/cjs/runtimeConfig.browser.js.map +0 -1
  228. package/dist/cjs/runtimeConfig.js.map +0 -1
  229. package/dist/cjs/runtimeConfig.native.js.map +0 -1
  230. package/dist/cjs/runtimeConfig.shared.js.map +0 -1
  231. package/dist/cjs/waiters/waitForAuditReportCreated.js.map +0 -1
  232. package/dist/cjs/waiters/waitForCertificateAuthorityCSRCreated.js.map +0 -1
  233. package/dist/cjs/waiters/waitForCertificateIssued.js.map +0 -1
  234. package/dist/es/ACMPCA.js.map +0 -1
  235. package/dist/es/ACMPCAClient.js.map +0 -1
  236. package/dist/es/commands/CreateCertificateAuthorityAuditReportCommand.js +0 -80
  237. package/dist/es/commands/CreateCertificateAuthorityAuditReportCommand.js.map +0 -1
  238. package/dist/es/commands/CreateCertificateAuthorityCommand.js +0 -85
  239. package/dist/es/commands/CreateCertificateAuthorityCommand.js.map +0 -1
  240. package/dist/es/commands/CreatePermissionCommand.js +0 -91
  241. package/dist/es/commands/CreatePermissionCommand.js.map +0 -1
  242. package/dist/es/commands/DeleteCertificateAuthorityCommand.js +0 -84
  243. package/dist/es/commands/DeleteCertificateAuthorityCommand.js.map +0 -1
  244. package/dist/es/commands/DeletePermissionCommand.js +0 -93
  245. package/dist/es/commands/DeletePermissionCommand.js.map +0 -1
  246. package/dist/es/commands/DeletePolicyCommand.js +0 -99
  247. package/dist/es/commands/DeletePolicyCommand.js.map +0 -1
  248. package/dist/es/commands/DescribeCertificateAuthorityAuditReportCommand.js.map +0 -1
  249. package/dist/es/commands/DescribeCertificateAuthorityCommand.js +0 -105
  250. package/dist/es/commands/DescribeCertificateAuthorityCommand.js.map +0 -1
  251. package/dist/es/commands/GetCertificateAuthorityCertificateCommand.js.map +0 -1
  252. package/dist/es/commands/GetCertificateAuthorityCsrCommand.js.map +0 -1
  253. package/dist/es/commands/GetCertificateCommand.js +0 -72
  254. package/dist/es/commands/GetCertificateCommand.js.map +0 -1
  255. package/dist/es/commands/GetPolicyCommand.js +0 -95
  256. package/dist/es/commands/GetPolicyCommand.js.map +0 -1
  257. package/dist/es/commands/ImportCertificateAuthorityCertificateCommand.js +0 -192
  258. package/dist/es/commands/ImportCertificateAuthorityCertificateCommand.js.map +0 -1
  259. package/dist/es/commands/IssueCertificateCommand.js.map +0 -1
  260. package/dist/es/commands/ListCertificateAuthoritiesCommand.js.map +0 -1
  261. package/dist/es/commands/ListPermissionsCommand.js +0 -92
  262. package/dist/es/commands/ListPermissionsCommand.js.map +0 -1
  263. package/dist/es/commands/ListTagsCommand.js.map +0 -1
  264. package/dist/es/commands/PutPolicyCommand.js +0 -96
  265. package/dist/es/commands/PutPolicyCommand.js.map +0 -1
  266. package/dist/es/commands/RestoreCertificateAuthorityCommand.js +0 -75
  267. package/dist/es/commands/RestoreCertificateAuthorityCommand.js.map +0 -1
  268. package/dist/es/commands/RevokeCertificateCommand.js +0 -84
  269. package/dist/es/commands/RevokeCertificateCommand.js.map +0 -1
  270. package/dist/es/commands/TagCertificateAuthorityCommand.js +0 -72
  271. package/dist/es/commands/TagCertificateAuthorityCommand.js.map +0 -1
  272. package/dist/es/commands/UntagCertificateAuthorityCommand.js.map +0 -1
  273. package/dist/es/commands/UpdateCertificateAuthorityCommand.js +0 -75
  274. package/dist/es/commands/UpdateCertificateAuthorityCommand.js.map +0 -1
  275. package/dist/es/endpoints.js.map +0 -1
  276. package/dist/es/index.js +0 -34
  277. package/dist/es/index.js.map +0 -1
  278. package/dist/es/models/index.js +0 -2
  279. package/dist/es/models/index.js.map +0 -1
  280. package/dist/es/models/models_0.js.map +0 -1
  281. package/dist/es/package.json +0 -92
  282. package/dist/es/pagination/Interfaces.js +0 -2
  283. package/dist/es/pagination/Interfaces.js.map +0 -1
  284. package/dist/es/pagination/ListCertificateAuthoritiesPaginator.js.map +0 -1
  285. package/dist/es/pagination/ListPermissionsPaginator.js.map +0 -1
  286. package/dist/es/pagination/ListTagsPaginator.js.map +0 -1
  287. package/dist/es/protocols/Aws_json1_1.js.map +0 -1
  288. package/dist/es/runtimeConfig.browser.js.map +0 -1
  289. package/dist/es/runtimeConfig.js.map +0 -1
  290. package/dist/es/runtimeConfig.native.js.map +0 -1
  291. package/dist/es/runtimeConfig.shared.js.map +0 -1
  292. package/dist/es/waiters/waitForAuditReportCreated.js.map +0 -1
  293. package/dist/es/waiters/waitForCertificateAuthorityCSRCreated.js.map +0 -1
  294. package/dist/es/waiters/waitForCertificateIssued.js.map +0 -1
  295. package/endpoints.ts +0 -91
  296. package/jest.config.js +0 -4
  297. package/models/models_0.ts +0 -2571
  298. package/pagination/Interfaces.ts +0 -7
  299. package/pagination/ListCertificateAuthoritiesPaginator.ts +0 -58
  300. package/pagination/ListPermissionsPaginator.ts +0 -58
  301. package/pagination/ListTagsPaginator.ts +0 -54
  302. package/protocols/Aws_json1_1.ts +0 -3844
  303. package/runtimeConfig.browser.ts +0 -40
  304. package/runtimeConfig.native.ts +0 -16
  305. package/runtimeConfig.shared.ts +0 -16
  306. package/runtimeConfig.ts +0 -45
  307. package/tsconfig.es.json +0 -12
  308. package/tsconfig.json +0 -32
  309. package/waiters/waitForAuditReportCreated.ts +0 -60
  310. package/waiters/waitForCertificateAuthorityCSRCreated.ts +0 -48
  311. package/waiters/waitForCertificateIssued.ts +0 -42
@@ -1,3844 +0,0 @@
1
- import {
2
- CreateCertificateAuthorityAuditReportCommandInput,
3
- CreateCertificateAuthorityAuditReportCommandOutput,
4
- } from "../commands/CreateCertificateAuthorityAuditReportCommand";
5
- import {
6
- CreateCertificateAuthorityCommandInput,
7
- CreateCertificateAuthorityCommandOutput,
8
- } from "../commands/CreateCertificateAuthorityCommand";
9
- import { CreatePermissionCommandInput, CreatePermissionCommandOutput } from "../commands/CreatePermissionCommand";
10
- import {
11
- DeleteCertificateAuthorityCommandInput,
12
- DeleteCertificateAuthorityCommandOutput,
13
- } from "../commands/DeleteCertificateAuthorityCommand";
14
- import { DeletePermissionCommandInput, DeletePermissionCommandOutput } from "../commands/DeletePermissionCommand";
15
- import { DeletePolicyCommandInput, DeletePolicyCommandOutput } from "../commands/DeletePolicyCommand";
16
- import {
17
- DescribeCertificateAuthorityAuditReportCommandInput,
18
- DescribeCertificateAuthorityAuditReportCommandOutput,
19
- } from "../commands/DescribeCertificateAuthorityAuditReportCommand";
20
- import {
21
- DescribeCertificateAuthorityCommandInput,
22
- DescribeCertificateAuthorityCommandOutput,
23
- } from "../commands/DescribeCertificateAuthorityCommand";
24
- import {
25
- GetCertificateAuthorityCertificateCommandInput,
26
- GetCertificateAuthorityCertificateCommandOutput,
27
- } from "../commands/GetCertificateAuthorityCertificateCommand";
28
- import {
29
- GetCertificateAuthorityCsrCommandInput,
30
- GetCertificateAuthorityCsrCommandOutput,
31
- } from "../commands/GetCertificateAuthorityCsrCommand";
32
- import { GetCertificateCommandInput, GetCertificateCommandOutput } from "../commands/GetCertificateCommand";
33
- import { GetPolicyCommandInput, GetPolicyCommandOutput } from "../commands/GetPolicyCommand";
34
- import {
35
- ImportCertificateAuthorityCertificateCommandInput,
36
- ImportCertificateAuthorityCertificateCommandOutput,
37
- } from "../commands/ImportCertificateAuthorityCertificateCommand";
38
- import { IssueCertificateCommandInput, IssueCertificateCommandOutput } from "../commands/IssueCertificateCommand";
39
- import {
40
- ListCertificateAuthoritiesCommandInput,
41
- ListCertificateAuthoritiesCommandOutput,
42
- } from "../commands/ListCertificateAuthoritiesCommand";
43
- import { ListPermissionsCommandInput, ListPermissionsCommandOutput } from "../commands/ListPermissionsCommand";
44
- import { ListTagsCommandInput, ListTagsCommandOutput } from "../commands/ListTagsCommand";
45
- import { PutPolicyCommandInput, PutPolicyCommandOutput } from "../commands/PutPolicyCommand";
46
- import {
47
- RestoreCertificateAuthorityCommandInput,
48
- RestoreCertificateAuthorityCommandOutput,
49
- } from "../commands/RestoreCertificateAuthorityCommand";
50
- import { RevokeCertificateCommandInput, RevokeCertificateCommandOutput } from "../commands/RevokeCertificateCommand";
51
- import {
52
- TagCertificateAuthorityCommandInput,
53
- TagCertificateAuthorityCommandOutput,
54
- } from "../commands/TagCertificateAuthorityCommand";
55
- import {
56
- UntagCertificateAuthorityCommandInput,
57
- UntagCertificateAuthorityCommandOutput,
58
- } from "../commands/UntagCertificateAuthorityCommand";
59
- import {
60
- UpdateCertificateAuthorityCommandInput,
61
- UpdateCertificateAuthorityCommandOutput,
62
- } from "../commands/UpdateCertificateAuthorityCommand";
63
- import {
64
- ASN1Subject,
65
- AccessDescription,
66
- AccessMethod,
67
- ActionType,
68
- ApiPassthrough,
69
- CertificateAuthority,
70
- CertificateAuthorityConfiguration,
71
- CertificateMismatchException,
72
- ConcurrentModificationException,
73
- CreateCertificateAuthorityAuditReportRequest,
74
- CreateCertificateAuthorityAuditReportResponse,
75
- CreateCertificateAuthorityRequest,
76
- CreateCertificateAuthorityResponse,
77
- CreatePermissionRequest,
78
- CrlConfiguration,
79
- CsrExtensions,
80
- DeleteCertificateAuthorityRequest,
81
- DeletePermissionRequest,
82
- DeletePolicyRequest,
83
- DescribeCertificateAuthorityAuditReportRequest,
84
- DescribeCertificateAuthorityAuditReportResponse,
85
- DescribeCertificateAuthorityRequest,
86
- DescribeCertificateAuthorityResponse,
87
- EdiPartyName,
88
- ExtendedKeyUsage,
89
- Extensions,
90
- GeneralName,
91
- GetCertificateAuthorityCertificateRequest,
92
- GetCertificateAuthorityCertificateResponse,
93
- GetCertificateAuthorityCsrRequest,
94
- GetCertificateAuthorityCsrResponse,
95
- GetCertificateRequest,
96
- GetCertificateResponse,
97
- GetPolicyRequest,
98
- GetPolicyResponse,
99
- ImportCertificateAuthorityCertificateRequest,
100
- InvalidArgsException,
101
- InvalidArnException,
102
- InvalidNextTokenException,
103
- InvalidPolicyException,
104
- InvalidRequestException,
105
- InvalidStateException,
106
- InvalidTagException,
107
- IssueCertificateRequest,
108
- IssueCertificateResponse,
109
- KeyUsage,
110
- LimitExceededException,
111
- ListCertificateAuthoritiesRequest,
112
- ListCertificateAuthoritiesResponse,
113
- ListPermissionsRequest,
114
- ListPermissionsResponse,
115
- ListTagsRequest,
116
- ListTagsResponse,
117
- LockoutPreventedException,
118
- MalformedCSRException,
119
- MalformedCertificateException,
120
- OcspConfiguration,
121
- OtherName,
122
- Permission,
123
- PermissionAlreadyExistsException,
124
- PolicyInformation,
125
- PolicyQualifierInfo,
126
- PutPolicyRequest,
127
- Qualifier,
128
- RequestAlreadyProcessedException,
129
- RequestFailedException,
130
- RequestInProgressException,
131
- ResourceNotFoundException,
132
- RestoreCertificateAuthorityRequest,
133
- RevocationConfiguration,
134
- RevokeCertificateRequest,
135
- Tag,
136
- TagCertificateAuthorityRequest,
137
- TooManyTagsException,
138
- UntagCertificateAuthorityRequest,
139
- UpdateCertificateAuthorityRequest,
140
- Validity,
141
- } from "../models/models_0";
142
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
143
- import {
144
- expectBoolean as __expectBoolean,
145
- expectInt32 as __expectInt32,
146
- expectNonNull as __expectNonNull,
147
- expectNumber as __expectNumber,
148
- expectString as __expectString,
149
- parseEpochTimestamp as __parseEpochTimestamp,
150
- } from "@aws-sdk/smithy-client";
151
- import {
152
- Endpoint as __Endpoint,
153
- HeaderBag as __HeaderBag,
154
- MetadataBearer as __MetadataBearer,
155
- ResponseMetadata as __ResponseMetadata,
156
- SerdeContext as __SerdeContext,
157
- SmithyException as __SmithyException,
158
- } from "@aws-sdk/types";
159
-
160
- export const serializeAws_json1_1CreateCertificateAuthorityCommand = async (
161
- input: CreateCertificateAuthorityCommandInput,
162
- context: __SerdeContext
163
- ): Promise<__HttpRequest> => {
164
- const headers: __HeaderBag = {
165
- "content-type": "application/x-amz-json-1.1",
166
- "x-amz-target": "ACMPrivateCA.CreateCertificateAuthority",
167
- };
168
- let body: any;
169
- body = JSON.stringify(serializeAws_json1_1CreateCertificateAuthorityRequest(input, context));
170
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
171
- };
172
-
173
- export const serializeAws_json1_1CreateCertificateAuthorityAuditReportCommand = async (
174
- input: CreateCertificateAuthorityAuditReportCommandInput,
175
- context: __SerdeContext
176
- ): Promise<__HttpRequest> => {
177
- const headers: __HeaderBag = {
178
- "content-type": "application/x-amz-json-1.1",
179
- "x-amz-target": "ACMPrivateCA.CreateCertificateAuthorityAuditReport",
180
- };
181
- let body: any;
182
- body = JSON.stringify(serializeAws_json1_1CreateCertificateAuthorityAuditReportRequest(input, context));
183
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
184
- };
185
-
186
- export const serializeAws_json1_1CreatePermissionCommand = async (
187
- input: CreatePermissionCommandInput,
188
- context: __SerdeContext
189
- ): Promise<__HttpRequest> => {
190
- const headers: __HeaderBag = {
191
- "content-type": "application/x-amz-json-1.1",
192
- "x-amz-target": "ACMPrivateCA.CreatePermission",
193
- };
194
- let body: any;
195
- body = JSON.stringify(serializeAws_json1_1CreatePermissionRequest(input, context));
196
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
197
- };
198
-
199
- export const serializeAws_json1_1DeleteCertificateAuthorityCommand = async (
200
- input: DeleteCertificateAuthorityCommandInput,
201
- context: __SerdeContext
202
- ): Promise<__HttpRequest> => {
203
- const headers: __HeaderBag = {
204
- "content-type": "application/x-amz-json-1.1",
205
- "x-amz-target": "ACMPrivateCA.DeleteCertificateAuthority",
206
- };
207
- let body: any;
208
- body = JSON.stringify(serializeAws_json1_1DeleteCertificateAuthorityRequest(input, context));
209
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
210
- };
211
-
212
- export const serializeAws_json1_1DeletePermissionCommand = async (
213
- input: DeletePermissionCommandInput,
214
- context: __SerdeContext
215
- ): Promise<__HttpRequest> => {
216
- const headers: __HeaderBag = {
217
- "content-type": "application/x-amz-json-1.1",
218
- "x-amz-target": "ACMPrivateCA.DeletePermission",
219
- };
220
- let body: any;
221
- body = JSON.stringify(serializeAws_json1_1DeletePermissionRequest(input, context));
222
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
223
- };
224
-
225
- export const serializeAws_json1_1DeletePolicyCommand = async (
226
- input: DeletePolicyCommandInput,
227
- context: __SerdeContext
228
- ): Promise<__HttpRequest> => {
229
- const headers: __HeaderBag = {
230
- "content-type": "application/x-amz-json-1.1",
231
- "x-amz-target": "ACMPrivateCA.DeletePolicy",
232
- };
233
- let body: any;
234
- body = JSON.stringify(serializeAws_json1_1DeletePolicyRequest(input, context));
235
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
236
- };
237
-
238
- export const serializeAws_json1_1DescribeCertificateAuthorityCommand = async (
239
- input: DescribeCertificateAuthorityCommandInput,
240
- context: __SerdeContext
241
- ): Promise<__HttpRequest> => {
242
- const headers: __HeaderBag = {
243
- "content-type": "application/x-amz-json-1.1",
244
- "x-amz-target": "ACMPrivateCA.DescribeCertificateAuthority",
245
- };
246
- let body: any;
247
- body = JSON.stringify(serializeAws_json1_1DescribeCertificateAuthorityRequest(input, context));
248
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
249
- };
250
-
251
- export const serializeAws_json1_1DescribeCertificateAuthorityAuditReportCommand = async (
252
- input: DescribeCertificateAuthorityAuditReportCommandInput,
253
- context: __SerdeContext
254
- ): Promise<__HttpRequest> => {
255
- const headers: __HeaderBag = {
256
- "content-type": "application/x-amz-json-1.1",
257
- "x-amz-target": "ACMPrivateCA.DescribeCertificateAuthorityAuditReport",
258
- };
259
- let body: any;
260
- body = JSON.stringify(serializeAws_json1_1DescribeCertificateAuthorityAuditReportRequest(input, context));
261
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
262
- };
263
-
264
- export const serializeAws_json1_1GetCertificateCommand = async (
265
- input: GetCertificateCommandInput,
266
- context: __SerdeContext
267
- ): Promise<__HttpRequest> => {
268
- const headers: __HeaderBag = {
269
- "content-type": "application/x-amz-json-1.1",
270
- "x-amz-target": "ACMPrivateCA.GetCertificate",
271
- };
272
- let body: any;
273
- body = JSON.stringify(serializeAws_json1_1GetCertificateRequest(input, context));
274
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
275
- };
276
-
277
- export const serializeAws_json1_1GetCertificateAuthorityCertificateCommand = async (
278
- input: GetCertificateAuthorityCertificateCommandInput,
279
- context: __SerdeContext
280
- ): Promise<__HttpRequest> => {
281
- const headers: __HeaderBag = {
282
- "content-type": "application/x-amz-json-1.1",
283
- "x-amz-target": "ACMPrivateCA.GetCertificateAuthorityCertificate",
284
- };
285
- let body: any;
286
- body = JSON.stringify(serializeAws_json1_1GetCertificateAuthorityCertificateRequest(input, context));
287
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
288
- };
289
-
290
- export const serializeAws_json1_1GetCertificateAuthorityCsrCommand = async (
291
- input: GetCertificateAuthorityCsrCommandInput,
292
- context: __SerdeContext
293
- ): Promise<__HttpRequest> => {
294
- const headers: __HeaderBag = {
295
- "content-type": "application/x-amz-json-1.1",
296
- "x-amz-target": "ACMPrivateCA.GetCertificateAuthorityCsr",
297
- };
298
- let body: any;
299
- body = JSON.stringify(serializeAws_json1_1GetCertificateAuthorityCsrRequest(input, context));
300
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
301
- };
302
-
303
- export const serializeAws_json1_1GetPolicyCommand = async (
304
- input: GetPolicyCommandInput,
305
- context: __SerdeContext
306
- ): Promise<__HttpRequest> => {
307
- const headers: __HeaderBag = {
308
- "content-type": "application/x-amz-json-1.1",
309
- "x-amz-target": "ACMPrivateCA.GetPolicy",
310
- };
311
- let body: any;
312
- body = JSON.stringify(serializeAws_json1_1GetPolicyRequest(input, context));
313
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
314
- };
315
-
316
- export const serializeAws_json1_1ImportCertificateAuthorityCertificateCommand = async (
317
- input: ImportCertificateAuthorityCertificateCommandInput,
318
- context: __SerdeContext
319
- ): Promise<__HttpRequest> => {
320
- const headers: __HeaderBag = {
321
- "content-type": "application/x-amz-json-1.1",
322
- "x-amz-target": "ACMPrivateCA.ImportCertificateAuthorityCertificate",
323
- };
324
- let body: any;
325
- body = JSON.stringify(serializeAws_json1_1ImportCertificateAuthorityCertificateRequest(input, context));
326
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
327
- };
328
-
329
- export const serializeAws_json1_1IssueCertificateCommand = async (
330
- input: IssueCertificateCommandInput,
331
- context: __SerdeContext
332
- ): Promise<__HttpRequest> => {
333
- const headers: __HeaderBag = {
334
- "content-type": "application/x-amz-json-1.1",
335
- "x-amz-target": "ACMPrivateCA.IssueCertificate",
336
- };
337
- let body: any;
338
- body = JSON.stringify(serializeAws_json1_1IssueCertificateRequest(input, context));
339
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
340
- };
341
-
342
- export const serializeAws_json1_1ListCertificateAuthoritiesCommand = async (
343
- input: ListCertificateAuthoritiesCommandInput,
344
- context: __SerdeContext
345
- ): Promise<__HttpRequest> => {
346
- const headers: __HeaderBag = {
347
- "content-type": "application/x-amz-json-1.1",
348
- "x-amz-target": "ACMPrivateCA.ListCertificateAuthorities",
349
- };
350
- let body: any;
351
- body = JSON.stringify(serializeAws_json1_1ListCertificateAuthoritiesRequest(input, context));
352
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
353
- };
354
-
355
- export const serializeAws_json1_1ListPermissionsCommand = async (
356
- input: ListPermissionsCommandInput,
357
- context: __SerdeContext
358
- ): Promise<__HttpRequest> => {
359
- const headers: __HeaderBag = {
360
- "content-type": "application/x-amz-json-1.1",
361
- "x-amz-target": "ACMPrivateCA.ListPermissions",
362
- };
363
- let body: any;
364
- body = JSON.stringify(serializeAws_json1_1ListPermissionsRequest(input, context));
365
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
366
- };
367
-
368
- export const serializeAws_json1_1ListTagsCommand = async (
369
- input: ListTagsCommandInput,
370
- context: __SerdeContext
371
- ): Promise<__HttpRequest> => {
372
- const headers: __HeaderBag = {
373
- "content-type": "application/x-amz-json-1.1",
374
- "x-amz-target": "ACMPrivateCA.ListTags",
375
- };
376
- let body: any;
377
- body = JSON.stringify(serializeAws_json1_1ListTagsRequest(input, context));
378
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
379
- };
380
-
381
- export const serializeAws_json1_1PutPolicyCommand = async (
382
- input: PutPolicyCommandInput,
383
- context: __SerdeContext
384
- ): Promise<__HttpRequest> => {
385
- const headers: __HeaderBag = {
386
- "content-type": "application/x-amz-json-1.1",
387
- "x-amz-target": "ACMPrivateCA.PutPolicy",
388
- };
389
- let body: any;
390
- body = JSON.stringify(serializeAws_json1_1PutPolicyRequest(input, context));
391
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
392
- };
393
-
394
- export const serializeAws_json1_1RestoreCertificateAuthorityCommand = async (
395
- input: RestoreCertificateAuthorityCommandInput,
396
- context: __SerdeContext
397
- ): Promise<__HttpRequest> => {
398
- const headers: __HeaderBag = {
399
- "content-type": "application/x-amz-json-1.1",
400
- "x-amz-target": "ACMPrivateCA.RestoreCertificateAuthority",
401
- };
402
- let body: any;
403
- body = JSON.stringify(serializeAws_json1_1RestoreCertificateAuthorityRequest(input, context));
404
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
405
- };
406
-
407
- export const serializeAws_json1_1RevokeCertificateCommand = async (
408
- input: RevokeCertificateCommandInput,
409
- context: __SerdeContext
410
- ): Promise<__HttpRequest> => {
411
- const headers: __HeaderBag = {
412
- "content-type": "application/x-amz-json-1.1",
413
- "x-amz-target": "ACMPrivateCA.RevokeCertificate",
414
- };
415
- let body: any;
416
- body = JSON.stringify(serializeAws_json1_1RevokeCertificateRequest(input, context));
417
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
418
- };
419
-
420
- export const serializeAws_json1_1TagCertificateAuthorityCommand = async (
421
- input: TagCertificateAuthorityCommandInput,
422
- context: __SerdeContext
423
- ): Promise<__HttpRequest> => {
424
- const headers: __HeaderBag = {
425
- "content-type": "application/x-amz-json-1.1",
426
- "x-amz-target": "ACMPrivateCA.TagCertificateAuthority",
427
- };
428
- let body: any;
429
- body = JSON.stringify(serializeAws_json1_1TagCertificateAuthorityRequest(input, context));
430
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
431
- };
432
-
433
- export const serializeAws_json1_1UntagCertificateAuthorityCommand = async (
434
- input: UntagCertificateAuthorityCommandInput,
435
- context: __SerdeContext
436
- ): Promise<__HttpRequest> => {
437
- const headers: __HeaderBag = {
438
- "content-type": "application/x-amz-json-1.1",
439
- "x-amz-target": "ACMPrivateCA.UntagCertificateAuthority",
440
- };
441
- let body: any;
442
- body = JSON.stringify(serializeAws_json1_1UntagCertificateAuthorityRequest(input, context));
443
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
444
- };
445
-
446
- export const serializeAws_json1_1UpdateCertificateAuthorityCommand = async (
447
- input: UpdateCertificateAuthorityCommandInput,
448
- context: __SerdeContext
449
- ): Promise<__HttpRequest> => {
450
- const headers: __HeaderBag = {
451
- "content-type": "application/x-amz-json-1.1",
452
- "x-amz-target": "ACMPrivateCA.UpdateCertificateAuthority",
453
- };
454
- let body: any;
455
- body = JSON.stringify(serializeAws_json1_1UpdateCertificateAuthorityRequest(input, context));
456
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
457
- };
458
-
459
- export const deserializeAws_json1_1CreateCertificateAuthorityCommand = async (
460
- output: __HttpResponse,
461
- context: __SerdeContext
462
- ): Promise<CreateCertificateAuthorityCommandOutput> => {
463
- if (output.statusCode >= 300) {
464
- return deserializeAws_json1_1CreateCertificateAuthorityCommandError(output, context);
465
- }
466
- const data: any = await parseBody(output.body, context);
467
- let contents: any = {};
468
- contents = deserializeAws_json1_1CreateCertificateAuthorityResponse(data, context);
469
- const response: CreateCertificateAuthorityCommandOutput = {
470
- $metadata: deserializeMetadata(output),
471
- ...contents,
472
- };
473
- return Promise.resolve(response);
474
- };
475
-
476
- const deserializeAws_json1_1CreateCertificateAuthorityCommandError = async (
477
- output: __HttpResponse,
478
- context: __SerdeContext
479
- ): Promise<CreateCertificateAuthorityCommandOutput> => {
480
- const parsedOutput: any = {
481
- ...output,
482
- body: await parseBody(output.body, context),
483
- };
484
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
485
- let errorCode: string = "UnknownError";
486
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
487
- switch (errorCode) {
488
- case "InvalidArgsException":
489
- case "com.amazonaws.acmpca#InvalidArgsException":
490
- response = {
491
- ...(await deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context)),
492
- name: errorCode,
493
- $metadata: deserializeMetadata(output),
494
- };
495
- break;
496
- case "InvalidPolicyException":
497
- case "com.amazonaws.acmpca#InvalidPolicyException":
498
- response = {
499
- ...(await deserializeAws_json1_1InvalidPolicyExceptionResponse(parsedOutput, context)),
500
- name: errorCode,
501
- $metadata: deserializeMetadata(output),
502
- };
503
- break;
504
- case "InvalidTagException":
505
- case "com.amazonaws.acmpca#InvalidTagException":
506
- response = {
507
- ...(await deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context)),
508
- name: errorCode,
509
- $metadata: deserializeMetadata(output),
510
- };
511
- break;
512
- case "LimitExceededException":
513
- case "com.amazonaws.acmpca#LimitExceededException":
514
- response = {
515
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
516
- name: errorCode,
517
- $metadata: deserializeMetadata(output),
518
- };
519
- break;
520
- default:
521
- const parsedBody = parsedOutput.body;
522
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
523
- response = {
524
- ...parsedBody,
525
- name: `${errorCode}`,
526
- message: parsedBody.message || parsedBody.Message || errorCode,
527
- $fault: "client",
528
- $metadata: deserializeMetadata(output),
529
- } as any;
530
- }
531
- const message = response.message || response.Message || errorCode;
532
- response.message = message;
533
- delete response.Message;
534
- return Promise.reject(Object.assign(new Error(message), response));
535
- };
536
-
537
- export const deserializeAws_json1_1CreateCertificateAuthorityAuditReportCommand = async (
538
- output: __HttpResponse,
539
- context: __SerdeContext
540
- ): Promise<CreateCertificateAuthorityAuditReportCommandOutput> => {
541
- if (output.statusCode >= 300) {
542
- return deserializeAws_json1_1CreateCertificateAuthorityAuditReportCommandError(output, context);
543
- }
544
- const data: any = await parseBody(output.body, context);
545
- let contents: any = {};
546
- contents = deserializeAws_json1_1CreateCertificateAuthorityAuditReportResponse(data, context);
547
- const response: CreateCertificateAuthorityAuditReportCommandOutput = {
548
- $metadata: deserializeMetadata(output),
549
- ...contents,
550
- };
551
- return Promise.resolve(response);
552
- };
553
-
554
- const deserializeAws_json1_1CreateCertificateAuthorityAuditReportCommandError = async (
555
- output: __HttpResponse,
556
- context: __SerdeContext
557
- ): Promise<CreateCertificateAuthorityAuditReportCommandOutput> => {
558
- const parsedOutput: any = {
559
- ...output,
560
- body: await parseBody(output.body, context),
561
- };
562
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
563
- let errorCode: string = "UnknownError";
564
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
565
- switch (errorCode) {
566
- case "InvalidArgsException":
567
- case "com.amazonaws.acmpca#InvalidArgsException":
568
- response = {
569
- ...(await deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context)),
570
- name: errorCode,
571
- $metadata: deserializeMetadata(output),
572
- };
573
- break;
574
- case "InvalidArnException":
575
- case "com.amazonaws.acmpca#InvalidArnException":
576
- response = {
577
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
578
- name: errorCode,
579
- $metadata: deserializeMetadata(output),
580
- };
581
- break;
582
- case "InvalidStateException":
583
- case "com.amazonaws.acmpca#InvalidStateException":
584
- response = {
585
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
586
- name: errorCode,
587
- $metadata: deserializeMetadata(output),
588
- };
589
- break;
590
- case "RequestFailedException":
591
- case "com.amazonaws.acmpca#RequestFailedException":
592
- response = {
593
- ...(await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)),
594
- name: errorCode,
595
- $metadata: deserializeMetadata(output),
596
- };
597
- break;
598
- case "RequestInProgressException":
599
- case "com.amazonaws.acmpca#RequestInProgressException":
600
- response = {
601
- ...(await deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context)),
602
- name: errorCode,
603
- $metadata: deserializeMetadata(output),
604
- };
605
- break;
606
- case "ResourceNotFoundException":
607
- case "com.amazonaws.acmpca#ResourceNotFoundException":
608
- response = {
609
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
610
- name: errorCode,
611
- $metadata: deserializeMetadata(output),
612
- };
613
- break;
614
- default:
615
- const parsedBody = parsedOutput.body;
616
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
617
- response = {
618
- ...parsedBody,
619
- name: `${errorCode}`,
620
- message: parsedBody.message || parsedBody.Message || errorCode,
621
- $fault: "client",
622
- $metadata: deserializeMetadata(output),
623
- } as any;
624
- }
625
- const message = response.message || response.Message || errorCode;
626
- response.message = message;
627
- delete response.Message;
628
- return Promise.reject(Object.assign(new Error(message), response));
629
- };
630
-
631
- export const deserializeAws_json1_1CreatePermissionCommand = async (
632
- output: __HttpResponse,
633
- context: __SerdeContext
634
- ): Promise<CreatePermissionCommandOutput> => {
635
- if (output.statusCode >= 300) {
636
- return deserializeAws_json1_1CreatePermissionCommandError(output, context);
637
- }
638
- await collectBody(output.body, context);
639
- const response: CreatePermissionCommandOutput = {
640
- $metadata: deserializeMetadata(output),
641
- };
642
- return Promise.resolve(response);
643
- };
644
-
645
- const deserializeAws_json1_1CreatePermissionCommandError = async (
646
- output: __HttpResponse,
647
- context: __SerdeContext
648
- ): Promise<CreatePermissionCommandOutput> => {
649
- const parsedOutput: any = {
650
- ...output,
651
- body: await parseBody(output.body, context),
652
- };
653
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
654
- let errorCode: string = "UnknownError";
655
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
656
- switch (errorCode) {
657
- case "InvalidArnException":
658
- case "com.amazonaws.acmpca#InvalidArnException":
659
- response = {
660
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
661
- name: errorCode,
662
- $metadata: deserializeMetadata(output),
663
- };
664
- break;
665
- case "InvalidStateException":
666
- case "com.amazonaws.acmpca#InvalidStateException":
667
- response = {
668
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
669
- name: errorCode,
670
- $metadata: deserializeMetadata(output),
671
- };
672
- break;
673
- case "LimitExceededException":
674
- case "com.amazonaws.acmpca#LimitExceededException":
675
- response = {
676
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
677
- name: errorCode,
678
- $metadata: deserializeMetadata(output),
679
- };
680
- break;
681
- case "PermissionAlreadyExistsException":
682
- case "com.amazonaws.acmpca#PermissionAlreadyExistsException":
683
- response = {
684
- ...(await deserializeAws_json1_1PermissionAlreadyExistsExceptionResponse(parsedOutput, context)),
685
- name: errorCode,
686
- $metadata: deserializeMetadata(output),
687
- };
688
- break;
689
- case "RequestFailedException":
690
- case "com.amazonaws.acmpca#RequestFailedException":
691
- response = {
692
- ...(await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)),
693
- name: errorCode,
694
- $metadata: deserializeMetadata(output),
695
- };
696
- break;
697
- case "ResourceNotFoundException":
698
- case "com.amazonaws.acmpca#ResourceNotFoundException":
699
- response = {
700
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
701
- name: errorCode,
702
- $metadata: deserializeMetadata(output),
703
- };
704
- break;
705
- default:
706
- const parsedBody = parsedOutput.body;
707
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
708
- response = {
709
- ...parsedBody,
710
- name: `${errorCode}`,
711
- message: parsedBody.message || parsedBody.Message || errorCode,
712
- $fault: "client",
713
- $metadata: deserializeMetadata(output),
714
- } as any;
715
- }
716
- const message = response.message || response.Message || errorCode;
717
- response.message = message;
718
- delete response.Message;
719
- return Promise.reject(Object.assign(new Error(message), response));
720
- };
721
-
722
- export const deserializeAws_json1_1DeleteCertificateAuthorityCommand = async (
723
- output: __HttpResponse,
724
- context: __SerdeContext
725
- ): Promise<DeleteCertificateAuthorityCommandOutput> => {
726
- if (output.statusCode >= 300) {
727
- return deserializeAws_json1_1DeleteCertificateAuthorityCommandError(output, context);
728
- }
729
- await collectBody(output.body, context);
730
- const response: DeleteCertificateAuthorityCommandOutput = {
731
- $metadata: deserializeMetadata(output),
732
- };
733
- return Promise.resolve(response);
734
- };
735
-
736
- const deserializeAws_json1_1DeleteCertificateAuthorityCommandError = async (
737
- output: __HttpResponse,
738
- context: __SerdeContext
739
- ): Promise<DeleteCertificateAuthorityCommandOutput> => {
740
- const parsedOutput: any = {
741
- ...output,
742
- body: await parseBody(output.body, context),
743
- };
744
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
745
- let errorCode: string = "UnknownError";
746
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
747
- switch (errorCode) {
748
- case "ConcurrentModificationException":
749
- case "com.amazonaws.acmpca#ConcurrentModificationException":
750
- response = {
751
- ...(await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)),
752
- name: errorCode,
753
- $metadata: deserializeMetadata(output),
754
- };
755
- break;
756
- case "InvalidArnException":
757
- case "com.amazonaws.acmpca#InvalidArnException":
758
- response = {
759
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
760
- name: errorCode,
761
- $metadata: deserializeMetadata(output),
762
- };
763
- break;
764
- case "InvalidStateException":
765
- case "com.amazonaws.acmpca#InvalidStateException":
766
- response = {
767
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
768
- name: errorCode,
769
- $metadata: deserializeMetadata(output),
770
- };
771
- break;
772
- case "ResourceNotFoundException":
773
- case "com.amazonaws.acmpca#ResourceNotFoundException":
774
- response = {
775
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
776
- name: errorCode,
777
- $metadata: deserializeMetadata(output),
778
- };
779
- break;
780
- default:
781
- const parsedBody = parsedOutput.body;
782
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
783
- response = {
784
- ...parsedBody,
785
- name: `${errorCode}`,
786
- message: parsedBody.message || parsedBody.Message || errorCode,
787
- $fault: "client",
788
- $metadata: deserializeMetadata(output),
789
- } as any;
790
- }
791
- const message = response.message || response.Message || errorCode;
792
- response.message = message;
793
- delete response.Message;
794
- return Promise.reject(Object.assign(new Error(message), response));
795
- };
796
-
797
- export const deserializeAws_json1_1DeletePermissionCommand = async (
798
- output: __HttpResponse,
799
- context: __SerdeContext
800
- ): Promise<DeletePermissionCommandOutput> => {
801
- if (output.statusCode >= 300) {
802
- return deserializeAws_json1_1DeletePermissionCommandError(output, context);
803
- }
804
- await collectBody(output.body, context);
805
- const response: DeletePermissionCommandOutput = {
806
- $metadata: deserializeMetadata(output),
807
- };
808
- return Promise.resolve(response);
809
- };
810
-
811
- const deserializeAws_json1_1DeletePermissionCommandError = async (
812
- output: __HttpResponse,
813
- context: __SerdeContext
814
- ): Promise<DeletePermissionCommandOutput> => {
815
- const parsedOutput: any = {
816
- ...output,
817
- body: await parseBody(output.body, context),
818
- };
819
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
820
- let errorCode: string = "UnknownError";
821
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
822
- switch (errorCode) {
823
- case "InvalidArnException":
824
- case "com.amazonaws.acmpca#InvalidArnException":
825
- response = {
826
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
827
- name: errorCode,
828
- $metadata: deserializeMetadata(output),
829
- };
830
- break;
831
- case "InvalidStateException":
832
- case "com.amazonaws.acmpca#InvalidStateException":
833
- response = {
834
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
835
- name: errorCode,
836
- $metadata: deserializeMetadata(output),
837
- };
838
- break;
839
- case "RequestFailedException":
840
- case "com.amazonaws.acmpca#RequestFailedException":
841
- response = {
842
- ...(await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)),
843
- name: errorCode,
844
- $metadata: deserializeMetadata(output),
845
- };
846
- break;
847
- case "ResourceNotFoundException":
848
- case "com.amazonaws.acmpca#ResourceNotFoundException":
849
- response = {
850
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
851
- name: errorCode,
852
- $metadata: deserializeMetadata(output),
853
- };
854
- break;
855
- default:
856
- const parsedBody = parsedOutput.body;
857
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
858
- response = {
859
- ...parsedBody,
860
- name: `${errorCode}`,
861
- message: parsedBody.message || parsedBody.Message || errorCode,
862
- $fault: "client",
863
- $metadata: deserializeMetadata(output),
864
- } as any;
865
- }
866
- const message = response.message || response.Message || errorCode;
867
- response.message = message;
868
- delete response.Message;
869
- return Promise.reject(Object.assign(new Error(message), response));
870
- };
871
-
872
- export const deserializeAws_json1_1DeletePolicyCommand = async (
873
- output: __HttpResponse,
874
- context: __SerdeContext
875
- ): Promise<DeletePolicyCommandOutput> => {
876
- if (output.statusCode >= 300) {
877
- return deserializeAws_json1_1DeletePolicyCommandError(output, context);
878
- }
879
- await collectBody(output.body, context);
880
- const response: DeletePolicyCommandOutput = {
881
- $metadata: deserializeMetadata(output),
882
- };
883
- return Promise.resolve(response);
884
- };
885
-
886
- const deserializeAws_json1_1DeletePolicyCommandError = async (
887
- output: __HttpResponse,
888
- context: __SerdeContext
889
- ): Promise<DeletePolicyCommandOutput> => {
890
- const parsedOutput: any = {
891
- ...output,
892
- body: await parseBody(output.body, context),
893
- };
894
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
895
- let errorCode: string = "UnknownError";
896
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
897
- switch (errorCode) {
898
- case "ConcurrentModificationException":
899
- case "com.amazonaws.acmpca#ConcurrentModificationException":
900
- response = {
901
- ...(await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)),
902
- name: errorCode,
903
- $metadata: deserializeMetadata(output),
904
- };
905
- break;
906
- case "InvalidArnException":
907
- case "com.amazonaws.acmpca#InvalidArnException":
908
- response = {
909
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
910
- name: errorCode,
911
- $metadata: deserializeMetadata(output),
912
- };
913
- break;
914
- case "InvalidStateException":
915
- case "com.amazonaws.acmpca#InvalidStateException":
916
- response = {
917
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
918
- name: errorCode,
919
- $metadata: deserializeMetadata(output),
920
- };
921
- break;
922
- case "LockoutPreventedException":
923
- case "com.amazonaws.acmpca#LockoutPreventedException":
924
- response = {
925
- ...(await deserializeAws_json1_1LockoutPreventedExceptionResponse(parsedOutput, context)),
926
- name: errorCode,
927
- $metadata: deserializeMetadata(output),
928
- };
929
- break;
930
- case "RequestFailedException":
931
- case "com.amazonaws.acmpca#RequestFailedException":
932
- response = {
933
- ...(await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)),
934
- name: errorCode,
935
- $metadata: deserializeMetadata(output),
936
- };
937
- break;
938
- case "ResourceNotFoundException":
939
- case "com.amazonaws.acmpca#ResourceNotFoundException":
940
- response = {
941
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
942
- name: errorCode,
943
- $metadata: deserializeMetadata(output),
944
- };
945
- break;
946
- default:
947
- const parsedBody = parsedOutput.body;
948
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
949
- response = {
950
- ...parsedBody,
951
- name: `${errorCode}`,
952
- message: parsedBody.message || parsedBody.Message || errorCode,
953
- $fault: "client",
954
- $metadata: deserializeMetadata(output),
955
- } as any;
956
- }
957
- const message = response.message || response.Message || errorCode;
958
- response.message = message;
959
- delete response.Message;
960
- return Promise.reject(Object.assign(new Error(message), response));
961
- };
962
-
963
- export const deserializeAws_json1_1DescribeCertificateAuthorityCommand = async (
964
- output: __HttpResponse,
965
- context: __SerdeContext
966
- ): Promise<DescribeCertificateAuthorityCommandOutput> => {
967
- if (output.statusCode >= 300) {
968
- return deserializeAws_json1_1DescribeCertificateAuthorityCommandError(output, context);
969
- }
970
- const data: any = await parseBody(output.body, context);
971
- let contents: any = {};
972
- contents = deserializeAws_json1_1DescribeCertificateAuthorityResponse(data, context);
973
- const response: DescribeCertificateAuthorityCommandOutput = {
974
- $metadata: deserializeMetadata(output),
975
- ...contents,
976
- };
977
- return Promise.resolve(response);
978
- };
979
-
980
- const deserializeAws_json1_1DescribeCertificateAuthorityCommandError = async (
981
- output: __HttpResponse,
982
- context: __SerdeContext
983
- ): Promise<DescribeCertificateAuthorityCommandOutput> => {
984
- const parsedOutput: any = {
985
- ...output,
986
- body: await parseBody(output.body, context),
987
- };
988
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
989
- let errorCode: string = "UnknownError";
990
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
991
- switch (errorCode) {
992
- case "InvalidArnException":
993
- case "com.amazonaws.acmpca#InvalidArnException":
994
- response = {
995
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
996
- name: errorCode,
997
- $metadata: deserializeMetadata(output),
998
- };
999
- break;
1000
- case "ResourceNotFoundException":
1001
- case "com.amazonaws.acmpca#ResourceNotFoundException":
1002
- response = {
1003
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1004
- name: errorCode,
1005
- $metadata: deserializeMetadata(output),
1006
- };
1007
- break;
1008
- default:
1009
- const parsedBody = parsedOutput.body;
1010
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1011
- response = {
1012
- ...parsedBody,
1013
- name: `${errorCode}`,
1014
- message: parsedBody.message || parsedBody.Message || errorCode,
1015
- $fault: "client",
1016
- $metadata: deserializeMetadata(output),
1017
- } as any;
1018
- }
1019
- const message = response.message || response.Message || errorCode;
1020
- response.message = message;
1021
- delete response.Message;
1022
- return Promise.reject(Object.assign(new Error(message), response));
1023
- };
1024
-
1025
- export const deserializeAws_json1_1DescribeCertificateAuthorityAuditReportCommand = async (
1026
- output: __HttpResponse,
1027
- context: __SerdeContext
1028
- ): Promise<DescribeCertificateAuthorityAuditReportCommandOutput> => {
1029
- if (output.statusCode >= 300) {
1030
- return deserializeAws_json1_1DescribeCertificateAuthorityAuditReportCommandError(output, context);
1031
- }
1032
- const data: any = await parseBody(output.body, context);
1033
- let contents: any = {};
1034
- contents = deserializeAws_json1_1DescribeCertificateAuthorityAuditReportResponse(data, context);
1035
- const response: DescribeCertificateAuthorityAuditReportCommandOutput = {
1036
- $metadata: deserializeMetadata(output),
1037
- ...contents,
1038
- };
1039
- return Promise.resolve(response);
1040
- };
1041
-
1042
- const deserializeAws_json1_1DescribeCertificateAuthorityAuditReportCommandError = async (
1043
- output: __HttpResponse,
1044
- context: __SerdeContext
1045
- ): Promise<DescribeCertificateAuthorityAuditReportCommandOutput> => {
1046
- const parsedOutput: any = {
1047
- ...output,
1048
- body: await parseBody(output.body, context),
1049
- };
1050
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1051
- let errorCode: string = "UnknownError";
1052
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1053
- switch (errorCode) {
1054
- case "InvalidArgsException":
1055
- case "com.amazonaws.acmpca#InvalidArgsException":
1056
- response = {
1057
- ...(await deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context)),
1058
- name: errorCode,
1059
- $metadata: deserializeMetadata(output),
1060
- };
1061
- break;
1062
- case "InvalidArnException":
1063
- case "com.amazonaws.acmpca#InvalidArnException":
1064
- response = {
1065
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
1066
- name: errorCode,
1067
- $metadata: deserializeMetadata(output),
1068
- };
1069
- break;
1070
- case "ResourceNotFoundException":
1071
- case "com.amazonaws.acmpca#ResourceNotFoundException":
1072
- response = {
1073
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1074
- name: errorCode,
1075
- $metadata: deserializeMetadata(output),
1076
- };
1077
- break;
1078
- default:
1079
- const parsedBody = parsedOutput.body;
1080
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1081
- response = {
1082
- ...parsedBody,
1083
- name: `${errorCode}`,
1084
- message: parsedBody.message || parsedBody.Message || errorCode,
1085
- $fault: "client",
1086
- $metadata: deserializeMetadata(output),
1087
- } as any;
1088
- }
1089
- const message = response.message || response.Message || errorCode;
1090
- response.message = message;
1091
- delete response.Message;
1092
- return Promise.reject(Object.assign(new Error(message), response));
1093
- };
1094
-
1095
- export const deserializeAws_json1_1GetCertificateCommand = async (
1096
- output: __HttpResponse,
1097
- context: __SerdeContext
1098
- ): Promise<GetCertificateCommandOutput> => {
1099
- if (output.statusCode >= 300) {
1100
- return deserializeAws_json1_1GetCertificateCommandError(output, context);
1101
- }
1102
- const data: any = await parseBody(output.body, context);
1103
- let contents: any = {};
1104
- contents = deserializeAws_json1_1GetCertificateResponse(data, context);
1105
- const response: GetCertificateCommandOutput = {
1106
- $metadata: deserializeMetadata(output),
1107
- ...contents,
1108
- };
1109
- return Promise.resolve(response);
1110
- };
1111
-
1112
- const deserializeAws_json1_1GetCertificateCommandError = async (
1113
- output: __HttpResponse,
1114
- context: __SerdeContext
1115
- ): Promise<GetCertificateCommandOutput> => {
1116
- const parsedOutput: any = {
1117
- ...output,
1118
- body: await parseBody(output.body, context),
1119
- };
1120
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1121
- let errorCode: string = "UnknownError";
1122
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1123
- switch (errorCode) {
1124
- case "InvalidArnException":
1125
- case "com.amazonaws.acmpca#InvalidArnException":
1126
- response = {
1127
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
1128
- name: errorCode,
1129
- $metadata: deserializeMetadata(output),
1130
- };
1131
- break;
1132
- case "InvalidStateException":
1133
- case "com.amazonaws.acmpca#InvalidStateException":
1134
- response = {
1135
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
1136
- name: errorCode,
1137
- $metadata: deserializeMetadata(output),
1138
- };
1139
- break;
1140
- case "RequestFailedException":
1141
- case "com.amazonaws.acmpca#RequestFailedException":
1142
- response = {
1143
- ...(await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)),
1144
- name: errorCode,
1145
- $metadata: deserializeMetadata(output),
1146
- };
1147
- break;
1148
- case "RequestInProgressException":
1149
- case "com.amazonaws.acmpca#RequestInProgressException":
1150
- response = {
1151
- ...(await deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context)),
1152
- name: errorCode,
1153
- $metadata: deserializeMetadata(output),
1154
- };
1155
- break;
1156
- case "ResourceNotFoundException":
1157
- case "com.amazonaws.acmpca#ResourceNotFoundException":
1158
- response = {
1159
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1160
- name: errorCode,
1161
- $metadata: deserializeMetadata(output),
1162
- };
1163
- break;
1164
- default:
1165
- const parsedBody = parsedOutput.body;
1166
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1167
- response = {
1168
- ...parsedBody,
1169
- name: `${errorCode}`,
1170
- message: parsedBody.message || parsedBody.Message || errorCode,
1171
- $fault: "client",
1172
- $metadata: deserializeMetadata(output),
1173
- } as any;
1174
- }
1175
- const message = response.message || response.Message || errorCode;
1176
- response.message = message;
1177
- delete response.Message;
1178
- return Promise.reject(Object.assign(new Error(message), response));
1179
- };
1180
-
1181
- export const deserializeAws_json1_1GetCertificateAuthorityCertificateCommand = async (
1182
- output: __HttpResponse,
1183
- context: __SerdeContext
1184
- ): Promise<GetCertificateAuthorityCertificateCommandOutput> => {
1185
- if (output.statusCode >= 300) {
1186
- return deserializeAws_json1_1GetCertificateAuthorityCertificateCommandError(output, context);
1187
- }
1188
- const data: any = await parseBody(output.body, context);
1189
- let contents: any = {};
1190
- contents = deserializeAws_json1_1GetCertificateAuthorityCertificateResponse(data, context);
1191
- const response: GetCertificateAuthorityCertificateCommandOutput = {
1192
- $metadata: deserializeMetadata(output),
1193
- ...contents,
1194
- };
1195
- return Promise.resolve(response);
1196
- };
1197
-
1198
- const deserializeAws_json1_1GetCertificateAuthorityCertificateCommandError = async (
1199
- output: __HttpResponse,
1200
- context: __SerdeContext
1201
- ): Promise<GetCertificateAuthorityCertificateCommandOutput> => {
1202
- const parsedOutput: any = {
1203
- ...output,
1204
- body: await parseBody(output.body, context),
1205
- };
1206
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1207
- let errorCode: string = "UnknownError";
1208
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1209
- switch (errorCode) {
1210
- case "InvalidArnException":
1211
- case "com.amazonaws.acmpca#InvalidArnException":
1212
- response = {
1213
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
1214
- name: errorCode,
1215
- $metadata: deserializeMetadata(output),
1216
- };
1217
- break;
1218
- case "InvalidStateException":
1219
- case "com.amazonaws.acmpca#InvalidStateException":
1220
- response = {
1221
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
1222
- name: errorCode,
1223
- $metadata: deserializeMetadata(output),
1224
- };
1225
- break;
1226
- case "ResourceNotFoundException":
1227
- case "com.amazonaws.acmpca#ResourceNotFoundException":
1228
- response = {
1229
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1230
- name: errorCode,
1231
- $metadata: deserializeMetadata(output),
1232
- };
1233
- break;
1234
- default:
1235
- const parsedBody = parsedOutput.body;
1236
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1237
- response = {
1238
- ...parsedBody,
1239
- name: `${errorCode}`,
1240
- message: parsedBody.message || parsedBody.Message || errorCode,
1241
- $fault: "client",
1242
- $metadata: deserializeMetadata(output),
1243
- } as any;
1244
- }
1245
- const message = response.message || response.Message || errorCode;
1246
- response.message = message;
1247
- delete response.Message;
1248
- return Promise.reject(Object.assign(new Error(message), response));
1249
- };
1250
-
1251
- export const deserializeAws_json1_1GetCertificateAuthorityCsrCommand = async (
1252
- output: __HttpResponse,
1253
- context: __SerdeContext
1254
- ): Promise<GetCertificateAuthorityCsrCommandOutput> => {
1255
- if (output.statusCode >= 300) {
1256
- return deserializeAws_json1_1GetCertificateAuthorityCsrCommandError(output, context);
1257
- }
1258
- const data: any = await parseBody(output.body, context);
1259
- let contents: any = {};
1260
- contents = deserializeAws_json1_1GetCertificateAuthorityCsrResponse(data, context);
1261
- const response: GetCertificateAuthorityCsrCommandOutput = {
1262
- $metadata: deserializeMetadata(output),
1263
- ...contents,
1264
- };
1265
- return Promise.resolve(response);
1266
- };
1267
-
1268
- const deserializeAws_json1_1GetCertificateAuthorityCsrCommandError = async (
1269
- output: __HttpResponse,
1270
- context: __SerdeContext
1271
- ): Promise<GetCertificateAuthorityCsrCommandOutput> => {
1272
- const parsedOutput: any = {
1273
- ...output,
1274
- body: await parseBody(output.body, context),
1275
- };
1276
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1277
- let errorCode: string = "UnknownError";
1278
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1279
- switch (errorCode) {
1280
- case "InvalidArnException":
1281
- case "com.amazonaws.acmpca#InvalidArnException":
1282
- response = {
1283
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
1284
- name: errorCode,
1285
- $metadata: deserializeMetadata(output),
1286
- };
1287
- break;
1288
- case "InvalidStateException":
1289
- case "com.amazonaws.acmpca#InvalidStateException":
1290
- response = {
1291
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
1292
- name: errorCode,
1293
- $metadata: deserializeMetadata(output),
1294
- };
1295
- break;
1296
- case "RequestFailedException":
1297
- case "com.amazonaws.acmpca#RequestFailedException":
1298
- response = {
1299
- ...(await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)),
1300
- name: errorCode,
1301
- $metadata: deserializeMetadata(output),
1302
- };
1303
- break;
1304
- case "RequestInProgressException":
1305
- case "com.amazonaws.acmpca#RequestInProgressException":
1306
- response = {
1307
- ...(await deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context)),
1308
- name: errorCode,
1309
- $metadata: deserializeMetadata(output),
1310
- };
1311
- break;
1312
- case "ResourceNotFoundException":
1313
- case "com.amazonaws.acmpca#ResourceNotFoundException":
1314
- response = {
1315
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1316
- name: errorCode,
1317
- $metadata: deserializeMetadata(output),
1318
- };
1319
- break;
1320
- default:
1321
- const parsedBody = parsedOutput.body;
1322
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1323
- response = {
1324
- ...parsedBody,
1325
- name: `${errorCode}`,
1326
- message: parsedBody.message || parsedBody.Message || errorCode,
1327
- $fault: "client",
1328
- $metadata: deserializeMetadata(output),
1329
- } as any;
1330
- }
1331
- const message = response.message || response.Message || errorCode;
1332
- response.message = message;
1333
- delete response.Message;
1334
- return Promise.reject(Object.assign(new Error(message), response));
1335
- };
1336
-
1337
- export const deserializeAws_json1_1GetPolicyCommand = async (
1338
- output: __HttpResponse,
1339
- context: __SerdeContext
1340
- ): Promise<GetPolicyCommandOutput> => {
1341
- if (output.statusCode >= 300) {
1342
- return deserializeAws_json1_1GetPolicyCommandError(output, context);
1343
- }
1344
- const data: any = await parseBody(output.body, context);
1345
- let contents: any = {};
1346
- contents = deserializeAws_json1_1GetPolicyResponse(data, context);
1347
- const response: GetPolicyCommandOutput = {
1348
- $metadata: deserializeMetadata(output),
1349
- ...contents,
1350
- };
1351
- return Promise.resolve(response);
1352
- };
1353
-
1354
- const deserializeAws_json1_1GetPolicyCommandError = async (
1355
- output: __HttpResponse,
1356
- context: __SerdeContext
1357
- ): Promise<GetPolicyCommandOutput> => {
1358
- const parsedOutput: any = {
1359
- ...output,
1360
- body: await parseBody(output.body, context),
1361
- };
1362
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1363
- let errorCode: string = "UnknownError";
1364
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1365
- switch (errorCode) {
1366
- case "InvalidArnException":
1367
- case "com.amazonaws.acmpca#InvalidArnException":
1368
- response = {
1369
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
1370
- name: errorCode,
1371
- $metadata: deserializeMetadata(output),
1372
- };
1373
- break;
1374
- case "InvalidStateException":
1375
- case "com.amazonaws.acmpca#InvalidStateException":
1376
- response = {
1377
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
1378
- name: errorCode,
1379
- $metadata: deserializeMetadata(output),
1380
- };
1381
- break;
1382
- case "RequestFailedException":
1383
- case "com.amazonaws.acmpca#RequestFailedException":
1384
- response = {
1385
- ...(await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)),
1386
- name: errorCode,
1387
- $metadata: deserializeMetadata(output),
1388
- };
1389
- break;
1390
- case "ResourceNotFoundException":
1391
- case "com.amazonaws.acmpca#ResourceNotFoundException":
1392
- response = {
1393
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1394
- name: errorCode,
1395
- $metadata: deserializeMetadata(output),
1396
- };
1397
- break;
1398
- default:
1399
- const parsedBody = parsedOutput.body;
1400
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1401
- response = {
1402
- ...parsedBody,
1403
- name: `${errorCode}`,
1404
- message: parsedBody.message || parsedBody.Message || errorCode,
1405
- $fault: "client",
1406
- $metadata: deserializeMetadata(output),
1407
- } as any;
1408
- }
1409
- const message = response.message || response.Message || errorCode;
1410
- response.message = message;
1411
- delete response.Message;
1412
- return Promise.reject(Object.assign(new Error(message), response));
1413
- };
1414
-
1415
- export const deserializeAws_json1_1ImportCertificateAuthorityCertificateCommand = async (
1416
- output: __HttpResponse,
1417
- context: __SerdeContext
1418
- ): Promise<ImportCertificateAuthorityCertificateCommandOutput> => {
1419
- if (output.statusCode >= 300) {
1420
- return deserializeAws_json1_1ImportCertificateAuthorityCertificateCommandError(output, context);
1421
- }
1422
- await collectBody(output.body, context);
1423
- const response: ImportCertificateAuthorityCertificateCommandOutput = {
1424
- $metadata: deserializeMetadata(output),
1425
- };
1426
- return Promise.resolve(response);
1427
- };
1428
-
1429
- const deserializeAws_json1_1ImportCertificateAuthorityCertificateCommandError = async (
1430
- output: __HttpResponse,
1431
- context: __SerdeContext
1432
- ): Promise<ImportCertificateAuthorityCertificateCommandOutput> => {
1433
- const parsedOutput: any = {
1434
- ...output,
1435
- body: await parseBody(output.body, context),
1436
- };
1437
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1438
- let errorCode: string = "UnknownError";
1439
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1440
- switch (errorCode) {
1441
- case "CertificateMismatchException":
1442
- case "com.amazonaws.acmpca#CertificateMismatchException":
1443
- response = {
1444
- ...(await deserializeAws_json1_1CertificateMismatchExceptionResponse(parsedOutput, context)),
1445
- name: errorCode,
1446
- $metadata: deserializeMetadata(output),
1447
- };
1448
- break;
1449
- case "ConcurrentModificationException":
1450
- case "com.amazonaws.acmpca#ConcurrentModificationException":
1451
- response = {
1452
- ...(await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)),
1453
- name: errorCode,
1454
- $metadata: deserializeMetadata(output),
1455
- };
1456
- break;
1457
- case "InvalidArnException":
1458
- case "com.amazonaws.acmpca#InvalidArnException":
1459
- response = {
1460
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
1461
- name: errorCode,
1462
- $metadata: deserializeMetadata(output),
1463
- };
1464
- break;
1465
- case "InvalidRequestException":
1466
- case "com.amazonaws.acmpca#InvalidRequestException":
1467
- response = {
1468
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
1469
- name: errorCode,
1470
- $metadata: deserializeMetadata(output),
1471
- };
1472
- break;
1473
- case "InvalidStateException":
1474
- case "com.amazonaws.acmpca#InvalidStateException":
1475
- response = {
1476
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
1477
- name: errorCode,
1478
- $metadata: deserializeMetadata(output),
1479
- };
1480
- break;
1481
- case "MalformedCertificateException":
1482
- case "com.amazonaws.acmpca#MalformedCertificateException":
1483
- response = {
1484
- ...(await deserializeAws_json1_1MalformedCertificateExceptionResponse(parsedOutput, context)),
1485
- name: errorCode,
1486
- $metadata: deserializeMetadata(output),
1487
- };
1488
- break;
1489
- case "RequestFailedException":
1490
- case "com.amazonaws.acmpca#RequestFailedException":
1491
- response = {
1492
- ...(await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)),
1493
- name: errorCode,
1494
- $metadata: deserializeMetadata(output),
1495
- };
1496
- break;
1497
- case "RequestInProgressException":
1498
- case "com.amazonaws.acmpca#RequestInProgressException":
1499
- response = {
1500
- ...(await deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context)),
1501
- name: errorCode,
1502
- $metadata: deserializeMetadata(output),
1503
- };
1504
- break;
1505
- case "ResourceNotFoundException":
1506
- case "com.amazonaws.acmpca#ResourceNotFoundException":
1507
- response = {
1508
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1509
- name: errorCode,
1510
- $metadata: deserializeMetadata(output),
1511
- };
1512
- break;
1513
- default:
1514
- const parsedBody = parsedOutput.body;
1515
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1516
- response = {
1517
- ...parsedBody,
1518
- name: `${errorCode}`,
1519
- message: parsedBody.message || parsedBody.Message || errorCode,
1520
- $fault: "client",
1521
- $metadata: deserializeMetadata(output),
1522
- } as any;
1523
- }
1524
- const message = response.message || response.Message || errorCode;
1525
- response.message = message;
1526
- delete response.Message;
1527
- return Promise.reject(Object.assign(new Error(message), response));
1528
- };
1529
-
1530
- export const deserializeAws_json1_1IssueCertificateCommand = async (
1531
- output: __HttpResponse,
1532
- context: __SerdeContext
1533
- ): Promise<IssueCertificateCommandOutput> => {
1534
- if (output.statusCode >= 300) {
1535
- return deserializeAws_json1_1IssueCertificateCommandError(output, context);
1536
- }
1537
- const data: any = await parseBody(output.body, context);
1538
- let contents: any = {};
1539
- contents = deserializeAws_json1_1IssueCertificateResponse(data, context);
1540
- const response: IssueCertificateCommandOutput = {
1541
- $metadata: deserializeMetadata(output),
1542
- ...contents,
1543
- };
1544
- return Promise.resolve(response);
1545
- };
1546
-
1547
- const deserializeAws_json1_1IssueCertificateCommandError = async (
1548
- output: __HttpResponse,
1549
- context: __SerdeContext
1550
- ): Promise<IssueCertificateCommandOutput> => {
1551
- const parsedOutput: any = {
1552
- ...output,
1553
- body: await parseBody(output.body, context),
1554
- };
1555
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1556
- let errorCode: string = "UnknownError";
1557
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1558
- switch (errorCode) {
1559
- case "InvalidArgsException":
1560
- case "com.amazonaws.acmpca#InvalidArgsException":
1561
- response = {
1562
- ...(await deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context)),
1563
- name: errorCode,
1564
- $metadata: deserializeMetadata(output),
1565
- };
1566
- break;
1567
- case "InvalidArnException":
1568
- case "com.amazonaws.acmpca#InvalidArnException":
1569
- response = {
1570
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
1571
- name: errorCode,
1572
- $metadata: deserializeMetadata(output),
1573
- };
1574
- break;
1575
- case "InvalidStateException":
1576
- case "com.amazonaws.acmpca#InvalidStateException":
1577
- response = {
1578
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
1579
- name: errorCode,
1580
- $metadata: deserializeMetadata(output),
1581
- };
1582
- break;
1583
- case "LimitExceededException":
1584
- case "com.amazonaws.acmpca#LimitExceededException":
1585
- response = {
1586
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
1587
- name: errorCode,
1588
- $metadata: deserializeMetadata(output),
1589
- };
1590
- break;
1591
- case "MalformedCSRException":
1592
- case "com.amazonaws.acmpca#MalformedCSRException":
1593
- response = {
1594
- ...(await deserializeAws_json1_1MalformedCSRExceptionResponse(parsedOutput, context)),
1595
- name: errorCode,
1596
- $metadata: deserializeMetadata(output),
1597
- };
1598
- break;
1599
- case "ResourceNotFoundException":
1600
- case "com.amazonaws.acmpca#ResourceNotFoundException":
1601
- response = {
1602
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1603
- name: errorCode,
1604
- $metadata: deserializeMetadata(output),
1605
- };
1606
- break;
1607
- default:
1608
- const parsedBody = parsedOutput.body;
1609
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1610
- response = {
1611
- ...parsedBody,
1612
- name: `${errorCode}`,
1613
- message: parsedBody.message || parsedBody.Message || errorCode,
1614
- $fault: "client",
1615
- $metadata: deserializeMetadata(output),
1616
- } as any;
1617
- }
1618
- const message = response.message || response.Message || errorCode;
1619
- response.message = message;
1620
- delete response.Message;
1621
- return Promise.reject(Object.assign(new Error(message), response));
1622
- };
1623
-
1624
- export const deserializeAws_json1_1ListCertificateAuthoritiesCommand = async (
1625
- output: __HttpResponse,
1626
- context: __SerdeContext
1627
- ): Promise<ListCertificateAuthoritiesCommandOutput> => {
1628
- if (output.statusCode >= 300) {
1629
- return deserializeAws_json1_1ListCertificateAuthoritiesCommandError(output, context);
1630
- }
1631
- const data: any = await parseBody(output.body, context);
1632
- let contents: any = {};
1633
- contents = deserializeAws_json1_1ListCertificateAuthoritiesResponse(data, context);
1634
- const response: ListCertificateAuthoritiesCommandOutput = {
1635
- $metadata: deserializeMetadata(output),
1636
- ...contents,
1637
- };
1638
- return Promise.resolve(response);
1639
- };
1640
-
1641
- const deserializeAws_json1_1ListCertificateAuthoritiesCommandError = async (
1642
- output: __HttpResponse,
1643
- context: __SerdeContext
1644
- ): Promise<ListCertificateAuthoritiesCommandOutput> => {
1645
- const parsedOutput: any = {
1646
- ...output,
1647
- body: await parseBody(output.body, context),
1648
- };
1649
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1650
- let errorCode: string = "UnknownError";
1651
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1652
- switch (errorCode) {
1653
- case "InvalidNextTokenException":
1654
- case "com.amazonaws.acmpca#InvalidNextTokenException":
1655
- response = {
1656
- ...(await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)),
1657
- name: errorCode,
1658
- $metadata: deserializeMetadata(output),
1659
- };
1660
- break;
1661
- default:
1662
- const parsedBody = parsedOutput.body;
1663
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1664
- response = {
1665
- ...parsedBody,
1666
- name: `${errorCode}`,
1667
- message: parsedBody.message || parsedBody.Message || errorCode,
1668
- $fault: "client",
1669
- $metadata: deserializeMetadata(output),
1670
- } as any;
1671
- }
1672
- const message = response.message || response.Message || errorCode;
1673
- response.message = message;
1674
- delete response.Message;
1675
- return Promise.reject(Object.assign(new Error(message), response));
1676
- };
1677
-
1678
- export const deserializeAws_json1_1ListPermissionsCommand = async (
1679
- output: __HttpResponse,
1680
- context: __SerdeContext
1681
- ): Promise<ListPermissionsCommandOutput> => {
1682
- if (output.statusCode >= 300) {
1683
- return deserializeAws_json1_1ListPermissionsCommandError(output, context);
1684
- }
1685
- const data: any = await parseBody(output.body, context);
1686
- let contents: any = {};
1687
- contents = deserializeAws_json1_1ListPermissionsResponse(data, context);
1688
- const response: ListPermissionsCommandOutput = {
1689
- $metadata: deserializeMetadata(output),
1690
- ...contents,
1691
- };
1692
- return Promise.resolve(response);
1693
- };
1694
-
1695
- const deserializeAws_json1_1ListPermissionsCommandError = async (
1696
- output: __HttpResponse,
1697
- context: __SerdeContext
1698
- ): Promise<ListPermissionsCommandOutput> => {
1699
- const parsedOutput: any = {
1700
- ...output,
1701
- body: await parseBody(output.body, context),
1702
- };
1703
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1704
- let errorCode: string = "UnknownError";
1705
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1706
- switch (errorCode) {
1707
- case "InvalidArnException":
1708
- case "com.amazonaws.acmpca#InvalidArnException":
1709
- response = {
1710
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
1711
- name: errorCode,
1712
- $metadata: deserializeMetadata(output),
1713
- };
1714
- break;
1715
- case "InvalidNextTokenException":
1716
- case "com.amazonaws.acmpca#InvalidNextTokenException":
1717
- response = {
1718
- ...(await deserializeAws_json1_1InvalidNextTokenExceptionResponse(parsedOutput, context)),
1719
- name: errorCode,
1720
- $metadata: deserializeMetadata(output),
1721
- };
1722
- break;
1723
- case "InvalidStateException":
1724
- case "com.amazonaws.acmpca#InvalidStateException":
1725
- response = {
1726
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
1727
- name: errorCode,
1728
- $metadata: deserializeMetadata(output),
1729
- };
1730
- break;
1731
- case "RequestFailedException":
1732
- case "com.amazonaws.acmpca#RequestFailedException":
1733
- response = {
1734
- ...(await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)),
1735
- name: errorCode,
1736
- $metadata: deserializeMetadata(output),
1737
- };
1738
- break;
1739
- case "ResourceNotFoundException":
1740
- case "com.amazonaws.acmpca#ResourceNotFoundException":
1741
- response = {
1742
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1743
- name: errorCode,
1744
- $metadata: deserializeMetadata(output),
1745
- };
1746
- break;
1747
- default:
1748
- const parsedBody = parsedOutput.body;
1749
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1750
- response = {
1751
- ...parsedBody,
1752
- name: `${errorCode}`,
1753
- message: parsedBody.message || parsedBody.Message || errorCode,
1754
- $fault: "client",
1755
- $metadata: deserializeMetadata(output),
1756
- } as any;
1757
- }
1758
- const message = response.message || response.Message || errorCode;
1759
- response.message = message;
1760
- delete response.Message;
1761
- return Promise.reject(Object.assign(new Error(message), response));
1762
- };
1763
-
1764
- export const deserializeAws_json1_1ListTagsCommand = async (
1765
- output: __HttpResponse,
1766
- context: __SerdeContext
1767
- ): Promise<ListTagsCommandOutput> => {
1768
- if (output.statusCode >= 300) {
1769
- return deserializeAws_json1_1ListTagsCommandError(output, context);
1770
- }
1771
- const data: any = await parseBody(output.body, context);
1772
- let contents: any = {};
1773
- contents = deserializeAws_json1_1ListTagsResponse(data, context);
1774
- const response: ListTagsCommandOutput = {
1775
- $metadata: deserializeMetadata(output),
1776
- ...contents,
1777
- };
1778
- return Promise.resolve(response);
1779
- };
1780
-
1781
- const deserializeAws_json1_1ListTagsCommandError = async (
1782
- output: __HttpResponse,
1783
- context: __SerdeContext
1784
- ): Promise<ListTagsCommandOutput> => {
1785
- const parsedOutput: any = {
1786
- ...output,
1787
- body: await parseBody(output.body, context),
1788
- };
1789
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1790
- let errorCode: string = "UnknownError";
1791
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1792
- switch (errorCode) {
1793
- case "InvalidArnException":
1794
- case "com.amazonaws.acmpca#InvalidArnException":
1795
- response = {
1796
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
1797
- name: errorCode,
1798
- $metadata: deserializeMetadata(output),
1799
- };
1800
- break;
1801
- case "InvalidStateException":
1802
- case "com.amazonaws.acmpca#InvalidStateException":
1803
- response = {
1804
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
1805
- name: errorCode,
1806
- $metadata: deserializeMetadata(output),
1807
- };
1808
- break;
1809
- case "ResourceNotFoundException":
1810
- case "com.amazonaws.acmpca#ResourceNotFoundException":
1811
- response = {
1812
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1813
- name: errorCode,
1814
- $metadata: deserializeMetadata(output),
1815
- };
1816
- break;
1817
- default:
1818
- const parsedBody = parsedOutput.body;
1819
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1820
- response = {
1821
- ...parsedBody,
1822
- name: `${errorCode}`,
1823
- message: parsedBody.message || parsedBody.Message || errorCode,
1824
- $fault: "client",
1825
- $metadata: deserializeMetadata(output),
1826
- } as any;
1827
- }
1828
- const message = response.message || response.Message || errorCode;
1829
- response.message = message;
1830
- delete response.Message;
1831
- return Promise.reject(Object.assign(new Error(message), response));
1832
- };
1833
-
1834
- export const deserializeAws_json1_1PutPolicyCommand = async (
1835
- output: __HttpResponse,
1836
- context: __SerdeContext
1837
- ): Promise<PutPolicyCommandOutput> => {
1838
- if (output.statusCode >= 300) {
1839
- return deserializeAws_json1_1PutPolicyCommandError(output, context);
1840
- }
1841
- await collectBody(output.body, context);
1842
- const response: PutPolicyCommandOutput = {
1843
- $metadata: deserializeMetadata(output),
1844
- };
1845
- return Promise.resolve(response);
1846
- };
1847
-
1848
- const deserializeAws_json1_1PutPolicyCommandError = async (
1849
- output: __HttpResponse,
1850
- context: __SerdeContext
1851
- ): Promise<PutPolicyCommandOutput> => {
1852
- const parsedOutput: any = {
1853
- ...output,
1854
- body: await parseBody(output.body, context),
1855
- };
1856
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1857
- let errorCode: string = "UnknownError";
1858
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1859
- switch (errorCode) {
1860
- case "ConcurrentModificationException":
1861
- case "com.amazonaws.acmpca#ConcurrentModificationException":
1862
- response = {
1863
- ...(await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)),
1864
- name: errorCode,
1865
- $metadata: deserializeMetadata(output),
1866
- };
1867
- break;
1868
- case "InvalidArnException":
1869
- case "com.amazonaws.acmpca#InvalidArnException":
1870
- response = {
1871
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
1872
- name: errorCode,
1873
- $metadata: deserializeMetadata(output),
1874
- };
1875
- break;
1876
- case "InvalidPolicyException":
1877
- case "com.amazonaws.acmpca#InvalidPolicyException":
1878
- response = {
1879
- ...(await deserializeAws_json1_1InvalidPolicyExceptionResponse(parsedOutput, context)),
1880
- name: errorCode,
1881
- $metadata: deserializeMetadata(output),
1882
- };
1883
- break;
1884
- case "InvalidStateException":
1885
- case "com.amazonaws.acmpca#InvalidStateException":
1886
- response = {
1887
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
1888
- name: errorCode,
1889
- $metadata: deserializeMetadata(output),
1890
- };
1891
- break;
1892
- case "LockoutPreventedException":
1893
- case "com.amazonaws.acmpca#LockoutPreventedException":
1894
- response = {
1895
- ...(await deserializeAws_json1_1LockoutPreventedExceptionResponse(parsedOutput, context)),
1896
- name: errorCode,
1897
- $metadata: deserializeMetadata(output),
1898
- };
1899
- break;
1900
- case "RequestFailedException":
1901
- case "com.amazonaws.acmpca#RequestFailedException":
1902
- response = {
1903
- ...(await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)),
1904
- name: errorCode,
1905
- $metadata: deserializeMetadata(output),
1906
- };
1907
- break;
1908
- case "ResourceNotFoundException":
1909
- case "com.amazonaws.acmpca#ResourceNotFoundException":
1910
- response = {
1911
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1912
- name: errorCode,
1913
- $metadata: deserializeMetadata(output),
1914
- };
1915
- break;
1916
- default:
1917
- const parsedBody = parsedOutput.body;
1918
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1919
- response = {
1920
- ...parsedBody,
1921
- name: `${errorCode}`,
1922
- message: parsedBody.message || parsedBody.Message || errorCode,
1923
- $fault: "client",
1924
- $metadata: deserializeMetadata(output),
1925
- } as any;
1926
- }
1927
- const message = response.message || response.Message || errorCode;
1928
- response.message = message;
1929
- delete response.Message;
1930
- return Promise.reject(Object.assign(new Error(message), response));
1931
- };
1932
-
1933
- export const deserializeAws_json1_1RestoreCertificateAuthorityCommand = async (
1934
- output: __HttpResponse,
1935
- context: __SerdeContext
1936
- ): Promise<RestoreCertificateAuthorityCommandOutput> => {
1937
- if (output.statusCode >= 300) {
1938
- return deserializeAws_json1_1RestoreCertificateAuthorityCommandError(output, context);
1939
- }
1940
- await collectBody(output.body, context);
1941
- const response: RestoreCertificateAuthorityCommandOutput = {
1942
- $metadata: deserializeMetadata(output),
1943
- };
1944
- return Promise.resolve(response);
1945
- };
1946
-
1947
- const deserializeAws_json1_1RestoreCertificateAuthorityCommandError = async (
1948
- output: __HttpResponse,
1949
- context: __SerdeContext
1950
- ): Promise<RestoreCertificateAuthorityCommandOutput> => {
1951
- const parsedOutput: any = {
1952
- ...output,
1953
- body: await parseBody(output.body, context),
1954
- };
1955
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
1956
- let errorCode: string = "UnknownError";
1957
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1958
- switch (errorCode) {
1959
- case "InvalidArnException":
1960
- case "com.amazonaws.acmpca#InvalidArnException":
1961
- response = {
1962
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
1963
- name: errorCode,
1964
- $metadata: deserializeMetadata(output),
1965
- };
1966
- break;
1967
- case "InvalidStateException":
1968
- case "com.amazonaws.acmpca#InvalidStateException":
1969
- response = {
1970
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
1971
- name: errorCode,
1972
- $metadata: deserializeMetadata(output),
1973
- };
1974
- break;
1975
- case "ResourceNotFoundException":
1976
- case "com.amazonaws.acmpca#ResourceNotFoundException":
1977
- response = {
1978
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1979
- name: errorCode,
1980
- $metadata: deserializeMetadata(output),
1981
- };
1982
- break;
1983
- default:
1984
- const parsedBody = parsedOutput.body;
1985
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1986
- response = {
1987
- ...parsedBody,
1988
- name: `${errorCode}`,
1989
- message: parsedBody.message || parsedBody.Message || errorCode,
1990
- $fault: "client",
1991
- $metadata: deserializeMetadata(output),
1992
- } as any;
1993
- }
1994
- const message = response.message || response.Message || errorCode;
1995
- response.message = message;
1996
- delete response.Message;
1997
- return Promise.reject(Object.assign(new Error(message), response));
1998
- };
1999
-
2000
- export const deserializeAws_json1_1RevokeCertificateCommand = async (
2001
- output: __HttpResponse,
2002
- context: __SerdeContext
2003
- ): Promise<RevokeCertificateCommandOutput> => {
2004
- if (output.statusCode >= 300) {
2005
- return deserializeAws_json1_1RevokeCertificateCommandError(output, context);
2006
- }
2007
- await collectBody(output.body, context);
2008
- const response: RevokeCertificateCommandOutput = {
2009
- $metadata: deserializeMetadata(output),
2010
- };
2011
- return Promise.resolve(response);
2012
- };
2013
-
2014
- const deserializeAws_json1_1RevokeCertificateCommandError = async (
2015
- output: __HttpResponse,
2016
- context: __SerdeContext
2017
- ): Promise<RevokeCertificateCommandOutput> => {
2018
- const parsedOutput: any = {
2019
- ...output,
2020
- body: await parseBody(output.body, context),
2021
- };
2022
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2023
- let errorCode: string = "UnknownError";
2024
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2025
- switch (errorCode) {
2026
- case "ConcurrentModificationException":
2027
- case "com.amazonaws.acmpca#ConcurrentModificationException":
2028
- response = {
2029
- ...(await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)),
2030
- name: errorCode,
2031
- $metadata: deserializeMetadata(output),
2032
- };
2033
- break;
2034
- case "InvalidArnException":
2035
- case "com.amazonaws.acmpca#InvalidArnException":
2036
- response = {
2037
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
2038
- name: errorCode,
2039
- $metadata: deserializeMetadata(output),
2040
- };
2041
- break;
2042
- case "InvalidRequestException":
2043
- case "com.amazonaws.acmpca#InvalidRequestException":
2044
- response = {
2045
- ...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
2046
- name: errorCode,
2047
- $metadata: deserializeMetadata(output),
2048
- };
2049
- break;
2050
- case "InvalidStateException":
2051
- case "com.amazonaws.acmpca#InvalidStateException":
2052
- response = {
2053
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
2054
- name: errorCode,
2055
- $metadata: deserializeMetadata(output),
2056
- };
2057
- break;
2058
- case "LimitExceededException":
2059
- case "com.amazonaws.acmpca#LimitExceededException":
2060
- response = {
2061
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
2062
- name: errorCode,
2063
- $metadata: deserializeMetadata(output),
2064
- };
2065
- break;
2066
- case "RequestAlreadyProcessedException":
2067
- case "com.amazonaws.acmpca#RequestAlreadyProcessedException":
2068
- response = {
2069
- ...(await deserializeAws_json1_1RequestAlreadyProcessedExceptionResponse(parsedOutput, context)),
2070
- name: errorCode,
2071
- $metadata: deserializeMetadata(output),
2072
- };
2073
- break;
2074
- case "RequestFailedException":
2075
- case "com.amazonaws.acmpca#RequestFailedException":
2076
- response = {
2077
- ...(await deserializeAws_json1_1RequestFailedExceptionResponse(parsedOutput, context)),
2078
- name: errorCode,
2079
- $metadata: deserializeMetadata(output),
2080
- };
2081
- break;
2082
- case "RequestInProgressException":
2083
- case "com.amazonaws.acmpca#RequestInProgressException":
2084
- response = {
2085
- ...(await deserializeAws_json1_1RequestInProgressExceptionResponse(parsedOutput, context)),
2086
- name: errorCode,
2087
- $metadata: deserializeMetadata(output),
2088
- };
2089
- break;
2090
- case "ResourceNotFoundException":
2091
- case "com.amazonaws.acmpca#ResourceNotFoundException":
2092
- response = {
2093
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2094
- name: errorCode,
2095
- $metadata: deserializeMetadata(output),
2096
- };
2097
- break;
2098
- default:
2099
- const parsedBody = parsedOutput.body;
2100
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2101
- response = {
2102
- ...parsedBody,
2103
- name: `${errorCode}`,
2104
- message: parsedBody.message || parsedBody.Message || errorCode,
2105
- $fault: "client",
2106
- $metadata: deserializeMetadata(output),
2107
- } as any;
2108
- }
2109
- const message = response.message || response.Message || errorCode;
2110
- response.message = message;
2111
- delete response.Message;
2112
- return Promise.reject(Object.assign(new Error(message), response));
2113
- };
2114
-
2115
- export const deserializeAws_json1_1TagCertificateAuthorityCommand = async (
2116
- output: __HttpResponse,
2117
- context: __SerdeContext
2118
- ): Promise<TagCertificateAuthorityCommandOutput> => {
2119
- if (output.statusCode >= 300) {
2120
- return deserializeAws_json1_1TagCertificateAuthorityCommandError(output, context);
2121
- }
2122
- await collectBody(output.body, context);
2123
- const response: TagCertificateAuthorityCommandOutput = {
2124
- $metadata: deserializeMetadata(output),
2125
- };
2126
- return Promise.resolve(response);
2127
- };
2128
-
2129
- const deserializeAws_json1_1TagCertificateAuthorityCommandError = async (
2130
- output: __HttpResponse,
2131
- context: __SerdeContext
2132
- ): Promise<TagCertificateAuthorityCommandOutput> => {
2133
- const parsedOutput: any = {
2134
- ...output,
2135
- body: await parseBody(output.body, context),
2136
- };
2137
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2138
- let errorCode: string = "UnknownError";
2139
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2140
- switch (errorCode) {
2141
- case "InvalidArnException":
2142
- case "com.amazonaws.acmpca#InvalidArnException":
2143
- response = {
2144
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
2145
- name: errorCode,
2146
- $metadata: deserializeMetadata(output),
2147
- };
2148
- break;
2149
- case "InvalidStateException":
2150
- case "com.amazonaws.acmpca#InvalidStateException":
2151
- response = {
2152
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
2153
- name: errorCode,
2154
- $metadata: deserializeMetadata(output),
2155
- };
2156
- break;
2157
- case "InvalidTagException":
2158
- case "com.amazonaws.acmpca#InvalidTagException":
2159
- response = {
2160
- ...(await deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context)),
2161
- name: errorCode,
2162
- $metadata: deserializeMetadata(output),
2163
- };
2164
- break;
2165
- case "ResourceNotFoundException":
2166
- case "com.amazonaws.acmpca#ResourceNotFoundException":
2167
- response = {
2168
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2169
- name: errorCode,
2170
- $metadata: deserializeMetadata(output),
2171
- };
2172
- break;
2173
- case "TooManyTagsException":
2174
- case "com.amazonaws.acmpca#TooManyTagsException":
2175
- response = {
2176
- ...(await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context)),
2177
- name: errorCode,
2178
- $metadata: deserializeMetadata(output),
2179
- };
2180
- break;
2181
- default:
2182
- const parsedBody = parsedOutput.body;
2183
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2184
- response = {
2185
- ...parsedBody,
2186
- name: `${errorCode}`,
2187
- message: parsedBody.message || parsedBody.Message || errorCode,
2188
- $fault: "client",
2189
- $metadata: deserializeMetadata(output),
2190
- } as any;
2191
- }
2192
- const message = response.message || response.Message || errorCode;
2193
- response.message = message;
2194
- delete response.Message;
2195
- return Promise.reject(Object.assign(new Error(message), response));
2196
- };
2197
-
2198
- export const deserializeAws_json1_1UntagCertificateAuthorityCommand = async (
2199
- output: __HttpResponse,
2200
- context: __SerdeContext
2201
- ): Promise<UntagCertificateAuthorityCommandOutput> => {
2202
- if (output.statusCode >= 300) {
2203
- return deserializeAws_json1_1UntagCertificateAuthorityCommandError(output, context);
2204
- }
2205
- await collectBody(output.body, context);
2206
- const response: UntagCertificateAuthorityCommandOutput = {
2207
- $metadata: deserializeMetadata(output),
2208
- };
2209
- return Promise.resolve(response);
2210
- };
2211
-
2212
- const deserializeAws_json1_1UntagCertificateAuthorityCommandError = async (
2213
- output: __HttpResponse,
2214
- context: __SerdeContext
2215
- ): Promise<UntagCertificateAuthorityCommandOutput> => {
2216
- const parsedOutput: any = {
2217
- ...output,
2218
- body: await parseBody(output.body, context),
2219
- };
2220
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2221
- let errorCode: string = "UnknownError";
2222
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2223
- switch (errorCode) {
2224
- case "InvalidArnException":
2225
- case "com.amazonaws.acmpca#InvalidArnException":
2226
- response = {
2227
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
2228
- name: errorCode,
2229
- $metadata: deserializeMetadata(output),
2230
- };
2231
- break;
2232
- case "InvalidStateException":
2233
- case "com.amazonaws.acmpca#InvalidStateException":
2234
- response = {
2235
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
2236
- name: errorCode,
2237
- $metadata: deserializeMetadata(output),
2238
- };
2239
- break;
2240
- case "InvalidTagException":
2241
- case "com.amazonaws.acmpca#InvalidTagException":
2242
- response = {
2243
- ...(await deserializeAws_json1_1InvalidTagExceptionResponse(parsedOutput, context)),
2244
- name: errorCode,
2245
- $metadata: deserializeMetadata(output),
2246
- };
2247
- break;
2248
- case "ResourceNotFoundException":
2249
- case "com.amazonaws.acmpca#ResourceNotFoundException":
2250
- response = {
2251
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2252
- name: errorCode,
2253
- $metadata: deserializeMetadata(output),
2254
- };
2255
- break;
2256
- default:
2257
- const parsedBody = parsedOutput.body;
2258
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2259
- response = {
2260
- ...parsedBody,
2261
- name: `${errorCode}`,
2262
- message: parsedBody.message || parsedBody.Message || errorCode,
2263
- $fault: "client",
2264
- $metadata: deserializeMetadata(output),
2265
- } as any;
2266
- }
2267
- const message = response.message || response.Message || errorCode;
2268
- response.message = message;
2269
- delete response.Message;
2270
- return Promise.reject(Object.assign(new Error(message), response));
2271
- };
2272
-
2273
- export const deserializeAws_json1_1UpdateCertificateAuthorityCommand = async (
2274
- output: __HttpResponse,
2275
- context: __SerdeContext
2276
- ): Promise<UpdateCertificateAuthorityCommandOutput> => {
2277
- if (output.statusCode >= 300) {
2278
- return deserializeAws_json1_1UpdateCertificateAuthorityCommandError(output, context);
2279
- }
2280
- await collectBody(output.body, context);
2281
- const response: UpdateCertificateAuthorityCommandOutput = {
2282
- $metadata: deserializeMetadata(output),
2283
- };
2284
- return Promise.resolve(response);
2285
- };
2286
-
2287
- const deserializeAws_json1_1UpdateCertificateAuthorityCommandError = async (
2288
- output: __HttpResponse,
2289
- context: __SerdeContext
2290
- ): Promise<UpdateCertificateAuthorityCommandOutput> => {
2291
- const parsedOutput: any = {
2292
- ...output,
2293
- body: await parseBody(output.body, context),
2294
- };
2295
- let response: __SmithyException & __MetadataBearer & { [key: string]: any };
2296
- let errorCode: string = "UnknownError";
2297
- errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2298
- switch (errorCode) {
2299
- case "ConcurrentModificationException":
2300
- case "com.amazonaws.acmpca#ConcurrentModificationException":
2301
- response = {
2302
- ...(await deserializeAws_json1_1ConcurrentModificationExceptionResponse(parsedOutput, context)),
2303
- name: errorCode,
2304
- $metadata: deserializeMetadata(output),
2305
- };
2306
- break;
2307
- case "InvalidArgsException":
2308
- case "com.amazonaws.acmpca#InvalidArgsException":
2309
- response = {
2310
- ...(await deserializeAws_json1_1InvalidArgsExceptionResponse(parsedOutput, context)),
2311
- name: errorCode,
2312
- $metadata: deserializeMetadata(output),
2313
- };
2314
- break;
2315
- case "InvalidArnException":
2316
- case "com.amazonaws.acmpca#InvalidArnException":
2317
- response = {
2318
- ...(await deserializeAws_json1_1InvalidArnExceptionResponse(parsedOutput, context)),
2319
- name: errorCode,
2320
- $metadata: deserializeMetadata(output),
2321
- };
2322
- break;
2323
- case "InvalidPolicyException":
2324
- case "com.amazonaws.acmpca#InvalidPolicyException":
2325
- response = {
2326
- ...(await deserializeAws_json1_1InvalidPolicyExceptionResponse(parsedOutput, context)),
2327
- name: errorCode,
2328
- $metadata: deserializeMetadata(output),
2329
- };
2330
- break;
2331
- case "InvalidStateException":
2332
- case "com.amazonaws.acmpca#InvalidStateException":
2333
- response = {
2334
- ...(await deserializeAws_json1_1InvalidStateExceptionResponse(parsedOutput, context)),
2335
- name: errorCode,
2336
- $metadata: deserializeMetadata(output),
2337
- };
2338
- break;
2339
- case "ResourceNotFoundException":
2340
- case "com.amazonaws.acmpca#ResourceNotFoundException":
2341
- response = {
2342
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2343
- name: errorCode,
2344
- $metadata: deserializeMetadata(output),
2345
- };
2346
- break;
2347
- default:
2348
- const parsedBody = parsedOutput.body;
2349
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2350
- response = {
2351
- ...parsedBody,
2352
- name: `${errorCode}`,
2353
- message: parsedBody.message || parsedBody.Message || errorCode,
2354
- $fault: "client",
2355
- $metadata: deserializeMetadata(output),
2356
- } as any;
2357
- }
2358
- const message = response.message || response.Message || errorCode;
2359
- response.message = message;
2360
- delete response.Message;
2361
- return Promise.reject(Object.assign(new Error(message), response));
2362
- };
2363
-
2364
- const deserializeAws_json1_1CertificateMismatchExceptionResponse = async (
2365
- parsedOutput: any,
2366
- context: __SerdeContext
2367
- ): Promise<CertificateMismatchException> => {
2368
- const body = parsedOutput.body;
2369
- const deserialized: any = deserializeAws_json1_1CertificateMismatchException(body, context);
2370
- const contents: CertificateMismatchException = {
2371
- name: "CertificateMismatchException",
2372
- $fault: "client",
2373
- $metadata: deserializeMetadata(parsedOutput),
2374
- ...deserialized,
2375
- };
2376
- return contents;
2377
- };
2378
-
2379
- const deserializeAws_json1_1ConcurrentModificationExceptionResponse = async (
2380
- parsedOutput: any,
2381
- context: __SerdeContext
2382
- ): Promise<ConcurrentModificationException> => {
2383
- const body = parsedOutput.body;
2384
- const deserialized: any = deserializeAws_json1_1ConcurrentModificationException(body, context);
2385
- const contents: ConcurrentModificationException = {
2386
- name: "ConcurrentModificationException",
2387
- $fault: "client",
2388
- $metadata: deserializeMetadata(parsedOutput),
2389
- ...deserialized,
2390
- };
2391
- return contents;
2392
- };
2393
-
2394
- const deserializeAws_json1_1InvalidArgsExceptionResponse = async (
2395
- parsedOutput: any,
2396
- context: __SerdeContext
2397
- ): Promise<InvalidArgsException> => {
2398
- const body = parsedOutput.body;
2399
- const deserialized: any = deserializeAws_json1_1InvalidArgsException(body, context);
2400
- const contents: InvalidArgsException = {
2401
- name: "InvalidArgsException",
2402
- $fault: "client",
2403
- $metadata: deserializeMetadata(parsedOutput),
2404
- ...deserialized,
2405
- };
2406
- return contents;
2407
- };
2408
-
2409
- const deserializeAws_json1_1InvalidArnExceptionResponse = async (
2410
- parsedOutput: any,
2411
- context: __SerdeContext
2412
- ): Promise<InvalidArnException> => {
2413
- const body = parsedOutput.body;
2414
- const deserialized: any = deserializeAws_json1_1InvalidArnException(body, context);
2415
- const contents: InvalidArnException = {
2416
- name: "InvalidArnException",
2417
- $fault: "client",
2418
- $metadata: deserializeMetadata(parsedOutput),
2419
- ...deserialized,
2420
- };
2421
- return contents;
2422
- };
2423
-
2424
- const deserializeAws_json1_1InvalidNextTokenExceptionResponse = async (
2425
- parsedOutput: any,
2426
- context: __SerdeContext
2427
- ): Promise<InvalidNextTokenException> => {
2428
- const body = parsedOutput.body;
2429
- const deserialized: any = deserializeAws_json1_1InvalidNextTokenException(body, context);
2430
- const contents: InvalidNextTokenException = {
2431
- name: "InvalidNextTokenException",
2432
- $fault: "client",
2433
- $metadata: deserializeMetadata(parsedOutput),
2434
- ...deserialized,
2435
- };
2436
- return contents;
2437
- };
2438
-
2439
- const deserializeAws_json1_1InvalidPolicyExceptionResponse = async (
2440
- parsedOutput: any,
2441
- context: __SerdeContext
2442
- ): Promise<InvalidPolicyException> => {
2443
- const body = parsedOutput.body;
2444
- const deserialized: any = deserializeAws_json1_1InvalidPolicyException(body, context);
2445
- const contents: InvalidPolicyException = {
2446
- name: "InvalidPolicyException",
2447
- $fault: "client",
2448
- $metadata: deserializeMetadata(parsedOutput),
2449
- ...deserialized,
2450
- };
2451
- return contents;
2452
- };
2453
-
2454
- const deserializeAws_json1_1InvalidRequestExceptionResponse = async (
2455
- parsedOutput: any,
2456
- context: __SerdeContext
2457
- ): Promise<InvalidRequestException> => {
2458
- const body = parsedOutput.body;
2459
- const deserialized: any = deserializeAws_json1_1InvalidRequestException(body, context);
2460
- const contents: InvalidRequestException = {
2461
- name: "InvalidRequestException",
2462
- $fault: "client",
2463
- $metadata: deserializeMetadata(parsedOutput),
2464
- ...deserialized,
2465
- };
2466
- return contents;
2467
- };
2468
-
2469
- const deserializeAws_json1_1InvalidStateExceptionResponse = async (
2470
- parsedOutput: any,
2471
- context: __SerdeContext
2472
- ): Promise<InvalidStateException> => {
2473
- const body = parsedOutput.body;
2474
- const deserialized: any = deserializeAws_json1_1InvalidStateException(body, context);
2475
- const contents: InvalidStateException = {
2476
- name: "InvalidStateException",
2477
- $fault: "client",
2478
- $metadata: deserializeMetadata(parsedOutput),
2479
- ...deserialized,
2480
- };
2481
- return contents;
2482
- };
2483
-
2484
- const deserializeAws_json1_1InvalidTagExceptionResponse = async (
2485
- parsedOutput: any,
2486
- context: __SerdeContext
2487
- ): Promise<InvalidTagException> => {
2488
- const body = parsedOutput.body;
2489
- const deserialized: any = deserializeAws_json1_1InvalidTagException(body, context);
2490
- const contents: InvalidTagException = {
2491
- name: "InvalidTagException",
2492
- $fault: "client",
2493
- $metadata: deserializeMetadata(parsedOutput),
2494
- ...deserialized,
2495
- };
2496
- return contents;
2497
- };
2498
-
2499
- const deserializeAws_json1_1LimitExceededExceptionResponse = async (
2500
- parsedOutput: any,
2501
- context: __SerdeContext
2502
- ): Promise<LimitExceededException> => {
2503
- const body = parsedOutput.body;
2504
- const deserialized: any = deserializeAws_json1_1LimitExceededException(body, context);
2505
- const contents: LimitExceededException = {
2506
- name: "LimitExceededException",
2507
- $fault: "client",
2508
- $metadata: deserializeMetadata(parsedOutput),
2509
- ...deserialized,
2510
- };
2511
- return contents;
2512
- };
2513
-
2514
- const deserializeAws_json1_1LockoutPreventedExceptionResponse = async (
2515
- parsedOutput: any,
2516
- context: __SerdeContext
2517
- ): Promise<LockoutPreventedException> => {
2518
- const body = parsedOutput.body;
2519
- const deserialized: any = deserializeAws_json1_1LockoutPreventedException(body, context);
2520
- const contents: LockoutPreventedException = {
2521
- name: "LockoutPreventedException",
2522
- $fault: "client",
2523
- $metadata: deserializeMetadata(parsedOutput),
2524
- ...deserialized,
2525
- };
2526
- return contents;
2527
- };
2528
-
2529
- const deserializeAws_json1_1MalformedCertificateExceptionResponse = async (
2530
- parsedOutput: any,
2531
- context: __SerdeContext
2532
- ): Promise<MalformedCertificateException> => {
2533
- const body = parsedOutput.body;
2534
- const deserialized: any = deserializeAws_json1_1MalformedCertificateException(body, context);
2535
- const contents: MalformedCertificateException = {
2536
- name: "MalformedCertificateException",
2537
- $fault: "client",
2538
- $metadata: deserializeMetadata(parsedOutput),
2539
- ...deserialized,
2540
- };
2541
- return contents;
2542
- };
2543
-
2544
- const deserializeAws_json1_1MalformedCSRExceptionResponse = async (
2545
- parsedOutput: any,
2546
- context: __SerdeContext
2547
- ): Promise<MalformedCSRException> => {
2548
- const body = parsedOutput.body;
2549
- const deserialized: any = deserializeAws_json1_1MalformedCSRException(body, context);
2550
- const contents: MalformedCSRException = {
2551
- name: "MalformedCSRException",
2552
- $fault: "client",
2553
- $metadata: deserializeMetadata(parsedOutput),
2554
- ...deserialized,
2555
- };
2556
- return contents;
2557
- };
2558
-
2559
- const deserializeAws_json1_1PermissionAlreadyExistsExceptionResponse = async (
2560
- parsedOutput: any,
2561
- context: __SerdeContext
2562
- ): Promise<PermissionAlreadyExistsException> => {
2563
- const body = parsedOutput.body;
2564
- const deserialized: any = deserializeAws_json1_1PermissionAlreadyExistsException(body, context);
2565
- const contents: PermissionAlreadyExistsException = {
2566
- name: "PermissionAlreadyExistsException",
2567
- $fault: "client",
2568
- $metadata: deserializeMetadata(parsedOutput),
2569
- ...deserialized,
2570
- };
2571
- return contents;
2572
- };
2573
-
2574
- const deserializeAws_json1_1RequestAlreadyProcessedExceptionResponse = async (
2575
- parsedOutput: any,
2576
- context: __SerdeContext
2577
- ): Promise<RequestAlreadyProcessedException> => {
2578
- const body = parsedOutput.body;
2579
- const deserialized: any = deserializeAws_json1_1RequestAlreadyProcessedException(body, context);
2580
- const contents: RequestAlreadyProcessedException = {
2581
- name: "RequestAlreadyProcessedException",
2582
- $fault: "client",
2583
- $metadata: deserializeMetadata(parsedOutput),
2584
- ...deserialized,
2585
- };
2586
- return contents;
2587
- };
2588
-
2589
- const deserializeAws_json1_1RequestFailedExceptionResponse = async (
2590
- parsedOutput: any,
2591
- context: __SerdeContext
2592
- ): Promise<RequestFailedException> => {
2593
- const body = parsedOutput.body;
2594
- const deserialized: any = deserializeAws_json1_1RequestFailedException(body, context);
2595
- const contents: RequestFailedException = {
2596
- name: "RequestFailedException",
2597
- $fault: "client",
2598
- $metadata: deserializeMetadata(parsedOutput),
2599
- ...deserialized,
2600
- };
2601
- return contents;
2602
- };
2603
-
2604
- const deserializeAws_json1_1RequestInProgressExceptionResponse = async (
2605
- parsedOutput: any,
2606
- context: __SerdeContext
2607
- ): Promise<RequestInProgressException> => {
2608
- const body = parsedOutput.body;
2609
- const deserialized: any = deserializeAws_json1_1RequestInProgressException(body, context);
2610
- const contents: RequestInProgressException = {
2611
- name: "RequestInProgressException",
2612
- $fault: "client",
2613
- $metadata: deserializeMetadata(parsedOutput),
2614
- ...deserialized,
2615
- };
2616
- return contents;
2617
- };
2618
-
2619
- const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (
2620
- parsedOutput: any,
2621
- context: __SerdeContext
2622
- ): Promise<ResourceNotFoundException> => {
2623
- const body = parsedOutput.body;
2624
- const deserialized: any = deserializeAws_json1_1ResourceNotFoundException(body, context);
2625
- const contents: ResourceNotFoundException = {
2626
- name: "ResourceNotFoundException",
2627
- $fault: "client",
2628
- $metadata: deserializeMetadata(parsedOutput),
2629
- ...deserialized,
2630
- };
2631
- return contents;
2632
- };
2633
-
2634
- const deserializeAws_json1_1TooManyTagsExceptionResponse = async (
2635
- parsedOutput: any,
2636
- context: __SerdeContext
2637
- ): Promise<TooManyTagsException> => {
2638
- const body = parsedOutput.body;
2639
- const deserialized: any = deserializeAws_json1_1TooManyTagsException(body, context);
2640
- const contents: TooManyTagsException = {
2641
- name: "TooManyTagsException",
2642
- $fault: "client",
2643
- $metadata: deserializeMetadata(parsedOutput),
2644
- ...deserialized,
2645
- };
2646
- return contents;
2647
- };
2648
-
2649
- const serializeAws_json1_1AccessDescription = (input: AccessDescription, context: __SerdeContext): any => {
2650
- return {
2651
- ...(input.AccessLocation !== undefined &&
2652
- input.AccessLocation !== null && {
2653
- AccessLocation: serializeAws_json1_1GeneralName(input.AccessLocation, context),
2654
- }),
2655
- ...(input.AccessMethod !== undefined &&
2656
- input.AccessMethod !== null && { AccessMethod: serializeAws_json1_1AccessMethod(input.AccessMethod, context) }),
2657
- };
2658
- };
2659
-
2660
- const serializeAws_json1_1AccessDescriptionList = (input: AccessDescription[], context: __SerdeContext): any => {
2661
- return input
2662
- .filter((e: any) => e != null)
2663
- .map((entry) => {
2664
- if (entry === null) {
2665
- return null as any;
2666
- }
2667
- return serializeAws_json1_1AccessDescription(entry, context);
2668
- });
2669
- };
2670
-
2671
- const serializeAws_json1_1AccessMethod = (input: AccessMethod, context: __SerdeContext): any => {
2672
- return {
2673
- ...(input.AccessMethodType !== undefined &&
2674
- input.AccessMethodType !== null && { AccessMethodType: input.AccessMethodType }),
2675
- ...(input.CustomObjectIdentifier !== undefined &&
2676
- input.CustomObjectIdentifier !== null && { CustomObjectIdentifier: input.CustomObjectIdentifier }),
2677
- };
2678
- };
2679
-
2680
- const serializeAws_json1_1ActionList = (input: (ActionType | string)[], context: __SerdeContext): any => {
2681
- return input
2682
- .filter((e: any) => e != null)
2683
- .map((entry) => {
2684
- if (entry === null) {
2685
- return null as any;
2686
- }
2687
- return entry;
2688
- });
2689
- };
2690
-
2691
- const serializeAws_json1_1ApiPassthrough = (input: ApiPassthrough, context: __SerdeContext): any => {
2692
- return {
2693
- ...(input.Extensions !== undefined &&
2694
- input.Extensions !== null && { Extensions: serializeAws_json1_1Extensions(input.Extensions, context) }),
2695
- ...(input.Subject !== undefined &&
2696
- input.Subject !== null && { Subject: serializeAws_json1_1ASN1Subject(input.Subject, context) }),
2697
- };
2698
- };
2699
-
2700
- const serializeAws_json1_1ASN1Subject = (input: ASN1Subject, context: __SerdeContext): any => {
2701
- return {
2702
- ...(input.CommonName !== undefined && input.CommonName !== null && { CommonName: input.CommonName }),
2703
- ...(input.Country !== undefined && input.Country !== null && { Country: input.Country }),
2704
- ...(input.DistinguishedNameQualifier !== undefined &&
2705
- input.DistinguishedNameQualifier !== null && { DistinguishedNameQualifier: input.DistinguishedNameQualifier }),
2706
- ...(input.GenerationQualifier !== undefined &&
2707
- input.GenerationQualifier !== null && { GenerationQualifier: input.GenerationQualifier }),
2708
- ...(input.GivenName !== undefined && input.GivenName !== null && { GivenName: input.GivenName }),
2709
- ...(input.Initials !== undefined && input.Initials !== null && { Initials: input.Initials }),
2710
- ...(input.Locality !== undefined && input.Locality !== null && { Locality: input.Locality }),
2711
- ...(input.Organization !== undefined && input.Organization !== null && { Organization: input.Organization }),
2712
- ...(input.OrganizationalUnit !== undefined &&
2713
- input.OrganizationalUnit !== null && { OrganizationalUnit: input.OrganizationalUnit }),
2714
- ...(input.Pseudonym !== undefined && input.Pseudonym !== null && { Pseudonym: input.Pseudonym }),
2715
- ...(input.SerialNumber !== undefined && input.SerialNumber !== null && { SerialNumber: input.SerialNumber }),
2716
- ...(input.State !== undefined && input.State !== null && { State: input.State }),
2717
- ...(input.Surname !== undefined && input.Surname !== null && { Surname: input.Surname }),
2718
- ...(input.Title !== undefined && input.Title !== null && { Title: input.Title }),
2719
- };
2720
- };
2721
-
2722
- const serializeAws_json1_1CertificateAuthorityConfiguration = (
2723
- input: CertificateAuthorityConfiguration,
2724
- context: __SerdeContext
2725
- ): any => {
2726
- return {
2727
- ...(input.CsrExtensions !== undefined &&
2728
- input.CsrExtensions !== null && {
2729
- CsrExtensions: serializeAws_json1_1CsrExtensions(input.CsrExtensions, context),
2730
- }),
2731
- ...(input.KeyAlgorithm !== undefined && input.KeyAlgorithm !== null && { KeyAlgorithm: input.KeyAlgorithm }),
2732
- ...(input.SigningAlgorithm !== undefined &&
2733
- input.SigningAlgorithm !== null && { SigningAlgorithm: input.SigningAlgorithm }),
2734
- ...(input.Subject !== undefined &&
2735
- input.Subject !== null && { Subject: serializeAws_json1_1ASN1Subject(input.Subject, context) }),
2736
- };
2737
- };
2738
-
2739
- const serializeAws_json1_1CertificatePolicyList = (input: PolicyInformation[], context: __SerdeContext): any => {
2740
- return input
2741
- .filter((e: any) => e != null)
2742
- .map((entry) => {
2743
- if (entry === null) {
2744
- return null as any;
2745
- }
2746
- return serializeAws_json1_1PolicyInformation(entry, context);
2747
- });
2748
- };
2749
-
2750
- const serializeAws_json1_1CreateCertificateAuthorityAuditReportRequest = (
2751
- input: CreateCertificateAuthorityAuditReportRequest,
2752
- context: __SerdeContext
2753
- ): any => {
2754
- return {
2755
- ...(input.AuditReportResponseFormat !== undefined &&
2756
- input.AuditReportResponseFormat !== null && { AuditReportResponseFormat: input.AuditReportResponseFormat }),
2757
- ...(input.CertificateAuthorityArn !== undefined &&
2758
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
2759
- ...(input.S3BucketName !== undefined && input.S3BucketName !== null && { S3BucketName: input.S3BucketName }),
2760
- };
2761
- };
2762
-
2763
- const serializeAws_json1_1CreateCertificateAuthorityRequest = (
2764
- input: CreateCertificateAuthorityRequest,
2765
- context: __SerdeContext
2766
- ): any => {
2767
- return {
2768
- ...(input.CertificateAuthorityConfiguration !== undefined &&
2769
- input.CertificateAuthorityConfiguration !== null && {
2770
- CertificateAuthorityConfiguration: serializeAws_json1_1CertificateAuthorityConfiguration(
2771
- input.CertificateAuthorityConfiguration,
2772
- context
2773
- ),
2774
- }),
2775
- ...(input.CertificateAuthorityType !== undefined &&
2776
- input.CertificateAuthorityType !== null && { CertificateAuthorityType: input.CertificateAuthorityType }),
2777
- ...(input.IdempotencyToken !== undefined &&
2778
- input.IdempotencyToken !== null && { IdempotencyToken: input.IdempotencyToken }),
2779
- ...(input.KeyStorageSecurityStandard !== undefined &&
2780
- input.KeyStorageSecurityStandard !== null && { KeyStorageSecurityStandard: input.KeyStorageSecurityStandard }),
2781
- ...(input.RevocationConfiguration !== undefined &&
2782
- input.RevocationConfiguration !== null && {
2783
- RevocationConfiguration: serializeAws_json1_1RevocationConfiguration(input.RevocationConfiguration, context),
2784
- }),
2785
- ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
2786
- };
2787
- };
2788
-
2789
- const serializeAws_json1_1CreatePermissionRequest = (input: CreatePermissionRequest, context: __SerdeContext): any => {
2790
- return {
2791
- ...(input.Actions !== undefined &&
2792
- input.Actions !== null && { Actions: serializeAws_json1_1ActionList(input.Actions, context) }),
2793
- ...(input.CertificateAuthorityArn !== undefined &&
2794
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
2795
- ...(input.Principal !== undefined && input.Principal !== null && { Principal: input.Principal }),
2796
- ...(input.SourceAccount !== undefined && input.SourceAccount !== null && { SourceAccount: input.SourceAccount }),
2797
- };
2798
- };
2799
-
2800
- const serializeAws_json1_1CrlConfiguration = (input: CrlConfiguration, context: __SerdeContext): any => {
2801
- return {
2802
- ...(input.CustomCname !== undefined && input.CustomCname !== null && { CustomCname: input.CustomCname }),
2803
- ...(input.Enabled !== undefined && input.Enabled !== null && { Enabled: input.Enabled }),
2804
- ...(input.ExpirationInDays !== undefined &&
2805
- input.ExpirationInDays !== null && { ExpirationInDays: input.ExpirationInDays }),
2806
- ...(input.S3BucketName !== undefined && input.S3BucketName !== null && { S3BucketName: input.S3BucketName }),
2807
- ...(input.S3ObjectAcl !== undefined && input.S3ObjectAcl !== null && { S3ObjectAcl: input.S3ObjectAcl }),
2808
- };
2809
- };
2810
-
2811
- const serializeAws_json1_1CsrExtensions = (input: CsrExtensions, context: __SerdeContext): any => {
2812
- return {
2813
- ...(input.KeyUsage !== undefined &&
2814
- input.KeyUsage !== null && { KeyUsage: serializeAws_json1_1KeyUsage(input.KeyUsage, context) }),
2815
- ...(input.SubjectInformationAccess !== undefined &&
2816
- input.SubjectInformationAccess !== null && {
2817
- SubjectInformationAccess: serializeAws_json1_1AccessDescriptionList(input.SubjectInformationAccess, context),
2818
- }),
2819
- };
2820
- };
2821
-
2822
- const serializeAws_json1_1DeleteCertificateAuthorityRequest = (
2823
- input: DeleteCertificateAuthorityRequest,
2824
- context: __SerdeContext
2825
- ): any => {
2826
- return {
2827
- ...(input.CertificateAuthorityArn !== undefined &&
2828
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
2829
- ...(input.PermanentDeletionTimeInDays !== undefined &&
2830
- input.PermanentDeletionTimeInDays !== null && { PermanentDeletionTimeInDays: input.PermanentDeletionTimeInDays }),
2831
- };
2832
- };
2833
-
2834
- const serializeAws_json1_1DeletePermissionRequest = (input: DeletePermissionRequest, context: __SerdeContext): any => {
2835
- return {
2836
- ...(input.CertificateAuthorityArn !== undefined &&
2837
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
2838
- ...(input.Principal !== undefined && input.Principal !== null && { Principal: input.Principal }),
2839
- ...(input.SourceAccount !== undefined && input.SourceAccount !== null && { SourceAccount: input.SourceAccount }),
2840
- };
2841
- };
2842
-
2843
- const serializeAws_json1_1DeletePolicyRequest = (input: DeletePolicyRequest, context: __SerdeContext): any => {
2844
- return {
2845
- ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
2846
- };
2847
- };
2848
-
2849
- const serializeAws_json1_1DescribeCertificateAuthorityAuditReportRequest = (
2850
- input: DescribeCertificateAuthorityAuditReportRequest,
2851
- context: __SerdeContext
2852
- ): any => {
2853
- return {
2854
- ...(input.AuditReportId !== undefined && input.AuditReportId !== null && { AuditReportId: input.AuditReportId }),
2855
- ...(input.CertificateAuthorityArn !== undefined &&
2856
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
2857
- };
2858
- };
2859
-
2860
- const serializeAws_json1_1DescribeCertificateAuthorityRequest = (
2861
- input: DescribeCertificateAuthorityRequest,
2862
- context: __SerdeContext
2863
- ): any => {
2864
- return {
2865
- ...(input.CertificateAuthorityArn !== undefined &&
2866
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
2867
- };
2868
- };
2869
-
2870
- const serializeAws_json1_1EdiPartyName = (input: EdiPartyName, context: __SerdeContext): any => {
2871
- return {
2872
- ...(input.NameAssigner !== undefined && input.NameAssigner !== null && { NameAssigner: input.NameAssigner }),
2873
- ...(input.PartyName !== undefined && input.PartyName !== null && { PartyName: input.PartyName }),
2874
- };
2875
- };
2876
-
2877
- const serializeAws_json1_1ExtendedKeyUsage = (input: ExtendedKeyUsage, context: __SerdeContext): any => {
2878
- return {
2879
- ...(input.ExtendedKeyUsageObjectIdentifier !== undefined &&
2880
- input.ExtendedKeyUsageObjectIdentifier !== null && {
2881
- ExtendedKeyUsageObjectIdentifier: input.ExtendedKeyUsageObjectIdentifier,
2882
- }),
2883
- ...(input.ExtendedKeyUsageType !== undefined &&
2884
- input.ExtendedKeyUsageType !== null && { ExtendedKeyUsageType: input.ExtendedKeyUsageType }),
2885
- };
2886
- };
2887
-
2888
- const serializeAws_json1_1ExtendedKeyUsageList = (input: ExtendedKeyUsage[], context: __SerdeContext): any => {
2889
- return input
2890
- .filter((e: any) => e != null)
2891
- .map((entry) => {
2892
- if (entry === null) {
2893
- return null as any;
2894
- }
2895
- return serializeAws_json1_1ExtendedKeyUsage(entry, context);
2896
- });
2897
- };
2898
-
2899
- const serializeAws_json1_1Extensions = (input: Extensions, context: __SerdeContext): any => {
2900
- return {
2901
- ...(input.CertificatePolicies !== undefined &&
2902
- input.CertificatePolicies !== null && {
2903
- CertificatePolicies: serializeAws_json1_1CertificatePolicyList(input.CertificatePolicies, context),
2904
- }),
2905
- ...(input.ExtendedKeyUsage !== undefined &&
2906
- input.ExtendedKeyUsage !== null && {
2907
- ExtendedKeyUsage: serializeAws_json1_1ExtendedKeyUsageList(input.ExtendedKeyUsage, context),
2908
- }),
2909
- ...(input.KeyUsage !== undefined &&
2910
- input.KeyUsage !== null && { KeyUsage: serializeAws_json1_1KeyUsage(input.KeyUsage, context) }),
2911
- ...(input.SubjectAlternativeNames !== undefined &&
2912
- input.SubjectAlternativeNames !== null && {
2913
- SubjectAlternativeNames: serializeAws_json1_1GeneralNameList(input.SubjectAlternativeNames, context),
2914
- }),
2915
- };
2916
- };
2917
-
2918
- const serializeAws_json1_1GeneralName = (input: GeneralName, context: __SerdeContext): any => {
2919
- return {
2920
- ...(input.DirectoryName !== undefined &&
2921
- input.DirectoryName !== null && { DirectoryName: serializeAws_json1_1ASN1Subject(input.DirectoryName, context) }),
2922
- ...(input.DnsName !== undefined && input.DnsName !== null && { DnsName: input.DnsName }),
2923
- ...(input.EdiPartyName !== undefined &&
2924
- input.EdiPartyName !== null && { EdiPartyName: serializeAws_json1_1EdiPartyName(input.EdiPartyName, context) }),
2925
- ...(input.IpAddress !== undefined && input.IpAddress !== null && { IpAddress: input.IpAddress }),
2926
- ...(input.OtherName !== undefined &&
2927
- input.OtherName !== null && { OtherName: serializeAws_json1_1OtherName(input.OtherName, context) }),
2928
- ...(input.RegisteredId !== undefined && input.RegisteredId !== null && { RegisteredId: input.RegisteredId }),
2929
- ...(input.Rfc822Name !== undefined && input.Rfc822Name !== null && { Rfc822Name: input.Rfc822Name }),
2930
- ...(input.UniformResourceIdentifier !== undefined &&
2931
- input.UniformResourceIdentifier !== null && { UniformResourceIdentifier: input.UniformResourceIdentifier }),
2932
- };
2933
- };
2934
-
2935
- const serializeAws_json1_1GeneralNameList = (input: GeneralName[], context: __SerdeContext): any => {
2936
- return input
2937
- .filter((e: any) => e != null)
2938
- .map((entry) => {
2939
- if (entry === null) {
2940
- return null as any;
2941
- }
2942
- return serializeAws_json1_1GeneralName(entry, context);
2943
- });
2944
- };
2945
-
2946
- const serializeAws_json1_1GetCertificateAuthorityCertificateRequest = (
2947
- input: GetCertificateAuthorityCertificateRequest,
2948
- context: __SerdeContext
2949
- ): any => {
2950
- return {
2951
- ...(input.CertificateAuthorityArn !== undefined &&
2952
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
2953
- };
2954
- };
2955
-
2956
- const serializeAws_json1_1GetCertificateAuthorityCsrRequest = (
2957
- input: GetCertificateAuthorityCsrRequest,
2958
- context: __SerdeContext
2959
- ): any => {
2960
- return {
2961
- ...(input.CertificateAuthorityArn !== undefined &&
2962
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
2963
- };
2964
- };
2965
-
2966
- const serializeAws_json1_1GetCertificateRequest = (input: GetCertificateRequest, context: __SerdeContext): any => {
2967
- return {
2968
- ...(input.CertificateArn !== undefined &&
2969
- input.CertificateArn !== null && { CertificateArn: input.CertificateArn }),
2970
- ...(input.CertificateAuthorityArn !== undefined &&
2971
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
2972
- };
2973
- };
2974
-
2975
- const serializeAws_json1_1GetPolicyRequest = (input: GetPolicyRequest, context: __SerdeContext): any => {
2976
- return {
2977
- ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
2978
- };
2979
- };
2980
-
2981
- const serializeAws_json1_1ImportCertificateAuthorityCertificateRequest = (
2982
- input: ImportCertificateAuthorityCertificateRequest,
2983
- context: __SerdeContext
2984
- ): any => {
2985
- return {
2986
- ...(input.Certificate !== undefined &&
2987
- input.Certificate !== null && { Certificate: context.base64Encoder(input.Certificate) }),
2988
- ...(input.CertificateAuthorityArn !== undefined &&
2989
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
2990
- ...(input.CertificateChain !== undefined &&
2991
- input.CertificateChain !== null && { CertificateChain: context.base64Encoder(input.CertificateChain) }),
2992
- };
2993
- };
2994
-
2995
- const serializeAws_json1_1IssueCertificateRequest = (input: IssueCertificateRequest, context: __SerdeContext): any => {
2996
- return {
2997
- ...(input.ApiPassthrough !== undefined &&
2998
- input.ApiPassthrough !== null && {
2999
- ApiPassthrough: serializeAws_json1_1ApiPassthrough(input.ApiPassthrough, context),
3000
- }),
3001
- ...(input.CertificateAuthorityArn !== undefined &&
3002
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
3003
- ...(input.Csr !== undefined && input.Csr !== null && { Csr: context.base64Encoder(input.Csr) }),
3004
- ...(input.IdempotencyToken !== undefined &&
3005
- input.IdempotencyToken !== null && { IdempotencyToken: input.IdempotencyToken }),
3006
- ...(input.SigningAlgorithm !== undefined &&
3007
- input.SigningAlgorithm !== null && { SigningAlgorithm: input.SigningAlgorithm }),
3008
- ...(input.TemplateArn !== undefined && input.TemplateArn !== null && { TemplateArn: input.TemplateArn }),
3009
- ...(input.Validity !== undefined &&
3010
- input.Validity !== null && { Validity: serializeAws_json1_1Validity(input.Validity, context) }),
3011
- ...(input.ValidityNotBefore !== undefined &&
3012
- input.ValidityNotBefore !== null && {
3013
- ValidityNotBefore: serializeAws_json1_1Validity(input.ValidityNotBefore, context),
3014
- }),
3015
- };
3016
- };
3017
-
3018
- const serializeAws_json1_1KeyUsage = (input: KeyUsage, context: __SerdeContext): any => {
3019
- return {
3020
- ...(input.CRLSign !== undefined && input.CRLSign !== null && { CRLSign: input.CRLSign }),
3021
- ...(input.DataEncipherment !== undefined &&
3022
- input.DataEncipherment !== null && { DataEncipherment: input.DataEncipherment }),
3023
- ...(input.DecipherOnly !== undefined && input.DecipherOnly !== null && { DecipherOnly: input.DecipherOnly }),
3024
- ...(input.DigitalSignature !== undefined &&
3025
- input.DigitalSignature !== null && { DigitalSignature: input.DigitalSignature }),
3026
- ...(input.EncipherOnly !== undefined && input.EncipherOnly !== null && { EncipherOnly: input.EncipherOnly }),
3027
- ...(input.KeyAgreement !== undefined && input.KeyAgreement !== null && { KeyAgreement: input.KeyAgreement }),
3028
- ...(input.KeyCertSign !== undefined && input.KeyCertSign !== null && { KeyCertSign: input.KeyCertSign }),
3029
- ...(input.KeyEncipherment !== undefined &&
3030
- input.KeyEncipherment !== null && { KeyEncipherment: input.KeyEncipherment }),
3031
- ...(input.NonRepudiation !== undefined &&
3032
- input.NonRepudiation !== null && { NonRepudiation: input.NonRepudiation }),
3033
- };
3034
- };
3035
-
3036
- const serializeAws_json1_1ListCertificateAuthoritiesRequest = (
3037
- input: ListCertificateAuthoritiesRequest,
3038
- context: __SerdeContext
3039
- ): any => {
3040
- return {
3041
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
3042
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
3043
- ...(input.ResourceOwner !== undefined && input.ResourceOwner !== null && { ResourceOwner: input.ResourceOwner }),
3044
- };
3045
- };
3046
-
3047
- const serializeAws_json1_1ListPermissionsRequest = (input: ListPermissionsRequest, context: __SerdeContext): any => {
3048
- return {
3049
- ...(input.CertificateAuthorityArn !== undefined &&
3050
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
3051
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
3052
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
3053
- };
3054
- };
3055
-
3056
- const serializeAws_json1_1ListTagsRequest = (input: ListTagsRequest, context: __SerdeContext): any => {
3057
- return {
3058
- ...(input.CertificateAuthorityArn !== undefined &&
3059
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
3060
- ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
3061
- ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
3062
- };
3063
- };
3064
-
3065
- const serializeAws_json1_1OcspConfiguration = (input: OcspConfiguration, context: __SerdeContext): any => {
3066
- return {
3067
- ...(input.Enabled !== undefined && input.Enabled !== null && { Enabled: input.Enabled }),
3068
- ...(input.OcspCustomCname !== undefined &&
3069
- input.OcspCustomCname !== null && { OcspCustomCname: input.OcspCustomCname }),
3070
- };
3071
- };
3072
-
3073
- const serializeAws_json1_1OtherName = (input: OtherName, context: __SerdeContext): any => {
3074
- return {
3075
- ...(input.TypeId !== undefined && input.TypeId !== null && { TypeId: input.TypeId }),
3076
- ...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
3077
- };
3078
- };
3079
-
3080
- const serializeAws_json1_1PolicyInformation = (input: PolicyInformation, context: __SerdeContext): any => {
3081
- return {
3082
- ...(input.CertPolicyId !== undefined && input.CertPolicyId !== null && { CertPolicyId: input.CertPolicyId }),
3083
- ...(input.PolicyQualifiers !== undefined &&
3084
- input.PolicyQualifiers !== null && {
3085
- PolicyQualifiers: serializeAws_json1_1PolicyQualifierInfoList(input.PolicyQualifiers, context),
3086
- }),
3087
- };
3088
- };
3089
-
3090
- const serializeAws_json1_1PolicyQualifierInfo = (input: PolicyQualifierInfo, context: __SerdeContext): any => {
3091
- return {
3092
- ...(input.PolicyQualifierId !== undefined &&
3093
- input.PolicyQualifierId !== null && { PolicyQualifierId: input.PolicyQualifierId }),
3094
- ...(input.Qualifier !== undefined &&
3095
- input.Qualifier !== null && { Qualifier: serializeAws_json1_1Qualifier(input.Qualifier, context) }),
3096
- };
3097
- };
3098
-
3099
- const serializeAws_json1_1PolicyQualifierInfoList = (input: PolicyQualifierInfo[], context: __SerdeContext): any => {
3100
- return input
3101
- .filter((e: any) => e != null)
3102
- .map((entry) => {
3103
- if (entry === null) {
3104
- return null as any;
3105
- }
3106
- return serializeAws_json1_1PolicyQualifierInfo(entry, context);
3107
- });
3108
- };
3109
-
3110
- const serializeAws_json1_1PutPolicyRequest = (input: PutPolicyRequest, context: __SerdeContext): any => {
3111
- return {
3112
- ...(input.Policy !== undefined && input.Policy !== null && { Policy: input.Policy }),
3113
- ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
3114
- };
3115
- };
3116
-
3117
- const serializeAws_json1_1Qualifier = (input: Qualifier, context: __SerdeContext): any => {
3118
- return {
3119
- ...(input.CpsUri !== undefined && input.CpsUri !== null && { CpsUri: input.CpsUri }),
3120
- };
3121
- };
3122
-
3123
- const serializeAws_json1_1RestoreCertificateAuthorityRequest = (
3124
- input: RestoreCertificateAuthorityRequest,
3125
- context: __SerdeContext
3126
- ): any => {
3127
- return {
3128
- ...(input.CertificateAuthorityArn !== undefined &&
3129
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
3130
- };
3131
- };
3132
-
3133
- const serializeAws_json1_1RevocationConfiguration = (input: RevocationConfiguration, context: __SerdeContext): any => {
3134
- return {
3135
- ...(input.CrlConfiguration !== undefined &&
3136
- input.CrlConfiguration !== null && {
3137
- CrlConfiguration: serializeAws_json1_1CrlConfiguration(input.CrlConfiguration, context),
3138
- }),
3139
- ...(input.OcspConfiguration !== undefined &&
3140
- input.OcspConfiguration !== null && {
3141
- OcspConfiguration: serializeAws_json1_1OcspConfiguration(input.OcspConfiguration, context),
3142
- }),
3143
- };
3144
- };
3145
-
3146
- const serializeAws_json1_1RevokeCertificateRequest = (
3147
- input: RevokeCertificateRequest,
3148
- context: __SerdeContext
3149
- ): any => {
3150
- return {
3151
- ...(input.CertificateAuthorityArn !== undefined &&
3152
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
3153
- ...(input.CertificateSerial !== undefined &&
3154
- input.CertificateSerial !== null && { CertificateSerial: input.CertificateSerial }),
3155
- ...(input.RevocationReason !== undefined &&
3156
- input.RevocationReason !== null && { RevocationReason: input.RevocationReason }),
3157
- };
3158
- };
3159
-
3160
- const serializeAws_json1_1Tag = (input: Tag, context: __SerdeContext): any => {
3161
- return {
3162
- ...(input.Key !== undefined && input.Key !== null && { Key: input.Key }),
3163
- ...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
3164
- };
3165
- };
3166
-
3167
- const serializeAws_json1_1TagCertificateAuthorityRequest = (
3168
- input: TagCertificateAuthorityRequest,
3169
- context: __SerdeContext
3170
- ): any => {
3171
- return {
3172
- ...(input.CertificateAuthorityArn !== undefined &&
3173
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
3174
- ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
3175
- };
3176
- };
3177
-
3178
- const serializeAws_json1_1TagList = (input: Tag[], context: __SerdeContext): any => {
3179
- return input
3180
- .filter((e: any) => e != null)
3181
- .map((entry) => {
3182
- if (entry === null) {
3183
- return null as any;
3184
- }
3185
- return serializeAws_json1_1Tag(entry, context);
3186
- });
3187
- };
3188
-
3189
- const serializeAws_json1_1UntagCertificateAuthorityRequest = (
3190
- input: UntagCertificateAuthorityRequest,
3191
- context: __SerdeContext
3192
- ): any => {
3193
- return {
3194
- ...(input.CertificateAuthorityArn !== undefined &&
3195
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
3196
- ...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagList(input.Tags, context) }),
3197
- };
3198
- };
3199
-
3200
- const serializeAws_json1_1UpdateCertificateAuthorityRequest = (
3201
- input: UpdateCertificateAuthorityRequest,
3202
- context: __SerdeContext
3203
- ): any => {
3204
- return {
3205
- ...(input.CertificateAuthorityArn !== undefined &&
3206
- input.CertificateAuthorityArn !== null && { CertificateAuthorityArn: input.CertificateAuthorityArn }),
3207
- ...(input.RevocationConfiguration !== undefined &&
3208
- input.RevocationConfiguration !== null && {
3209
- RevocationConfiguration: serializeAws_json1_1RevocationConfiguration(input.RevocationConfiguration, context),
3210
- }),
3211
- ...(input.Status !== undefined && input.Status !== null && { Status: input.Status }),
3212
- };
3213
- };
3214
-
3215
- const serializeAws_json1_1Validity = (input: Validity, context: __SerdeContext): any => {
3216
- return {
3217
- ...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
3218
- ...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
3219
- };
3220
- };
3221
-
3222
- const deserializeAws_json1_1AccessDescription = (output: any, context: __SerdeContext): AccessDescription => {
3223
- return {
3224
- AccessLocation:
3225
- output.AccessLocation !== undefined && output.AccessLocation !== null
3226
- ? deserializeAws_json1_1GeneralName(output.AccessLocation, context)
3227
- : undefined,
3228
- AccessMethod:
3229
- output.AccessMethod !== undefined && output.AccessMethod !== null
3230
- ? deserializeAws_json1_1AccessMethod(output.AccessMethod, context)
3231
- : undefined,
3232
- } as any;
3233
- };
3234
-
3235
- const deserializeAws_json1_1AccessDescriptionList = (output: any, context: __SerdeContext): AccessDescription[] => {
3236
- return (output || [])
3237
- .filter((e: any) => e != null)
3238
- .map((entry: any) => {
3239
- if (entry === null) {
3240
- return null as any;
3241
- }
3242
- return deserializeAws_json1_1AccessDescription(entry, context);
3243
- });
3244
- };
3245
-
3246
- const deserializeAws_json1_1AccessMethod = (output: any, context: __SerdeContext): AccessMethod => {
3247
- return {
3248
- AccessMethodType: __expectString(output.AccessMethodType),
3249
- CustomObjectIdentifier: __expectString(output.CustomObjectIdentifier),
3250
- } as any;
3251
- };
3252
-
3253
- const deserializeAws_json1_1ActionList = (output: any, context: __SerdeContext): (ActionType | string)[] => {
3254
- return (output || [])
3255
- .filter((e: any) => e != null)
3256
- .map((entry: any) => {
3257
- if (entry === null) {
3258
- return null as any;
3259
- }
3260
- return __expectString(entry) as any;
3261
- });
3262
- };
3263
-
3264
- const deserializeAws_json1_1ASN1Subject = (output: any, context: __SerdeContext): ASN1Subject => {
3265
- return {
3266
- CommonName: __expectString(output.CommonName),
3267
- Country: __expectString(output.Country),
3268
- DistinguishedNameQualifier: __expectString(output.DistinguishedNameQualifier),
3269
- GenerationQualifier: __expectString(output.GenerationQualifier),
3270
- GivenName: __expectString(output.GivenName),
3271
- Initials: __expectString(output.Initials),
3272
- Locality: __expectString(output.Locality),
3273
- Organization: __expectString(output.Organization),
3274
- OrganizationalUnit: __expectString(output.OrganizationalUnit),
3275
- Pseudonym: __expectString(output.Pseudonym),
3276
- SerialNumber: __expectString(output.SerialNumber),
3277
- State: __expectString(output.State),
3278
- Surname: __expectString(output.Surname),
3279
- Title: __expectString(output.Title),
3280
- } as any;
3281
- };
3282
-
3283
- const deserializeAws_json1_1CertificateAuthorities = (output: any, context: __SerdeContext): CertificateAuthority[] => {
3284
- return (output || [])
3285
- .filter((e: any) => e != null)
3286
- .map((entry: any) => {
3287
- if (entry === null) {
3288
- return null as any;
3289
- }
3290
- return deserializeAws_json1_1CertificateAuthority(entry, context);
3291
- });
3292
- };
3293
-
3294
- const deserializeAws_json1_1CertificateAuthority = (output: any, context: __SerdeContext): CertificateAuthority => {
3295
- return {
3296
- Arn: __expectString(output.Arn),
3297
- CertificateAuthorityConfiguration:
3298
- output.CertificateAuthorityConfiguration !== undefined && output.CertificateAuthorityConfiguration !== null
3299
- ? deserializeAws_json1_1CertificateAuthorityConfiguration(output.CertificateAuthorityConfiguration, context)
3300
- : undefined,
3301
- CreatedAt:
3302
- output.CreatedAt !== undefined && output.CreatedAt !== null
3303
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
3304
- : undefined,
3305
- FailureReason: __expectString(output.FailureReason),
3306
- KeyStorageSecurityStandard: __expectString(output.KeyStorageSecurityStandard),
3307
- LastStateChangeAt:
3308
- output.LastStateChangeAt !== undefined && output.LastStateChangeAt !== null
3309
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastStateChangeAt)))
3310
- : undefined,
3311
- NotAfter:
3312
- output.NotAfter !== undefined && output.NotAfter !== null
3313
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NotAfter)))
3314
- : undefined,
3315
- NotBefore:
3316
- output.NotBefore !== undefined && output.NotBefore !== null
3317
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NotBefore)))
3318
- : undefined,
3319
- OwnerAccount: __expectString(output.OwnerAccount),
3320
- RestorableUntil:
3321
- output.RestorableUntil !== undefined && output.RestorableUntil !== null
3322
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.RestorableUntil)))
3323
- : undefined,
3324
- RevocationConfiguration:
3325
- output.RevocationConfiguration !== undefined && output.RevocationConfiguration !== null
3326
- ? deserializeAws_json1_1RevocationConfiguration(output.RevocationConfiguration, context)
3327
- : undefined,
3328
- Serial: __expectString(output.Serial),
3329
- Status: __expectString(output.Status),
3330
- Type: __expectString(output.Type),
3331
- } as any;
3332
- };
3333
-
3334
- const deserializeAws_json1_1CertificateAuthorityConfiguration = (
3335
- output: any,
3336
- context: __SerdeContext
3337
- ): CertificateAuthorityConfiguration => {
3338
- return {
3339
- CsrExtensions:
3340
- output.CsrExtensions !== undefined && output.CsrExtensions !== null
3341
- ? deserializeAws_json1_1CsrExtensions(output.CsrExtensions, context)
3342
- : undefined,
3343
- KeyAlgorithm: __expectString(output.KeyAlgorithm),
3344
- SigningAlgorithm: __expectString(output.SigningAlgorithm),
3345
- Subject:
3346
- output.Subject !== undefined && output.Subject !== null
3347
- ? deserializeAws_json1_1ASN1Subject(output.Subject, context)
3348
- : undefined,
3349
- } as any;
3350
- };
3351
-
3352
- const deserializeAws_json1_1CertificateMismatchException = (
3353
- output: any,
3354
- context: __SerdeContext
3355
- ): CertificateMismatchException => {
3356
- return {
3357
- message: __expectString(output.message),
3358
- } as any;
3359
- };
3360
-
3361
- const deserializeAws_json1_1ConcurrentModificationException = (
3362
- output: any,
3363
- context: __SerdeContext
3364
- ): ConcurrentModificationException => {
3365
- return {
3366
- message: __expectString(output.message),
3367
- } as any;
3368
- };
3369
-
3370
- const deserializeAws_json1_1CreateCertificateAuthorityAuditReportResponse = (
3371
- output: any,
3372
- context: __SerdeContext
3373
- ): CreateCertificateAuthorityAuditReportResponse => {
3374
- return {
3375
- AuditReportId: __expectString(output.AuditReportId),
3376
- S3Key: __expectString(output.S3Key),
3377
- } as any;
3378
- };
3379
-
3380
- const deserializeAws_json1_1CreateCertificateAuthorityResponse = (
3381
- output: any,
3382
- context: __SerdeContext
3383
- ): CreateCertificateAuthorityResponse => {
3384
- return {
3385
- CertificateAuthorityArn: __expectString(output.CertificateAuthorityArn),
3386
- } as any;
3387
- };
3388
-
3389
- const deserializeAws_json1_1CrlConfiguration = (output: any, context: __SerdeContext): CrlConfiguration => {
3390
- return {
3391
- CustomCname: __expectString(output.CustomCname),
3392
- Enabled: __expectBoolean(output.Enabled),
3393
- ExpirationInDays: __expectInt32(output.ExpirationInDays),
3394
- S3BucketName: __expectString(output.S3BucketName),
3395
- S3ObjectAcl: __expectString(output.S3ObjectAcl),
3396
- } as any;
3397
- };
3398
-
3399
- const deserializeAws_json1_1CsrExtensions = (output: any, context: __SerdeContext): CsrExtensions => {
3400
- return {
3401
- KeyUsage:
3402
- output.KeyUsage !== undefined && output.KeyUsage !== null
3403
- ? deserializeAws_json1_1KeyUsage(output.KeyUsage, context)
3404
- : undefined,
3405
- SubjectInformationAccess:
3406
- output.SubjectInformationAccess !== undefined && output.SubjectInformationAccess !== null
3407
- ? deserializeAws_json1_1AccessDescriptionList(output.SubjectInformationAccess, context)
3408
- : undefined,
3409
- } as any;
3410
- };
3411
-
3412
- const deserializeAws_json1_1DescribeCertificateAuthorityAuditReportResponse = (
3413
- output: any,
3414
- context: __SerdeContext
3415
- ): DescribeCertificateAuthorityAuditReportResponse => {
3416
- return {
3417
- AuditReportStatus: __expectString(output.AuditReportStatus),
3418
- CreatedAt:
3419
- output.CreatedAt !== undefined && output.CreatedAt !== null
3420
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
3421
- : undefined,
3422
- S3BucketName: __expectString(output.S3BucketName),
3423
- S3Key: __expectString(output.S3Key),
3424
- } as any;
3425
- };
3426
-
3427
- const deserializeAws_json1_1DescribeCertificateAuthorityResponse = (
3428
- output: any,
3429
- context: __SerdeContext
3430
- ): DescribeCertificateAuthorityResponse => {
3431
- return {
3432
- CertificateAuthority:
3433
- output.CertificateAuthority !== undefined && output.CertificateAuthority !== null
3434
- ? deserializeAws_json1_1CertificateAuthority(output.CertificateAuthority, context)
3435
- : undefined,
3436
- } as any;
3437
- };
3438
-
3439
- const deserializeAws_json1_1EdiPartyName = (output: any, context: __SerdeContext): EdiPartyName => {
3440
- return {
3441
- NameAssigner: __expectString(output.NameAssigner),
3442
- PartyName: __expectString(output.PartyName),
3443
- } as any;
3444
- };
3445
-
3446
- const deserializeAws_json1_1GeneralName = (output: any, context: __SerdeContext): GeneralName => {
3447
- return {
3448
- DirectoryName:
3449
- output.DirectoryName !== undefined && output.DirectoryName !== null
3450
- ? deserializeAws_json1_1ASN1Subject(output.DirectoryName, context)
3451
- : undefined,
3452
- DnsName: __expectString(output.DnsName),
3453
- EdiPartyName:
3454
- output.EdiPartyName !== undefined && output.EdiPartyName !== null
3455
- ? deserializeAws_json1_1EdiPartyName(output.EdiPartyName, context)
3456
- : undefined,
3457
- IpAddress: __expectString(output.IpAddress),
3458
- OtherName:
3459
- output.OtherName !== undefined && output.OtherName !== null
3460
- ? deserializeAws_json1_1OtherName(output.OtherName, context)
3461
- : undefined,
3462
- RegisteredId: __expectString(output.RegisteredId),
3463
- Rfc822Name: __expectString(output.Rfc822Name),
3464
- UniformResourceIdentifier: __expectString(output.UniformResourceIdentifier),
3465
- } as any;
3466
- };
3467
-
3468
- const deserializeAws_json1_1GetCertificateAuthorityCertificateResponse = (
3469
- output: any,
3470
- context: __SerdeContext
3471
- ): GetCertificateAuthorityCertificateResponse => {
3472
- return {
3473
- Certificate: __expectString(output.Certificate),
3474
- CertificateChain: __expectString(output.CertificateChain),
3475
- } as any;
3476
- };
3477
-
3478
- const deserializeAws_json1_1GetCertificateAuthorityCsrResponse = (
3479
- output: any,
3480
- context: __SerdeContext
3481
- ): GetCertificateAuthorityCsrResponse => {
3482
- return {
3483
- Csr: __expectString(output.Csr),
3484
- } as any;
3485
- };
3486
-
3487
- const deserializeAws_json1_1GetCertificateResponse = (output: any, context: __SerdeContext): GetCertificateResponse => {
3488
- return {
3489
- Certificate: __expectString(output.Certificate),
3490
- CertificateChain: __expectString(output.CertificateChain),
3491
- } as any;
3492
- };
3493
-
3494
- const deserializeAws_json1_1GetPolicyResponse = (output: any, context: __SerdeContext): GetPolicyResponse => {
3495
- return {
3496
- Policy: __expectString(output.Policy),
3497
- } as any;
3498
- };
3499
-
3500
- const deserializeAws_json1_1InvalidArgsException = (output: any, context: __SerdeContext): InvalidArgsException => {
3501
- return {
3502
- message: __expectString(output.message),
3503
- } as any;
3504
- };
3505
-
3506
- const deserializeAws_json1_1InvalidArnException = (output: any, context: __SerdeContext): InvalidArnException => {
3507
- return {
3508
- message: __expectString(output.message),
3509
- } as any;
3510
- };
3511
-
3512
- const deserializeAws_json1_1InvalidNextTokenException = (
3513
- output: any,
3514
- context: __SerdeContext
3515
- ): InvalidNextTokenException => {
3516
- return {
3517
- message: __expectString(output.message),
3518
- } as any;
3519
- };
3520
-
3521
- const deserializeAws_json1_1InvalidPolicyException = (output: any, context: __SerdeContext): InvalidPolicyException => {
3522
- return {
3523
- message: __expectString(output.message),
3524
- } as any;
3525
- };
3526
-
3527
- const deserializeAws_json1_1InvalidRequestException = (
3528
- output: any,
3529
- context: __SerdeContext
3530
- ): InvalidRequestException => {
3531
- return {
3532
- message: __expectString(output.message),
3533
- } as any;
3534
- };
3535
-
3536
- const deserializeAws_json1_1InvalidStateException = (output: any, context: __SerdeContext): InvalidStateException => {
3537
- return {
3538
- message: __expectString(output.message),
3539
- } as any;
3540
- };
3541
-
3542
- const deserializeAws_json1_1InvalidTagException = (output: any, context: __SerdeContext): InvalidTagException => {
3543
- return {
3544
- message: __expectString(output.message),
3545
- } as any;
3546
- };
3547
-
3548
- const deserializeAws_json1_1IssueCertificateResponse = (
3549
- output: any,
3550
- context: __SerdeContext
3551
- ): IssueCertificateResponse => {
3552
- return {
3553
- CertificateArn: __expectString(output.CertificateArn),
3554
- } as any;
3555
- };
3556
-
3557
- const deserializeAws_json1_1KeyUsage = (output: any, context: __SerdeContext): KeyUsage => {
3558
- return {
3559
- CRLSign: __expectBoolean(output.CRLSign),
3560
- DataEncipherment: __expectBoolean(output.DataEncipherment),
3561
- DecipherOnly: __expectBoolean(output.DecipherOnly),
3562
- DigitalSignature: __expectBoolean(output.DigitalSignature),
3563
- EncipherOnly: __expectBoolean(output.EncipherOnly),
3564
- KeyAgreement: __expectBoolean(output.KeyAgreement),
3565
- KeyCertSign: __expectBoolean(output.KeyCertSign),
3566
- KeyEncipherment: __expectBoolean(output.KeyEncipherment),
3567
- NonRepudiation: __expectBoolean(output.NonRepudiation),
3568
- } as any;
3569
- };
3570
-
3571
- const deserializeAws_json1_1LimitExceededException = (output: any, context: __SerdeContext): LimitExceededException => {
3572
- return {
3573
- message: __expectString(output.message),
3574
- } as any;
3575
- };
3576
-
3577
- const deserializeAws_json1_1ListCertificateAuthoritiesResponse = (
3578
- output: any,
3579
- context: __SerdeContext
3580
- ): ListCertificateAuthoritiesResponse => {
3581
- return {
3582
- CertificateAuthorities:
3583
- output.CertificateAuthorities !== undefined && output.CertificateAuthorities !== null
3584
- ? deserializeAws_json1_1CertificateAuthorities(output.CertificateAuthorities, context)
3585
- : undefined,
3586
- NextToken: __expectString(output.NextToken),
3587
- } as any;
3588
- };
3589
-
3590
- const deserializeAws_json1_1ListPermissionsResponse = (
3591
- output: any,
3592
- context: __SerdeContext
3593
- ): ListPermissionsResponse => {
3594
- return {
3595
- NextToken: __expectString(output.NextToken),
3596
- Permissions:
3597
- output.Permissions !== undefined && output.Permissions !== null
3598
- ? deserializeAws_json1_1PermissionList(output.Permissions, context)
3599
- : undefined,
3600
- } as any;
3601
- };
3602
-
3603
- const deserializeAws_json1_1ListTagsResponse = (output: any, context: __SerdeContext): ListTagsResponse => {
3604
- return {
3605
- NextToken: __expectString(output.NextToken),
3606
- Tags:
3607
- output.Tags !== undefined && output.Tags !== null
3608
- ? deserializeAws_json1_1TagList(output.Tags, context)
3609
- : undefined,
3610
- } as any;
3611
- };
3612
-
3613
- const deserializeAws_json1_1LockoutPreventedException = (
3614
- output: any,
3615
- context: __SerdeContext
3616
- ): LockoutPreventedException => {
3617
- return {
3618
- message: __expectString(output.message),
3619
- } as any;
3620
- };
3621
-
3622
- const deserializeAws_json1_1MalformedCertificateException = (
3623
- output: any,
3624
- context: __SerdeContext
3625
- ): MalformedCertificateException => {
3626
- return {
3627
- message: __expectString(output.message),
3628
- } as any;
3629
- };
3630
-
3631
- const deserializeAws_json1_1MalformedCSRException = (output: any, context: __SerdeContext): MalformedCSRException => {
3632
- return {
3633
- message: __expectString(output.message),
3634
- } as any;
3635
- };
3636
-
3637
- const deserializeAws_json1_1OcspConfiguration = (output: any, context: __SerdeContext): OcspConfiguration => {
3638
- return {
3639
- Enabled: __expectBoolean(output.Enabled),
3640
- OcspCustomCname: __expectString(output.OcspCustomCname),
3641
- } as any;
3642
- };
3643
-
3644
- const deserializeAws_json1_1OtherName = (output: any, context: __SerdeContext): OtherName => {
3645
- return {
3646
- TypeId: __expectString(output.TypeId),
3647
- Value: __expectString(output.Value),
3648
- } as any;
3649
- };
3650
-
3651
- const deserializeAws_json1_1Permission = (output: any, context: __SerdeContext): Permission => {
3652
- return {
3653
- Actions:
3654
- output.Actions !== undefined && output.Actions !== null
3655
- ? deserializeAws_json1_1ActionList(output.Actions, context)
3656
- : undefined,
3657
- CertificateAuthorityArn: __expectString(output.CertificateAuthorityArn),
3658
- CreatedAt:
3659
- output.CreatedAt !== undefined && output.CreatedAt !== null
3660
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
3661
- : undefined,
3662
- Policy: __expectString(output.Policy),
3663
- Principal: __expectString(output.Principal),
3664
- SourceAccount: __expectString(output.SourceAccount),
3665
- } as any;
3666
- };
3667
-
3668
- const deserializeAws_json1_1PermissionAlreadyExistsException = (
3669
- output: any,
3670
- context: __SerdeContext
3671
- ): PermissionAlreadyExistsException => {
3672
- return {
3673
- message: __expectString(output.message),
3674
- } as any;
3675
- };
3676
-
3677
- const deserializeAws_json1_1PermissionList = (output: any, context: __SerdeContext): Permission[] => {
3678
- return (output || [])
3679
- .filter((e: any) => e != null)
3680
- .map((entry: any) => {
3681
- if (entry === null) {
3682
- return null as any;
3683
- }
3684
- return deserializeAws_json1_1Permission(entry, context);
3685
- });
3686
- };
3687
-
3688
- const deserializeAws_json1_1RequestAlreadyProcessedException = (
3689
- output: any,
3690
- context: __SerdeContext
3691
- ): RequestAlreadyProcessedException => {
3692
- return {
3693
- message: __expectString(output.message),
3694
- } as any;
3695
- };
3696
-
3697
- const deserializeAws_json1_1RequestFailedException = (output: any, context: __SerdeContext): RequestFailedException => {
3698
- return {
3699
- message: __expectString(output.message),
3700
- } as any;
3701
- };
3702
-
3703
- const deserializeAws_json1_1RequestInProgressException = (
3704
- output: any,
3705
- context: __SerdeContext
3706
- ): RequestInProgressException => {
3707
- return {
3708
- message: __expectString(output.message),
3709
- } as any;
3710
- };
3711
-
3712
- const deserializeAws_json1_1ResourceNotFoundException = (
3713
- output: any,
3714
- context: __SerdeContext
3715
- ): ResourceNotFoundException => {
3716
- return {
3717
- message: __expectString(output.message),
3718
- } as any;
3719
- };
3720
-
3721
- const deserializeAws_json1_1RevocationConfiguration = (
3722
- output: any,
3723
- context: __SerdeContext
3724
- ): RevocationConfiguration => {
3725
- return {
3726
- CrlConfiguration:
3727
- output.CrlConfiguration !== undefined && output.CrlConfiguration !== null
3728
- ? deserializeAws_json1_1CrlConfiguration(output.CrlConfiguration, context)
3729
- : undefined,
3730
- OcspConfiguration:
3731
- output.OcspConfiguration !== undefined && output.OcspConfiguration !== null
3732
- ? deserializeAws_json1_1OcspConfiguration(output.OcspConfiguration, context)
3733
- : undefined,
3734
- } as any;
3735
- };
3736
-
3737
- const deserializeAws_json1_1Tag = (output: any, context: __SerdeContext): Tag => {
3738
- return {
3739
- Key: __expectString(output.Key),
3740
- Value: __expectString(output.Value),
3741
- } as any;
3742
- };
3743
-
3744
- const deserializeAws_json1_1TagList = (output: any, context: __SerdeContext): Tag[] => {
3745
- return (output || [])
3746
- .filter((e: any) => e != null)
3747
- .map((entry: any) => {
3748
- if (entry === null) {
3749
- return null as any;
3750
- }
3751
- return deserializeAws_json1_1Tag(entry, context);
3752
- });
3753
- };
3754
-
3755
- const deserializeAws_json1_1TooManyTagsException = (output: any, context: __SerdeContext): TooManyTagsException => {
3756
- return {
3757
- message: __expectString(output.message),
3758
- } as any;
3759
- };
3760
-
3761
- const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
3762
- httpStatusCode: output.statusCode,
3763
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
3764
- extendedRequestId: output.headers["x-amz-id-2"],
3765
- cfId: output.headers["x-amz-cf-id"],
3766
- });
3767
-
3768
- // Collect low-level response body stream to Uint8Array.
3769
- const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
3770
- if (streamBody instanceof Uint8Array) {
3771
- return Promise.resolve(streamBody);
3772
- }
3773
- return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
3774
- };
3775
-
3776
- // Encode Uint8Array data into string with utf-8.
3777
- const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
3778
- collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
3779
-
3780
- const buildHttpRpcRequest = async (
3781
- context: __SerdeContext,
3782
- headers: __HeaderBag,
3783
- path: string,
3784
- resolvedHostname: string | undefined,
3785
- body: any
3786
- ): Promise<__HttpRequest> => {
3787
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
3788
- const contents: any = {
3789
- protocol,
3790
- hostname,
3791
- port,
3792
- method: "POST",
3793
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
3794
- headers,
3795
- };
3796
- if (resolvedHostname !== undefined) {
3797
- contents.hostname = resolvedHostname;
3798
- }
3799
- if (body !== undefined) {
3800
- contents.body = body;
3801
- }
3802
- return new __HttpRequest(contents);
3803
- };
3804
-
3805
- const parseBody = (streamBody: any, context: __SerdeContext): any =>
3806
- collectBodyString(streamBody, context).then((encoded) => {
3807
- if (encoded.length) {
3808
- return JSON.parse(encoded);
3809
- }
3810
- return {};
3811
- });
3812
-
3813
- /**
3814
- * Load an error code for the aws.rest-json-1.1 protocol.
3815
- */
3816
- const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
3817
- const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
3818
-
3819
- const sanitizeErrorCode = (rawValue: string): string => {
3820
- let cleanValue = rawValue;
3821
- if (cleanValue.indexOf(":") >= 0) {
3822
- cleanValue = cleanValue.split(":")[0];
3823
- }
3824
- if (cleanValue.indexOf("#") >= 0) {
3825
- cleanValue = cleanValue.split("#")[1];
3826
- }
3827
- return cleanValue;
3828
- };
3829
-
3830
- const headerKey = findKey(output.headers, "x-amzn-errortype");
3831
- if (headerKey !== undefined) {
3832
- return sanitizeErrorCode(output.headers[headerKey]);
3833
- }
3834
-
3835
- if (data.code !== undefined) {
3836
- return sanitizeErrorCode(data.code);
3837
- }
3838
-
3839
- if (data["__type"] !== undefined) {
3840
- return sanitizeErrorCode(data["__type"]);
3841
- }
3842
-
3843
- return "";
3844
- };