@aws-sdk/client-kms 3.35.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 (421) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +8 -7
  3. package/dist-cjs/KMS.js +8 -8
  4. package/dist-cjs/KMSClient.js +8 -8
  5. package/dist-cjs/commands/CancelKeyDeletionCommand.js +6 -5
  6. package/dist-cjs/commands/ConnectCustomKeyStoreCommand.js +3 -4
  7. package/dist-cjs/commands/CreateAliasCommand.js +11 -8
  8. package/dist-cjs/commands/CreateCustomKeyStoreCommand.js +0 -1
  9. package/dist-cjs/commands/CreateGrantCommand.js +14 -12
  10. package/dist-cjs/commands/CreateKeyCommand.js +16 -15
  11. package/dist-cjs/commands/DecryptCommand.js +24 -22
  12. package/dist-cjs/commands/DeleteAliasCommand.js +11 -8
  13. package/dist-cjs/commands/DeleteCustomKeyStoreCommand.js +10 -12
  14. package/dist-cjs/commands/DeleteImportedKeyMaterialCommand.js +5 -7
  15. package/dist-cjs/commands/DescribeCustomKeyStoresCommand.js +4 -5
  16. package/dist-cjs/commands/DescribeKeyCommand.js +12 -11
  17. package/dist-cjs/commands/DisableKeyCommand.js +5 -5
  18. package/dist-cjs/commands/DisableKeyRotationCommand.js +2 -2
  19. package/dist-cjs/commands/DisconnectCustomKeyStoreCommand.js +6 -5
  20. package/dist-cjs/commands/EnableKeyCommand.js +4 -3
  21. package/dist-cjs/commands/EnableKeyRotationCommand.js +2 -2
  22. package/dist-cjs/commands/EncryptCommand.js +14 -13
  23. package/dist-cjs/commands/GenerateDataKeyCommand.js +15 -13
  24. package/dist-cjs/commands/GenerateDataKeyPairCommand.js +15 -14
  25. package/dist-cjs/commands/GenerateDataKeyPairWithoutPlaintextCommand.js +16 -14
  26. package/dist-cjs/commands/GenerateDataKeyWithoutPlaintextCommand.js +11 -10
  27. package/dist-cjs/commands/GenerateRandomCommand.js +2 -2
  28. package/dist-cjs/commands/GetKeyPolicyCommand.js +0 -1
  29. package/dist-cjs/commands/GetKeyRotationStatusCommand.js +2 -2
  30. package/dist-cjs/commands/GetParametersForImportCommand.js +7 -9
  31. package/dist-cjs/commands/GetPublicKeyCommand.js +7 -6
  32. package/dist-cjs/commands/ImportKeyMaterialCommand.js +13 -14
  33. package/dist-cjs/commands/ListAliasesCommand.js +13 -11
  34. package/dist-cjs/commands/ListGrantsCommand.js +2 -3
  35. package/dist-cjs/commands/ListKeyPoliciesCommand.js +3 -4
  36. package/dist-cjs/commands/ListKeysCommand.js +1 -3
  37. package/dist-cjs/commands/ListResourceTagsCommand.js +0 -1
  38. package/dist-cjs/commands/ListRetirableGrantsCommand.js +7 -7
  39. package/dist-cjs/commands/PutKeyPolicyCommand.js +0 -1
  40. package/dist-cjs/commands/ReEncryptCommand.js +33 -28
  41. package/dist-cjs/commands/ReplicateKeyCommand.js +5 -6
  42. package/dist-cjs/commands/RetireGrantCommand.js +7 -6
  43. package/dist-cjs/commands/RevokeGrantCommand.js +1 -3
  44. package/dist-cjs/commands/ScheduleKeyDeletionCommand.js +19 -16
  45. package/dist-cjs/commands/SignCommand.js +10 -10
  46. package/dist-cjs/commands/TagResourceCommand.js +6 -5
  47. package/dist-cjs/commands/UntagResourceCommand.js +3 -4
  48. package/dist-cjs/commands/UpdateAliasCommand.js +15 -12
  49. package/dist-cjs/commands/UpdateCustomKeyStoreCommand.js +17 -18
  50. package/dist-cjs/commands/UpdateKeyDescriptionCommand.js +3 -4
  51. package/dist-cjs/commands/UpdatePrimaryRegionCommand.js +1 -2
  52. package/dist-cjs/commands/VerifyCommand.js +5 -6
  53. package/dist-cjs/endpoints.js +0 -1
  54. package/dist-cjs/index.js +0 -1
  55. package/dist-cjs/models/index.js +0 -1
  56. package/dist-cjs/models/models_0.js +0 -1
  57. package/dist-cjs/pagination/Interfaces.js +0 -1
  58. package/dist-cjs/pagination/ListAliasesPaginator.js +0 -1
  59. package/dist-cjs/pagination/ListGrantsPaginator.js +0 -1
  60. package/dist-cjs/pagination/ListKeyPoliciesPaginator.js +0 -1
  61. package/dist-cjs/pagination/ListKeysPaginator.js +0 -1
  62. package/dist-cjs/protocols/Aws_json1_1.js +0 -1
  63. package/dist-cjs/runtimeConfig.browser.js +2 -3
  64. package/dist-cjs/runtimeConfig.js +3 -4
  65. package/dist-cjs/runtimeConfig.native.js +0 -1
  66. package/dist-cjs/runtimeConfig.shared.js +0 -1
  67. package/dist-es/KMS.js +0 -1
  68. package/dist-es/KMSClient.js +0 -1
  69. package/dist-es/commands/CancelKeyDeletionCommand.js +0 -1
  70. package/dist-es/commands/ConnectCustomKeyStoreCommand.js +0 -1
  71. package/dist-es/commands/CreateAliasCommand.js +0 -1
  72. package/dist-es/commands/CreateCustomKeyStoreCommand.js +0 -1
  73. package/dist-es/commands/CreateGrantCommand.js +0 -1
  74. package/dist-es/commands/CreateKeyCommand.js +0 -1
  75. package/dist-es/commands/DecryptCommand.js +0 -1
  76. package/dist-es/commands/DeleteAliasCommand.js +0 -1
  77. package/dist-es/commands/DeleteCustomKeyStoreCommand.js +0 -1
  78. package/dist-es/commands/DeleteImportedKeyMaterialCommand.js +0 -1
  79. package/dist-es/commands/DescribeCustomKeyStoresCommand.js +0 -1
  80. package/dist-es/commands/DescribeKeyCommand.js +0 -1
  81. package/dist-es/commands/DisableKeyCommand.js +0 -1
  82. package/dist-es/commands/DisableKeyRotationCommand.js +0 -1
  83. package/dist-es/commands/DisconnectCustomKeyStoreCommand.js +0 -1
  84. package/dist-es/commands/EnableKeyCommand.js +0 -1
  85. package/dist-es/commands/EnableKeyRotationCommand.js +0 -1
  86. package/dist-es/commands/EncryptCommand.js +0 -1
  87. package/dist-es/commands/GenerateDataKeyCommand.js +0 -1
  88. package/dist-es/commands/GenerateDataKeyPairCommand.js +0 -1
  89. package/dist-es/commands/GenerateDataKeyPairWithoutPlaintextCommand.js +0 -1
  90. package/dist-es/commands/GenerateDataKeyWithoutPlaintextCommand.js +0 -1
  91. package/dist-es/commands/GenerateRandomCommand.js +0 -1
  92. package/dist-es/commands/GetKeyPolicyCommand.js +0 -1
  93. package/dist-es/commands/GetKeyRotationStatusCommand.js +0 -1
  94. package/dist-es/commands/GetParametersForImportCommand.js +0 -1
  95. package/dist-es/commands/GetPublicKeyCommand.js +0 -1
  96. package/dist-es/commands/ImportKeyMaterialCommand.js +0 -1
  97. package/dist-es/commands/ListAliasesCommand.js +0 -1
  98. package/dist-es/commands/ListGrantsCommand.js +0 -1
  99. package/dist-es/commands/ListKeyPoliciesCommand.js +0 -1
  100. package/dist-es/commands/ListKeysCommand.js +0 -1
  101. package/dist-es/commands/ListResourceTagsCommand.js +0 -1
  102. package/dist-es/commands/ListRetirableGrantsCommand.js +0 -1
  103. package/dist-es/commands/PutKeyPolicyCommand.js +0 -1
  104. package/dist-es/commands/ReEncryptCommand.js +0 -1
  105. package/dist-es/commands/ReplicateKeyCommand.js +0 -1
  106. package/dist-es/commands/RetireGrantCommand.js +0 -1
  107. package/dist-es/commands/RevokeGrantCommand.js +0 -1
  108. package/dist-es/commands/ScheduleKeyDeletionCommand.js +0 -1
  109. package/dist-es/commands/SignCommand.js +0 -1
  110. package/dist-es/commands/TagResourceCommand.js +0 -1
  111. package/dist-es/commands/UntagResourceCommand.js +0 -1
  112. package/dist-es/commands/UpdateAliasCommand.js +0 -1
  113. package/dist-es/commands/UpdateCustomKeyStoreCommand.js +0 -1
  114. package/dist-es/commands/UpdateKeyDescriptionCommand.js +0 -1
  115. package/dist-es/commands/UpdatePrimaryRegionCommand.js +0 -1
  116. package/dist-es/commands/VerifyCommand.js +0 -1
  117. package/dist-es/endpoints.js +0 -1
  118. package/dist-es/index.js +0 -1
  119. package/dist-es/models/index.js +0 -1
  120. package/dist-es/models/models_0.js +0 -1
  121. package/dist-es/pagination/Interfaces.js +0 -1
  122. package/dist-es/pagination/ListAliasesPaginator.js +0 -1
  123. package/dist-es/pagination/ListGrantsPaginator.js +0 -1
  124. package/dist-es/pagination/ListKeyPoliciesPaginator.js +0 -1
  125. package/dist-es/pagination/ListKeysPaginator.js +0 -1
  126. package/dist-es/protocols/Aws_json1_1.js +0 -1
  127. package/dist-es/runtimeConfig.browser.js +1 -2
  128. package/dist-es/runtimeConfig.js +2 -3
  129. package/dist-es/runtimeConfig.native.js +0 -1
  130. package/dist-es/runtimeConfig.shared.js +0 -1
  131. package/dist-types/KMS.d.ts +396 -334
  132. package/dist-types/KMSClient.d.ts +8 -7
  133. package/dist-types/commands/CancelKeyDeletionCommand.d.ts +6 -4
  134. package/dist-types/commands/ConnectCustomKeyStoreCommand.d.ts +3 -3
  135. package/dist-types/commands/CreateAliasCommand.d.ts +11 -7
  136. package/dist-types/commands/CreateGrantCommand.d.ts +14 -11
  137. package/dist-types/commands/CreateKeyCommand.d.ts +16 -14
  138. package/dist-types/commands/DecryptCommand.d.ts +24 -21
  139. package/dist-types/commands/DeleteAliasCommand.d.ts +11 -7
  140. package/dist-types/commands/DeleteCustomKeyStoreCommand.d.ts +10 -11
  141. package/dist-types/commands/DeleteImportedKeyMaterialCommand.d.ts +5 -6
  142. package/dist-types/commands/DescribeCustomKeyStoresCommand.d.ts +4 -4
  143. package/dist-types/commands/DescribeKeyCommand.d.ts +12 -10
  144. package/dist-types/commands/DisableKeyCommand.d.ts +5 -4
  145. package/dist-types/commands/DisableKeyRotationCommand.d.ts +2 -1
  146. package/dist-types/commands/DisconnectCustomKeyStoreCommand.d.ts +6 -4
  147. package/dist-types/commands/EnableKeyCommand.d.ts +4 -2
  148. package/dist-types/commands/EnableKeyRotationCommand.d.ts +2 -1
  149. package/dist-types/commands/EncryptCommand.d.ts +14 -12
  150. package/dist-types/commands/GenerateDataKeyCommand.d.ts +15 -12
  151. package/dist-types/commands/GenerateDataKeyPairCommand.d.ts +15 -13
  152. package/dist-types/commands/GenerateDataKeyPairWithoutPlaintextCommand.d.ts +16 -13
  153. package/dist-types/commands/GenerateDataKeyWithoutPlaintextCommand.d.ts +11 -9
  154. package/dist-types/commands/GenerateRandomCommand.d.ts +2 -1
  155. package/dist-types/commands/GetKeyRotationStatusCommand.d.ts +2 -1
  156. package/dist-types/commands/GetParametersForImportCommand.d.ts +7 -8
  157. package/dist-types/commands/GetPublicKeyCommand.d.ts +7 -5
  158. package/dist-types/commands/ImportKeyMaterialCommand.d.ts +13 -13
  159. package/dist-types/commands/ListAliasesCommand.d.ts +13 -10
  160. package/dist-types/commands/ListGrantsCommand.d.ts +2 -2
  161. package/dist-types/commands/ListKeyPoliciesCommand.d.ts +3 -3
  162. package/dist-types/commands/ListKeysCommand.d.ts +1 -2
  163. package/dist-types/commands/ListRetirableGrantsCommand.d.ts +7 -6
  164. package/dist-types/commands/ReEncryptCommand.d.ts +33 -27
  165. package/dist-types/commands/ReplicateKeyCommand.d.ts +5 -5
  166. package/dist-types/commands/RetireGrantCommand.d.ts +7 -5
  167. package/dist-types/commands/RevokeGrantCommand.d.ts +1 -2
  168. package/dist-types/commands/ScheduleKeyDeletionCommand.d.ts +19 -15
  169. package/dist-types/commands/SignCommand.d.ts +10 -9
  170. package/dist-types/commands/TagResourceCommand.d.ts +6 -4
  171. package/dist-types/commands/UntagResourceCommand.d.ts +3 -3
  172. package/dist-types/commands/UpdateAliasCommand.d.ts +15 -11
  173. package/dist-types/commands/UpdateCustomKeyStoreCommand.d.ts +17 -17
  174. package/dist-types/commands/UpdateKeyDescriptionCommand.d.ts +3 -3
  175. package/dist-types/commands/UpdatePrimaryRegionCommand.d.ts +1 -1
  176. package/dist-types/commands/VerifyCommand.d.ts +5 -5
  177. package/dist-types/models/models_0.d.ts +296 -249
  178. package/dist-types/ts3.4/KMS.d.ts +396 -334
  179. package/dist-types/ts3.4/KMSClient.d.ts +8 -7
  180. package/dist-types/ts3.4/commands/CancelKeyDeletionCommand.d.ts +6 -4
  181. package/dist-types/ts3.4/commands/ConnectCustomKeyStoreCommand.d.ts +3 -3
  182. package/dist-types/ts3.4/commands/CreateAliasCommand.d.ts +11 -7
  183. package/dist-types/ts3.4/commands/CreateGrantCommand.d.ts +14 -11
  184. package/dist-types/ts3.4/commands/CreateKeyCommand.d.ts +16 -14
  185. package/dist-types/ts3.4/commands/DecryptCommand.d.ts +24 -21
  186. package/dist-types/ts3.4/commands/DeleteAliasCommand.d.ts +11 -7
  187. package/dist-types/ts3.4/commands/DeleteCustomKeyStoreCommand.d.ts +10 -11
  188. package/dist-types/ts3.4/commands/DeleteImportedKeyMaterialCommand.d.ts +5 -6
  189. package/dist-types/ts3.4/commands/DescribeCustomKeyStoresCommand.d.ts +4 -4
  190. package/dist-types/ts3.4/commands/DescribeKeyCommand.d.ts +12 -10
  191. package/dist-types/ts3.4/commands/DisableKeyCommand.d.ts +5 -4
  192. package/dist-types/ts3.4/commands/DisableKeyRotationCommand.d.ts +2 -1
  193. package/dist-types/ts3.4/commands/DisconnectCustomKeyStoreCommand.d.ts +6 -4
  194. package/dist-types/ts3.4/commands/EnableKeyCommand.d.ts +4 -2
  195. package/dist-types/ts3.4/commands/EnableKeyRotationCommand.d.ts +2 -1
  196. package/dist-types/ts3.4/commands/EncryptCommand.d.ts +14 -12
  197. package/dist-types/ts3.4/commands/GenerateDataKeyCommand.d.ts +15 -12
  198. package/dist-types/ts3.4/commands/GenerateDataKeyPairCommand.d.ts +15 -13
  199. package/dist-types/ts3.4/commands/GenerateDataKeyPairWithoutPlaintextCommand.d.ts +16 -13
  200. package/dist-types/ts3.4/commands/GenerateDataKeyWithoutPlaintextCommand.d.ts +11 -9
  201. package/dist-types/ts3.4/commands/GenerateRandomCommand.d.ts +2 -1
  202. package/dist-types/ts3.4/commands/GetKeyRotationStatusCommand.d.ts +2 -1
  203. package/dist-types/ts3.4/commands/GetParametersForImportCommand.d.ts +7 -8
  204. package/dist-types/ts3.4/commands/GetPublicKeyCommand.d.ts +7 -5
  205. package/dist-types/ts3.4/commands/ImportKeyMaterialCommand.d.ts +13 -13
  206. package/dist-types/ts3.4/commands/ListAliasesCommand.d.ts +13 -10
  207. package/dist-types/ts3.4/commands/ListGrantsCommand.d.ts +2 -2
  208. package/dist-types/ts3.4/commands/ListKeyPoliciesCommand.d.ts +3 -3
  209. package/dist-types/ts3.4/commands/ListKeysCommand.d.ts +1 -2
  210. package/dist-types/ts3.4/commands/ListRetirableGrantsCommand.d.ts +7 -6
  211. package/dist-types/ts3.4/commands/ReEncryptCommand.d.ts +33 -27
  212. package/dist-types/ts3.4/commands/ReplicateKeyCommand.d.ts +5 -5
  213. package/dist-types/ts3.4/commands/RetireGrantCommand.d.ts +7 -5
  214. package/dist-types/ts3.4/commands/RevokeGrantCommand.d.ts +1 -2
  215. package/dist-types/ts3.4/commands/ScheduleKeyDeletionCommand.d.ts +19 -15
  216. package/dist-types/ts3.4/commands/SignCommand.d.ts +10 -9
  217. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +6 -4
  218. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +3 -3
  219. package/dist-types/ts3.4/commands/UpdateAliasCommand.d.ts +15 -11
  220. package/dist-types/ts3.4/commands/UpdateCustomKeyStoreCommand.d.ts +17 -17
  221. package/dist-types/ts3.4/commands/UpdateKeyDescriptionCommand.d.ts +3 -3
  222. package/dist-types/ts3.4/commands/UpdatePrimaryRegionCommand.d.ts +1 -1
  223. package/dist-types/ts3.4/commands/VerifyCommand.d.ts +5 -5
  224. package/dist-types/ts3.4/models/models_0.d.ts +296 -249
  225. package/package.json +33 -30
  226. package/dist-cjs/KMS.js.map +0 -1
  227. package/dist-cjs/KMSClient.js.map +0 -1
  228. package/dist-cjs/commands/CancelKeyDeletionCommand.js.map +0 -1
  229. package/dist-cjs/commands/ConnectCustomKeyStoreCommand.js.map +0 -1
  230. package/dist-cjs/commands/CreateAliasCommand.js.map +0 -1
  231. package/dist-cjs/commands/CreateCustomKeyStoreCommand.js.map +0 -1
  232. package/dist-cjs/commands/CreateGrantCommand.js.map +0 -1
  233. package/dist-cjs/commands/CreateKeyCommand.js.map +0 -1
  234. package/dist-cjs/commands/DecryptCommand.js.map +0 -1
  235. package/dist-cjs/commands/DeleteAliasCommand.js.map +0 -1
  236. package/dist-cjs/commands/DeleteCustomKeyStoreCommand.js.map +0 -1
  237. package/dist-cjs/commands/DeleteImportedKeyMaterialCommand.js.map +0 -1
  238. package/dist-cjs/commands/DescribeCustomKeyStoresCommand.js.map +0 -1
  239. package/dist-cjs/commands/DescribeKeyCommand.js.map +0 -1
  240. package/dist-cjs/commands/DisableKeyCommand.js.map +0 -1
  241. package/dist-cjs/commands/DisableKeyRotationCommand.js.map +0 -1
  242. package/dist-cjs/commands/DisconnectCustomKeyStoreCommand.js.map +0 -1
  243. package/dist-cjs/commands/EnableKeyCommand.js.map +0 -1
  244. package/dist-cjs/commands/EnableKeyRotationCommand.js.map +0 -1
  245. package/dist-cjs/commands/EncryptCommand.js.map +0 -1
  246. package/dist-cjs/commands/GenerateDataKeyCommand.js.map +0 -1
  247. package/dist-cjs/commands/GenerateDataKeyPairCommand.js.map +0 -1
  248. package/dist-cjs/commands/GenerateDataKeyPairWithoutPlaintextCommand.js.map +0 -1
  249. package/dist-cjs/commands/GenerateDataKeyWithoutPlaintextCommand.js.map +0 -1
  250. package/dist-cjs/commands/GenerateRandomCommand.js.map +0 -1
  251. package/dist-cjs/commands/GetKeyPolicyCommand.js.map +0 -1
  252. package/dist-cjs/commands/GetKeyRotationStatusCommand.js.map +0 -1
  253. package/dist-cjs/commands/GetParametersForImportCommand.js.map +0 -1
  254. package/dist-cjs/commands/GetPublicKeyCommand.js.map +0 -1
  255. package/dist-cjs/commands/ImportKeyMaterialCommand.js.map +0 -1
  256. package/dist-cjs/commands/ListAliasesCommand.js.map +0 -1
  257. package/dist-cjs/commands/ListGrantsCommand.js.map +0 -1
  258. package/dist-cjs/commands/ListKeyPoliciesCommand.js.map +0 -1
  259. package/dist-cjs/commands/ListKeysCommand.js.map +0 -1
  260. package/dist-cjs/commands/ListResourceTagsCommand.js.map +0 -1
  261. package/dist-cjs/commands/ListRetirableGrantsCommand.js.map +0 -1
  262. package/dist-cjs/commands/PutKeyPolicyCommand.js.map +0 -1
  263. package/dist-cjs/commands/ReEncryptCommand.js.map +0 -1
  264. package/dist-cjs/commands/ReplicateKeyCommand.js.map +0 -1
  265. package/dist-cjs/commands/RetireGrantCommand.js.map +0 -1
  266. package/dist-cjs/commands/RevokeGrantCommand.js.map +0 -1
  267. package/dist-cjs/commands/ScheduleKeyDeletionCommand.js.map +0 -1
  268. package/dist-cjs/commands/SignCommand.js.map +0 -1
  269. package/dist-cjs/commands/TagResourceCommand.js.map +0 -1
  270. package/dist-cjs/commands/UntagResourceCommand.js.map +0 -1
  271. package/dist-cjs/commands/UpdateAliasCommand.js.map +0 -1
  272. package/dist-cjs/commands/UpdateCustomKeyStoreCommand.js.map +0 -1
  273. package/dist-cjs/commands/UpdateKeyDescriptionCommand.js.map +0 -1
  274. package/dist-cjs/commands/UpdatePrimaryRegionCommand.js.map +0 -1
  275. package/dist-cjs/commands/VerifyCommand.js.map +0 -1
  276. package/dist-cjs/endpoints.js.map +0 -1
  277. package/dist-cjs/index.js.map +0 -1
  278. package/dist-cjs/models/index.js.map +0 -1
  279. package/dist-cjs/models/models_0.js.map +0 -1
  280. package/dist-cjs/pagination/Interfaces.js.map +0 -1
  281. package/dist-cjs/pagination/ListAliasesPaginator.js.map +0 -1
  282. package/dist-cjs/pagination/ListGrantsPaginator.js.map +0 -1
  283. package/dist-cjs/pagination/ListKeyPoliciesPaginator.js.map +0 -1
  284. package/dist-cjs/pagination/ListKeysPaginator.js.map +0 -1
  285. package/dist-cjs/protocols/Aws_json1_1.js.map +0 -1
  286. package/dist-cjs/runtimeConfig.browser.js.map +0 -1
  287. package/dist-cjs/runtimeConfig.js.map +0 -1
  288. package/dist-cjs/runtimeConfig.native.js.map +0 -1
  289. package/dist-cjs/runtimeConfig.shared.js.map +0 -1
  290. package/dist-es/KMS.js.map +0 -1
  291. package/dist-es/KMSClient.js.map +0 -1
  292. package/dist-es/commands/CancelKeyDeletionCommand.js.map +0 -1
  293. package/dist-es/commands/ConnectCustomKeyStoreCommand.js.map +0 -1
  294. package/dist-es/commands/CreateAliasCommand.js.map +0 -1
  295. package/dist-es/commands/CreateCustomKeyStoreCommand.js.map +0 -1
  296. package/dist-es/commands/CreateGrantCommand.js.map +0 -1
  297. package/dist-es/commands/CreateKeyCommand.js.map +0 -1
  298. package/dist-es/commands/DecryptCommand.js.map +0 -1
  299. package/dist-es/commands/DeleteAliasCommand.js.map +0 -1
  300. package/dist-es/commands/DeleteCustomKeyStoreCommand.js.map +0 -1
  301. package/dist-es/commands/DeleteImportedKeyMaterialCommand.js.map +0 -1
  302. package/dist-es/commands/DescribeCustomKeyStoresCommand.js.map +0 -1
  303. package/dist-es/commands/DescribeKeyCommand.js.map +0 -1
  304. package/dist-es/commands/DisableKeyCommand.js.map +0 -1
  305. package/dist-es/commands/DisableKeyRotationCommand.js.map +0 -1
  306. package/dist-es/commands/DisconnectCustomKeyStoreCommand.js.map +0 -1
  307. package/dist-es/commands/EnableKeyCommand.js.map +0 -1
  308. package/dist-es/commands/EnableKeyRotationCommand.js.map +0 -1
  309. package/dist-es/commands/EncryptCommand.js.map +0 -1
  310. package/dist-es/commands/GenerateDataKeyCommand.js.map +0 -1
  311. package/dist-es/commands/GenerateDataKeyPairCommand.js.map +0 -1
  312. package/dist-es/commands/GenerateDataKeyPairWithoutPlaintextCommand.js.map +0 -1
  313. package/dist-es/commands/GenerateDataKeyWithoutPlaintextCommand.js.map +0 -1
  314. package/dist-es/commands/GenerateRandomCommand.js.map +0 -1
  315. package/dist-es/commands/GetKeyPolicyCommand.js.map +0 -1
  316. package/dist-es/commands/GetKeyRotationStatusCommand.js.map +0 -1
  317. package/dist-es/commands/GetParametersForImportCommand.js.map +0 -1
  318. package/dist-es/commands/GetPublicKeyCommand.js.map +0 -1
  319. package/dist-es/commands/ImportKeyMaterialCommand.js.map +0 -1
  320. package/dist-es/commands/ListAliasesCommand.js.map +0 -1
  321. package/dist-es/commands/ListGrantsCommand.js.map +0 -1
  322. package/dist-es/commands/ListKeyPoliciesCommand.js.map +0 -1
  323. package/dist-es/commands/ListKeysCommand.js.map +0 -1
  324. package/dist-es/commands/ListResourceTagsCommand.js.map +0 -1
  325. package/dist-es/commands/ListRetirableGrantsCommand.js.map +0 -1
  326. package/dist-es/commands/PutKeyPolicyCommand.js.map +0 -1
  327. package/dist-es/commands/ReEncryptCommand.js.map +0 -1
  328. package/dist-es/commands/ReplicateKeyCommand.js.map +0 -1
  329. package/dist-es/commands/RetireGrantCommand.js.map +0 -1
  330. package/dist-es/commands/RevokeGrantCommand.js.map +0 -1
  331. package/dist-es/commands/ScheduleKeyDeletionCommand.js.map +0 -1
  332. package/dist-es/commands/SignCommand.js.map +0 -1
  333. package/dist-es/commands/TagResourceCommand.js.map +0 -1
  334. package/dist-es/commands/UntagResourceCommand.js.map +0 -1
  335. package/dist-es/commands/UpdateAliasCommand.js.map +0 -1
  336. package/dist-es/commands/UpdateCustomKeyStoreCommand.js.map +0 -1
  337. package/dist-es/commands/UpdateKeyDescriptionCommand.js.map +0 -1
  338. package/dist-es/commands/UpdatePrimaryRegionCommand.js.map +0 -1
  339. package/dist-es/commands/VerifyCommand.js.map +0 -1
  340. package/dist-es/endpoints.js.map +0 -1
  341. package/dist-es/index.js.map +0 -1
  342. package/dist-es/models/index.js.map +0 -1
  343. package/dist-es/models/models_0.js.map +0 -1
  344. package/dist-es/pagination/Interfaces.js.map +0 -1
  345. package/dist-es/pagination/ListAliasesPaginator.js.map +0 -1
  346. package/dist-es/pagination/ListGrantsPaginator.js.map +0 -1
  347. package/dist-es/pagination/ListKeyPoliciesPaginator.js.map +0 -1
  348. package/dist-es/pagination/ListKeysPaginator.js.map +0 -1
  349. package/dist-es/protocols/Aws_json1_1.js.map +0 -1
  350. package/dist-es/runtimeConfig.browser.js.map +0 -1
  351. package/dist-es/runtimeConfig.js.map +0 -1
  352. package/dist-es/runtimeConfig.native.js.map +0 -1
  353. package/dist-es/runtimeConfig.shared.js.map +0 -1
  354. package/jest.config.js +0 -4
  355. package/src/KMS.ts +0 -4019
  356. package/src/KMSClient.ts +0 -516
  357. package/src/commands/CancelKeyDeletionCommand.ts +0 -106
  358. package/src/commands/ConnectCustomKeyStoreCommand.ts +0 -156
  359. package/src/commands/CreateAliasCommand.ts +0 -148
  360. package/src/commands/CreateCustomKeyStoreCommand.ts +0 -144
  361. package/src/commands/CreateGrantCommand.ts +0 -154
  362. package/src/commands/CreateKeyCommand.ts +0 -210
  363. package/src/commands/DecryptCommand.ts +0 -173
  364. package/src/commands/DeleteAliasCommand.ts +0 -138
  365. package/src/commands/DeleteCustomKeyStoreCommand.ts +0 -150
  366. package/src/commands/DeleteImportedKeyMaterialCommand.ts +0 -128
  367. package/src/commands/DescribeCustomKeyStoresCommand.ts +0 -148
  368. package/src/commands/DescribeKeyCommand.ts +0 -172
  369. package/src/commands/DisableKeyCommand.ts +0 -109
  370. package/src/commands/DisableKeyRotationCommand.ts +0 -119
  371. package/src/commands/DisconnectCustomKeyStoreCommand.ts +0 -145
  372. package/src/commands/EnableKeyCommand.ts +0 -98
  373. package/src/commands/EnableKeyRotationCommand.ts +0 -119
  374. package/src/commands/EncryptCommand.ts +0 -210
  375. package/src/commands/GenerateDataKeyCommand.ts +0 -189
  376. package/src/commands/GenerateDataKeyPairCommand.ts +0 -169
  377. package/src/commands/GenerateDataKeyPairWithoutPlaintextCommand.ts +0 -169
  378. package/src/commands/GenerateDataKeyWithoutPlaintextCommand.ts +0 -172
  379. package/src/commands/GenerateRandomCommand.ts +0 -103
  380. package/src/commands/GetKeyPolicyCommand.ts +0 -103
  381. package/src/commands/GetKeyRotationStatusCommand.ts +0 -131
  382. package/src/commands/GetParametersForImportCommand.ts +0 -130
  383. package/src/commands/GetPublicKeyCommand.ts +0 -139
  384. package/src/commands/ImportKeyMaterialCommand.ts +0 -158
  385. package/src/commands/ListAliasesCommand.ts +0 -134
  386. package/src/commands/ListGrantsCommand.ts +0 -140
  387. package/src/commands/ListKeyPoliciesCommand.ts +0 -117
  388. package/src/commands/ListKeysCommand.ts +0 -119
  389. package/src/commands/ListResourceTagsCommand.ts +0 -129
  390. package/src/commands/ListRetirableGrantsCommand.ts +0 -137
  391. package/src/commands/PutKeyPolicyCommand.ts +0 -108
  392. package/src/commands/ReEncryptCommand.ts +0 -180
  393. package/src/commands/ReplicateKeyCommand.ts +0 -172
  394. package/src/commands/RetireGrantCommand.ts +0 -139
  395. package/src/commands/RevokeGrantCommand.ts +0 -139
  396. package/src/commands/ScheduleKeyDeletionCommand.ts +0 -145
  397. package/src/commands/SignCommand.ts +0 -132
  398. package/src/commands/TagResourceCommand.ts +0 -140
  399. package/src/commands/UntagResourceCommand.ts +0 -138
  400. package/src/commands/UpdateAliasCommand.ts +0 -153
  401. package/src/commands/UpdateCustomKeyStoreCommand.ts +0 -167
  402. package/src/commands/UpdateKeyDescriptionCommand.ts +0 -118
  403. package/src/commands/UpdatePrimaryRegionCommand.ts +0 -160
  404. package/src/commands/VerifyCommand.ts +0 -118
  405. package/src/endpoints.ts +0 -62
  406. package/src/index.ts +0 -56
  407. package/src/models/index.ts +0 -1
  408. package/src/models/models_0.ts +0 -4742
  409. package/src/pagination/Interfaces.ts +0 -8
  410. package/src/pagination/ListAliasesPaginator.ts +0 -55
  411. package/src/pagination/ListGrantsPaginator.ts +0 -55
  412. package/src/pagination/ListKeyPoliciesPaginator.ts +0 -59
  413. package/src/pagination/ListKeysPaginator.ts +0 -55
  414. package/src/protocols/Aws_json1_1.ts +0 -7632
  415. package/src/runtimeConfig.browser.ts +0 -41
  416. package/src/runtimeConfig.native.ts +0 -17
  417. package/src/runtimeConfig.shared.ts +0 -17
  418. package/src/runtimeConfig.ts +0 -46
  419. package/tsconfig.es.json +0 -10
  420. package/tsconfig.json +0 -33
  421. package/tsconfig.types.json +0 -9
@@ -1,210 +0,0 @@
1
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3
- import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import {
5
- FinalizeHandlerArguments,
6
- Handler,
7
- HandlerExecutionContext,
8
- HttpHandlerOptions as __HttpHandlerOptions,
9
- MetadataBearer as __MetadataBearer,
10
- MiddlewareStack,
11
- SerdeContext as __SerdeContext,
12
- } from "@aws-sdk/types";
13
-
14
- import { KMSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../KMSClient";
15
- import { EncryptRequest, EncryptResponse } from "../models/models_0";
16
- import { deserializeAws_json1_1EncryptCommand, serializeAws_json1_1EncryptCommand } from "../protocols/Aws_json1_1";
17
-
18
- export interface EncryptCommandInput extends EncryptRequest {}
19
- export interface EncryptCommandOutput extends EncryptResponse, __MetadataBearer {}
20
-
21
- /**
22
- * <p>Encrypts plaintext into ciphertext by using a KMS key. The
23
- * <code>Encrypt</code> operation has two primary use cases:</p>
24
- * <ul>
25
- * <li>
26
- * <p>You can encrypt small amounts of arbitrary data, such as a personal identifier or
27
- * database password, or other sensitive information. </p>
28
- * </li>
29
- * <li>
30
- * <p>You can use the <code>Encrypt</code> operation to move encrypted data from one Amazon Web Services Region to another. For example, in Region A, generate a data key and use the plaintext key to encrypt
31
- * your data. Then, in Region A, use the <code>Encrypt</code> operation to encrypt the
32
- * plaintext data key under a KMS key in Region B. Now, you can move the encrypted data and the
33
- * encrypted data key to Region B. When necessary, you can decrypt the encrypted data key and
34
- * the encrypted data entirely within in Region B.</p>
35
- * </li>
36
- * </ul>
37
- *
38
- * <p>You don't need to use the <code>Encrypt</code> operation to encrypt a data key. The <a>GenerateDataKey</a> and <a>GenerateDataKeyPair</a> operations return a
39
- * plaintext data key and an encrypted copy of that data key.</p>
40
- *
41
- * <p>When you encrypt data, you must specify a symmetric or asymmetric KMS key to use in the
42
- * encryption operation. The KMS key must have a <code>KeyUsage</code> value of
43
- * <code>ENCRYPT_DECRYPT.</code> To find the <code>KeyUsage</code> of a KMS key, use the <a>DescribeKey</a> operation. </p>
44
- *
45
- * <p>If you use a symmetric KMS key, you can use an encryption context to add additional security
46
- * to your encryption operation. If you specify an <code>EncryptionContext</code> when encrypting
47
- * data, you must specify the same encryption context (a case-sensitive exact match) when
48
- * decrypting the data. Otherwise, the request to decrypt fails with an
49
- * <code>InvalidCiphertextException</code>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">Encryption
50
- * Context</a> in the <i>Key Management Service Developer Guide</i>.</p>
51
- * <p>If you specify an asymmetric KMS key, you must also specify the encryption algorithm. The
52
- * algorithm must be compatible with the KMS key type.</p>
53
- * <important>
54
- * <p>When you use an asymmetric KMS key to encrypt or reencrypt data, be sure to record the KMS key and encryption algorithm that you choose. You will be required to provide the same KMS key and encryption algorithm when you decrypt the data. If the KMS key and algorithm do not match the values used to encrypt the data, the decrypt operation fails.</p>
55
- * <p>You are not required to supply the key ID and encryption algorithm when you decrypt with symmetric KMS keys because KMS stores this information in the ciphertext blob. KMS cannot store metadata in ciphertext generated with asymmetric keys. The standard format for asymmetric key ciphertext does not include configurable fields.</p>
56
- * </important>
57
- *
58
- *
59
- * <p>The maximum size of the data that you can encrypt varies with the type of KMS key and the
60
- * encryption algorithm that you choose.</p>
61
- * <ul>
62
- * <li>
63
- * <p>Symmetric KMS keys</p>
64
- * <ul>
65
- * <li>
66
- * <p>
67
- * <code>SYMMETRIC_DEFAULT</code>: 4096 bytes</p>
68
- * </li>
69
- * </ul>
70
- * </li>
71
- * <li>
72
- * <p>
73
- * <code>RSA_2048</code>
74
- * </p>
75
- * <ul>
76
- * <li>
77
- * <p>
78
- * <code>RSAES_OAEP_SHA_1</code>: 214 bytes</p>
79
- * </li>
80
- * <li>
81
- * <p>
82
- * <code>RSAES_OAEP_SHA_256</code>: 190 bytes</p>
83
- * </li>
84
- * </ul>
85
- * </li>
86
- * <li>
87
- * <p>
88
- * <code>RSA_3072</code>
89
- * </p>
90
- * <ul>
91
- * <li>
92
- * <p>
93
- * <code>RSAES_OAEP_SHA_1</code>: 342 bytes</p>
94
- * </li>
95
- * <li>
96
- * <p>
97
- * <code>RSAES_OAEP_SHA_256</code>: 318 bytes</p>
98
- * </li>
99
- * </ul>
100
- * </li>
101
- * <li>
102
- * <p>
103
- * <code>RSA_4096</code>
104
- * </p>
105
- * <ul>
106
- * <li>
107
- * <p>
108
- * <code>RSAES_OAEP_SHA_1</code>: 470 bytes</p>
109
- * </li>
110
- * <li>
111
- * <p>
112
- * <code>RSAES_OAEP_SHA_256</code>: 446 bytes</p>
113
- * </li>
114
- * </ul>
115
- * </li>
116
- * </ul>
117
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
118
- * details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key state: Effect on your KMS key</a> in the <i>Key Management Service Developer Guide</i>.</p>
119
- * <p>
120
- * <b>Cross-account use</b>: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
121
- * the key ARN or alias ARN in the value of the <code>KeyId</code> parameter.</p>
122
- *
123
- * <p>
124
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:Encrypt</a> (key policy)</p>
125
- * <p>
126
- * <b>Related operations:</b>
127
- * </p>
128
- * <ul>
129
- * <li>
130
- * <p>
131
- * <a>Decrypt</a>
132
- * </p>
133
- * </li>
134
- * <li>
135
- * <p>
136
- * <a>GenerateDataKey</a>
137
- * </p>
138
- * </li>
139
- * <li>
140
- * <p>
141
- * <a>GenerateDataKeyPair</a>
142
- * </p>
143
- * </li>
144
- * </ul>
145
- * @example
146
- * Use a bare-bones client and the command you need to make an API call.
147
- * ```javascript
148
- * import { KMSClient, EncryptCommand } from "@aws-sdk/client-kms"; // ES Modules import
149
- * // const { KMSClient, EncryptCommand } = require("@aws-sdk/client-kms"); // CommonJS import
150
- * const client = new KMSClient(config);
151
- * const command = new EncryptCommand(input);
152
- * const response = await client.send(command);
153
- * ```
154
- *
155
- * @see {@link EncryptCommandInput} for command's `input` shape.
156
- * @see {@link EncryptCommandOutput} for command's `response` shape.
157
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
158
- *
159
- */
160
- export class EncryptCommand extends $Command<EncryptCommandInput, EncryptCommandOutput, KMSClientResolvedConfig> {
161
- // Start section: command_properties
162
- // End section: command_properties
163
-
164
- constructor(readonly input: EncryptCommandInput) {
165
- // Start section: command_constructor
166
- super();
167
- // End section: command_constructor
168
- }
169
-
170
- /**
171
- * @internal
172
- */
173
- resolveMiddleware(
174
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
175
- configuration: KMSClientResolvedConfig,
176
- options?: __HttpHandlerOptions
177
- ): Handler<EncryptCommandInput, EncryptCommandOutput> {
178
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
179
-
180
- const stack = clientStack.concat(this.middlewareStack);
181
-
182
- const { logger } = configuration;
183
- const clientName = "KMSClient";
184
- const commandName = "EncryptCommand";
185
- const handlerExecutionContext: HandlerExecutionContext = {
186
- logger,
187
- clientName,
188
- commandName,
189
- inputFilterSensitiveLog: EncryptRequest.filterSensitiveLog,
190
- outputFilterSensitiveLog: EncryptResponse.filterSensitiveLog,
191
- };
192
- const { requestHandler } = configuration;
193
- return stack.resolve(
194
- (request: FinalizeHandlerArguments<any>) =>
195
- requestHandler.handle(request.request as __HttpRequest, options || {}),
196
- handlerExecutionContext
197
- );
198
- }
199
-
200
- private serialize(input: EncryptCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
201
- return serializeAws_json1_1EncryptCommand(input, context);
202
- }
203
-
204
- private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<EncryptCommandOutput> {
205
- return deserializeAws_json1_1EncryptCommand(output, context);
206
- }
207
-
208
- // Start section: command_body_extra
209
- // End section: command_body_extra
210
- }
@@ -1,189 +0,0 @@
1
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3
- import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import {
5
- FinalizeHandlerArguments,
6
- Handler,
7
- HandlerExecutionContext,
8
- HttpHandlerOptions as __HttpHandlerOptions,
9
- MetadataBearer as __MetadataBearer,
10
- MiddlewareStack,
11
- SerdeContext as __SerdeContext,
12
- } from "@aws-sdk/types";
13
-
14
- import { KMSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../KMSClient";
15
- import { GenerateDataKeyRequest, GenerateDataKeyResponse } from "../models/models_0";
16
- import {
17
- deserializeAws_json1_1GenerateDataKeyCommand,
18
- serializeAws_json1_1GenerateDataKeyCommand,
19
- } from "../protocols/Aws_json1_1";
20
-
21
- export interface GenerateDataKeyCommandInput extends GenerateDataKeyRequest {}
22
- export interface GenerateDataKeyCommandOutput extends GenerateDataKeyResponse, __MetadataBearer {}
23
-
24
- /**
25
- * <p>Generates a unique symmetric data key for client-side encryption. This operation returns a
26
- * plaintext copy of the data key and a copy that is encrypted under a KMS key
27
- * that you specify. You can use the plaintext key to encrypt your data outside of KMS and
28
- * store the encrypted data key with the encrypted data.</p>
29
- *
30
- * <p>
31
- * <code>GenerateDataKey</code> returns a unique data key for each request. The bytes in the
32
- * plaintext key are not related to the caller or the KMS key.</p>
33
- *
34
- * <p>To generate a data key, specify the symmetric KMS key that will be used to encrypt the data
35
- * key. You cannot use an asymmetric KMS key to generate data keys. To get the type of your KMS key, use
36
- * the <a>DescribeKey</a> operation. You must also specify the length of the data key.
37
- * Use either the <code>KeySpec</code> or <code>NumberOfBytes</code> parameters (but not both).
38
- * For 128-bit and 256-bit data keys, use the <code>KeySpec</code> parameter. </p>
39
- *
40
- * <p>To get only an encrypted copy of the data key, use <a>GenerateDataKeyWithoutPlaintext</a>. To generate an asymmetric data key pair, use
41
- * the <a>GenerateDataKeyPair</a> or <a>GenerateDataKeyPairWithoutPlaintext</a> operation. To get a cryptographically secure
42
- * random byte string, use <a>GenerateRandom</a>.</p>
43
- *
44
- * <p>You can use the optional encryption context to add additional security to the encryption
45
- * operation. If you specify an <code>EncryptionContext</code>, you must specify the same
46
- * encryption context (a case-sensitive exact match) when decrypting the encrypted data key.
47
- * Otherwise, the request to decrypt fails with an <code>InvalidCiphertextException</code>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">Encryption Context</a> in the
48
- * <i>Key Management Service Developer Guide</i>.</p>
49
- * <p>Applications in Amazon Web Services Nitro Enclaves can call this operation by using the <a href="https://github.com/aws/aws-nitro-enclaves-sdk-c">Amazon Web Services Nitro Enclaves Development Kit</a>. For information about the supporting parameters, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html">How Amazon Web Services Nitro Enclaves use KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
50
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
51
- * details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key state: Effect on your KMS key</a> in the <i>Key Management Service Developer Guide</i>.</p>
52
- * <p>
53
- * <b>How to use your data key</b>
54
- * </p>
55
- * <p>We recommend that you use the following pattern to encrypt data locally in your application.
56
- * You can write your own code or use a client-side encryption library, such as the <a href="https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/">Amazon Web Services Encryption SDK</a>, the <a href="https://docs.aws.amazon.com/dynamodb-encryption-client/latest/devguide/">Amazon DynamoDB Encryption Client</a>, or
57
- * <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html">Amazon S3
58
- * client-side encryption</a> to do these tasks for you.</p>
59
- * <p>To encrypt data outside of KMS:</p>
60
- * <ol>
61
- * <li>
62
- * <p>Use the <code>GenerateDataKey</code> operation to get a data key.</p>
63
- * </li>
64
- * <li>
65
- * <p>Use the plaintext data key (in the <code>Plaintext</code> field of the response) to
66
- * encrypt your data outside of KMS. Then erase the plaintext data key from memory.</p>
67
- * </li>
68
- * <li>
69
- * <p>Store the encrypted data key (in the <code>CiphertextBlob</code> field of the
70
- * response) with the encrypted data.</p>
71
- * </li>
72
- * </ol>
73
- * <p>To decrypt data outside of KMS:</p>
74
- * <ol>
75
- * <li>
76
- * <p>Use the <a>Decrypt</a> operation to decrypt the encrypted data key. The
77
- * operation returns a plaintext copy of the data key.</p>
78
- * </li>
79
- * <li>
80
- * <p>Use the plaintext data key to decrypt data outside of KMS, then erase the plaintext
81
- * data key from memory.</p>
82
- * </li>
83
- * </ol>
84
- * <p>
85
- * <b>Cross-account use</b>: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
86
- * the key ARN or alias ARN in the value of the <code>KeyId</code> parameter.</p>
87
- *
88
- * <p>
89
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:GenerateDataKey</a> (key policy)</p>
90
- * <p>
91
- * <b>Related operations:</b>
92
- * </p>
93
- * <ul>
94
- * <li>
95
- * <p>
96
- * <a>Decrypt</a>
97
- * </p>
98
- * </li>
99
- * <li>
100
- * <p>
101
- * <a>Encrypt</a>
102
- * </p>
103
- * </li>
104
- * <li>
105
- * <p>
106
- * <a>GenerateDataKeyPair</a>
107
- * </p>
108
- * </li>
109
- * <li>
110
- * <p>
111
- * <a>GenerateDataKeyPairWithoutPlaintext</a>
112
- * </p>
113
- * </li>
114
- * <li>
115
- * <p>
116
- * <a>GenerateDataKeyWithoutPlaintext</a>
117
- * </p>
118
- * </li>
119
- * </ul>
120
- * @example
121
- * Use a bare-bones client and the command you need to make an API call.
122
- * ```javascript
123
- * import { KMSClient, GenerateDataKeyCommand } from "@aws-sdk/client-kms"; // ES Modules import
124
- * // const { KMSClient, GenerateDataKeyCommand } = require("@aws-sdk/client-kms"); // CommonJS import
125
- * const client = new KMSClient(config);
126
- * const command = new GenerateDataKeyCommand(input);
127
- * const response = await client.send(command);
128
- * ```
129
- *
130
- * @see {@link GenerateDataKeyCommandInput} for command's `input` shape.
131
- * @see {@link GenerateDataKeyCommandOutput} for command's `response` shape.
132
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
133
- *
134
- */
135
- export class GenerateDataKeyCommand extends $Command<
136
- GenerateDataKeyCommandInput,
137
- GenerateDataKeyCommandOutput,
138
- KMSClientResolvedConfig
139
- > {
140
- // Start section: command_properties
141
- // End section: command_properties
142
-
143
- constructor(readonly input: GenerateDataKeyCommandInput) {
144
- // Start section: command_constructor
145
- super();
146
- // End section: command_constructor
147
- }
148
-
149
- /**
150
- * @internal
151
- */
152
- resolveMiddleware(
153
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
154
- configuration: KMSClientResolvedConfig,
155
- options?: __HttpHandlerOptions
156
- ): Handler<GenerateDataKeyCommandInput, GenerateDataKeyCommandOutput> {
157
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
158
-
159
- const stack = clientStack.concat(this.middlewareStack);
160
-
161
- const { logger } = configuration;
162
- const clientName = "KMSClient";
163
- const commandName = "GenerateDataKeyCommand";
164
- const handlerExecutionContext: HandlerExecutionContext = {
165
- logger,
166
- clientName,
167
- commandName,
168
- inputFilterSensitiveLog: GenerateDataKeyRequest.filterSensitiveLog,
169
- outputFilterSensitiveLog: GenerateDataKeyResponse.filterSensitiveLog,
170
- };
171
- const { requestHandler } = configuration;
172
- return stack.resolve(
173
- (request: FinalizeHandlerArguments<any>) =>
174
- requestHandler.handle(request.request as __HttpRequest, options || {}),
175
- handlerExecutionContext
176
- );
177
- }
178
-
179
- private serialize(input: GenerateDataKeyCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
180
- return serializeAws_json1_1GenerateDataKeyCommand(input, context);
181
- }
182
-
183
- private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GenerateDataKeyCommandOutput> {
184
- return deserializeAws_json1_1GenerateDataKeyCommand(output, context);
185
- }
186
-
187
- // Start section: command_body_extra
188
- // End section: command_body_extra
189
- }
@@ -1,169 +0,0 @@
1
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3
- import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import {
5
- FinalizeHandlerArguments,
6
- Handler,
7
- HandlerExecutionContext,
8
- HttpHandlerOptions as __HttpHandlerOptions,
9
- MetadataBearer as __MetadataBearer,
10
- MiddlewareStack,
11
- SerdeContext as __SerdeContext,
12
- } from "@aws-sdk/types";
13
-
14
- import { KMSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../KMSClient";
15
- import { GenerateDataKeyPairRequest, GenerateDataKeyPairResponse } from "../models/models_0";
16
- import {
17
- deserializeAws_json1_1GenerateDataKeyPairCommand,
18
- serializeAws_json1_1GenerateDataKeyPairCommand,
19
- } from "../protocols/Aws_json1_1";
20
-
21
- export interface GenerateDataKeyPairCommandInput extends GenerateDataKeyPairRequest {}
22
- export interface GenerateDataKeyPairCommandOutput extends GenerateDataKeyPairResponse, __MetadataBearer {}
23
-
24
- /**
25
- * <p>Generates a unique asymmetric data key pair. The <code>GenerateDataKeyPair</code>
26
- * operation returns a plaintext public key, a plaintext private key, and a copy of the private
27
- * key that is encrypted under the symmetric KMS key you specify. You can use the data key pair to
28
- * perform asymmetric cryptography and implement digital signatures outside of KMS.</p>
29
- *
30
- * <p>You can use the public key that <code>GenerateDataKeyPair</code> returns to encrypt data
31
- * or verify a signature outside of KMS. Then, store the encrypted private key with the data.
32
- * When you are ready to decrypt data or sign a message, you can use the <a>Decrypt</a> operation to decrypt the encrypted private key.</p>
33
- *
34
- * <p>To generate a data key pair, you must specify a symmetric KMS key to
35
- * encrypt the private key in a data key pair. You cannot use an asymmetric KMS key or a KMS key in a
36
- * custom key store. To get the type and origin of your KMS key, use the <a>DescribeKey</a> operation. </p>
37
- * <p>Use the <code>KeyPairSpec</code> parameter to choose an RSA or Elliptic Curve (ECC) data
38
- * key pair. KMS recommends that your use ECC key pairs for signing, and use RSA key pairs
39
- * for either encryption or signing, but not both. However, KMS cannot enforce any restrictions
40
- * on the use of data key pairs outside of KMS.</p>
41
- *
42
- * <p>If you are using the data key pair to encrypt data, or for any operation where you don't
43
- * immediately need a private key, consider using the <a>GenerateDataKeyPairWithoutPlaintext</a> operation.
44
- * <code>GenerateDataKeyPairWithoutPlaintext</code> returns a plaintext public key and an
45
- * encrypted private key, but omits the plaintext private key that you need only to decrypt
46
- * ciphertext or sign a message. Later, when you need to decrypt the data or sign a message, use
47
- * the <a>Decrypt</a> operation to decrypt the encrypted private key in the data key
48
- * pair.</p>
49
- *
50
- * <p>
51
- * <code>GenerateDataKeyPair</code> returns a unique data key pair for each request. The
52
- * bytes in the keys are not related to the caller or the KMS key that is used to encrypt the private
53
- * key. The public key is a DER-encoded X.509 SubjectPublicKeyInfo, as specified in <a href="https://tools.ietf.org/html/rfc5280">RFC 5280</a>. The
54
- * private key is a DER-encoded PKCS8 PrivateKeyInfo, as specified in <a href="https://tools.ietf.org/html/rfc5958">RFC
55
- * 5958</a>.</p>
56
- *
57
- * <p>You can use the optional encryption context to add additional security to the encryption
58
- * operation. If you specify an <code>EncryptionContext</code>, you must specify the same
59
- * encryption context (a case-sensitive exact match) when decrypting the encrypted data key.
60
- * Otherwise, the request to decrypt fails with an <code>InvalidCiphertextException</code>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">Encryption Context</a> in the
61
- * <i>Key Management Service Developer Guide</i>.</p>
62
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
63
- * details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key state: Effect on your KMS key</a> in the <i>Key Management Service Developer Guide</i>.</p>
64
- * <p>
65
- * <b>Cross-account use</b>: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
66
- * the key ARN or alias ARN in the value of the <code>KeyId</code> parameter.</p>
67
- *
68
- * <p>
69
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:GenerateDataKeyPair</a> (key policy)</p>
70
- * <p>
71
- * <b>Related operations:</b>
72
- * </p>
73
- * <ul>
74
- * <li>
75
- * <p>
76
- * <a>Decrypt</a>
77
- * </p>
78
- * </li>
79
- * <li>
80
- * <p>
81
- * <a>Encrypt</a>
82
- * </p>
83
- * </li>
84
- * <li>
85
- * <p>
86
- * <a>GenerateDataKey</a>
87
- * </p>
88
- * </li>
89
- * <li>
90
- * <p>
91
- * <a>GenerateDataKeyPairWithoutPlaintext</a>
92
- * </p>
93
- * </li>
94
- * <li>
95
- * <p>
96
- * <a>GenerateDataKeyWithoutPlaintext</a>
97
- * </p>
98
- * </li>
99
- * </ul>
100
- * @example
101
- * Use a bare-bones client and the command you need to make an API call.
102
- * ```javascript
103
- * import { KMSClient, GenerateDataKeyPairCommand } from "@aws-sdk/client-kms"; // ES Modules import
104
- * // const { KMSClient, GenerateDataKeyPairCommand } = require("@aws-sdk/client-kms"); // CommonJS import
105
- * const client = new KMSClient(config);
106
- * const command = new GenerateDataKeyPairCommand(input);
107
- * const response = await client.send(command);
108
- * ```
109
- *
110
- * @see {@link GenerateDataKeyPairCommandInput} for command's `input` shape.
111
- * @see {@link GenerateDataKeyPairCommandOutput} for command's `response` shape.
112
- * @see {@link KMSClientResolvedConfig | config} for command's `input` shape.
113
- *
114
- */
115
- export class GenerateDataKeyPairCommand extends $Command<
116
- GenerateDataKeyPairCommandInput,
117
- GenerateDataKeyPairCommandOutput,
118
- KMSClientResolvedConfig
119
- > {
120
- // Start section: command_properties
121
- // End section: command_properties
122
-
123
- constructor(readonly input: GenerateDataKeyPairCommandInput) {
124
- // Start section: command_constructor
125
- super();
126
- // End section: command_constructor
127
- }
128
-
129
- /**
130
- * @internal
131
- */
132
- resolveMiddleware(
133
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
134
- configuration: KMSClientResolvedConfig,
135
- options?: __HttpHandlerOptions
136
- ): Handler<GenerateDataKeyPairCommandInput, GenerateDataKeyPairCommandOutput> {
137
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
138
-
139
- const stack = clientStack.concat(this.middlewareStack);
140
-
141
- const { logger } = configuration;
142
- const clientName = "KMSClient";
143
- const commandName = "GenerateDataKeyPairCommand";
144
- const handlerExecutionContext: HandlerExecutionContext = {
145
- logger,
146
- clientName,
147
- commandName,
148
- inputFilterSensitiveLog: GenerateDataKeyPairRequest.filterSensitiveLog,
149
- outputFilterSensitiveLog: GenerateDataKeyPairResponse.filterSensitiveLog,
150
- };
151
- const { requestHandler } = configuration;
152
- return stack.resolve(
153
- (request: FinalizeHandlerArguments<any>) =>
154
- requestHandler.handle(request.request as __HttpRequest, options || {}),
155
- handlerExecutionContext
156
- );
157
- }
158
-
159
- private serialize(input: GenerateDataKeyPairCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
160
- return serializeAws_json1_1GenerateDataKeyPairCommand(input, context);
161
- }
162
-
163
- private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GenerateDataKeyPairCommandOutput> {
164
- return deserializeAws_json1_1GenerateDataKeyPairCommand(output, context);
165
- }
166
-
167
- // Start section: command_body_extra
168
- // End section: command_body_extra
169
- }