@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
package/src/KMS.ts DELETED
@@ -1,4019 +0,0 @@
1
- import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
2
-
3
- import {
4
- CancelKeyDeletionCommand,
5
- CancelKeyDeletionCommandInput,
6
- CancelKeyDeletionCommandOutput,
7
- } from "./commands/CancelKeyDeletionCommand";
8
- import {
9
- ConnectCustomKeyStoreCommand,
10
- ConnectCustomKeyStoreCommandInput,
11
- ConnectCustomKeyStoreCommandOutput,
12
- } from "./commands/ConnectCustomKeyStoreCommand";
13
- import { CreateAliasCommand, CreateAliasCommandInput, CreateAliasCommandOutput } from "./commands/CreateAliasCommand";
14
- import {
15
- CreateCustomKeyStoreCommand,
16
- CreateCustomKeyStoreCommandInput,
17
- CreateCustomKeyStoreCommandOutput,
18
- } from "./commands/CreateCustomKeyStoreCommand";
19
- import { CreateGrantCommand, CreateGrantCommandInput, CreateGrantCommandOutput } from "./commands/CreateGrantCommand";
20
- import { CreateKeyCommand, CreateKeyCommandInput, CreateKeyCommandOutput } from "./commands/CreateKeyCommand";
21
- import { DecryptCommand, DecryptCommandInput, DecryptCommandOutput } from "./commands/DecryptCommand";
22
- import { DeleteAliasCommand, DeleteAliasCommandInput, DeleteAliasCommandOutput } from "./commands/DeleteAliasCommand";
23
- import {
24
- DeleteCustomKeyStoreCommand,
25
- DeleteCustomKeyStoreCommandInput,
26
- DeleteCustomKeyStoreCommandOutput,
27
- } from "./commands/DeleteCustomKeyStoreCommand";
28
- import {
29
- DeleteImportedKeyMaterialCommand,
30
- DeleteImportedKeyMaterialCommandInput,
31
- DeleteImportedKeyMaterialCommandOutput,
32
- } from "./commands/DeleteImportedKeyMaterialCommand";
33
- import {
34
- DescribeCustomKeyStoresCommand,
35
- DescribeCustomKeyStoresCommandInput,
36
- DescribeCustomKeyStoresCommandOutput,
37
- } from "./commands/DescribeCustomKeyStoresCommand";
38
- import { DescribeKeyCommand, DescribeKeyCommandInput, DescribeKeyCommandOutput } from "./commands/DescribeKeyCommand";
39
- import { DisableKeyCommand, DisableKeyCommandInput, DisableKeyCommandOutput } from "./commands/DisableKeyCommand";
40
- import {
41
- DisableKeyRotationCommand,
42
- DisableKeyRotationCommandInput,
43
- DisableKeyRotationCommandOutput,
44
- } from "./commands/DisableKeyRotationCommand";
45
- import {
46
- DisconnectCustomKeyStoreCommand,
47
- DisconnectCustomKeyStoreCommandInput,
48
- DisconnectCustomKeyStoreCommandOutput,
49
- } from "./commands/DisconnectCustomKeyStoreCommand";
50
- import { EnableKeyCommand, EnableKeyCommandInput, EnableKeyCommandOutput } from "./commands/EnableKeyCommand";
51
- import {
52
- EnableKeyRotationCommand,
53
- EnableKeyRotationCommandInput,
54
- EnableKeyRotationCommandOutput,
55
- } from "./commands/EnableKeyRotationCommand";
56
- import { EncryptCommand, EncryptCommandInput, EncryptCommandOutput } from "./commands/EncryptCommand";
57
- import {
58
- GenerateDataKeyCommand,
59
- GenerateDataKeyCommandInput,
60
- GenerateDataKeyCommandOutput,
61
- } from "./commands/GenerateDataKeyCommand";
62
- import {
63
- GenerateDataKeyPairCommand,
64
- GenerateDataKeyPairCommandInput,
65
- GenerateDataKeyPairCommandOutput,
66
- } from "./commands/GenerateDataKeyPairCommand";
67
- import {
68
- GenerateDataKeyPairWithoutPlaintextCommand,
69
- GenerateDataKeyPairWithoutPlaintextCommandInput,
70
- GenerateDataKeyPairWithoutPlaintextCommandOutput,
71
- } from "./commands/GenerateDataKeyPairWithoutPlaintextCommand";
72
- import {
73
- GenerateDataKeyWithoutPlaintextCommand,
74
- GenerateDataKeyWithoutPlaintextCommandInput,
75
- GenerateDataKeyWithoutPlaintextCommandOutput,
76
- } from "./commands/GenerateDataKeyWithoutPlaintextCommand";
77
- import {
78
- GenerateRandomCommand,
79
- GenerateRandomCommandInput,
80
- GenerateRandomCommandOutput,
81
- } from "./commands/GenerateRandomCommand";
82
- import {
83
- GetKeyPolicyCommand,
84
- GetKeyPolicyCommandInput,
85
- GetKeyPolicyCommandOutput,
86
- } from "./commands/GetKeyPolicyCommand";
87
- import {
88
- GetKeyRotationStatusCommand,
89
- GetKeyRotationStatusCommandInput,
90
- GetKeyRotationStatusCommandOutput,
91
- } from "./commands/GetKeyRotationStatusCommand";
92
- import {
93
- GetParametersForImportCommand,
94
- GetParametersForImportCommandInput,
95
- GetParametersForImportCommandOutput,
96
- } from "./commands/GetParametersForImportCommand";
97
- import {
98
- GetPublicKeyCommand,
99
- GetPublicKeyCommandInput,
100
- GetPublicKeyCommandOutput,
101
- } from "./commands/GetPublicKeyCommand";
102
- import {
103
- ImportKeyMaterialCommand,
104
- ImportKeyMaterialCommandInput,
105
- ImportKeyMaterialCommandOutput,
106
- } from "./commands/ImportKeyMaterialCommand";
107
- import { ListAliasesCommand, ListAliasesCommandInput, ListAliasesCommandOutput } from "./commands/ListAliasesCommand";
108
- import { ListGrantsCommand, ListGrantsCommandInput, ListGrantsCommandOutput } from "./commands/ListGrantsCommand";
109
- import {
110
- ListKeyPoliciesCommand,
111
- ListKeyPoliciesCommandInput,
112
- ListKeyPoliciesCommandOutput,
113
- } from "./commands/ListKeyPoliciesCommand";
114
- import { ListKeysCommand, ListKeysCommandInput, ListKeysCommandOutput } from "./commands/ListKeysCommand";
115
- import {
116
- ListResourceTagsCommand,
117
- ListResourceTagsCommandInput,
118
- ListResourceTagsCommandOutput,
119
- } from "./commands/ListResourceTagsCommand";
120
- import {
121
- ListRetirableGrantsCommand,
122
- ListRetirableGrantsCommandInput,
123
- ListRetirableGrantsCommandOutput,
124
- } from "./commands/ListRetirableGrantsCommand";
125
- import {
126
- PutKeyPolicyCommand,
127
- PutKeyPolicyCommandInput,
128
- PutKeyPolicyCommandOutput,
129
- } from "./commands/PutKeyPolicyCommand";
130
- import { ReEncryptCommand, ReEncryptCommandInput, ReEncryptCommandOutput } from "./commands/ReEncryptCommand";
131
- import {
132
- ReplicateKeyCommand,
133
- ReplicateKeyCommandInput,
134
- ReplicateKeyCommandOutput,
135
- } from "./commands/ReplicateKeyCommand";
136
- import { RetireGrantCommand, RetireGrantCommandInput, RetireGrantCommandOutput } from "./commands/RetireGrantCommand";
137
- import { RevokeGrantCommand, RevokeGrantCommandInput, RevokeGrantCommandOutput } from "./commands/RevokeGrantCommand";
138
- import {
139
- ScheduleKeyDeletionCommand,
140
- ScheduleKeyDeletionCommandInput,
141
- ScheduleKeyDeletionCommandOutput,
142
- } from "./commands/ScheduleKeyDeletionCommand";
143
- import { SignCommand, SignCommandInput, SignCommandOutput } from "./commands/SignCommand";
144
- import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
145
- import {
146
- UntagResourceCommand,
147
- UntagResourceCommandInput,
148
- UntagResourceCommandOutput,
149
- } from "./commands/UntagResourceCommand";
150
- import { UpdateAliasCommand, UpdateAliasCommandInput, UpdateAliasCommandOutput } from "./commands/UpdateAliasCommand";
151
- import {
152
- UpdateCustomKeyStoreCommand,
153
- UpdateCustomKeyStoreCommandInput,
154
- UpdateCustomKeyStoreCommandOutput,
155
- } from "./commands/UpdateCustomKeyStoreCommand";
156
- import {
157
- UpdateKeyDescriptionCommand,
158
- UpdateKeyDescriptionCommandInput,
159
- UpdateKeyDescriptionCommandOutput,
160
- } from "./commands/UpdateKeyDescriptionCommand";
161
- import {
162
- UpdatePrimaryRegionCommand,
163
- UpdatePrimaryRegionCommandInput,
164
- UpdatePrimaryRegionCommandOutput,
165
- } from "./commands/UpdatePrimaryRegionCommand";
166
- import { VerifyCommand, VerifyCommandInput, VerifyCommandOutput } from "./commands/VerifyCommand";
167
- import { KMSClient } from "./KMSClient";
168
-
169
- /**
170
- * <fullname>Key Management Service</fullname>
171
- * <p>Key Management Service (KMS) is an encryption and key management web service. This guide describes
172
- * the KMS operations that you can call programmatically. For general information about KMS,
173
- * see the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/">
174
- * <i>Key Management Service Developer Guide</i>
175
- * </a>.</p>
176
- * <note>
177
- * <p>KMS is replacing the term <i>customer master key (CMK)</i> with <i>KMS key</i> and <i>KMS key</i>. The concept has not changed. To prevent breaking changes, KMS is keeping some variations of this term.</p>
178
- * <p>Amazon Web Services provides SDKs that consist of libraries and sample code for various programming
179
- * languages and platforms (Java, Ruby, .Net, macOS, Android, etc.). The SDKs provide a
180
- * convenient way to create programmatic access to KMS and other Amazon Web Services services. For example,
181
- * the SDKs take care of tasks such as signing requests (see below), managing errors, and
182
- * retrying requests automatically. For more information about the Amazon Web Services SDKs, including how to
183
- * download and install them, see <a href="http://aws.amazon.com/tools/">Tools for Amazon Web
184
- * Services</a>.</p>
185
- * </note>
186
- * <p>We recommend that you use the Amazon Web Services SDKs to make programmatic API calls to KMS.</p>
187
- * <p>Clients must support TLS (Transport Layer Security) 1.0. We recommend TLS 1.2. Clients
188
- * must also support cipher suites with Perfect Forward Secrecy (PFS) such as Ephemeral
189
- * Diffie-Hellman (DHE) or Elliptic Curve Ephemeral Diffie-Hellman (ECDHE). Most modern systems
190
- * such as Java 7 and later support these modes.</p>
191
- * <p>
192
- * <b>Signing Requests</b>
193
- * </p>
194
- * <p>Requests must be signed by using an access key ID and a secret access key. We strongly
195
- * recommend that you <i>do not</i> use your Amazon Web Services account (root) access key ID and
196
- * secret key for everyday work with KMS. Instead, use the access key ID and secret access key
197
- * for an IAM user. You can also use the Amazon Web Services Security Token Service to generate temporary
198
- * security credentials that you can use to sign requests.</p>
199
- * <p>All KMS operations require <a href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html">Signature Version 4</a>.</p>
200
- * <p>
201
- * <b>Logging API Requests</b>
202
- * </p>
203
- * <p>KMS supports CloudTrail, a service that logs Amazon Web Services API calls and related events for your Amazon Web Services account and delivers them to an Amazon S3 bucket that you specify. By using the information
204
- * collected by CloudTrail, you can determine what requests were made to KMS, who made the request,
205
- * when it was made, and so on. To learn more about CloudTrail, including how to turn it on and find
206
- * your log files, see the <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/">CloudTrail User Guide</a>.</p>
207
- * <p>
208
- * <b>Additional Resources</b>
209
- * </p>
210
- * <p>For more information about credentials and request signing, see the following:</p>
211
- * <ul>
212
- * <li>
213
- * <p>
214
- * <a href="https://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html">Amazon Web Services Security
215
- * Credentials</a> - This topic provides general information about the types of
216
- * credentials used to access Amazon Web Services.</p>
217
- * </li>
218
- * <li>
219
- * <p>
220
- * <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html">Temporary
221
- * Security Credentials</a> - This section of the <i>IAM User Guide</i>
222
- * describes how to create and use temporary security credentials.</p>
223
- * </li>
224
- * <li>
225
- * <p>
226
- * <a href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html">Signature Version
227
- * 4 Signing Process</a> - This set of topics walks you through the process of signing
228
- * a request using an access key ID and a secret access key.</p>
229
- * </li>
230
- * </ul>
231
- * <p>
232
- * <b>Commonly Used API Operations</b>
233
- * </p>
234
- * <p>Of the API operations discussed in this guide, the following will prove the most useful
235
- * for most applications. You will likely perform operations other than these, such as creating
236
- * keys and assigning policies, by using the console.</p>
237
- * <ul>
238
- * <li>
239
- * <p>
240
- * <a>Encrypt</a>
241
- * </p>
242
- * </li>
243
- * <li>
244
- * <p>
245
- * <a>Decrypt</a>
246
- * </p>
247
- * </li>
248
- * <li>
249
- * <p>
250
- * <a>GenerateDataKey</a>
251
- * </p>
252
- * </li>
253
- * <li>
254
- * <p>
255
- * <a>GenerateDataKeyWithoutPlaintext</a>
256
- * </p>
257
- * </li>
258
- * </ul>
259
- */
260
- export class KMS extends KMSClient {
261
- /**
262
- * <p>Cancels the deletion of a KMS key. When this operation succeeds, the key
263
- * state of the KMS key is <code>Disabled</code>. To enable the KMS key, use <a>EnableKey</a>. </p>
264
- * <p>For more information about scheduling and canceling deletion of a KMS key, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html">Deleting KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
265
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
266
- * 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>
267
- * <p>
268
- * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
269
- * <p>
270
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:CancelKeyDeletion</a> (key policy)</p>
271
- * <p>
272
- * <b>Related operations</b>: <a>ScheduleKeyDeletion</a>
273
- * </p>
274
- */
275
- public cancelKeyDeletion(
276
- args: CancelKeyDeletionCommandInput,
277
- options?: __HttpHandlerOptions
278
- ): Promise<CancelKeyDeletionCommandOutput>;
279
- public cancelKeyDeletion(
280
- args: CancelKeyDeletionCommandInput,
281
- cb: (err: any, data?: CancelKeyDeletionCommandOutput) => void
282
- ): void;
283
- public cancelKeyDeletion(
284
- args: CancelKeyDeletionCommandInput,
285
- options: __HttpHandlerOptions,
286
- cb: (err: any, data?: CancelKeyDeletionCommandOutput) => void
287
- ): void;
288
- public cancelKeyDeletion(
289
- args: CancelKeyDeletionCommandInput,
290
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CancelKeyDeletionCommandOutput) => void),
291
- cb?: (err: any, data?: CancelKeyDeletionCommandOutput) => void
292
- ): Promise<CancelKeyDeletionCommandOutput> | void {
293
- const command = new CancelKeyDeletionCommand(args);
294
- if (typeof optionsOrCb === "function") {
295
- this.send(command, optionsOrCb);
296
- } else if (typeof cb === "function") {
297
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
298
- this.send(command, optionsOrCb || {}, cb);
299
- } else {
300
- return this.send(command, optionsOrCb);
301
- }
302
- }
303
-
304
- /**
305
- * <p>Connects or reconnects a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a> to its associated CloudHSM cluster.</p>
306
- * <p>The custom key store must be connected before you can create KMS keys
307
- * in the key store or use the KMS keys it contains. You can disconnect and reconnect a custom key
308
- * store at any time.</p>
309
- * <p>To connect a custom key store, its associated CloudHSM cluster must have at least one active
310
- * HSM. To get the number of active HSMs in a cluster, use the <a href="https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html">DescribeClusters</a> operation. To add HSMs
311
- * to the cluster, use the <a href="https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html">CreateHsm</a> operation. Also, the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser">
312
- * <code>kmsuser</code> crypto
313
- * user</a> (CU) must not be logged into the cluster. This prevents KMS from using this
314
- * account to log in.</p>
315
- * <p>The connection process can take an extended amount of time to complete; up to 20 minutes.
316
- * This operation starts the connection process, but it does not wait for it to complete. When it
317
- * succeeds, this operation quickly returns an HTTP 200 response and a JSON object with no
318
- * properties. However, this response does not indicate that the custom key store is connected.
319
- * To get the connection state of the custom key store, use the <a>DescribeCustomKeyStores</a> operation.</p>
320
- * <p>During the connection process, KMS finds the CloudHSM cluster that is associated with the
321
- * custom key store, creates the connection infrastructure, connects to the cluster, logs into
322
- * the CloudHSM client as the <code>kmsuser</code> CU, and rotates its password.</p>
323
- * <p>The <code>ConnectCustomKeyStore</code> operation might fail for various reasons. To find
324
- * the reason, use the <a>DescribeCustomKeyStores</a> operation and see the
325
- * <code>ConnectionErrorCode</code> in the response. For help interpreting the
326
- * <code>ConnectionErrorCode</code>, see <a>CustomKeyStoresListEntry</a>.</p>
327
- * <p>To fix the failure, use the <a>DisconnectCustomKeyStore</a> operation to
328
- * disconnect the custom key store, correct the error, use the <a>UpdateCustomKeyStore</a> operation if necessary, and then use
329
- * <code>ConnectCustomKeyStore</code> again.</p>
330
- * <p>If you are having trouble connecting or disconnecting a custom key store, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html">Troubleshooting a Custom Key
331
- * Store</a> in the <i>Key Management Service Developer Guide</i>.</p>
332
- * <p>
333
- * <b>Cross-account use</b>: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account.</p>
334
- *
335
- * <p>
336
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:ConnectCustomKeyStore</a> (IAM policy)</p>
337
- * <p>
338
- * <b>Related operations</b>
339
- * </p>
340
- * <ul>
341
- * <li>
342
- * <p>
343
- * <a>CreateCustomKeyStore</a>
344
- * </p>
345
- * </li>
346
- * <li>
347
- * <p>
348
- * <a>DeleteCustomKeyStore</a>
349
- * </p>
350
- * </li>
351
- * <li>
352
- * <p>
353
- * <a>DescribeCustomKeyStores</a>
354
- * </p>
355
- * </li>
356
- * <li>
357
- * <p>
358
- * <a>DisconnectCustomKeyStore</a>
359
- * </p>
360
- * </li>
361
- * <li>
362
- * <p>
363
- * <a>UpdateCustomKeyStore</a>
364
- * </p>
365
- * </li>
366
- * </ul>
367
- */
368
- public connectCustomKeyStore(
369
- args: ConnectCustomKeyStoreCommandInput,
370
- options?: __HttpHandlerOptions
371
- ): Promise<ConnectCustomKeyStoreCommandOutput>;
372
- public connectCustomKeyStore(
373
- args: ConnectCustomKeyStoreCommandInput,
374
- cb: (err: any, data?: ConnectCustomKeyStoreCommandOutput) => void
375
- ): void;
376
- public connectCustomKeyStore(
377
- args: ConnectCustomKeyStoreCommandInput,
378
- options: __HttpHandlerOptions,
379
- cb: (err: any, data?: ConnectCustomKeyStoreCommandOutput) => void
380
- ): void;
381
- public connectCustomKeyStore(
382
- args: ConnectCustomKeyStoreCommandInput,
383
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ConnectCustomKeyStoreCommandOutput) => void),
384
- cb?: (err: any, data?: ConnectCustomKeyStoreCommandOutput) => void
385
- ): Promise<ConnectCustomKeyStoreCommandOutput> | void {
386
- const command = new ConnectCustomKeyStoreCommand(args);
387
- if (typeof optionsOrCb === "function") {
388
- this.send(command, optionsOrCb);
389
- } else if (typeof cb === "function") {
390
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
391
- this.send(command, optionsOrCb || {}, cb);
392
- } else {
393
- return this.send(command, optionsOrCb);
394
- }
395
- }
396
-
397
- /**
398
- * <p>Creates a friendly name for a KMS key. </p>
399
- * <note>
400
- * <p>Adding, deleting, or updating an alias can allow or deny permission to the KMS key. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/abac.html">Using ABAC in KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
401
- * </note>
402
- * <p>You can use an alias to identify a KMS key in the KMS console, in the <a>DescribeKey</a> operation and in <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations">cryptographic operations</a>, such as <a>Encrypt</a> and
403
- * <a>GenerateDataKey</a>. You can also change the KMS key that's associated with the
404
- * alias (<a>UpdateAlias</a>) or delete the alias (<a>DeleteAlias</a>) at
405
- * any time. These operations don't affect the underlying KMS key. </p>
406
- * <p>You can associate the alias with any customer managed key in the same Amazon Web Services Region. Each
407
- * alias is associated with only one KMS key at a time, but a KMS key can have multiple aliases. A valid KMS key is required. You can't create an alias without a KMS key.</p>
408
- * <p>The alias must be unique in the account and Region, but you can have aliases with the same
409
- * name in different Regions. For detailed information about aliases, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html">Using aliases</a> in the
410
- * <i>Key Management Service Developer Guide</i>.</p>
411
- * <p>This operation does not return a response. To get the alias that you created, use the
412
- * <a>ListAliases</a> operation.</p>
413
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
414
- * 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>
415
- * <p>
416
- * <b>Cross-account use</b>: No. You cannot perform this operation on an alias in a different Amazon Web Services account.</p>
417
- *
418
- * <p>
419
- * <b>Required permissions</b>
420
- * </p>
421
- * <ul>
422
- * <li>
423
- * <p>
424
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:CreateAlias</a> on the alias (IAM policy).</p>
425
- * </li>
426
- * <li>
427
- * <p>
428
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:CreateAlias</a> on the KMS key (key policy).</p>
429
- * </li>
430
- * </ul>
431
- * <p>For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access">Controlling access to aliases</a> in the <i>Key Management Service Developer Guide</i>.</p>
432
- * <p>
433
- * <b>Related operations:</b>
434
- * </p>
435
- * <ul>
436
- * <li>
437
- * <p>
438
- * <a>DeleteAlias</a>
439
- * </p>
440
- * </li>
441
- * <li>
442
- * <p>
443
- * <a>ListAliases</a>
444
- * </p>
445
- * </li>
446
- * <li>
447
- * <p>
448
- * <a>UpdateAlias</a>
449
- * </p>
450
- * </li>
451
- * </ul>
452
- */
453
- public createAlias(args: CreateAliasCommandInput, options?: __HttpHandlerOptions): Promise<CreateAliasCommandOutput>;
454
- public createAlias(args: CreateAliasCommandInput, cb: (err: any, data?: CreateAliasCommandOutput) => void): void;
455
- public createAlias(
456
- args: CreateAliasCommandInput,
457
- options: __HttpHandlerOptions,
458
- cb: (err: any, data?: CreateAliasCommandOutput) => void
459
- ): void;
460
- public createAlias(
461
- args: CreateAliasCommandInput,
462
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateAliasCommandOutput) => void),
463
- cb?: (err: any, data?: CreateAliasCommandOutput) => void
464
- ): Promise<CreateAliasCommandOutput> | void {
465
- const command = new CreateAliasCommand(args);
466
- if (typeof optionsOrCb === "function") {
467
- this.send(command, optionsOrCb);
468
- } else if (typeof cb === "function") {
469
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
470
- this.send(command, optionsOrCb || {}, cb);
471
- } else {
472
- return this.send(command, optionsOrCb);
473
- }
474
- }
475
-
476
- /**
477
- * <p>Creates a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a> that is associated with an <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/clusters.html">CloudHSM cluster</a> that you own and
478
- * manage.</p>
479
- * <p>This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">Custom Key Store feature</a> feature in KMS, which
480
- * combines the convenience and extensive integration of KMS with the isolation and control of a
481
- * single-tenant key store.</p>
482
- * <p>Before you create the custom key store, you must assemble
483
- * the required elements, including an CloudHSM cluster that fulfills the requirements for a custom
484
- * key store. For details about the required elements, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore">Assemble the Prerequisites</a>
485
- * in the <i>Key Management Service Developer Guide</i>.</p>
486
- * <p>When the operation completes successfully, it returns the ID of the new custom key store.
487
- * Before you can use your new custom key store, you need to use the <a>ConnectCustomKeyStore</a> operation to connect the new key store to its CloudHSM
488
- * cluster. Even if you are not going to use your custom key store immediately, you might want to
489
- * connect it to verify that all settings are correct and then disconnect it until you are ready
490
- * to use it.</p>
491
- * <p>For help with failures, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html">Troubleshooting a Custom Key Store</a> in the
492
- * <i>Key Management Service Developer Guide</i>.</p>
493
- * <p>
494
- * <b>Cross-account use</b>: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account.</p>
495
- * <p>
496
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:CreateCustomKeyStore</a> (IAM policy).</p>
497
- * <p>
498
- * <b>Related operations:</b>
499
- * </p>
500
- * <ul>
501
- * <li>
502
- * <p>
503
- * <a>ConnectCustomKeyStore</a>
504
- * </p>
505
- * </li>
506
- * <li>
507
- * <p>
508
- * <a>DeleteCustomKeyStore</a>
509
- * </p>
510
- * </li>
511
- * <li>
512
- * <p>
513
- * <a>DescribeCustomKeyStores</a>
514
- * </p>
515
- * </li>
516
- * <li>
517
- * <p>
518
- * <a>DisconnectCustomKeyStore</a>
519
- * </p>
520
- * </li>
521
- * <li>
522
- * <p>
523
- * <a>UpdateCustomKeyStore</a>
524
- * </p>
525
- * </li>
526
- * </ul>
527
- */
528
- public createCustomKeyStore(
529
- args: CreateCustomKeyStoreCommandInput,
530
- options?: __HttpHandlerOptions
531
- ): Promise<CreateCustomKeyStoreCommandOutput>;
532
- public createCustomKeyStore(
533
- args: CreateCustomKeyStoreCommandInput,
534
- cb: (err: any, data?: CreateCustomKeyStoreCommandOutput) => void
535
- ): void;
536
- public createCustomKeyStore(
537
- args: CreateCustomKeyStoreCommandInput,
538
- options: __HttpHandlerOptions,
539
- cb: (err: any, data?: CreateCustomKeyStoreCommandOutput) => void
540
- ): void;
541
- public createCustomKeyStore(
542
- args: CreateCustomKeyStoreCommandInput,
543
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateCustomKeyStoreCommandOutput) => void),
544
- cb?: (err: any, data?: CreateCustomKeyStoreCommandOutput) => void
545
- ): Promise<CreateCustomKeyStoreCommandOutput> | void {
546
- const command = new CreateCustomKeyStoreCommand(args);
547
- if (typeof optionsOrCb === "function") {
548
- this.send(command, optionsOrCb);
549
- } else if (typeof cb === "function") {
550
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
551
- this.send(command, optionsOrCb || {}, cb);
552
- } else {
553
- return this.send(command, optionsOrCb);
554
- }
555
- }
556
-
557
- /**
558
- * <p>Adds a grant to a KMS key. </p>
559
- * <p>A <i>grant</i> is a policy instrument that allows Amazon Web Services principals to use KMS keys in cryptographic operations. It also can allow them to view a KMS key (<a>DescribeKey</a>) and create and manage grants. When authorizing access to a KMS key, grants are considered along with key policies and IAM policies. Grants are often used for
560
- * temporary permissions because you can create one, use its permissions, and delete it without
561
- * changing your key policies or IAM policies. </p>
562
- * <p>For detailed information about grants, including grant terminology, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html">Using grants</a> in the
563
- * <i>
564
- * <i>Key Management Service Developer Guide</i>
565
- * </i>. For examples of working with grants in several
566
- * programming languages, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html">Programming grants</a>. </p>
567
- * <p>The <code>CreateGrant</code> operation returns a <code>GrantToken</code> and a
568
- * <code>GrantId</code>.</p>
569
- * <ul>
570
- * <li>
571
- * <p>When you create, retire, or revoke a grant, there might be a brief delay, usually less than five minutes, until the grant is available throughout KMS. This state is known as <i>eventual consistency</i>. Once the grant has achieved eventual consistency, the grantee principal
572
- * can use the permissions in the grant without identifying the grant. </p>
573
- * <p>However, to use the permissions in the grant immediately, use the
574
- * <code>GrantToken</code> that <code>CreateGrant</code> returns. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token">Using a grant
575
- * token</a> in the <i>
576
- * <i>Key Management Service Developer Guide</i>
577
- * </i>.</p>
578
- * </li>
579
- * <li>
580
- * <p>The <code>CreateGrant</code> operation also returns a <code>GrantId</code>. You can use the
581
- * <code>GrantId</code> and a key identifier to identify the grant in the <a>RetireGrant</a> and <a>RevokeGrant</a> operations. To find the grant
582
- * ID, use the <a>ListGrants</a> or <a>ListRetirableGrants</a>
583
- * operations.</p>
584
- * </li>
585
- * </ul>
586
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
587
- * 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>
588
- * <p>
589
- * <b>Cross-account use</b>: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key
590
- * ARN in the value of the <code>KeyId</code> parameter. </p>
591
- * <p>
592
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:CreateGrant</a> (key policy)</p>
593
- * <p>
594
- * <b>Related operations:</b>
595
- * </p>
596
- * <ul>
597
- * <li>
598
- * <p>
599
- * <a>ListGrants</a>
600
- * </p>
601
- * </li>
602
- * <li>
603
- * <p>
604
- * <a>ListRetirableGrants</a>
605
- * </p>
606
- * </li>
607
- * <li>
608
- * <p>
609
- * <a>RetireGrant</a>
610
- * </p>
611
- * </li>
612
- * <li>
613
- * <p>
614
- * <a>RevokeGrant</a>
615
- * </p>
616
- * </li>
617
- * </ul>
618
- */
619
- public createGrant(args: CreateGrantCommandInput, options?: __HttpHandlerOptions): Promise<CreateGrantCommandOutput>;
620
- public createGrant(args: CreateGrantCommandInput, cb: (err: any, data?: CreateGrantCommandOutput) => void): void;
621
- public createGrant(
622
- args: CreateGrantCommandInput,
623
- options: __HttpHandlerOptions,
624
- cb: (err: any, data?: CreateGrantCommandOutput) => void
625
- ): void;
626
- public createGrant(
627
- args: CreateGrantCommandInput,
628
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateGrantCommandOutput) => void),
629
- cb?: (err: any, data?: CreateGrantCommandOutput) => void
630
- ): Promise<CreateGrantCommandOutput> | void {
631
- const command = new CreateGrantCommand(args);
632
- if (typeof optionsOrCb === "function") {
633
- this.send(command, optionsOrCb);
634
- } else if (typeof cb === "function") {
635
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
636
- this.send(command, optionsOrCb || {}, cb);
637
- } else {
638
- return this.send(command, optionsOrCb);
639
- }
640
- }
641
-
642
- /**
643
- * <p>Creates a unique customer managed <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms-keys">KMS key</a> in your Amazon Web Services account and Region.</p>
644
- * <note>
645
- * <p>KMS is replacing the term <i>customer master key (CMK)</i> with <i>KMS key</i> and <i>KMS key</i>. The concept has not changed. To prevent breaking changes, KMS is keeping some variations of this term.</p>
646
- * </note>
647
- *
648
- * <p>You can use the <code>CreateKey</code> operation to create symmetric or asymmetric KMS keys.</p>
649
- * <ul>
650
- * <li>
651
- * <p>
652
- * <b>Symmetric KMS keys</b> contain a 256-bit symmetric key that
653
- * never leaves KMS unencrypted. To use the KMS key, you must call KMS. You can use a
654
- * symmetric KMS key to encrypt and decrypt small amounts of data, but they are typically used to
655
- * generate <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#data-keys">data
656
- * keys</a> and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#data-key-pairs">data keys pairs</a>. For details,
657
- * see <a>GenerateDataKey</a> and <a>GenerateDataKeyPair</a>.</p>
658
- * </li>
659
- * <li>
660
- * <p>
661
- * <b>Asymmetric KMS keys</b> can contain an RSA key pair or an
662
- * Elliptic Curve (ECC) key pair. The private key in an asymmetric KMS key never leaves KMS
663
- * unencrypted. However, you can use the <a>GetPublicKey</a> operation to download
664
- * the public key so it can be used outside of KMS. KMS keys with RSA key pairs can be used to
665
- * encrypt or decrypt data or sign and verify messages (but not both). KMS keys with ECC key
666
- * pairs can be used only to sign and verify messages.</p>
667
- * </li>
668
- * </ul>
669
- * <p>For information about symmetric and asymmetric KMS keys, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using Symmetric and Asymmetric KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
670
- *
671
- *
672
- * <p>To create different types of KMS keys, use the following guidance:</p>
673
- *
674
- * <dl>
675
- * <dt>Asymmetric KMS keys</dt>
676
- * <dd>
677
- * <p>To create an asymmetric KMS key, use the <code>KeySpec</code> parameter to specify
678
- * the type of key material in the KMS key. Then, use the <code>KeyUsage</code> parameter
679
- * to determine whether the KMS key will be used to encrypt and decrypt or sign and verify.
680
- * You can't change these properties after the KMS key is created.</p>
681
- * <p> </p>
682
- * </dd>
683
- * <dt>Symmetric KMS keys</dt>
684
- * <dd>
685
- * <p>When creating a symmetric KMS key, you don't need to specify the
686
- * <code>KeySpec</code> or <code>KeyUsage</code> parameters. The default value for
687
- * <code>KeySpec</code>, <code>SYMMETRIC_DEFAULT</code>, and the default value for
688
- * <code>KeyUsage</code>, <code>ENCRYPT_DECRYPT</code>, are the only valid values for
689
- * symmetric KMS keys. </p>
690
- * <p> </p>
691
- * </dd>
692
- * <dt>Multi-Region primary keys</dt>
693
- * <dt>Imported key material</dt>
694
- * <dd>
695
- * <p>To create a multi-Region <i>primary key</i> in the local Amazon Web Services Region,
696
- * use the <code>MultiRegion</code> parameter with a value of <code>True</code>. To create
697
- * a multi-Region <i>replica key</i>, that is, a KMS key with the same key ID and
698
- * key material as a primary key, but in a different Amazon Web Services Region, use the <a>ReplicateKey</a> operation. To change a replica key to a primary key, and its
699
- * primary key to a replica key, use the <a>UpdatePrimaryRegion</a>
700
- * operation.</p>
701
- * <p>This operation supports <i>multi-Region keys</i>, an KMS feature that lets you create multiple
702
- * interoperable KMS keys in different Amazon Web Services Regions. Because these KMS keys have the same key ID, key
703
- * material, and other metadata, you can use them interchangeably to encrypt data in one Amazon Web Services Region and decrypt
704
- * it in a different Amazon Web Services Region without re-encrypting the data or making a cross-Region call. For more information about multi-Region keys, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html">Using multi-Region keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
705
- * <p>You can create symmetric and asymmetric multi-Region keys and multi-Region keys with
706
- * imported key material. You cannot create multi-Region keys in a custom key store.</p>
707
- * <p> </p>
708
- * </dd>
709
- * <dd>
710
- * <p>To import your own key material, begin by creating a symmetric KMS key with no key
711
- * material. To do this, use the <code>Origin</code> parameter of <code>CreateKey</code>
712
- * with a value of <code>EXTERNAL</code>. Next, use <a>GetParametersForImport</a> operation to get a public key and import token, and use the public key to encrypt
713
- * your key material. Then, use <a>ImportKeyMaterial</a> with your import token
714
- * to import the key material. For step-by-step instructions, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html">Importing Key Material</a> in the <i>
715
- * <i>Key Management Service Developer Guide</i>
716
- * </i>. You
717
- * cannot import the key material into an asymmetric KMS key.</p>
718
- * <p>To create a multi-Region primary key with imported key material, use the
719
- * <code>Origin</code> parameter of <code>CreateKey</code> with a value of
720
- * <code>EXTERNAL</code> and the <code>MultiRegion</code> parameter with a value of
721
- * <code>True</code>. To create replicas of the multi-Region primary key, use the <a>ReplicateKey</a> operation. For more information about multi-Region keys, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html">Using multi-Region keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
722
- * <p> </p>
723
- * </dd>
724
- * <dt>Custom key store</dt>
725
- * <dd>
726
- * <p>To create a symmetric KMS key in a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a>, use the
727
- * <code>CustomKeyStoreId</code> parameter to specify the custom key store. You must also
728
- * use the <code>Origin</code> parameter with a value of <code>AWS_CLOUDHSM</code>. The
729
- * CloudHSM cluster that is associated with the custom key store must have at least two active
730
- * HSMs in different Availability Zones in the Amazon Web Services Region. </p>
731
- * <p>You cannot create an asymmetric KMS key in a custom key store. For information about
732
- * custom key stores in KMS see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">Using Custom Key Stores</a> in
733
- * the <i>
734
- * <i>Key Management Service Developer Guide</i>
735
- * </i>.</p>
736
- * </dd>
737
- * </dl>
738
- * <p>
739
- * <b>Cross-account use</b>: No. You cannot use this operation to
740
- * create a KMS key in a different Amazon Web Services account.</p>
741
- *
742
- * <p>
743
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:CreateKey</a> (IAM policy). To use the
744
- * <code>Tags</code> parameter, <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:TagResource</a> (IAM policy). For examples and information about related
745
- * permissions, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/iam-policies.html#iam-policy-example-create-key">Allow a user to create KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
746
- * <p>
747
- * <b>Related operations:</b>
748
- * </p>
749
- * <ul>
750
- * <li>
751
- * <p>
752
- * <a>DescribeKey</a>
753
- * </p>
754
- * </li>
755
- * <li>
756
- * <p>
757
- * <a>ListKeys</a>
758
- * </p>
759
- * </li>
760
- * <li>
761
- * <p>
762
- * <a>ScheduleKeyDeletion</a>
763
- * </p>
764
- * </li>
765
- * </ul>
766
- */
767
- public createKey(args: CreateKeyCommandInput, options?: __HttpHandlerOptions): Promise<CreateKeyCommandOutput>;
768
- public createKey(args: CreateKeyCommandInput, cb: (err: any, data?: CreateKeyCommandOutput) => void): void;
769
- public createKey(
770
- args: CreateKeyCommandInput,
771
- options: __HttpHandlerOptions,
772
- cb: (err: any, data?: CreateKeyCommandOutput) => void
773
- ): void;
774
- public createKey(
775
- args: CreateKeyCommandInput,
776
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateKeyCommandOutput) => void),
777
- cb?: (err: any, data?: CreateKeyCommandOutput) => void
778
- ): Promise<CreateKeyCommandOutput> | void {
779
- const command = new CreateKeyCommand(args);
780
- if (typeof optionsOrCb === "function") {
781
- this.send(command, optionsOrCb);
782
- } else if (typeof cb === "function") {
783
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
784
- this.send(command, optionsOrCb || {}, cb);
785
- } else {
786
- return this.send(command, optionsOrCb);
787
- }
788
- }
789
-
790
- /**
791
- * <p>Decrypts ciphertext that was encrypted by a KMS key using any of
792
- * the following operations:</p>
793
- * <ul>
794
- * <li>
795
- * <p>
796
- * <a>Encrypt</a>
797
- * </p>
798
- * </li>
799
- * <li>
800
- * <p>
801
- * <a>GenerateDataKey</a>
802
- * </p>
803
- * </li>
804
- * <li>
805
- * <p>
806
- * <a>GenerateDataKeyPair</a>
807
- * </p>
808
- * </li>
809
- * <li>
810
- * <p>
811
- * <a>GenerateDataKeyWithoutPlaintext</a>
812
- * </p>
813
- * </li>
814
- * <li>
815
- * <p>
816
- * <a>GenerateDataKeyPairWithoutPlaintext</a>
817
- * </p>
818
- * </li>
819
- * </ul>
820
- * <p>You can use this operation to decrypt ciphertext that was encrypted under a symmetric or
821
- * asymmetric KMS key. When the KMS key is asymmetric, you must specify the KMS key and the encryption
822
- * algorithm that was used to encrypt the ciphertext. For information about symmetric and asymmetric KMS keys, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using Symmetric and Asymmetric KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
823
- * <p>The Decrypt operation also decrypts ciphertext that was encrypted outside of KMS by the
824
- * public key in an KMS asymmetric KMS key. However, it cannot decrypt ciphertext produced by other
825
- * libraries, such as the <a href="https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/">Amazon Web Services Encryption
826
- * SDK</a> or <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html">Amazon S3 client-side encryption</a>. These libraries return a ciphertext format that
827
- * is incompatible with KMS.</p>
828
- * <p>If the ciphertext was encrypted under a symmetric KMS key, the <code>KeyId</code> parameter is
829
- * optional. KMS can get this information from metadata that it adds to the symmetric
830
- * ciphertext blob. This feature adds durability to your implementation by ensuring that
831
- * authorized users can decrypt ciphertext decades after it was encrypted, even if they've lost
832
- * track of the key ID. However, specifying the KMS key is always recommended as a best practice.
833
- * When you use the <code>KeyId</code> parameter to specify a KMS key, KMS only uses the KMS key you
834
- * specify. If the ciphertext was encrypted under a different KMS key, the <code>Decrypt</code>
835
- * operation fails. This practice ensures that you use the KMS key that you intend.</p>
836
- * <p>Whenever possible, use key policies to give users permission to call the
837
- * <code>Decrypt</code> operation on a particular KMS key, instead of using IAM policies.
838
- * Otherwise, you might create an IAM user policy that gives the user <code>Decrypt</code>
839
- * permission on all KMS keys. This user could decrypt ciphertext that was encrypted by KMS keys in other
840
- * accounts if the key policy for the cross-account KMS key permits it. If you must use an IAM policy
841
- * for <code>Decrypt</code> permissions, limit the user to particular KMS keys or particular trusted
842
- * accounts. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/iam-policies.html#iam-policies-best-practices">Best practices for IAM policies</a> in the <i>Key Management Service Developer Guide</i>.</p>
843
- * <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>
844
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
845
- * 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>
846
- * <p>
847
- * <b>Cross-account use</b>: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
848
- * the key ARN or alias ARN in the value of the <code>KeyId</code> parameter. </p>
849
- *
850
- * <p>
851
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:Decrypt</a> (key policy)</p>
852
- * <p>
853
- * <b>Related operations:</b>
854
- * </p>
855
- * <ul>
856
- * <li>
857
- * <p>
858
- * <a>Encrypt</a>
859
- * </p>
860
- * </li>
861
- * <li>
862
- * <p>
863
- * <a>GenerateDataKey</a>
864
- * </p>
865
- * </li>
866
- * <li>
867
- * <p>
868
- * <a>GenerateDataKeyPair</a>
869
- * </p>
870
- * </li>
871
- * <li>
872
- * <p>
873
- * <a>ReEncrypt</a>
874
- * </p>
875
- * </li>
876
- * </ul>
877
- */
878
- public decrypt(args: DecryptCommandInput, options?: __HttpHandlerOptions): Promise<DecryptCommandOutput>;
879
- public decrypt(args: DecryptCommandInput, cb: (err: any, data?: DecryptCommandOutput) => void): void;
880
- public decrypt(
881
- args: DecryptCommandInput,
882
- options: __HttpHandlerOptions,
883
- cb: (err: any, data?: DecryptCommandOutput) => void
884
- ): void;
885
- public decrypt(
886
- args: DecryptCommandInput,
887
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DecryptCommandOutput) => void),
888
- cb?: (err: any, data?: DecryptCommandOutput) => void
889
- ): Promise<DecryptCommandOutput> | void {
890
- const command = new DecryptCommand(args);
891
- if (typeof optionsOrCb === "function") {
892
- this.send(command, optionsOrCb);
893
- } else if (typeof cb === "function") {
894
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
895
- this.send(command, optionsOrCb || {}, cb);
896
- } else {
897
- return this.send(command, optionsOrCb);
898
- }
899
- }
900
-
901
- /**
902
- * <p>Deletes the specified alias. </p>
903
- * <note>
904
- * <p>Adding, deleting, or updating an alias can allow or deny permission to the KMS key. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/abac.html">Using ABAC in KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
905
- * </note>
906
- * <p>Because an alias is not a property of a KMS key, you can delete and change the aliases of a KMS key without affecting the KMS key. Also, aliases do not appear in the response from the <a>DescribeKey</a> operation. To get the aliases of all KMS keys, use the <a>ListAliases</a> operation. </p>
907
- * <p>Each KMS key can have multiple aliases. To change the alias of a KMS key, use <a>DeleteAlias</a> to delete the current alias and <a>CreateAlias</a> to
908
- * create a new alias. To associate an existing alias with a different KMS key,
909
- * call <a>UpdateAlias</a>.</p>
910
- * <p>
911
- * <b>Cross-account use</b>: No. You cannot perform this operation on an alias in a different Amazon Web Services account.</p>
912
- * <p>
913
- * <b>Required permissions</b>
914
- * </p>
915
- * <ul>
916
- * <li>
917
- * <p>
918
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:DeleteAlias</a> on the alias (IAM policy).</p>
919
- * </li>
920
- * <li>
921
- * <p>
922
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:DeleteAlias</a> on the KMS key (key policy).</p>
923
- * </li>
924
- * </ul>
925
- * <p>For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access">Controlling access to aliases</a> in the <i>Key Management Service Developer Guide</i>.</p>
926
- * <p>
927
- * <b>Related operations:</b>
928
- * </p>
929
- * <ul>
930
- * <li>
931
- * <p>
932
- * <a>CreateAlias</a>
933
- * </p>
934
- * </li>
935
- * <li>
936
- * <p>
937
- * <a>ListAliases</a>
938
- * </p>
939
- * </li>
940
- * <li>
941
- * <p>
942
- * <a>UpdateAlias</a>
943
- * </p>
944
- * </li>
945
- * </ul>
946
- */
947
- public deleteAlias(args: DeleteAliasCommandInput, options?: __HttpHandlerOptions): Promise<DeleteAliasCommandOutput>;
948
- public deleteAlias(args: DeleteAliasCommandInput, cb: (err: any, data?: DeleteAliasCommandOutput) => void): void;
949
- public deleteAlias(
950
- args: DeleteAliasCommandInput,
951
- options: __HttpHandlerOptions,
952
- cb: (err: any, data?: DeleteAliasCommandOutput) => void
953
- ): void;
954
- public deleteAlias(
955
- args: DeleteAliasCommandInput,
956
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteAliasCommandOutput) => void),
957
- cb?: (err: any, data?: DeleteAliasCommandOutput) => void
958
- ): Promise<DeleteAliasCommandOutput> | void {
959
- const command = new DeleteAliasCommand(args);
960
- if (typeof optionsOrCb === "function") {
961
- this.send(command, optionsOrCb);
962
- } else if (typeof cb === "function") {
963
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
964
- this.send(command, optionsOrCb || {}, cb);
965
- } else {
966
- return this.send(command, optionsOrCb);
967
- }
968
- }
969
-
970
- /**
971
- * <p>Deletes a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a>. This operation does not delete the CloudHSM cluster that is
972
- * associated with the custom key store, or affect any users or keys in the cluster.</p>
973
- * <p>The custom key store that you delete cannot contain any KMS <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys">KMS keys</a>. Before
974
- * deleting the key store, verify that you will never need to use any of the KMS keys in the key
975
- * store for any <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations">cryptographic operations</a>. Then, use <a>ScheduleKeyDeletion</a> to delete the
976
- * KMS keys from the key store. When the scheduled waiting period
977
- * expires, the <code>ScheduleKeyDeletion</code> operation deletes the KMS keys. Then it makes a best
978
- * effort to delete the key material from the associated cluster. However, you might need to
979
- * manually <a href="https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-orphaned-key">delete the orphaned key
980
- * material</a> from the cluster and its backups.</p>
981
- * <p>After all KMS keys are deleted from KMS, use <a>DisconnectCustomKeyStore</a> to
982
- * disconnect the key store from KMS. Then, you can delete the custom key store.</p>
983
- * <p>Instead of deleting the custom key store, consider using <a>DisconnectCustomKeyStore</a> to disconnect it from KMS. While the key store is
984
- * disconnected, you cannot create or use the KMS keys in the key store. But, you do not need to
985
- * delete KMS keys and you can reconnect a disconnected custom key store at any time.</p>
986
- * <p>If the operation succeeds, it returns a JSON object with no
987
- * properties.</p>
988
- * <p>This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">Custom Key Store feature</a> feature in KMS, which
989
- * combines the convenience and extensive integration of KMS with the isolation and control of a
990
- * single-tenant key store.</p>
991
- *
992
- * <p>
993
- * <b>Cross-account use</b>: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account.</p>
994
- *
995
- * <p>
996
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:DeleteCustomKeyStore</a> (IAM policy)</p>
997
- * <p>
998
- * <b>Related operations:</b>
999
- * </p>
1000
- * <ul>
1001
- * <li>
1002
- * <p>
1003
- * <a>ConnectCustomKeyStore</a>
1004
- * </p>
1005
- * </li>
1006
- * <li>
1007
- * <p>
1008
- * <a>CreateCustomKeyStore</a>
1009
- * </p>
1010
- * </li>
1011
- * <li>
1012
- * <p>
1013
- * <a>DescribeCustomKeyStores</a>
1014
- * </p>
1015
- * </li>
1016
- * <li>
1017
- * <p>
1018
- * <a>DisconnectCustomKeyStore</a>
1019
- * </p>
1020
- * </li>
1021
- * <li>
1022
- * <p>
1023
- * <a>UpdateCustomKeyStore</a>
1024
- * </p>
1025
- * </li>
1026
- * </ul>
1027
- */
1028
- public deleteCustomKeyStore(
1029
- args: DeleteCustomKeyStoreCommandInput,
1030
- options?: __HttpHandlerOptions
1031
- ): Promise<DeleteCustomKeyStoreCommandOutput>;
1032
- public deleteCustomKeyStore(
1033
- args: DeleteCustomKeyStoreCommandInput,
1034
- cb: (err: any, data?: DeleteCustomKeyStoreCommandOutput) => void
1035
- ): void;
1036
- public deleteCustomKeyStore(
1037
- args: DeleteCustomKeyStoreCommandInput,
1038
- options: __HttpHandlerOptions,
1039
- cb: (err: any, data?: DeleteCustomKeyStoreCommandOutput) => void
1040
- ): void;
1041
- public deleteCustomKeyStore(
1042
- args: DeleteCustomKeyStoreCommandInput,
1043
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteCustomKeyStoreCommandOutput) => void),
1044
- cb?: (err: any, data?: DeleteCustomKeyStoreCommandOutput) => void
1045
- ): Promise<DeleteCustomKeyStoreCommandOutput> | void {
1046
- const command = new DeleteCustomKeyStoreCommand(args);
1047
- if (typeof optionsOrCb === "function") {
1048
- this.send(command, optionsOrCb);
1049
- } else if (typeof cb === "function") {
1050
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1051
- this.send(command, optionsOrCb || {}, cb);
1052
- } else {
1053
- return this.send(command, optionsOrCb);
1054
- }
1055
- }
1056
-
1057
- /**
1058
- * <p>Deletes key material that you previously imported. This operation makes the specified
1059
- * KMS key unusable. For more information about importing key material into
1060
- * KMS, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html">Importing Key
1061
- * Material</a> in the <i>Key Management Service Developer Guide</i>. </p>
1062
- * <p>When the specified KMS key is in the <code>PendingDeletion</code> state, this operation does
1063
- * not change the KMS key's state. Otherwise, it changes the KMS key's state to
1064
- * <code>PendingImport</code>.</p>
1065
- * <p>After you delete key material, you can use <a>ImportKeyMaterial</a> to reimport
1066
- * the same key material into the KMS key.</p>
1067
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
1068
- * 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>
1069
- * <p>
1070
- * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
1071
- *
1072
- * <p>
1073
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:DeleteImportedKeyMaterial</a> (key policy)</p>
1074
- * <p>
1075
- * <b>Related operations:</b>
1076
- * </p>
1077
- * <ul>
1078
- * <li>
1079
- * <p>
1080
- * <a>GetParametersForImport</a>
1081
- * </p>
1082
- * </li>
1083
- * <li>
1084
- * <p>
1085
- * <a>ImportKeyMaterial</a>
1086
- * </p>
1087
- * </li>
1088
- * </ul>
1089
- */
1090
- public deleteImportedKeyMaterial(
1091
- args: DeleteImportedKeyMaterialCommandInput,
1092
- options?: __HttpHandlerOptions
1093
- ): Promise<DeleteImportedKeyMaterialCommandOutput>;
1094
- public deleteImportedKeyMaterial(
1095
- args: DeleteImportedKeyMaterialCommandInput,
1096
- cb: (err: any, data?: DeleteImportedKeyMaterialCommandOutput) => void
1097
- ): void;
1098
- public deleteImportedKeyMaterial(
1099
- args: DeleteImportedKeyMaterialCommandInput,
1100
- options: __HttpHandlerOptions,
1101
- cb: (err: any, data?: DeleteImportedKeyMaterialCommandOutput) => void
1102
- ): void;
1103
- public deleteImportedKeyMaterial(
1104
- args: DeleteImportedKeyMaterialCommandInput,
1105
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteImportedKeyMaterialCommandOutput) => void),
1106
- cb?: (err: any, data?: DeleteImportedKeyMaterialCommandOutput) => void
1107
- ): Promise<DeleteImportedKeyMaterialCommandOutput> | void {
1108
- const command = new DeleteImportedKeyMaterialCommand(args);
1109
- if (typeof optionsOrCb === "function") {
1110
- this.send(command, optionsOrCb);
1111
- } else if (typeof cb === "function") {
1112
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1113
- this.send(command, optionsOrCb || {}, cb);
1114
- } else {
1115
- return this.send(command, optionsOrCb);
1116
- }
1117
- }
1118
-
1119
- /**
1120
- * <p>Gets information about <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key stores</a> in the account and Region.</p>
1121
- * <p>This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">Custom Key Store feature</a> feature in KMS, which
1122
- * combines the convenience and extensive integration of KMS with the isolation and control of a
1123
- * single-tenant key store.</p>
1124
- * <p>By default, this operation returns information about all custom key stores in the account and
1125
- * Region. To get only information about a particular custom key store, use either the
1126
- * <code>CustomKeyStoreName</code> or <code>CustomKeyStoreId</code> parameter (but not
1127
- * both).</p>
1128
- * <p>To determine whether the custom key store is connected to its CloudHSM cluster, use the
1129
- * <code>ConnectionState</code> element in the response. If an attempt to connect the custom
1130
- * key store failed, the <code>ConnectionState</code> value is <code>FAILED</code> and the
1131
- * <code>ConnectionErrorCode</code> element in the response indicates the cause of the failure.
1132
- * For help interpreting the <code>ConnectionErrorCode</code>, see <a>CustomKeyStoresListEntry</a>.</p>
1133
- * <p>Custom key stores have a <code>DISCONNECTED</code> connection state if the key store has
1134
- * never been connected or you use the <a>DisconnectCustomKeyStore</a> operation to
1135
- * disconnect it. If your custom key store state is <code>CONNECTED</code> but you are having
1136
- * trouble using it, make sure that its associated CloudHSM cluster is active and contains the
1137
- * minimum number of HSMs required for the operation, if any.</p>
1138
- * <p> For help repairing your custom key store, see the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html">Troubleshooting Custom Key Stores</a> topic in the
1139
- * <i>Key Management Service Developer Guide</i>.</p>
1140
- * <p>
1141
- * <b>Cross-account use</b>: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account.</p>
1142
- * <p>
1143
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:DescribeCustomKeyStores</a> (IAM policy)</p>
1144
- * <p>
1145
- * <b>Related operations:</b>
1146
- * </p>
1147
- * <ul>
1148
- * <li>
1149
- * <p>
1150
- * <a>ConnectCustomKeyStore</a>
1151
- * </p>
1152
- * </li>
1153
- * <li>
1154
- * <p>
1155
- * <a>CreateCustomKeyStore</a>
1156
- * </p>
1157
- * </li>
1158
- * <li>
1159
- * <p>
1160
- * <a>DeleteCustomKeyStore</a>
1161
- * </p>
1162
- * </li>
1163
- * <li>
1164
- * <p>
1165
- * <a>DisconnectCustomKeyStore</a>
1166
- * </p>
1167
- * </li>
1168
- * <li>
1169
- * <p>
1170
- * <a>UpdateCustomKeyStore</a>
1171
- * </p>
1172
- * </li>
1173
- * </ul>
1174
- */
1175
- public describeCustomKeyStores(
1176
- args: DescribeCustomKeyStoresCommandInput,
1177
- options?: __HttpHandlerOptions
1178
- ): Promise<DescribeCustomKeyStoresCommandOutput>;
1179
- public describeCustomKeyStores(
1180
- args: DescribeCustomKeyStoresCommandInput,
1181
- cb: (err: any, data?: DescribeCustomKeyStoresCommandOutput) => void
1182
- ): void;
1183
- public describeCustomKeyStores(
1184
- args: DescribeCustomKeyStoresCommandInput,
1185
- options: __HttpHandlerOptions,
1186
- cb: (err: any, data?: DescribeCustomKeyStoresCommandOutput) => void
1187
- ): void;
1188
- public describeCustomKeyStores(
1189
- args: DescribeCustomKeyStoresCommandInput,
1190
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeCustomKeyStoresCommandOutput) => void),
1191
- cb?: (err: any, data?: DescribeCustomKeyStoresCommandOutput) => void
1192
- ): Promise<DescribeCustomKeyStoresCommandOutput> | void {
1193
- const command = new DescribeCustomKeyStoresCommand(args);
1194
- if (typeof optionsOrCb === "function") {
1195
- this.send(command, optionsOrCb);
1196
- } else if (typeof cb === "function") {
1197
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1198
- this.send(command, optionsOrCb || {}, cb);
1199
- } else {
1200
- return this.send(command, optionsOrCb);
1201
- }
1202
- }
1203
-
1204
- /**
1205
- * <p>Provides detailed information about a KMS key. You can run
1206
- * <code>DescribeKey</code> on a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> or an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a>.</p>
1207
- * <p>This detailed information includes the key ARN, creation date (and deletion date, if
1208
- * applicable), the key state, and the origin and expiration date (if any) of the key material.
1209
- * It includes fields, like <code>KeySpec</code>, that help you distinguish symmetric from
1210
- * asymmetric KMS keys. It also provides information that is particularly important to asymmetric
1211
- * keys, such as the key usage (encryption or signing) and the encryption algorithms or signing
1212
- * algorithms that the KMS key supports. For KMS keys in custom key stores, it includes information about
1213
- * the custom key store, such as the key store ID and the CloudHSM cluster ID. For multi-Region
1214
- * keys, it displays the primary key and all related replica keys. </p>
1215
- * <p>
1216
- * <code>DescribeKey</code> does not return the following information:</p>
1217
- * <ul>
1218
- * <li>
1219
- * <p>Aliases associated with the KMS key. To get this information, use <a>ListAliases</a>.</p>
1220
- * </li>
1221
- * <li>
1222
- * <p>Whether automatic key rotation is enabled on the KMS key. To get this information, use
1223
- * <a>GetKeyRotationStatus</a>. Also, some key states prevent a KMS key from being
1224
- * automatically rotated. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotate-keys-how-it-works">How Automatic Key Rotation
1225
- * Works</a> in <i>Key Management Service Developer Guide</i>.</p>
1226
- * </li>
1227
- * <li>
1228
- * <p>Tags on the KMS key. To get this information, use <a>ListResourceTags</a>.</p>
1229
- * </li>
1230
- * <li>
1231
- * <p>Key policies and grants on the KMS key. To get this information, use <a>GetKeyPolicy</a> and <a>ListGrants</a>.</p>
1232
- * </li>
1233
- * </ul>
1234
- * <p>If you call the <code>DescribeKey</code> operation on a <i>predefined Amazon Web Services alias</i>, that is, an Amazon Web Services alias with no key ID, KMS creates an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a>.
1235
- * Then, it associates the alias with the new KMS key, and returns the <code>KeyId</code> and
1236
- * <code>Arn</code> of the new KMS key in the response.</p>
1237
- * <p>
1238
- * <b>Cross-account use</b>: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
1239
- * the key ARN or alias ARN in the value of the <code>KeyId</code> parameter.</p>
1240
- *
1241
- * <p>
1242
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:DescribeKey</a> (key policy)</p>
1243
- * <p>
1244
- * <b>Related operations:</b>
1245
- * </p>
1246
- * <ul>
1247
- * <li>
1248
- * <p>
1249
- * <a>GetKeyPolicy</a>
1250
- * </p>
1251
- * </li>
1252
- * <li>
1253
- * <p>
1254
- * <a>GetKeyRotationStatus</a>
1255
- * </p>
1256
- * </li>
1257
- * <li>
1258
- * <p>
1259
- * <a>ListAliases</a>
1260
- * </p>
1261
- * </li>
1262
- * <li>
1263
- * <p>
1264
- * <a>ListGrants</a>
1265
- * </p>
1266
- * </li>
1267
- * <li>
1268
- * <p>
1269
- * <a>ListKeys</a>
1270
- * </p>
1271
- * </li>
1272
- * <li>
1273
- * <p>
1274
- * <a>ListResourceTags</a>
1275
- * </p>
1276
- * </li>
1277
- * <li>
1278
- * <p>
1279
- * <a>ListRetirableGrants</a>
1280
- * </p>
1281
- * </li>
1282
- * </ul>
1283
- */
1284
- public describeKey(args: DescribeKeyCommandInput, options?: __HttpHandlerOptions): Promise<DescribeKeyCommandOutput>;
1285
- public describeKey(args: DescribeKeyCommandInput, cb: (err: any, data?: DescribeKeyCommandOutput) => void): void;
1286
- public describeKey(
1287
- args: DescribeKeyCommandInput,
1288
- options: __HttpHandlerOptions,
1289
- cb: (err: any, data?: DescribeKeyCommandOutput) => void
1290
- ): void;
1291
- public describeKey(
1292
- args: DescribeKeyCommandInput,
1293
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeKeyCommandOutput) => void),
1294
- cb?: (err: any, data?: DescribeKeyCommandOutput) => void
1295
- ): Promise<DescribeKeyCommandOutput> | void {
1296
- const command = new DescribeKeyCommand(args);
1297
- if (typeof optionsOrCb === "function") {
1298
- this.send(command, optionsOrCb);
1299
- } else if (typeof cb === "function") {
1300
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1301
- this.send(command, optionsOrCb || {}, cb);
1302
- } else {
1303
- return this.send(command, optionsOrCb);
1304
- }
1305
- }
1306
-
1307
- /**
1308
- * <p>Sets the state of a KMS key to disabled. This change temporarily
1309
- * prevents use of the KMS key for <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations">cryptographic operations</a>. </p>
1310
- * <p>For more information about how key state affects the use of a KMS key, 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>
1311
- * <i>Key Management Service Developer Guide</i>
1312
- * </i>.</p>
1313
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
1314
- * 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>
1315
- * <p>
1316
- * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
1317
- *
1318
- * <p>
1319
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:DisableKey</a> (key policy)</p>
1320
- * <p>
1321
- * <b>Related operations</b>: <a>EnableKey</a>
1322
- * </p>
1323
- */
1324
- public disableKey(args: DisableKeyCommandInput, options?: __HttpHandlerOptions): Promise<DisableKeyCommandOutput>;
1325
- public disableKey(args: DisableKeyCommandInput, cb: (err: any, data?: DisableKeyCommandOutput) => void): void;
1326
- public disableKey(
1327
- args: DisableKeyCommandInput,
1328
- options: __HttpHandlerOptions,
1329
- cb: (err: any, data?: DisableKeyCommandOutput) => void
1330
- ): void;
1331
- public disableKey(
1332
- args: DisableKeyCommandInput,
1333
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DisableKeyCommandOutput) => void),
1334
- cb?: (err: any, data?: DisableKeyCommandOutput) => void
1335
- ): Promise<DisableKeyCommandOutput> | void {
1336
- const command = new DisableKeyCommand(args);
1337
- if (typeof optionsOrCb === "function") {
1338
- this.send(command, optionsOrCb);
1339
- } else if (typeof cb === "function") {
1340
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1341
- this.send(command, optionsOrCb || {}, cb);
1342
- } else {
1343
- return this.send(command, optionsOrCb);
1344
- }
1345
- }
1346
-
1347
- /**
1348
- * <p>Disables <a href="https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html">automatic
1349
- * rotation of the key material</a> for the specified symmetric KMS key.</p>
1350
- * <p> You cannot enable automatic rotation of <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#asymmetric-cmks">asymmetric KMS keys</a>, KMS keys with <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html">imported key material</a>, or KMS keys in a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a>. To enable or disable automatic rotation of a set of related <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html#mrk-replica-key">multi-Region keys</a>, set the property on the primary key. </p>
1351
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
1352
- * 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>
1353
- * <p>
1354
- * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
1355
- *
1356
- * <p>
1357
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:DisableKeyRotation</a> (key policy)</p>
1358
- * <p>
1359
- * <b>Related operations:</b>
1360
- * </p>
1361
- * <ul>
1362
- * <li>
1363
- * <p>
1364
- * <a>EnableKeyRotation</a>
1365
- * </p>
1366
- * </li>
1367
- * <li>
1368
- * <p>
1369
- * <a>GetKeyRotationStatus</a>
1370
- * </p>
1371
- * </li>
1372
- * </ul>
1373
- */
1374
- public disableKeyRotation(
1375
- args: DisableKeyRotationCommandInput,
1376
- options?: __HttpHandlerOptions
1377
- ): Promise<DisableKeyRotationCommandOutput>;
1378
- public disableKeyRotation(
1379
- args: DisableKeyRotationCommandInput,
1380
- cb: (err: any, data?: DisableKeyRotationCommandOutput) => void
1381
- ): void;
1382
- public disableKeyRotation(
1383
- args: DisableKeyRotationCommandInput,
1384
- options: __HttpHandlerOptions,
1385
- cb: (err: any, data?: DisableKeyRotationCommandOutput) => void
1386
- ): void;
1387
- public disableKeyRotation(
1388
- args: DisableKeyRotationCommandInput,
1389
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DisableKeyRotationCommandOutput) => void),
1390
- cb?: (err: any, data?: DisableKeyRotationCommandOutput) => void
1391
- ): Promise<DisableKeyRotationCommandOutput> | void {
1392
- const command = new DisableKeyRotationCommand(args);
1393
- if (typeof optionsOrCb === "function") {
1394
- this.send(command, optionsOrCb);
1395
- } else if (typeof cb === "function") {
1396
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1397
- this.send(command, optionsOrCb || {}, cb);
1398
- } else {
1399
- return this.send(command, optionsOrCb);
1400
- }
1401
- }
1402
-
1403
- /**
1404
- * <p>Disconnects the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a> from its associated CloudHSM cluster. While a custom key
1405
- * store is disconnected, you can manage the custom key store and its KMS keys, but you cannot create or use KMS keys in the custom key store. You can reconnect the
1406
- * custom key store at any time.</p>
1407
- * <note>
1408
- * <p>While a custom key store is disconnected, all attempts to create KMS keys in the custom key store or to use existing KMS keys in <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations">cryptographic operations</a> will
1409
- * fail. This action can prevent users from storing and accessing sensitive data.</p>
1410
- * </note>
1411
- * <p></p>
1412
- * <p>To find the connection state of a custom key store, use the <a>DescribeCustomKeyStores</a> operation. To reconnect a custom key store, use the
1413
- * <a>ConnectCustomKeyStore</a> operation.</p>
1414
- * <p>If the operation succeeds, it returns a JSON object with no
1415
- * properties.</p>
1416
- * <p>This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">Custom Key Store feature</a> feature in KMS, which
1417
- * combines the convenience and extensive integration of KMS with the isolation and control of a
1418
- * single-tenant key store.</p>
1419
- *
1420
- * <p>
1421
- * <b>Cross-account use</b>: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account.</p>
1422
- *
1423
- * <p>
1424
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:DisconnectCustomKeyStore</a> (IAM policy)</p>
1425
- * <p>
1426
- * <b>Related operations:</b>
1427
- * </p>
1428
- * <ul>
1429
- * <li>
1430
- * <p>
1431
- * <a>ConnectCustomKeyStore</a>
1432
- * </p>
1433
- * </li>
1434
- * <li>
1435
- * <p>
1436
- * <a>CreateCustomKeyStore</a>
1437
- * </p>
1438
- * </li>
1439
- * <li>
1440
- * <p>
1441
- * <a>DeleteCustomKeyStore</a>
1442
- * </p>
1443
- * </li>
1444
- * <li>
1445
- * <p>
1446
- * <a>DescribeCustomKeyStores</a>
1447
- * </p>
1448
- * </li>
1449
- * <li>
1450
- * <p>
1451
- * <a>UpdateCustomKeyStore</a>
1452
- * </p>
1453
- * </li>
1454
- * </ul>
1455
- */
1456
- public disconnectCustomKeyStore(
1457
- args: DisconnectCustomKeyStoreCommandInput,
1458
- options?: __HttpHandlerOptions
1459
- ): Promise<DisconnectCustomKeyStoreCommandOutput>;
1460
- public disconnectCustomKeyStore(
1461
- args: DisconnectCustomKeyStoreCommandInput,
1462
- cb: (err: any, data?: DisconnectCustomKeyStoreCommandOutput) => void
1463
- ): void;
1464
- public disconnectCustomKeyStore(
1465
- args: DisconnectCustomKeyStoreCommandInput,
1466
- options: __HttpHandlerOptions,
1467
- cb: (err: any, data?: DisconnectCustomKeyStoreCommandOutput) => void
1468
- ): void;
1469
- public disconnectCustomKeyStore(
1470
- args: DisconnectCustomKeyStoreCommandInput,
1471
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DisconnectCustomKeyStoreCommandOutput) => void),
1472
- cb?: (err: any, data?: DisconnectCustomKeyStoreCommandOutput) => void
1473
- ): Promise<DisconnectCustomKeyStoreCommandOutput> | void {
1474
- const command = new DisconnectCustomKeyStoreCommand(args);
1475
- if (typeof optionsOrCb === "function") {
1476
- this.send(command, optionsOrCb);
1477
- } else if (typeof cb === "function") {
1478
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1479
- this.send(command, optionsOrCb || {}, cb);
1480
- } else {
1481
- return this.send(command, optionsOrCb);
1482
- }
1483
- }
1484
-
1485
- /**
1486
- * <p>Sets the key state of a KMS key to enabled. This allows you to use the KMS key for <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations">cryptographic operations</a>. </p>
1487
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
1488
- * 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>
1489
- * <p>
1490
- * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
1491
- *
1492
- * <p>
1493
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:EnableKey</a> (key policy)</p>
1494
- * <p>
1495
- * <b>Related operations</b>: <a>DisableKey</a>
1496
- * </p>
1497
- */
1498
- public enableKey(args: EnableKeyCommandInput, options?: __HttpHandlerOptions): Promise<EnableKeyCommandOutput>;
1499
- public enableKey(args: EnableKeyCommandInput, cb: (err: any, data?: EnableKeyCommandOutput) => void): void;
1500
- public enableKey(
1501
- args: EnableKeyCommandInput,
1502
- options: __HttpHandlerOptions,
1503
- cb: (err: any, data?: EnableKeyCommandOutput) => void
1504
- ): void;
1505
- public enableKey(
1506
- args: EnableKeyCommandInput,
1507
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: EnableKeyCommandOutput) => void),
1508
- cb?: (err: any, data?: EnableKeyCommandOutput) => void
1509
- ): Promise<EnableKeyCommandOutput> | void {
1510
- const command = new EnableKeyCommand(args);
1511
- if (typeof optionsOrCb === "function") {
1512
- this.send(command, optionsOrCb);
1513
- } else if (typeof cb === "function") {
1514
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1515
- this.send(command, optionsOrCb || {}, cb);
1516
- } else {
1517
- return this.send(command, optionsOrCb);
1518
- }
1519
- }
1520
-
1521
- /**
1522
- * <p>Enables <a href="https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html">automatic rotation
1523
- * of the key material</a> for the specified symmetric KMS key.</p>
1524
- * <p>You cannot enable automatic rotation of <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#asymmetric-cmks">asymmetric KMS keys</a>, KMS keys with <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html">imported key material</a>, or KMS keys in a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a>. To enable or disable automatic rotation of a set of related <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html#mrk-replica-key">multi-Region keys</a>, set the property on the primary key.</p>
1525
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
1526
- * 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>
1527
- * <p>
1528
- * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
1529
- *
1530
- * <p>
1531
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:EnableKeyRotation</a> (key policy)</p>
1532
- * <p>
1533
- * <b>Related operations:</b>
1534
- * </p>
1535
- * <ul>
1536
- * <li>
1537
- * <p>
1538
- * <a>DisableKeyRotation</a>
1539
- * </p>
1540
- * </li>
1541
- * <li>
1542
- * <p>
1543
- * <a>GetKeyRotationStatus</a>
1544
- * </p>
1545
- * </li>
1546
- * </ul>
1547
- */
1548
- public enableKeyRotation(
1549
- args: EnableKeyRotationCommandInput,
1550
- options?: __HttpHandlerOptions
1551
- ): Promise<EnableKeyRotationCommandOutput>;
1552
- public enableKeyRotation(
1553
- args: EnableKeyRotationCommandInput,
1554
- cb: (err: any, data?: EnableKeyRotationCommandOutput) => void
1555
- ): void;
1556
- public enableKeyRotation(
1557
- args: EnableKeyRotationCommandInput,
1558
- options: __HttpHandlerOptions,
1559
- cb: (err: any, data?: EnableKeyRotationCommandOutput) => void
1560
- ): void;
1561
- public enableKeyRotation(
1562
- args: EnableKeyRotationCommandInput,
1563
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: EnableKeyRotationCommandOutput) => void),
1564
- cb?: (err: any, data?: EnableKeyRotationCommandOutput) => void
1565
- ): Promise<EnableKeyRotationCommandOutput> | void {
1566
- const command = new EnableKeyRotationCommand(args);
1567
- if (typeof optionsOrCb === "function") {
1568
- this.send(command, optionsOrCb);
1569
- } else if (typeof cb === "function") {
1570
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1571
- this.send(command, optionsOrCb || {}, cb);
1572
- } else {
1573
- return this.send(command, optionsOrCb);
1574
- }
1575
- }
1576
-
1577
- /**
1578
- * <p>Encrypts plaintext into ciphertext by using a KMS key. The
1579
- * <code>Encrypt</code> operation has two primary use cases:</p>
1580
- * <ul>
1581
- * <li>
1582
- * <p>You can encrypt small amounts of arbitrary data, such as a personal identifier or
1583
- * database password, or other sensitive information. </p>
1584
- * </li>
1585
- * <li>
1586
- * <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
1587
- * your data. Then, in Region A, use the <code>Encrypt</code> operation to encrypt the
1588
- * plaintext data key under a KMS key in Region B. Now, you can move the encrypted data and the
1589
- * encrypted data key to Region B. When necessary, you can decrypt the encrypted data key and
1590
- * the encrypted data entirely within in Region B.</p>
1591
- * </li>
1592
- * </ul>
1593
- *
1594
- * <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
1595
- * plaintext data key and an encrypted copy of that data key.</p>
1596
- *
1597
- * <p>When you encrypt data, you must specify a symmetric or asymmetric KMS key to use in the
1598
- * encryption operation. The KMS key must have a <code>KeyUsage</code> value of
1599
- * <code>ENCRYPT_DECRYPT.</code> To find the <code>KeyUsage</code> of a KMS key, use the <a>DescribeKey</a> operation. </p>
1600
- *
1601
- * <p>If you use a symmetric KMS key, you can use an encryption context to add additional security
1602
- * to your encryption operation. If you specify an <code>EncryptionContext</code> when encrypting
1603
- * data, you must specify the same encryption context (a case-sensitive exact match) when
1604
- * decrypting the data. Otherwise, the request to decrypt fails with an
1605
- * <code>InvalidCiphertextException</code>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">Encryption
1606
- * Context</a> in the <i>Key Management Service Developer Guide</i>.</p>
1607
- * <p>If you specify an asymmetric KMS key, you must also specify the encryption algorithm. The
1608
- * algorithm must be compatible with the KMS key type.</p>
1609
- * <important>
1610
- * <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>
1611
- * <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>
1612
- * </important>
1613
- *
1614
- *
1615
- * <p>The maximum size of the data that you can encrypt varies with the type of KMS key and the
1616
- * encryption algorithm that you choose.</p>
1617
- * <ul>
1618
- * <li>
1619
- * <p>Symmetric KMS keys</p>
1620
- * <ul>
1621
- * <li>
1622
- * <p>
1623
- * <code>SYMMETRIC_DEFAULT</code>: 4096 bytes</p>
1624
- * </li>
1625
- * </ul>
1626
- * </li>
1627
- * <li>
1628
- * <p>
1629
- * <code>RSA_2048</code>
1630
- * </p>
1631
- * <ul>
1632
- * <li>
1633
- * <p>
1634
- * <code>RSAES_OAEP_SHA_1</code>: 214 bytes</p>
1635
- * </li>
1636
- * <li>
1637
- * <p>
1638
- * <code>RSAES_OAEP_SHA_256</code>: 190 bytes</p>
1639
- * </li>
1640
- * </ul>
1641
- * </li>
1642
- * <li>
1643
- * <p>
1644
- * <code>RSA_3072</code>
1645
- * </p>
1646
- * <ul>
1647
- * <li>
1648
- * <p>
1649
- * <code>RSAES_OAEP_SHA_1</code>: 342 bytes</p>
1650
- * </li>
1651
- * <li>
1652
- * <p>
1653
- * <code>RSAES_OAEP_SHA_256</code>: 318 bytes</p>
1654
- * </li>
1655
- * </ul>
1656
- * </li>
1657
- * <li>
1658
- * <p>
1659
- * <code>RSA_4096</code>
1660
- * </p>
1661
- * <ul>
1662
- * <li>
1663
- * <p>
1664
- * <code>RSAES_OAEP_SHA_1</code>: 470 bytes</p>
1665
- * </li>
1666
- * <li>
1667
- * <p>
1668
- * <code>RSAES_OAEP_SHA_256</code>: 446 bytes</p>
1669
- * </li>
1670
- * </ul>
1671
- * </li>
1672
- * </ul>
1673
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
1674
- * 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>
1675
- * <p>
1676
- * <b>Cross-account use</b>: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
1677
- * the key ARN or alias ARN in the value of the <code>KeyId</code> parameter.</p>
1678
- *
1679
- * <p>
1680
- * <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>
1681
- * <p>
1682
- * <b>Related operations:</b>
1683
- * </p>
1684
- * <ul>
1685
- * <li>
1686
- * <p>
1687
- * <a>Decrypt</a>
1688
- * </p>
1689
- * </li>
1690
- * <li>
1691
- * <p>
1692
- * <a>GenerateDataKey</a>
1693
- * </p>
1694
- * </li>
1695
- * <li>
1696
- * <p>
1697
- * <a>GenerateDataKeyPair</a>
1698
- * </p>
1699
- * </li>
1700
- * </ul>
1701
- */
1702
- public encrypt(args: EncryptCommandInput, options?: __HttpHandlerOptions): Promise<EncryptCommandOutput>;
1703
- public encrypt(args: EncryptCommandInput, cb: (err: any, data?: EncryptCommandOutput) => void): void;
1704
- public encrypt(
1705
- args: EncryptCommandInput,
1706
- options: __HttpHandlerOptions,
1707
- cb: (err: any, data?: EncryptCommandOutput) => void
1708
- ): void;
1709
- public encrypt(
1710
- args: EncryptCommandInput,
1711
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: EncryptCommandOutput) => void),
1712
- cb?: (err: any, data?: EncryptCommandOutput) => void
1713
- ): Promise<EncryptCommandOutput> | void {
1714
- const command = new EncryptCommand(args);
1715
- if (typeof optionsOrCb === "function") {
1716
- this.send(command, optionsOrCb);
1717
- } else if (typeof cb === "function") {
1718
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1719
- this.send(command, optionsOrCb || {}, cb);
1720
- } else {
1721
- return this.send(command, optionsOrCb);
1722
- }
1723
- }
1724
-
1725
- /**
1726
- * <p>Generates a unique symmetric data key for client-side encryption. This operation returns a
1727
- * plaintext copy of the data key and a copy that is encrypted under a KMS key
1728
- * that you specify. You can use the plaintext key to encrypt your data outside of KMS and
1729
- * store the encrypted data key with the encrypted data.</p>
1730
- *
1731
- * <p>
1732
- * <code>GenerateDataKey</code> returns a unique data key for each request. The bytes in the
1733
- * plaintext key are not related to the caller or the KMS key.</p>
1734
- *
1735
- * <p>To generate a data key, specify the symmetric KMS key that will be used to encrypt the data
1736
- * key. You cannot use an asymmetric KMS key to generate data keys. To get the type of your KMS key, use
1737
- * the <a>DescribeKey</a> operation. You must also specify the length of the data key.
1738
- * Use either the <code>KeySpec</code> or <code>NumberOfBytes</code> parameters (but not both).
1739
- * For 128-bit and 256-bit data keys, use the <code>KeySpec</code> parameter. </p>
1740
- *
1741
- * <p>To get only an encrypted copy of the data key, use <a>GenerateDataKeyWithoutPlaintext</a>. To generate an asymmetric data key pair, use
1742
- * the <a>GenerateDataKeyPair</a> or <a>GenerateDataKeyPairWithoutPlaintext</a> operation. To get a cryptographically secure
1743
- * random byte string, use <a>GenerateRandom</a>.</p>
1744
- *
1745
- * <p>You can use the optional encryption context to add additional security to the encryption
1746
- * operation. If you specify an <code>EncryptionContext</code>, you must specify the same
1747
- * encryption context (a case-sensitive exact match) when decrypting the encrypted data key.
1748
- * 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
1749
- * <i>Key Management Service Developer Guide</i>.</p>
1750
- * <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>
1751
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
1752
- * 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>
1753
- * <p>
1754
- * <b>How to use your data key</b>
1755
- * </p>
1756
- * <p>We recommend that you use the following pattern to encrypt data locally in your application.
1757
- * 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
1758
- * <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html">Amazon S3
1759
- * client-side encryption</a> to do these tasks for you.</p>
1760
- * <p>To encrypt data outside of KMS:</p>
1761
- * <ol>
1762
- * <li>
1763
- * <p>Use the <code>GenerateDataKey</code> operation to get a data key.</p>
1764
- * </li>
1765
- * <li>
1766
- * <p>Use the plaintext data key (in the <code>Plaintext</code> field of the response) to
1767
- * encrypt your data outside of KMS. Then erase the plaintext data key from memory.</p>
1768
- * </li>
1769
- * <li>
1770
- * <p>Store the encrypted data key (in the <code>CiphertextBlob</code> field of the
1771
- * response) with the encrypted data.</p>
1772
- * </li>
1773
- * </ol>
1774
- * <p>To decrypt data outside of KMS:</p>
1775
- * <ol>
1776
- * <li>
1777
- * <p>Use the <a>Decrypt</a> operation to decrypt the encrypted data key. The
1778
- * operation returns a plaintext copy of the data key.</p>
1779
- * </li>
1780
- * <li>
1781
- * <p>Use the plaintext data key to decrypt data outside of KMS, then erase the plaintext
1782
- * data key from memory.</p>
1783
- * </li>
1784
- * </ol>
1785
- * <p>
1786
- * <b>Cross-account use</b>: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
1787
- * the key ARN or alias ARN in the value of the <code>KeyId</code> parameter.</p>
1788
- *
1789
- * <p>
1790
- * <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>
1791
- * <p>
1792
- * <b>Related operations:</b>
1793
- * </p>
1794
- * <ul>
1795
- * <li>
1796
- * <p>
1797
- * <a>Decrypt</a>
1798
- * </p>
1799
- * </li>
1800
- * <li>
1801
- * <p>
1802
- * <a>Encrypt</a>
1803
- * </p>
1804
- * </li>
1805
- * <li>
1806
- * <p>
1807
- * <a>GenerateDataKeyPair</a>
1808
- * </p>
1809
- * </li>
1810
- * <li>
1811
- * <p>
1812
- * <a>GenerateDataKeyPairWithoutPlaintext</a>
1813
- * </p>
1814
- * </li>
1815
- * <li>
1816
- * <p>
1817
- * <a>GenerateDataKeyWithoutPlaintext</a>
1818
- * </p>
1819
- * </li>
1820
- * </ul>
1821
- */
1822
- public generateDataKey(
1823
- args: GenerateDataKeyCommandInput,
1824
- options?: __HttpHandlerOptions
1825
- ): Promise<GenerateDataKeyCommandOutput>;
1826
- public generateDataKey(
1827
- args: GenerateDataKeyCommandInput,
1828
- cb: (err: any, data?: GenerateDataKeyCommandOutput) => void
1829
- ): void;
1830
- public generateDataKey(
1831
- args: GenerateDataKeyCommandInput,
1832
- options: __HttpHandlerOptions,
1833
- cb: (err: any, data?: GenerateDataKeyCommandOutput) => void
1834
- ): void;
1835
- public generateDataKey(
1836
- args: GenerateDataKeyCommandInput,
1837
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GenerateDataKeyCommandOutput) => void),
1838
- cb?: (err: any, data?: GenerateDataKeyCommandOutput) => void
1839
- ): Promise<GenerateDataKeyCommandOutput> | void {
1840
- const command = new GenerateDataKeyCommand(args);
1841
- if (typeof optionsOrCb === "function") {
1842
- this.send(command, optionsOrCb);
1843
- } else if (typeof cb === "function") {
1844
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1845
- this.send(command, optionsOrCb || {}, cb);
1846
- } else {
1847
- return this.send(command, optionsOrCb);
1848
- }
1849
- }
1850
-
1851
- /**
1852
- * <p>Generates a unique asymmetric data key pair. The <code>GenerateDataKeyPair</code>
1853
- * operation returns a plaintext public key, a plaintext private key, and a copy of the private
1854
- * key that is encrypted under the symmetric KMS key you specify. You can use the data key pair to
1855
- * perform asymmetric cryptography and implement digital signatures outside of KMS.</p>
1856
- *
1857
- * <p>You can use the public key that <code>GenerateDataKeyPair</code> returns to encrypt data
1858
- * or verify a signature outside of KMS. Then, store the encrypted private key with the data.
1859
- * 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>
1860
- *
1861
- * <p>To generate a data key pair, you must specify a symmetric KMS key to
1862
- * encrypt the private key in a data key pair. You cannot use an asymmetric KMS key or a KMS key in a
1863
- * custom key store. To get the type and origin of your KMS key, use the <a>DescribeKey</a> operation. </p>
1864
- * <p>Use the <code>KeyPairSpec</code> parameter to choose an RSA or Elliptic Curve (ECC) data
1865
- * key pair. KMS recommends that your use ECC key pairs for signing, and use RSA key pairs
1866
- * for either encryption or signing, but not both. However, KMS cannot enforce any restrictions
1867
- * on the use of data key pairs outside of KMS.</p>
1868
- *
1869
- * <p>If you are using the data key pair to encrypt data, or for any operation where you don't
1870
- * immediately need a private key, consider using the <a>GenerateDataKeyPairWithoutPlaintext</a> operation.
1871
- * <code>GenerateDataKeyPairWithoutPlaintext</code> returns a plaintext public key and an
1872
- * encrypted private key, but omits the plaintext private key that you need only to decrypt
1873
- * ciphertext or sign a message. Later, when you need to decrypt the data or sign a message, use
1874
- * the <a>Decrypt</a> operation to decrypt the encrypted private key in the data key
1875
- * pair.</p>
1876
- *
1877
- * <p>
1878
- * <code>GenerateDataKeyPair</code> returns a unique data key pair for each request. The
1879
- * bytes in the keys are not related to the caller or the KMS key that is used to encrypt the private
1880
- * 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
1881
- * private key is a DER-encoded PKCS8 PrivateKeyInfo, as specified in <a href="https://tools.ietf.org/html/rfc5958">RFC
1882
- * 5958</a>.</p>
1883
- *
1884
- * <p>You can use the optional encryption context to add additional security to the encryption
1885
- * operation. If you specify an <code>EncryptionContext</code>, you must specify the same
1886
- * encryption context (a case-sensitive exact match) when decrypting the encrypted data key.
1887
- * 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
1888
- * <i>Key Management Service Developer Guide</i>.</p>
1889
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
1890
- * 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>
1891
- * <p>
1892
- * <b>Cross-account use</b>: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
1893
- * the key ARN or alias ARN in the value of the <code>KeyId</code> parameter.</p>
1894
- *
1895
- * <p>
1896
- * <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>
1897
- * <p>
1898
- * <b>Related operations:</b>
1899
- * </p>
1900
- * <ul>
1901
- * <li>
1902
- * <p>
1903
- * <a>Decrypt</a>
1904
- * </p>
1905
- * </li>
1906
- * <li>
1907
- * <p>
1908
- * <a>Encrypt</a>
1909
- * </p>
1910
- * </li>
1911
- * <li>
1912
- * <p>
1913
- * <a>GenerateDataKey</a>
1914
- * </p>
1915
- * </li>
1916
- * <li>
1917
- * <p>
1918
- * <a>GenerateDataKeyPairWithoutPlaintext</a>
1919
- * </p>
1920
- * </li>
1921
- * <li>
1922
- * <p>
1923
- * <a>GenerateDataKeyWithoutPlaintext</a>
1924
- * </p>
1925
- * </li>
1926
- * </ul>
1927
- */
1928
- public generateDataKeyPair(
1929
- args: GenerateDataKeyPairCommandInput,
1930
- options?: __HttpHandlerOptions
1931
- ): Promise<GenerateDataKeyPairCommandOutput>;
1932
- public generateDataKeyPair(
1933
- args: GenerateDataKeyPairCommandInput,
1934
- cb: (err: any, data?: GenerateDataKeyPairCommandOutput) => void
1935
- ): void;
1936
- public generateDataKeyPair(
1937
- args: GenerateDataKeyPairCommandInput,
1938
- options: __HttpHandlerOptions,
1939
- cb: (err: any, data?: GenerateDataKeyPairCommandOutput) => void
1940
- ): void;
1941
- public generateDataKeyPair(
1942
- args: GenerateDataKeyPairCommandInput,
1943
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GenerateDataKeyPairCommandOutput) => void),
1944
- cb?: (err: any, data?: GenerateDataKeyPairCommandOutput) => void
1945
- ): Promise<GenerateDataKeyPairCommandOutput> | void {
1946
- const command = new GenerateDataKeyPairCommand(args);
1947
- if (typeof optionsOrCb === "function") {
1948
- this.send(command, optionsOrCb);
1949
- } else if (typeof cb === "function") {
1950
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1951
- this.send(command, optionsOrCb || {}, cb);
1952
- } else {
1953
- return this.send(command, optionsOrCb);
1954
- }
1955
- }
1956
-
1957
- /**
1958
- * <p>Generates a unique asymmetric data key pair. The
1959
- * <code>GenerateDataKeyPairWithoutPlaintext</code> operation returns a plaintext public key
1960
- * and a copy of the private key that is encrypted under the symmetric KMS key you specify. Unlike
1961
- * <a>GenerateDataKeyPair</a>, this operation does not return a plaintext private
1962
- * key. </p>
1963
- * <p>You can use the public key that <code>GenerateDataKeyPairWithoutPlaintext</code> returns
1964
- * to encrypt data or verify a signature outside of KMS. Then, store the encrypted private key
1965
- * with the data. 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>
1966
- * <p>To generate a data key pair, you must specify a symmetric KMS key to
1967
- * encrypt the private key in a data key pair. You cannot use an asymmetric KMS key or a KMS key in a
1968
- * custom key store. To get the type and origin of your KMS key, use the <a>DescribeKey</a> operation. </p>
1969
- * <p>Use the <code>KeyPairSpec</code> parameter to choose an RSA or Elliptic Curve (ECC) data
1970
- * key pair. KMS recommends that your use ECC key pairs for signing, and use RSA key pairs
1971
- * for either encryption or signing, but not both. However, KMS cannot enforce any restrictions
1972
- * on the use of data key pairs outside of KMS.</p>
1973
- * <p>
1974
- * <code>GenerateDataKeyPairWithoutPlaintext</code> returns a unique data key pair for each
1975
- * request. The bytes in the key are not related to the caller or KMS key that is used to encrypt the
1976
- * private key. The public key is a DER-encoded X.509 SubjectPublicKeyInfo, as specified in
1977
- * <a href="https://tools.ietf.org/html/rfc5280">RFC 5280</a>.</p>
1978
- *
1979
- * <p>You can use the optional encryption context to add additional security to the encryption
1980
- * operation. If you specify an <code>EncryptionContext</code>, you must specify the same
1981
- * encryption context (a case-sensitive exact match) when decrypting the encrypted data key.
1982
- * 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
1983
- * <i>Key Management Service Developer Guide</i>.</p>
1984
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
1985
- * 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>
1986
- * <p>
1987
- * <b>Cross-account use</b>: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
1988
- * the key ARN or alias ARN in the value of the <code>KeyId</code> parameter.</p>
1989
- *
1990
- * <p>
1991
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:GenerateDataKeyPairWithoutPlaintext</a> (key policy)</p>
1992
- * <p>
1993
- * <b>Related operations:</b>
1994
- * </p>
1995
- * <ul>
1996
- * <li>
1997
- * <p>
1998
- * <a>Decrypt</a>
1999
- * </p>
2000
- * </li>
2001
- * <li>
2002
- * <p>
2003
- * <a>Encrypt</a>
2004
- * </p>
2005
- * </li>
2006
- * <li>
2007
- * <p>
2008
- * <a>GenerateDataKey</a>
2009
- * </p>
2010
- * </li>
2011
- * <li>
2012
- * <p>
2013
- * <a>GenerateDataKeyPair</a>
2014
- * </p>
2015
- * </li>
2016
- * <li>
2017
- * <p>
2018
- * <a>GenerateDataKeyWithoutPlaintext</a>
2019
- * </p>
2020
- * </li>
2021
- * </ul>
2022
- */
2023
- public generateDataKeyPairWithoutPlaintext(
2024
- args: GenerateDataKeyPairWithoutPlaintextCommandInput,
2025
- options?: __HttpHandlerOptions
2026
- ): Promise<GenerateDataKeyPairWithoutPlaintextCommandOutput>;
2027
- public generateDataKeyPairWithoutPlaintext(
2028
- args: GenerateDataKeyPairWithoutPlaintextCommandInput,
2029
- cb: (err: any, data?: GenerateDataKeyPairWithoutPlaintextCommandOutput) => void
2030
- ): void;
2031
- public generateDataKeyPairWithoutPlaintext(
2032
- args: GenerateDataKeyPairWithoutPlaintextCommandInput,
2033
- options: __HttpHandlerOptions,
2034
- cb: (err: any, data?: GenerateDataKeyPairWithoutPlaintextCommandOutput) => void
2035
- ): void;
2036
- public generateDataKeyPairWithoutPlaintext(
2037
- args: GenerateDataKeyPairWithoutPlaintextCommandInput,
2038
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GenerateDataKeyPairWithoutPlaintextCommandOutput) => void),
2039
- cb?: (err: any, data?: GenerateDataKeyPairWithoutPlaintextCommandOutput) => void
2040
- ): Promise<GenerateDataKeyPairWithoutPlaintextCommandOutput> | void {
2041
- const command = new GenerateDataKeyPairWithoutPlaintextCommand(args);
2042
- if (typeof optionsOrCb === "function") {
2043
- this.send(command, optionsOrCb);
2044
- } else if (typeof cb === "function") {
2045
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
2046
- this.send(command, optionsOrCb || {}, cb);
2047
- } else {
2048
- return this.send(command, optionsOrCb);
2049
- }
2050
- }
2051
-
2052
- /**
2053
- * <p>Generates a unique symmetric data key. This operation returns a data key that is encrypted
2054
- * under a KMS key that you specify. To request an asymmetric data key pair,
2055
- * use the <a>GenerateDataKeyPair</a> or <a>GenerateDataKeyPairWithoutPlaintext</a> operations.</p>
2056
- * <p>
2057
- * <code>GenerateDataKeyWithoutPlaintext</code> is identical to the <a>GenerateDataKey</a> operation except that returns only the encrypted copy of the
2058
- * data key. This operation is useful for systems that need to encrypt data at some point, but
2059
- * not immediately. When you need to encrypt the data, you call the <a>Decrypt</a>
2060
- * operation on the encrypted copy of the key. </p>
2061
- * <p>It's also useful in distributed systems with different levels of trust. For example, you
2062
- * might store encrypted data in containers. One component of your system creates new containers
2063
- * and stores an encrypted data key with each container. Then, a different component puts the
2064
- * data into the containers. That component first decrypts the data key, uses the plaintext data
2065
- * key to encrypt data, puts the encrypted data into the container, and then destroys the
2066
- * plaintext data key. In this system, the component that creates the containers never sees the
2067
- * plaintext data key.</p>
2068
- * <p>
2069
- * <code>GenerateDataKeyWithoutPlaintext</code> returns a unique data key for each request.
2070
- * The bytes in the keys are not related to the caller or KMS key that is used to encrypt the private
2071
- * key.</p>
2072
- *
2073
- * <p>To generate a data key, you must specify the symmetric KMS key that is
2074
- * used to encrypt the data key. You cannot use an asymmetric KMS key to generate a data key. To get
2075
- * the type of your KMS key, use the <a>DescribeKey</a> operation.</p>
2076
- *
2077
- * <p>If the operation succeeds, you will find the encrypted copy of the data key in the
2078
- * <code>CiphertextBlob</code> field.</p>
2079
- *
2080
- * <p>You can use the optional encryption context to add additional security to the encryption
2081
- * operation. If you specify an <code>EncryptionContext</code>, you must specify the same
2082
- * encryption context (a case-sensitive exact match) when decrypting the encrypted data key.
2083
- * 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
2084
- * <i>Key Management Service Developer Guide</i>.</p>
2085
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
2086
- * 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>
2087
- * <p>
2088
- * <b>Cross-account use</b>: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
2089
- * the key ARN or alias ARN in the value of the <code>KeyId</code> parameter.</p>
2090
- *
2091
- * <p>
2092
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:GenerateDataKeyWithoutPlaintext</a> (key policy)</p>
2093
- * <p>
2094
- * <b>Related operations:</b>
2095
- * </p>
2096
- * <ul>
2097
- * <li>
2098
- * <p>
2099
- * <a>Decrypt</a>
2100
- * </p>
2101
- * </li>
2102
- * <li>
2103
- * <p>
2104
- * <a>Encrypt</a>
2105
- * </p>
2106
- * </li>
2107
- * <li>
2108
- * <p>
2109
- * <a>GenerateDataKey</a>
2110
- * </p>
2111
- * </li>
2112
- * <li>
2113
- * <p>
2114
- * <a>GenerateDataKeyPair</a>
2115
- * </p>
2116
- * </li>
2117
- * <li>
2118
- * <p>
2119
- * <a>GenerateDataKeyPairWithoutPlaintext</a>
2120
- * </p>
2121
- * </li>
2122
- * </ul>
2123
- */
2124
- public generateDataKeyWithoutPlaintext(
2125
- args: GenerateDataKeyWithoutPlaintextCommandInput,
2126
- options?: __HttpHandlerOptions
2127
- ): Promise<GenerateDataKeyWithoutPlaintextCommandOutput>;
2128
- public generateDataKeyWithoutPlaintext(
2129
- args: GenerateDataKeyWithoutPlaintextCommandInput,
2130
- cb: (err: any, data?: GenerateDataKeyWithoutPlaintextCommandOutput) => void
2131
- ): void;
2132
- public generateDataKeyWithoutPlaintext(
2133
- args: GenerateDataKeyWithoutPlaintextCommandInput,
2134
- options: __HttpHandlerOptions,
2135
- cb: (err: any, data?: GenerateDataKeyWithoutPlaintextCommandOutput) => void
2136
- ): void;
2137
- public generateDataKeyWithoutPlaintext(
2138
- args: GenerateDataKeyWithoutPlaintextCommandInput,
2139
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GenerateDataKeyWithoutPlaintextCommandOutput) => void),
2140
- cb?: (err: any, data?: GenerateDataKeyWithoutPlaintextCommandOutput) => void
2141
- ): Promise<GenerateDataKeyWithoutPlaintextCommandOutput> | void {
2142
- const command = new GenerateDataKeyWithoutPlaintextCommand(args);
2143
- if (typeof optionsOrCb === "function") {
2144
- this.send(command, optionsOrCb);
2145
- } else if (typeof cb === "function") {
2146
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
2147
- this.send(command, optionsOrCb || {}, cb);
2148
- } else {
2149
- return this.send(command, optionsOrCb);
2150
- }
2151
- }
2152
-
2153
- /**
2154
- * <p>Returns a random byte string that is cryptographically secure.</p>
2155
- * <p>By default, the random byte string is generated in KMS. To generate the byte string in
2156
- * the CloudHSM cluster that is associated with a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a>, specify the custom key store
2157
- * ID.</p>
2158
- * <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>
2159
- * <p>For more information about entropy and random number generation, see <a href="https://docs.aws.amazon.com/kms/latest/cryptographic-details/">Key Management Service Cryptographic Details</a>.</p>
2160
- *
2161
- * <p>
2162
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:GenerateRandom</a> (IAM policy)</p>
2163
- */
2164
- public generateRandom(
2165
- args: GenerateRandomCommandInput,
2166
- options?: __HttpHandlerOptions
2167
- ): Promise<GenerateRandomCommandOutput>;
2168
- public generateRandom(
2169
- args: GenerateRandomCommandInput,
2170
- cb: (err: any, data?: GenerateRandomCommandOutput) => void
2171
- ): void;
2172
- public generateRandom(
2173
- args: GenerateRandomCommandInput,
2174
- options: __HttpHandlerOptions,
2175
- cb: (err: any, data?: GenerateRandomCommandOutput) => void
2176
- ): void;
2177
- public generateRandom(
2178
- args: GenerateRandomCommandInput,
2179
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GenerateRandomCommandOutput) => void),
2180
- cb?: (err: any, data?: GenerateRandomCommandOutput) => void
2181
- ): Promise<GenerateRandomCommandOutput> | void {
2182
- const command = new GenerateRandomCommand(args);
2183
- if (typeof optionsOrCb === "function") {
2184
- this.send(command, optionsOrCb);
2185
- } else if (typeof cb === "function") {
2186
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
2187
- this.send(command, optionsOrCb || {}, cb);
2188
- } else {
2189
- return this.send(command, optionsOrCb);
2190
- }
2191
- }
2192
-
2193
- /**
2194
- * <p>Gets a key policy attached to the specified KMS key.</p>
2195
- * <p>
2196
- * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
2197
- *
2198
- * <p>
2199
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:GetKeyPolicy</a> (key policy)</p>
2200
- * <p>
2201
- * <b>Related operations</b>: <a>PutKeyPolicy</a>
2202
- * </p>
2203
- */
2204
- public getKeyPolicy(
2205
- args: GetKeyPolicyCommandInput,
2206
- options?: __HttpHandlerOptions
2207
- ): Promise<GetKeyPolicyCommandOutput>;
2208
- public getKeyPolicy(args: GetKeyPolicyCommandInput, cb: (err: any, data?: GetKeyPolicyCommandOutput) => void): void;
2209
- public getKeyPolicy(
2210
- args: GetKeyPolicyCommandInput,
2211
- options: __HttpHandlerOptions,
2212
- cb: (err: any, data?: GetKeyPolicyCommandOutput) => void
2213
- ): void;
2214
- public getKeyPolicy(
2215
- args: GetKeyPolicyCommandInput,
2216
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetKeyPolicyCommandOutput) => void),
2217
- cb?: (err: any, data?: GetKeyPolicyCommandOutput) => void
2218
- ): Promise<GetKeyPolicyCommandOutput> | void {
2219
- const command = new GetKeyPolicyCommand(args);
2220
- if (typeof optionsOrCb === "function") {
2221
- this.send(command, optionsOrCb);
2222
- } else if (typeof cb === "function") {
2223
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
2224
- this.send(command, optionsOrCb || {}, cb);
2225
- } else {
2226
- return this.send(command, optionsOrCb);
2227
- }
2228
- }
2229
-
2230
- /**
2231
- * <p>Gets a Boolean value that indicates whether <a href="https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html">automatic rotation of the key material</a> is
2232
- * enabled for the specified KMS key.</p>
2233
- * <p>You cannot enable automatic rotation of <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#asymmetric-cmks">asymmetric KMS keys</a>, KMS keys with <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html">imported key material</a>, or KMS keys in a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a>. To enable or disable automatic rotation of a set of related <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html#mrk-replica-key">multi-Region keys</a>, set the property on the primary key. The key rotation status for these KMS keys is always <code>false</code>.</p>
2234
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
2235
- * 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>
2236
- * <ul>
2237
- * <li>
2238
- * <p>Disabled: The key rotation status does not change when you disable a KMS key. However,
2239
- * while the KMS key is disabled, KMS does not rotate the key material.</p>
2240
- * </li>
2241
- * <li>
2242
- * <p>Pending deletion: While a KMS key is pending deletion, its key rotation status is
2243
- * <code>false</code> and KMS does not rotate the key material. If you cancel the
2244
- * deletion, the original key rotation status is restored.</p>
2245
- * </li>
2246
- * </ul>
2247
- * <p>
2248
- * <b>Cross-account use</b>: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key
2249
- * ARN in the value of the <code>KeyId</code> parameter.</p>
2250
- *
2251
- * <p>
2252
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:GetKeyRotationStatus</a> (key policy)</p>
2253
- * <p>
2254
- * <b>Related operations:</b>
2255
- * </p>
2256
- * <ul>
2257
- * <li>
2258
- * <p>
2259
- * <a>DisableKeyRotation</a>
2260
- * </p>
2261
- * </li>
2262
- * <li>
2263
- * <p>
2264
- * <a>EnableKeyRotation</a>
2265
- * </p>
2266
- * </li>
2267
- * </ul>
2268
- */
2269
- public getKeyRotationStatus(
2270
- args: GetKeyRotationStatusCommandInput,
2271
- options?: __HttpHandlerOptions
2272
- ): Promise<GetKeyRotationStatusCommandOutput>;
2273
- public getKeyRotationStatus(
2274
- args: GetKeyRotationStatusCommandInput,
2275
- cb: (err: any, data?: GetKeyRotationStatusCommandOutput) => void
2276
- ): void;
2277
- public getKeyRotationStatus(
2278
- args: GetKeyRotationStatusCommandInput,
2279
- options: __HttpHandlerOptions,
2280
- cb: (err: any, data?: GetKeyRotationStatusCommandOutput) => void
2281
- ): void;
2282
- public getKeyRotationStatus(
2283
- args: GetKeyRotationStatusCommandInput,
2284
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetKeyRotationStatusCommandOutput) => void),
2285
- cb?: (err: any, data?: GetKeyRotationStatusCommandOutput) => void
2286
- ): Promise<GetKeyRotationStatusCommandOutput> | void {
2287
- const command = new GetKeyRotationStatusCommand(args);
2288
- if (typeof optionsOrCb === "function") {
2289
- this.send(command, optionsOrCb);
2290
- } else if (typeof cb === "function") {
2291
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
2292
- this.send(command, optionsOrCb || {}, cb);
2293
- } else {
2294
- return this.send(command, optionsOrCb);
2295
- }
2296
- }
2297
-
2298
- /**
2299
- * <p>Returns the items you need to import key material into a symmetric, customer managed
2300
- * KMS key. For more information about importing key material into KMS, see
2301
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html">Importing Key
2302
- * Material</a> in the <i>Key Management Service Developer Guide</i>.</p>
2303
- * <p>This operation returns a public key and an import token. Use the public key to encrypt the
2304
- * symmetric key material. Store the import token to send with a subsequent <a>ImportKeyMaterial</a> request.</p>
2305
- * <p>You must specify the key ID of the symmetric KMS key into which you will import key material.
2306
- * This KMS key's <code>Origin</code> must be <code>EXTERNAL</code>. You must also specify the
2307
- * wrapping algorithm and type of wrapping key (public key) that you will use to encrypt the key
2308
- * material. You cannot perform this operation on an asymmetric KMS key or on any KMS key in a different Amazon Web Services account.</p>
2309
- * <p>To import key material, you must use the public key and import token from the same
2310
- * response. These items are valid for 24 hours. The expiration date and time appear in the
2311
- * <code>GetParametersForImport</code> response. You cannot use an expired token in an <a>ImportKeyMaterial</a> request. If your key and token expire, send another
2312
- * <code>GetParametersForImport</code> request.</p>
2313
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
2314
- * 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>
2315
- * <p>
2316
- * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
2317
- *
2318
- * <p>
2319
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:GetParametersForImport</a> (key policy)</p>
2320
- * <p>
2321
- * <b>Related operations:</b>
2322
- * </p>
2323
- * <ul>
2324
- * <li>
2325
- * <p>
2326
- * <a>ImportKeyMaterial</a>
2327
- * </p>
2328
- * </li>
2329
- * <li>
2330
- * <p>
2331
- * <a>DeleteImportedKeyMaterial</a>
2332
- * </p>
2333
- * </li>
2334
- * </ul>
2335
- */
2336
- public getParametersForImport(
2337
- args: GetParametersForImportCommandInput,
2338
- options?: __HttpHandlerOptions
2339
- ): Promise<GetParametersForImportCommandOutput>;
2340
- public getParametersForImport(
2341
- args: GetParametersForImportCommandInput,
2342
- cb: (err: any, data?: GetParametersForImportCommandOutput) => void
2343
- ): void;
2344
- public getParametersForImport(
2345
- args: GetParametersForImportCommandInput,
2346
- options: __HttpHandlerOptions,
2347
- cb: (err: any, data?: GetParametersForImportCommandOutput) => void
2348
- ): void;
2349
- public getParametersForImport(
2350
- args: GetParametersForImportCommandInput,
2351
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetParametersForImportCommandOutput) => void),
2352
- cb?: (err: any, data?: GetParametersForImportCommandOutput) => void
2353
- ): Promise<GetParametersForImportCommandOutput> | void {
2354
- const command = new GetParametersForImportCommand(args);
2355
- if (typeof optionsOrCb === "function") {
2356
- this.send(command, optionsOrCb);
2357
- } else if (typeof cb === "function") {
2358
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
2359
- this.send(command, optionsOrCb || {}, cb);
2360
- } else {
2361
- return this.send(command, optionsOrCb);
2362
- }
2363
- }
2364
-
2365
- /**
2366
- * <p>Returns the public key of an asymmetric KMS key. Unlike the private key of a asymmetric KMS key,
2367
- * which never leaves KMS unencrypted, callers with <code>kms:GetPublicKey</code> permission
2368
- * can download the public key of an asymmetric KMS key. You can share the public key to allow others
2369
- * to encrypt messages and verify signatures outside of KMS. For information about symmetric and asymmetric KMS keys, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using Symmetric and Asymmetric KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
2370
- * <p>You do not need to download the public key. Instead, you can use the public key within
2371
- * KMS by calling the <a>Encrypt</a>, <a>ReEncrypt</a>, or <a>Verify</a> operations with the identifier of an asymmetric KMS key. When you use the
2372
- * public key within KMS, you benefit from the authentication, authorization, and logging that
2373
- * are part of every KMS operation. You also reduce of risk of encrypting data that cannot be
2374
- * decrypted. These features are not effective outside of KMS. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/download-public-key.html#download-public-key-considerations">Special
2375
- * Considerations for Downloading Public Keys</a>.</p>
2376
- * <p>To help you use the public key safely outside of KMS, <code>GetPublicKey</code> returns
2377
- * important information about the public key in the response, including:</p>
2378
- * <ul>
2379
- * <li>
2380
- * <p>
2381
- * <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-KeySpec">KeySpec</a>: The type of key material in the public key, such as
2382
- * <code>RSA_4096</code> or <code>ECC_NIST_P521</code>.</p>
2383
- * </li>
2384
- * <li>
2385
- * <p>
2386
- * <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-KeyUsage">KeyUsage</a>: Whether the key is used for encryption or signing.</p>
2387
- * </li>
2388
- * <li>
2389
- * <p>
2390
- * <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-EncryptionAlgorithms">EncryptionAlgorithms</a> or <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-SigningAlgorithms">SigningAlgorithms</a>: A list of the encryption algorithms or the signing
2391
- * algorithms for the key.</p>
2392
- * </li>
2393
- * </ul>
2394
- * <p>Although KMS cannot enforce these restrictions on external operations, it is crucial
2395
- * that you use this information to prevent the public key from being used improperly. For
2396
- * example, you can prevent a public signing key from being used encrypt data, or prevent a
2397
- * public key from being used with an encryption algorithm that is not supported by KMS. You
2398
- * can also avoid errors, such as using the wrong signing algorithm in a verification
2399
- * operation.</p>
2400
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
2401
- * 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>
2402
- * <p>
2403
- * <b>Cross-account use</b>: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
2404
- * the key ARN or alias ARN in the value of the <code>KeyId</code> parameter.</p>
2405
- *
2406
- * <p>
2407
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:GetPublicKey</a> (key policy)</p>
2408
- * <p>
2409
- * <b>Related operations</b>: <a>CreateKey</a>
2410
- * </p>
2411
- */
2412
- public getPublicKey(
2413
- args: GetPublicKeyCommandInput,
2414
- options?: __HttpHandlerOptions
2415
- ): Promise<GetPublicKeyCommandOutput>;
2416
- public getPublicKey(args: GetPublicKeyCommandInput, cb: (err: any, data?: GetPublicKeyCommandOutput) => void): void;
2417
- public getPublicKey(
2418
- args: GetPublicKeyCommandInput,
2419
- options: __HttpHandlerOptions,
2420
- cb: (err: any, data?: GetPublicKeyCommandOutput) => void
2421
- ): void;
2422
- public getPublicKey(
2423
- args: GetPublicKeyCommandInput,
2424
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetPublicKeyCommandOutput) => void),
2425
- cb?: (err: any, data?: GetPublicKeyCommandOutput) => void
2426
- ): Promise<GetPublicKeyCommandOutput> | void {
2427
- const command = new GetPublicKeyCommand(args);
2428
- if (typeof optionsOrCb === "function") {
2429
- this.send(command, optionsOrCb);
2430
- } else if (typeof cb === "function") {
2431
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
2432
- this.send(command, optionsOrCb || {}, cb);
2433
- } else {
2434
- return this.send(command, optionsOrCb);
2435
- }
2436
- }
2437
-
2438
- /**
2439
- * <p>Imports key material into an existing symmetric KMS KMS key that was
2440
- * created without key material. After you successfully import key material into a KMS key, you can
2441
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html#reimport-key-material">reimport the same key material</a> into that KMS key, but you cannot import different key
2442
- * material. </p>
2443
- * <p>You cannot perform this operation on an asymmetric KMS key or on any KMS key in a different Amazon Web Services account. For more information about creating KMS keys with no key material and
2444
- * then importing key material, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html">Importing Key Material</a> in the
2445
- * <i>Key Management Service Developer Guide</i>.</p>
2446
- * <p>Before using this operation, call <a>GetParametersForImport</a>. Its response
2447
- * includes a public key and an import token. Use the public key to encrypt the key material.
2448
- * Then, submit the import token from the same <code>GetParametersForImport</code>
2449
- * response.</p>
2450
- * <p>When calling this operation, you must specify the following values:</p>
2451
- * <ul>
2452
- * <li>
2453
- * <p>The key ID or key ARN of a KMS key with no key material. Its <code>Origin</code> must be
2454
- * <code>EXTERNAL</code>.</p>
2455
- * <p>To create a KMS key with no key material, call <a>CreateKey</a> and set the
2456
- * value of its <code>Origin</code> parameter to <code>EXTERNAL</code>. To get the
2457
- * <code>Origin</code> of a KMS key, call <a>DescribeKey</a>.)</p>
2458
- * </li>
2459
- * <li>
2460
- * <p>The encrypted key material. To get the public key to encrypt the key material, call
2461
- * <a>GetParametersForImport</a>.</p>
2462
- * </li>
2463
- * <li>
2464
- * <p>The import token that <a>GetParametersForImport</a> returned. You must use
2465
- * a public key and token from the same <code>GetParametersForImport</code> response.</p>
2466
- * </li>
2467
- * <li>
2468
- * <p>Whether the key material expires and if so, when. If you set an expiration date, KMS
2469
- * deletes the key material from the KMS key on the specified date, and the KMS key becomes unusable.
2470
- * To use the KMS key again, you must reimport the same key material. The only way to change an
2471
- * expiration date is by reimporting the same key material and specifying a new expiration
2472
- * date. </p>
2473
- * </li>
2474
- * </ul>
2475
- * <p>When this operation is successful, the key state of the KMS key changes from
2476
- * <code>PendingImport</code> to <code>Enabled</code>, and you can use the KMS key.</p>
2477
- * <p>If this operation fails, use the exception to help determine the problem. If the error is
2478
- * related to the key material, the import token, or wrapping key, use <a>GetParametersForImport</a> to get a new public key and import token for the KMS key and
2479
- * repeat the import procedure. For help, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html#importing-keys-overview">How To Import Key
2480
- * Material</a> in the <i>Key Management Service Developer Guide</i>.</p>
2481
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
2482
- * 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>
2483
- * <p>
2484
- * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
2485
- *
2486
- * <p>
2487
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:ImportKeyMaterial</a> (key policy)</p>
2488
- * <p>
2489
- * <b>Related operations:</b>
2490
- * </p>
2491
- * <ul>
2492
- * <li>
2493
- * <p>
2494
- * <a>DeleteImportedKeyMaterial</a>
2495
- * </p>
2496
- * </li>
2497
- * <li>
2498
- * <p>
2499
- * <a>GetParametersForImport</a>
2500
- * </p>
2501
- * </li>
2502
- * </ul>
2503
- */
2504
- public importKeyMaterial(
2505
- args: ImportKeyMaterialCommandInput,
2506
- options?: __HttpHandlerOptions
2507
- ): Promise<ImportKeyMaterialCommandOutput>;
2508
- public importKeyMaterial(
2509
- args: ImportKeyMaterialCommandInput,
2510
- cb: (err: any, data?: ImportKeyMaterialCommandOutput) => void
2511
- ): void;
2512
- public importKeyMaterial(
2513
- args: ImportKeyMaterialCommandInput,
2514
- options: __HttpHandlerOptions,
2515
- cb: (err: any, data?: ImportKeyMaterialCommandOutput) => void
2516
- ): void;
2517
- public importKeyMaterial(
2518
- args: ImportKeyMaterialCommandInput,
2519
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ImportKeyMaterialCommandOutput) => void),
2520
- cb?: (err: any, data?: ImportKeyMaterialCommandOutput) => void
2521
- ): Promise<ImportKeyMaterialCommandOutput> | void {
2522
- const command = new ImportKeyMaterialCommand(args);
2523
- if (typeof optionsOrCb === "function") {
2524
- this.send(command, optionsOrCb);
2525
- } else if (typeof cb === "function") {
2526
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
2527
- this.send(command, optionsOrCb || {}, cb);
2528
- } else {
2529
- return this.send(command, optionsOrCb);
2530
- }
2531
- }
2532
-
2533
- /**
2534
- * <p>Gets a list of aliases in the caller's Amazon Web Services account and region. For more information about
2535
- * aliases, see <a>CreateAlias</a>.</p>
2536
- * <p>By default, the <code>ListAliases</code> operation returns all aliases in the account and
2537
- * region. To get only the aliases associated with a particular KMS key, use
2538
- * the <code>KeyId</code> parameter.</p>
2539
- * <p>The <code>ListAliases</code> response can include aliases that you created and associated
2540
- * with your customer managed keys, and aliases that Amazon Web Services created and associated with Amazon Web Services managed keys in your account. You can recognize Amazon Web Services aliases because their names have the format
2541
- * <code>aws/<service-name></code>, such as <code>aws/dynamodb</code>.</p>
2542
- * <p>The response might also include aliases that have no <code>TargetKeyId</code> field. These
2543
- * are predefined aliases that Amazon Web Services has created but has not yet associated with a KMS key. Aliases
2544
- * that Amazon Web Services creates in your account, including predefined aliases, do not count against your
2545
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/limits.html#aliases-limit">KMS aliases
2546
- * quota</a>.</p>
2547
- * <p>
2548
- * <b>Cross-account use</b>: No. <code>ListAliases</code> does not
2549
- * return aliases in other Amazon Web Services accounts.</p>
2550
- *
2551
- * <p>
2552
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:ListAliases</a> (IAM policy)</p>
2553
- * <p>For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access">Controlling access to aliases</a> in the <i>Key Management Service Developer Guide</i>.</p>
2554
- * <p>
2555
- * <b>Related operations:</b>
2556
- * </p>
2557
- * <ul>
2558
- * <li>
2559
- * <p>
2560
- * <a>CreateAlias</a>
2561
- * </p>
2562
- * </li>
2563
- * <li>
2564
- * <p>
2565
- * <a>DeleteAlias</a>
2566
- * </p>
2567
- * </li>
2568
- * <li>
2569
- * <p>
2570
- * <a>UpdateAlias</a>
2571
- * </p>
2572
- * </li>
2573
- * </ul>
2574
- */
2575
- public listAliases(args: ListAliasesCommandInput, options?: __HttpHandlerOptions): Promise<ListAliasesCommandOutput>;
2576
- public listAliases(args: ListAliasesCommandInput, cb: (err: any, data?: ListAliasesCommandOutput) => void): void;
2577
- public listAliases(
2578
- args: ListAliasesCommandInput,
2579
- options: __HttpHandlerOptions,
2580
- cb: (err: any, data?: ListAliasesCommandOutput) => void
2581
- ): void;
2582
- public listAliases(
2583
- args: ListAliasesCommandInput,
2584
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListAliasesCommandOutput) => void),
2585
- cb?: (err: any, data?: ListAliasesCommandOutput) => void
2586
- ): Promise<ListAliasesCommandOutput> | void {
2587
- const command = new ListAliasesCommand(args);
2588
- if (typeof optionsOrCb === "function") {
2589
- this.send(command, optionsOrCb);
2590
- } else if (typeof cb === "function") {
2591
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
2592
- this.send(command, optionsOrCb || {}, cb);
2593
- } else {
2594
- return this.send(command, optionsOrCb);
2595
- }
2596
- }
2597
-
2598
- /**
2599
- * <p>Gets a list of all grants for the specified KMS key. </p>
2600
- * <p>You must specify the KMS key in all requests. You can filter the grant list by grant ID
2601
- * or grantee principal.</p>
2602
- * <p>For detailed information about grants, including grant terminology, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html">Using grants</a> in the
2603
- * <i>
2604
- * <i>Key Management Service Developer Guide</i>
2605
- * </i>. For examples of working with grants in several
2606
- * programming languages, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html">Programming grants</a>. </p>
2607
- * <note>
2608
- * <p>The <code>GranteePrincipal</code> field in the <code>ListGrants</code> response usually contains the
2609
- * user or role designated as the grantee principal in the grant. However, when the grantee
2610
- * principal in the grant is an Amazon Web Services service, the <code>GranteePrincipal</code> field contains
2611
- * the <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services">service
2612
- * principal</a>, which might represent several different grantee principals.</p>
2613
- * </note>
2614
- * <p>
2615
- * <b>Cross-account use</b>: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key
2616
- * ARN in the value of the <code>KeyId</code> parameter.</p>
2617
- *
2618
- * <p>
2619
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:ListGrants</a> (key policy)</p>
2620
- * <p>
2621
- * <b>Related operations:</b>
2622
- * </p>
2623
- * <ul>
2624
- * <li>
2625
- * <p>
2626
- * <a>CreateGrant</a>
2627
- * </p>
2628
- * </li>
2629
- * <li>
2630
- * <p>
2631
- * <a>ListRetirableGrants</a>
2632
- * </p>
2633
- * </li>
2634
- * <li>
2635
- * <p>
2636
- * <a>RetireGrant</a>
2637
- * </p>
2638
- * </li>
2639
- * <li>
2640
- * <p>
2641
- * <a>RevokeGrant</a>
2642
- * </p>
2643
- * </li>
2644
- * </ul>
2645
- */
2646
- public listGrants(args: ListGrantsCommandInput, options?: __HttpHandlerOptions): Promise<ListGrantsCommandOutput>;
2647
- public listGrants(args: ListGrantsCommandInput, cb: (err: any, data?: ListGrantsCommandOutput) => void): void;
2648
- public listGrants(
2649
- args: ListGrantsCommandInput,
2650
- options: __HttpHandlerOptions,
2651
- cb: (err: any, data?: ListGrantsCommandOutput) => void
2652
- ): void;
2653
- public listGrants(
2654
- args: ListGrantsCommandInput,
2655
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListGrantsCommandOutput) => void),
2656
- cb?: (err: any, data?: ListGrantsCommandOutput) => void
2657
- ): Promise<ListGrantsCommandOutput> | void {
2658
- const command = new ListGrantsCommand(args);
2659
- if (typeof optionsOrCb === "function") {
2660
- this.send(command, optionsOrCb);
2661
- } else if (typeof cb === "function") {
2662
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
2663
- this.send(command, optionsOrCb || {}, cb);
2664
- } else {
2665
- return this.send(command, optionsOrCb);
2666
- }
2667
- }
2668
-
2669
- /**
2670
- * <p>Gets the names of the key policies that are attached to a KMS key. This
2671
- * operation is designed to get policy names that you can use in a <a>GetKeyPolicy</a>
2672
- * operation. However, the only valid policy name is <code>default</code>. </p>
2673
- * <p>
2674
- * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
2675
- *
2676
- * <p>
2677
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:ListKeyPolicies</a> (key policy)</p>
2678
- * <p>
2679
- * <b>Related operations:</b>
2680
- * </p>
2681
- * <ul>
2682
- * <li>
2683
- * <p>
2684
- * <a>GetKeyPolicy</a>
2685
- * </p>
2686
- * </li>
2687
- * <li>
2688
- * <p>
2689
- * <a>PutKeyPolicy</a>
2690
- * </p>
2691
- * </li>
2692
- * </ul>
2693
- */
2694
- public listKeyPolicies(
2695
- args: ListKeyPoliciesCommandInput,
2696
- options?: __HttpHandlerOptions
2697
- ): Promise<ListKeyPoliciesCommandOutput>;
2698
- public listKeyPolicies(
2699
- args: ListKeyPoliciesCommandInput,
2700
- cb: (err: any, data?: ListKeyPoliciesCommandOutput) => void
2701
- ): void;
2702
- public listKeyPolicies(
2703
- args: ListKeyPoliciesCommandInput,
2704
- options: __HttpHandlerOptions,
2705
- cb: (err: any, data?: ListKeyPoliciesCommandOutput) => void
2706
- ): void;
2707
- public listKeyPolicies(
2708
- args: ListKeyPoliciesCommandInput,
2709
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListKeyPoliciesCommandOutput) => void),
2710
- cb?: (err: any, data?: ListKeyPoliciesCommandOutput) => void
2711
- ): Promise<ListKeyPoliciesCommandOutput> | void {
2712
- const command = new ListKeyPoliciesCommand(args);
2713
- if (typeof optionsOrCb === "function") {
2714
- this.send(command, optionsOrCb);
2715
- } else if (typeof cb === "function") {
2716
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
2717
- this.send(command, optionsOrCb || {}, cb);
2718
- } else {
2719
- return this.send(command, optionsOrCb);
2720
- }
2721
- }
2722
-
2723
- /**
2724
- * <p>Gets a list of all KMS keys in the caller's Amazon Web Services account and
2725
- * Region.</p>
2726
- * <p>
2727
- * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
2728
- *
2729
- * <p>
2730
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:ListKeys</a> (IAM policy)</p>
2731
- * <p>
2732
- * <b>Related operations:</b>
2733
- * </p>
2734
- * <ul>
2735
- * <li>
2736
- * <p>
2737
- * <a>CreateKey</a>
2738
- * </p>
2739
- * </li>
2740
- * <li>
2741
- * <p>
2742
- * <a>DescribeKey</a>
2743
- * </p>
2744
- * </li>
2745
- * <li>
2746
- * <p>
2747
- * <a>ListAliases</a>
2748
- * </p>
2749
- * </li>
2750
- * <li>
2751
- * <p>
2752
- * <a>ListResourceTags</a>
2753
- * </p>
2754
- * </li>
2755
- * </ul>
2756
- */
2757
- public listKeys(args: ListKeysCommandInput, options?: __HttpHandlerOptions): Promise<ListKeysCommandOutput>;
2758
- public listKeys(args: ListKeysCommandInput, cb: (err: any, data?: ListKeysCommandOutput) => void): void;
2759
- public listKeys(
2760
- args: ListKeysCommandInput,
2761
- options: __HttpHandlerOptions,
2762
- cb: (err: any, data?: ListKeysCommandOutput) => void
2763
- ): void;
2764
- public listKeys(
2765
- args: ListKeysCommandInput,
2766
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListKeysCommandOutput) => void),
2767
- cb?: (err: any, data?: ListKeysCommandOutput) => void
2768
- ): Promise<ListKeysCommandOutput> | void {
2769
- const command = new ListKeysCommand(args);
2770
- if (typeof optionsOrCb === "function") {
2771
- this.send(command, optionsOrCb);
2772
- } else if (typeof cb === "function") {
2773
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
2774
- this.send(command, optionsOrCb || {}, cb);
2775
- } else {
2776
- return this.send(command, optionsOrCb);
2777
- }
2778
- }
2779
-
2780
- /**
2781
- * <p>Returns all tags on the specified KMS key.</p>
2782
- * <p>For general information about tags, including the format and syntax, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in
2783
- * the <i>Amazon Web Services General Reference</i>. For information about using
2784
- * tags in KMS, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html">Tagging
2785
- * keys</a>.</p>
2786
- * <p>
2787
- * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
2788
- *
2789
- * <p>
2790
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:ListResourceTags</a> (key policy)</p>
2791
- * <p>
2792
- * <b>Related operations:</b>
2793
- * </p>
2794
- * <ul>
2795
- * <li>
2796
- * <p>
2797
- * <a>CreateKey</a>
2798
- * </p>
2799
- * </li>
2800
- * <li>
2801
- * <p>
2802
- * <a>ReplicateKey</a>
2803
- * </p>
2804
- * </li>
2805
- * <li>
2806
- * <p>
2807
- * <a>TagResource</a>
2808
- * </p>
2809
- * </li>
2810
- * <li>
2811
- * <p>
2812
- * <a>UntagResource</a>
2813
- * </p>
2814
- * </li>
2815
- * </ul>
2816
- */
2817
- public listResourceTags(
2818
- args: ListResourceTagsCommandInput,
2819
- options?: __HttpHandlerOptions
2820
- ): Promise<ListResourceTagsCommandOutput>;
2821
- public listResourceTags(
2822
- args: ListResourceTagsCommandInput,
2823
- cb: (err: any, data?: ListResourceTagsCommandOutput) => void
2824
- ): void;
2825
- public listResourceTags(
2826
- args: ListResourceTagsCommandInput,
2827
- options: __HttpHandlerOptions,
2828
- cb: (err: any, data?: ListResourceTagsCommandOutput) => void
2829
- ): void;
2830
- public listResourceTags(
2831
- args: ListResourceTagsCommandInput,
2832
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListResourceTagsCommandOutput) => void),
2833
- cb?: (err: any, data?: ListResourceTagsCommandOutput) => void
2834
- ): Promise<ListResourceTagsCommandOutput> | void {
2835
- const command = new ListResourceTagsCommand(args);
2836
- if (typeof optionsOrCb === "function") {
2837
- this.send(command, optionsOrCb);
2838
- } else if (typeof cb === "function") {
2839
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
2840
- this.send(command, optionsOrCb || {}, cb);
2841
- } else {
2842
- return this.send(command, optionsOrCb);
2843
- }
2844
- }
2845
-
2846
- /**
2847
- * <p>Returns information about all grants in the Amazon Web Services account and Region that have the specified
2848
- * retiring principal. </p>
2849
- * <p>You can specify any principal in your Amazon Web Services account. The grants that are returned include
2850
- * grants for KMS keys in your Amazon Web Services account and other Amazon Web Services accounts. You might use this operation to
2851
- * determine which grants you may retire. To retire a grant, use the <a>RetireGrant</a> operation.</p>
2852
- * <p>For detailed information about grants, including grant terminology, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html">Using grants</a> in the
2853
- * <i>
2854
- * <i>Key Management Service Developer Guide</i>
2855
- * </i>. For examples of working with grants in several
2856
- * programming languages, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html">Programming grants</a>. </p>
2857
- * <p>
2858
- * <b>Cross-account use</b>: You must specify a principal in your
2859
- * Amazon Web Services account. However, this operation can return grants in any Amazon Web Services account. You do not need
2860
- * <code>kms:ListRetirableGrants</code> permission (or any other additional permission) in any
2861
- * Amazon Web Services account other than your own.</p>
2862
- *
2863
- * <p>
2864
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:ListRetirableGrants</a> (IAM policy) in your Amazon Web Services account.</p>
2865
- * <p>
2866
- * <b>Related operations:</b>
2867
- * </p>
2868
- * <ul>
2869
- * <li>
2870
- * <p>
2871
- * <a>CreateGrant</a>
2872
- * </p>
2873
- * </li>
2874
- * <li>
2875
- * <p>
2876
- * <a>ListGrants</a>
2877
- * </p>
2878
- * </li>
2879
- * <li>
2880
- * <p>
2881
- * <a>RetireGrant</a>
2882
- * </p>
2883
- * </li>
2884
- * <li>
2885
- * <p>
2886
- * <a>RevokeGrant</a>
2887
- * </p>
2888
- * </li>
2889
- * </ul>
2890
- */
2891
- public listRetirableGrants(
2892
- args: ListRetirableGrantsCommandInput,
2893
- options?: __HttpHandlerOptions
2894
- ): Promise<ListRetirableGrantsCommandOutput>;
2895
- public listRetirableGrants(
2896
- args: ListRetirableGrantsCommandInput,
2897
- cb: (err: any, data?: ListRetirableGrantsCommandOutput) => void
2898
- ): void;
2899
- public listRetirableGrants(
2900
- args: ListRetirableGrantsCommandInput,
2901
- options: __HttpHandlerOptions,
2902
- cb: (err: any, data?: ListRetirableGrantsCommandOutput) => void
2903
- ): void;
2904
- public listRetirableGrants(
2905
- args: ListRetirableGrantsCommandInput,
2906
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListRetirableGrantsCommandOutput) => void),
2907
- cb?: (err: any, data?: ListRetirableGrantsCommandOutput) => void
2908
- ): Promise<ListRetirableGrantsCommandOutput> | void {
2909
- const command = new ListRetirableGrantsCommand(args);
2910
- if (typeof optionsOrCb === "function") {
2911
- this.send(command, optionsOrCb);
2912
- } else if (typeof cb === "function") {
2913
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
2914
- this.send(command, optionsOrCb || {}, cb);
2915
- } else {
2916
- return this.send(command, optionsOrCb);
2917
- }
2918
- }
2919
-
2920
- /**
2921
- * <p>Attaches a key policy to the specified KMS key. </p>
2922
- * <p>For more information about key policies, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html">Key Policies</a> in the <i>Key Management Service Developer Guide</i>.
2923
- * For help writing and formatting a JSON policy document, see the <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html">IAM JSON Policy Reference</a> in the <i>
2924
- * <i>Identity and Access Management User Guide</i>
2925
- * </i>. For examples of adding a key policy in multiple programming languages,
2926
- * see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/programming-key-policies.html#put-policy">Setting a key policy</a> in the <i>Key Management Service Developer Guide</i>.</p>
2927
- * <p>
2928
- * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
2929
- *
2930
- * <p>
2931
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:PutKeyPolicy</a> (key policy)</p>
2932
- * <p>
2933
- * <b>Related operations</b>: <a>GetKeyPolicy</a>
2934
- * </p>
2935
- */
2936
- public putKeyPolicy(
2937
- args: PutKeyPolicyCommandInput,
2938
- options?: __HttpHandlerOptions
2939
- ): Promise<PutKeyPolicyCommandOutput>;
2940
- public putKeyPolicy(args: PutKeyPolicyCommandInput, cb: (err: any, data?: PutKeyPolicyCommandOutput) => void): void;
2941
- public putKeyPolicy(
2942
- args: PutKeyPolicyCommandInput,
2943
- options: __HttpHandlerOptions,
2944
- cb: (err: any, data?: PutKeyPolicyCommandOutput) => void
2945
- ): void;
2946
- public putKeyPolicy(
2947
- args: PutKeyPolicyCommandInput,
2948
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: PutKeyPolicyCommandOutput) => void),
2949
- cb?: (err: any, data?: PutKeyPolicyCommandOutput) => void
2950
- ): Promise<PutKeyPolicyCommandOutput> | void {
2951
- const command = new PutKeyPolicyCommand(args);
2952
- if (typeof optionsOrCb === "function") {
2953
- this.send(command, optionsOrCb);
2954
- } else if (typeof cb === "function") {
2955
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
2956
- this.send(command, optionsOrCb || {}, cb);
2957
- } else {
2958
- return this.send(command, optionsOrCb);
2959
- }
2960
- }
2961
-
2962
- /**
2963
- * <p>Decrypts ciphertext and then reencrypts it entirely within KMS. You can use this
2964
- * operation to change the KMS key under which data is encrypted, such as when
2965
- * you <a href="https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotate-keys-manually">manually rotate</a> a KMS key or change the KMS key that protects a ciphertext. You can also
2966
- * use it to reencrypt ciphertext under the same KMS key, such as to change the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">encryption
2967
- * context</a> of a ciphertext.</p>
2968
- * <p>The <code>ReEncrypt</code> operation can decrypt ciphertext that was encrypted by using an
2969
- * KMS KMS key in an KMS operation, such as <a>Encrypt</a> or <a>GenerateDataKey</a>. It can also decrypt ciphertext that was encrypted by using the
2970
- * public key of an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#asymmetric-cmks">asymmetric KMS key</a> outside of KMS. However, it cannot decrypt ciphertext
2971
- * produced by other libraries, such as the <a href="https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/">Amazon Web Services Encryption SDK</a> or <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html">Amazon S3 client-side encryption</a>.
2972
- * These libraries return a ciphertext format that is incompatible with KMS.</p>
2973
- * <p>When you use the <code>ReEncrypt</code> operation, you need to provide information for the
2974
- * decrypt operation and the subsequent encrypt operation.</p>
2975
- * <ul>
2976
- * <li>
2977
- * <p>If your ciphertext was encrypted under an asymmetric KMS key, you must use the
2978
- * <code>SourceKeyId</code> parameter to identify the KMS key that encrypted the ciphertext.
2979
- * You must also supply the encryption algorithm that was used. This information is required
2980
- * to decrypt the data.</p>
2981
- * </li>
2982
- * <li>
2983
- * <p>If your ciphertext was encrypted under a symmetric KMS key, the <code>SourceKeyId</code>
2984
- * parameter is optional. KMS can get this information from metadata that it adds to the
2985
- * symmetric ciphertext blob. This feature adds durability to your implementation by ensuring
2986
- * that authorized users can decrypt ciphertext decades after it was encrypted, even if
2987
- * they've lost track of the key ID. However, specifying the source KMS key is always recommended
2988
- * as a best practice. When you use the <code>SourceKeyId</code> parameter to specify a KMS key,
2989
- * KMS uses only the KMS key you specify. If the ciphertext was encrypted under a different KMS key, the <code>ReEncrypt</code> operation fails. This practice ensures that you use the KMS key that you intend.</p>
2990
- * </li>
2991
- * <li>
2992
- * <p>To reencrypt the data, you must use the <code>DestinationKeyId</code> parameter
2993
- * specify the KMS key that re-encrypts the data after it is decrypted. You can select a
2994
- * symmetric or asymmetric KMS key. If the destination KMS key is an asymmetric KMS key, you must also
2995
- * provide the encryption algorithm. The algorithm that you choose must be compatible with
2996
- * the KMS key.</p>
2997
- *
2998
- * <important>
2999
- * <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>
3000
- * <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>
3001
- * </important>
3002
- * </li>
3003
- * </ul>
3004
- *
3005
- *
3006
- *
3007
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
3008
- * 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>
3009
- * <p>
3010
- * <b>Cross-account use</b>: Yes. The source KMS key and destination KMS key can be in different Amazon Web Services accounts. Either or both KMS keys can be in a different account than
3011
- * the caller. To specify a KMS key in a different account, you must use its key ARN or alias
3012
- * ARN.</p>
3013
- *
3014
- * <p>
3015
- * <b>Required permissions</b>:</p>
3016
- * <ul>
3017
- * <li>
3018
- * <p>
3019
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:ReEncryptFrom</a> permission on the source KMS key (key policy)</p>
3020
- * </li>
3021
- * <li>
3022
- * <p>
3023
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:ReEncryptTo</a> permission on the destination KMS key (key policy)</p>
3024
- * </li>
3025
- * </ul>
3026
- * <p>To permit reencryption from or to a KMS key, include the <code>"kms:ReEncrypt*"</code>
3027
- * permission in your <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html">key policy</a>. This permission is
3028
- * automatically included in the key policy when you use the console to create a KMS key. But you
3029
- * must include it manually when you create a KMS key programmatically or when you use the <a>PutKeyPolicy</a> operation to set a key policy.</p>
3030
- *
3031
- * <p>
3032
- * <b>Related operations:</b>
3033
- * </p>
3034
- * <ul>
3035
- * <li>
3036
- * <p>
3037
- * <a>Decrypt</a>
3038
- * </p>
3039
- * </li>
3040
- * <li>
3041
- * <p>
3042
- * <a>Encrypt</a>
3043
- * </p>
3044
- * </li>
3045
- * <li>
3046
- * <p>
3047
- * <a>GenerateDataKey</a>
3048
- * </p>
3049
- * </li>
3050
- * <li>
3051
- * <p>
3052
- * <a>GenerateDataKeyPair</a>
3053
- * </p>
3054
- * </li>
3055
- * </ul>
3056
- */
3057
- public reEncrypt(args: ReEncryptCommandInput, options?: __HttpHandlerOptions): Promise<ReEncryptCommandOutput>;
3058
- public reEncrypt(args: ReEncryptCommandInput, cb: (err: any, data?: ReEncryptCommandOutput) => void): void;
3059
- public reEncrypt(
3060
- args: ReEncryptCommandInput,
3061
- options: __HttpHandlerOptions,
3062
- cb: (err: any, data?: ReEncryptCommandOutput) => void
3063
- ): void;
3064
- public reEncrypt(
3065
- args: ReEncryptCommandInput,
3066
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ReEncryptCommandOutput) => void),
3067
- cb?: (err: any, data?: ReEncryptCommandOutput) => void
3068
- ): Promise<ReEncryptCommandOutput> | void {
3069
- const command = new ReEncryptCommand(args);
3070
- if (typeof optionsOrCb === "function") {
3071
- this.send(command, optionsOrCb);
3072
- } else if (typeof cb === "function") {
3073
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
3074
- this.send(command, optionsOrCb || {}, cb);
3075
- } else {
3076
- return this.send(command, optionsOrCb);
3077
- }
3078
- }
3079
-
3080
- /**
3081
- * <p>Replicates a multi-Region key into the specified Region. This operation creates a
3082
- * multi-Region replica key based on a multi-Region primary key in a different Region of the same
3083
- * Amazon Web Services partition. You can create multiple replicas of a primary key, but each must be in a
3084
- * different Region. To create a multi-Region primary key, use the <a>CreateKey</a>
3085
- * operation.</p>
3086
- * <p>This operation supports <i>multi-Region keys</i>, an KMS feature that lets you create multiple
3087
- * interoperable KMS keys in different Amazon Web Services Regions. Because these KMS keys have the same key ID, key
3088
- * material, and other metadata, you can use them interchangeably to encrypt data in one Amazon Web Services Region and decrypt
3089
- * it in a different Amazon Web Services Region without re-encrypting the data or making a cross-Region call. For more information about multi-Region keys, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html">Using multi-Region keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
3090
- * <p>A <i>replica key</i> is a fully-functional KMS key that can be used
3091
- * independently of its primary and peer replica keys. A primary key and its replica keys share
3092
- * properties that make them interoperable. They have the same <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-id">key ID</a> and key material. They also
3093
- * have the same <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-spec">key
3094
- * spec</a>, <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-usage">key
3095
- * usage</a>, <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-origin">key
3096
- * material origin</a>, and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html">automatic key rotation status</a>. KMS automatically synchronizes these shared
3097
- * properties among related multi-Region keys. All other properties of a replica key can differ,
3098
- * including its <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html">key
3099
- * policy</a>, <a href="https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html">tags</a>, <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html">aliases</a>, and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">key
3100
- * state</a>. KMS pricing and quotas for KMS keys apply to each primary key and replica
3101
- * key.</p>
3102
- * <p>When this operation completes, the new replica key has a transient key state of
3103
- * <code>Creating</code>. This key state changes to <code>Enabled</code> (or
3104
- * <code>PendingImport</code>) after a few seconds when the process of creating the new replica
3105
- * key is complete. While the key state is <code>Creating</code>, you can manage key, but you
3106
- * cannot yet use it in cryptographic operations. If you are creating and using the replica key
3107
- * programmatically, retry on <code>KMSInvalidStateException</code> or call
3108
- * <code>DescribeKey</code> to check its <code>KeyState</code> value before using it. For
3109
- * details about the <code>Creating</code> key state, see <a href="kms/latest/developerguide/key-state.html">Key state: Effect on your KMS key</a> in the
3110
- * <i>Key Management Service Developer Guide</i>.</p>
3111
- * <p>The CloudTrail log of a <code>ReplicateKey</code> operation records a
3112
- * <code>ReplicateKey</code> operation in the primary key's Region and a <a>CreateKey</a> operation in the replica key's Region.</p>
3113
- * <p>If you replicate a multi-Region primary key with imported key material, the replica key is
3114
- * created with no key material. You must import the same key material that you imported into the
3115
- * primary key. For details, see <a href="kms/latest/developerguide/multi-region-keys-import.html">Importing key material into multi-Region keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
3116
- * <p>To convert a replica key to a primary key, use the <a>UpdatePrimaryRegion</a>
3117
- * operation.</p>
3118
- * <note>
3119
- * <p>
3120
- * <code>ReplicateKey</code> uses different default values for the <code>KeyPolicy</code> and
3121
- * <code>Tags</code> parameters than those used in the KMS console. For details, see the
3122
- * parameter descriptions.</p>
3123
- * </note>
3124
- * <p>
3125
- * <b>Cross-account use</b>: No. You cannot use this operation to
3126
- * create a replica key in a different Amazon Web Services account. </p>
3127
- * <p>
3128
- * <b>Required permissions</b>: </p>
3129
- * <ul>
3130
- * <li>
3131
- * <p>
3132
- * <code>kms:ReplicateKey</code> on the primary key (in the primary key's Region). Include this
3133
- * permission in the primary key's key policy.</p>
3134
- * </li>
3135
- * <li>
3136
- * <p>
3137
- * <code>kms:CreateKey</code> in an IAM policy in the replica Region.</p>
3138
- * </li>
3139
- * <li>
3140
- * <p>To use the <code>Tags</code> parameter, <code>kms:TagResource</code> in an IAM policy
3141
- * in the replica Region.</p>
3142
- * </li>
3143
- * </ul>
3144
- * <p>
3145
- * <b>Related operations</b>
3146
- * </p>
3147
- * <ul>
3148
- * <li>
3149
- * <p>
3150
- * <a>CreateKey</a>
3151
- * </p>
3152
- * </li>
3153
- * <li>
3154
- * <p>
3155
- * <a>UpdatePrimaryRegion</a>
3156
- * </p>
3157
- * </li>
3158
- * </ul>
3159
- */
3160
- public replicateKey(
3161
- args: ReplicateKeyCommandInput,
3162
- options?: __HttpHandlerOptions
3163
- ): Promise<ReplicateKeyCommandOutput>;
3164
- public replicateKey(args: ReplicateKeyCommandInput, cb: (err: any, data?: ReplicateKeyCommandOutput) => void): void;
3165
- public replicateKey(
3166
- args: ReplicateKeyCommandInput,
3167
- options: __HttpHandlerOptions,
3168
- cb: (err: any, data?: ReplicateKeyCommandOutput) => void
3169
- ): void;
3170
- public replicateKey(
3171
- args: ReplicateKeyCommandInput,
3172
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ReplicateKeyCommandOutput) => void),
3173
- cb?: (err: any, data?: ReplicateKeyCommandOutput) => void
3174
- ): Promise<ReplicateKeyCommandOutput> | void {
3175
- const command = new ReplicateKeyCommand(args);
3176
- if (typeof optionsOrCb === "function") {
3177
- this.send(command, optionsOrCb);
3178
- } else if (typeof cb === "function") {
3179
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
3180
- this.send(command, optionsOrCb || {}, cb);
3181
- } else {
3182
- return this.send(command, optionsOrCb);
3183
- }
3184
- }
3185
-
3186
- /**
3187
- * <p>Deletes a grant. Typically, you retire a grant when you no longer need its permissions. To
3188
- * identify the grant to retire, use a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token">grant token</a>, or both the grant ID and a
3189
- * key identifier (key ID or key ARN) of the KMS key. The <a>CreateGrant</a> operation returns both values.</p>
3190
- * <p>This operation can be called by the <i>retiring principal</i> for a grant,
3191
- * by the <i>grantee principal</i> if the grant allows the <code>RetireGrant</code>
3192
- * operation, and by the Amazon Web Services account (root user) in which the grant is created. It can also be
3193
- * called by principals to whom permission for retiring a grant is delegated. For details, see
3194
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#grant-delete">Retiring and
3195
- * revoking grants</a> in the <i>Key Management Service Developer Guide</i>.</p>
3196
- * <p>For detailed information about grants, including grant terminology, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html">Using grants</a> in the
3197
- * <i>
3198
- * <i>Key Management Service Developer Guide</i>
3199
- * </i>. For examples of working with grants in several
3200
- * programming languages, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html">Programming grants</a>. </p>
3201
- * <p>
3202
- * <b>Cross-account use</b>: Yes. You can retire a grant on a KMS key
3203
- * in a different Amazon Web Services account.</p>
3204
- * <p>
3205
- * <b>Required permissions:</b>:Permission to retire a grant is
3206
- * determined primarily by the grant. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#grant-delete">Retiring and revoking grants</a> in the <i>Key Management Service Developer Guide</i>.</p>
3207
- * <p>
3208
- * <b>Related operations:</b>
3209
- * </p>
3210
- * <ul>
3211
- * <li>
3212
- * <p>
3213
- * <a>CreateGrant</a>
3214
- * </p>
3215
- * </li>
3216
- * <li>
3217
- * <p>
3218
- * <a>ListGrants</a>
3219
- * </p>
3220
- * </li>
3221
- * <li>
3222
- * <p>
3223
- * <a>ListRetirableGrants</a>
3224
- * </p>
3225
- * </li>
3226
- * <li>
3227
- * <p>
3228
- * <a>RevokeGrant</a>
3229
- * </p>
3230
- * </li>
3231
- * </ul>
3232
- */
3233
- public retireGrant(args: RetireGrantCommandInput, options?: __HttpHandlerOptions): Promise<RetireGrantCommandOutput>;
3234
- public retireGrant(args: RetireGrantCommandInput, cb: (err: any, data?: RetireGrantCommandOutput) => void): void;
3235
- public retireGrant(
3236
- args: RetireGrantCommandInput,
3237
- options: __HttpHandlerOptions,
3238
- cb: (err: any, data?: RetireGrantCommandOutput) => void
3239
- ): void;
3240
- public retireGrant(
3241
- args: RetireGrantCommandInput,
3242
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: RetireGrantCommandOutput) => void),
3243
- cb?: (err: any, data?: RetireGrantCommandOutput) => void
3244
- ): Promise<RetireGrantCommandOutput> | void {
3245
- const command = new RetireGrantCommand(args);
3246
- if (typeof optionsOrCb === "function") {
3247
- this.send(command, optionsOrCb);
3248
- } else if (typeof cb === "function") {
3249
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
3250
- this.send(command, optionsOrCb || {}, cb);
3251
- } else {
3252
- return this.send(command, optionsOrCb);
3253
- }
3254
- }
3255
-
3256
- /**
3257
- * <p>Deletes the specified grant. You revoke a grant to terminate the permissions that the
3258
- * grant allows. For more
3259
- * information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/managing-grants.html#grant-delete">Retiring and revoking grants</a> in
3260
- * the <i>
3261
- * <i>Key Management Service Developer Guide</i>
3262
- * </i>.</p>
3263
- * <p>When you create, retire, or revoke a grant, there might be a brief delay, usually less than five minutes, until the grant is available throughout KMS. This state is known as <i>eventual consistency</i>. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-eventual-consistency">Eventual consistency</a> in
3264
- * the <i>
3265
- * <i>Key Management Service Developer Guide</i>
3266
- * </i>. </p>
3267
- * <p>For detailed information about grants, including grant terminology, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html">Using grants</a> in the
3268
- * <i>
3269
- * <i>Key Management Service Developer Guide</i>
3270
- * </i>. For examples of working with grants in several
3271
- * programming languages, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html">Programming grants</a>. </p>
3272
- * <p>
3273
- * <b>Cross-account use</b>: Yes. To perform this operation on a KMS key in a different Amazon Web Services account, specify the key
3274
- * ARN in the value of the <code>KeyId</code> parameter.</p>
3275
- * <p>
3276
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:RevokeGrant</a> (key policy).</p>
3277
- * <p>
3278
- * <b>Related operations:</b>
3279
- * </p>
3280
- * <ul>
3281
- * <li>
3282
- * <p>
3283
- * <a>CreateGrant</a>
3284
- * </p>
3285
- * </li>
3286
- * <li>
3287
- * <p>
3288
- * <a>ListGrants</a>
3289
- * </p>
3290
- * </li>
3291
- * <li>
3292
- * <p>
3293
- * <a>ListRetirableGrants</a>
3294
- * </p>
3295
- * </li>
3296
- * <li>
3297
- * <p>
3298
- * <a>RetireGrant</a>
3299
- * </p>
3300
- * </li>
3301
- * </ul>
3302
- */
3303
- public revokeGrant(args: RevokeGrantCommandInput, options?: __HttpHandlerOptions): Promise<RevokeGrantCommandOutput>;
3304
- public revokeGrant(args: RevokeGrantCommandInput, cb: (err: any, data?: RevokeGrantCommandOutput) => void): void;
3305
- public revokeGrant(
3306
- args: RevokeGrantCommandInput,
3307
- options: __HttpHandlerOptions,
3308
- cb: (err: any, data?: RevokeGrantCommandOutput) => void
3309
- ): void;
3310
- public revokeGrant(
3311
- args: RevokeGrantCommandInput,
3312
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: RevokeGrantCommandOutput) => void),
3313
- cb?: (err: any, data?: RevokeGrantCommandOutput) => void
3314
- ): Promise<RevokeGrantCommandOutput> | void {
3315
- const command = new RevokeGrantCommand(args);
3316
- if (typeof optionsOrCb === "function") {
3317
- this.send(command, optionsOrCb);
3318
- } else if (typeof cb === "function") {
3319
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
3320
- this.send(command, optionsOrCb || {}, cb);
3321
- } else {
3322
- return this.send(command, optionsOrCb);
3323
- }
3324
- }
3325
-
3326
- /**
3327
- * <p>Schedules the deletion of a KMS key. By default, KMS applies a waiting
3328
- * period of 30 days, but you can specify a waiting period of 7-30 days. When this operation is
3329
- * successful, the key state of the KMS key changes to <code>PendingDeletion</code> and the key can't
3330
- * be used in any cryptographic operations. It remains in this state for the duration of the
3331
- * waiting period. Before the waiting period ends, you can use <a>CancelKeyDeletion</a> to cancel the deletion of the KMS key. After the waiting period ends, KMS deletes the KMS key,
3332
- * its key material, and all KMS data associated with it, including all aliases that refer to
3333
- * it.</p>
3334
- * <important>
3335
- * <p>Deleting a KMS key is a destructive and potentially dangerous operation. When a KMS key is
3336
- * deleted, all data that was encrypted under the KMS key is unrecoverable. (The only exception is
3337
- * a multi-Region replica key.) To prevent the use of a KMS key without deleting it, use <a>DisableKey</a>. </p>
3338
- * </important>
3339
- * <p>If you schedule deletion of a KMS key from a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a>, when the waiting period
3340
- * expires, <code>ScheduleKeyDeletion</code> deletes the KMS key from KMS. Then KMS makes a best
3341
- * effort to delete the key material from the associated CloudHSM cluster. However, you might need
3342
- * to manually <a href="https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-orphaned-key">delete the orphaned key
3343
- * material</a> from the cluster and its backups.</p>
3344
- * <p>You can schedule the deletion of a multi-Region primary key and its replica keys at any
3345
- * time. However, KMS will not delete a multi-Region primary key with existing replica keys. If
3346
- * you schedule the deletion of a primary key with replicas, its key state changes to
3347
- * <code>PendingReplicaDeletion</code> and it cannot be replicated or used in cryptographic
3348
- * operations. This status can continue indefinitely. When the last of its replicas keys is
3349
- * deleted (not just scheduled), the key state of the primary key changes to
3350
- * <code>PendingDeletion</code> and its waiting period (<code>PendingWindowInDays</code>)
3351
- * begins. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-delete.html">Deleting multi-Region keys</a> in the <i>Key Management Service Developer Guide</i>. </p>
3352
- * <p>For more information about scheduling a KMS key for deletion, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html">Deleting KMS keys</a> in the
3353
- * <i>Key Management Service Developer Guide</i>.</p>
3354
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
3355
- * 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>
3356
- *
3357
- * <p>
3358
- * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
3359
- *
3360
- *
3361
- * <p>
3362
- * <b>Required permissions</b>: kms:ScheduleKeyDeletion (key policy)</p>
3363
- * <p>
3364
- * <b>Related operations</b>
3365
- * </p>
3366
- * <ul>
3367
- * <li>
3368
- * <p>
3369
- * <a>CancelKeyDeletion</a>
3370
- * </p>
3371
- * </li>
3372
- * <li>
3373
- * <p>
3374
- * <a>DisableKey</a>
3375
- * </p>
3376
- * </li>
3377
- * </ul>
3378
- */
3379
- public scheduleKeyDeletion(
3380
- args: ScheduleKeyDeletionCommandInput,
3381
- options?: __HttpHandlerOptions
3382
- ): Promise<ScheduleKeyDeletionCommandOutput>;
3383
- public scheduleKeyDeletion(
3384
- args: ScheduleKeyDeletionCommandInput,
3385
- cb: (err: any, data?: ScheduleKeyDeletionCommandOutput) => void
3386
- ): void;
3387
- public scheduleKeyDeletion(
3388
- args: ScheduleKeyDeletionCommandInput,
3389
- options: __HttpHandlerOptions,
3390
- cb: (err: any, data?: ScheduleKeyDeletionCommandOutput) => void
3391
- ): void;
3392
- public scheduleKeyDeletion(
3393
- args: ScheduleKeyDeletionCommandInput,
3394
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ScheduleKeyDeletionCommandOutput) => void),
3395
- cb?: (err: any, data?: ScheduleKeyDeletionCommandOutput) => void
3396
- ): Promise<ScheduleKeyDeletionCommandOutput> | void {
3397
- const command = new ScheduleKeyDeletionCommand(args);
3398
- if (typeof optionsOrCb === "function") {
3399
- this.send(command, optionsOrCb);
3400
- } else if (typeof cb === "function") {
3401
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
3402
- this.send(command, optionsOrCb || {}, cb);
3403
- } else {
3404
- return this.send(command, optionsOrCb);
3405
- }
3406
- }
3407
-
3408
- /**
3409
- * <p>Creates a <a href="https://en.wikipedia.org/wiki/Digital_signature">digital
3410
- * signature</a> for a message or message digest by using the private key in an asymmetric KMS key. To verify the signature, use the <a>Verify</a> operation, or use the public
3411
- * key in the same asymmetric KMS key outside of KMS. For information about symmetric and asymmetric KMS keys, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using Symmetric and Asymmetric KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
3412
- * <p>Digital signatures are generated and verified by using asymmetric key pair, such as an RSA
3413
- * or ECC pair that is represented by an asymmetric KMS key. The key owner (or
3414
- * an authorized user) uses their private key to sign a message. Anyone with the public key can
3415
- * verify that the message was signed with that particular private key and that the message
3416
- * hasn't changed since it was signed. </p>
3417
- * <p>To use the <code>Sign</code> operation, provide the following information:</p>
3418
- * <ul>
3419
- * <li>
3420
- * <p>Use the <code>KeyId</code> parameter to identify an asymmetric KMS key with a
3421
- * <code>KeyUsage</code> value of <code>SIGN_VERIFY</code>. To get the
3422
- * <code>KeyUsage</code> value of a KMS key, use the <a>DescribeKey</a> operation.
3423
- * The caller must have <code>kms:Sign</code> permission on the KMS key.</p>
3424
- * </li>
3425
- * <li>
3426
- * <p>Use the <code>Message</code> parameter to specify the message or message digest to
3427
- * sign. You can submit messages of up to 4096 bytes. To sign a larger message, generate a
3428
- * hash digest of the message, and then provide the hash digest in the <code>Message</code>
3429
- * parameter. To indicate whether the message is a full message or a digest, use the
3430
- * <code>MessageType</code> parameter.</p>
3431
- * </li>
3432
- * <li>
3433
- * <p>Choose a signing algorithm that is compatible with the KMS key. </p>
3434
- * </li>
3435
- * </ul>
3436
- * <important>
3437
- * <p>When signing a message, be sure to record the KMS key and the signing algorithm. This
3438
- * information is required to verify the signature.</p>
3439
- * </important>
3440
- * <p>To verify the signature that this operation generates, use the <a>Verify</a>
3441
- * operation. Or use the <a>GetPublicKey</a> operation to download the public key and
3442
- * then use the public key to verify the signature outside of KMS. </p>
3443
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
3444
- * 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>
3445
- * <p>
3446
- * <b>Cross-account use</b>: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
3447
- * the key ARN or alias ARN in the value of the <code>KeyId</code> parameter.</p>
3448
- *
3449
- * <p>
3450
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:Sign</a> (key policy)</p>
3451
- * <p>
3452
- * <b>Related operations</b>: <a>Verify</a>
3453
- * </p>
3454
- */
3455
- public sign(args: SignCommandInput, options?: __HttpHandlerOptions): Promise<SignCommandOutput>;
3456
- public sign(args: SignCommandInput, cb: (err: any, data?: SignCommandOutput) => void): void;
3457
- public sign(
3458
- args: SignCommandInput,
3459
- options: __HttpHandlerOptions,
3460
- cb: (err: any, data?: SignCommandOutput) => void
3461
- ): void;
3462
- public sign(
3463
- args: SignCommandInput,
3464
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: SignCommandOutput) => void),
3465
- cb?: (err: any, data?: SignCommandOutput) => void
3466
- ): Promise<SignCommandOutput> | void {
3467
- const command = new SignCommand(args);
3468
- if (typeof optionsOrCb === "function") {
3469
- this.send(command, optionsOrCb);
3470
- } else if (typeof cb === "function") {
3471
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
3472
- this.send(command, optionsOrCb || {}, cb);
3473
- } else {
3474
- return this.send(command, optionsOrCb);
3475
- }
3476
- }
3477
-
3478
- /**
3479
- * <p>Adds or edits tags on a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a>.</p>
3480
- * <note>
3481
- * <p>Tagging or untagging a KMS key can allow or deny permission to the KMS key. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/abac.html">Using ABAC in KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
3482
- * </note>
3483
- * <p>Each tag consists of a tag key and a tag value, both of which are case-sensitive strings.
3484
- * The tag value can be an empty (null) string. To add a tag, specify a new tag key and a tag
3485
- * value. To edit a tag, specify an existing tag key and a new tag value.</p>
3486
- * <p>You can use this operation to tag a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a>, but you cannot
3487
- * tag an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a>, an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk">Amazon Web Services owned key</a>, a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#keystore-concept">custom key store</a>, or
3488
- * an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#alias-concept">alias</a>.</p>
3489
- * <p>You can also add tags to a KMS key while creating it (<a>CreateKey</a>) or replicating it (<a>ReplicateKey</a>).</p>
3490
- * <p>For information about using tags in KMS, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html">Tagging keys</a>. For general information about
3491
- * tags, including the format and syntax, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon
3492
- * Web Services General Reference</i>. </p>
3493
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
3494
- * 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>
3495
- * <p>
3496
- * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account. </p>
3497
- *
3498
- * <p>
3499
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:TagResource</a> (key policy)</p>
3500
- * <p>
3501
- * <b>Related operations</b>
3502
- * </p>
3503
- * <ul>
3504
- * <li>
3505
- * <p>
3506
- * <a>CreateKey</a>
3507
- * </p>
3508
- * </li>
3509
- * <li>
3510
- * <p>
3511
- * <a>ListResourceTags</a>
3512
- * </p>
3513
- * </li>
3514
- * <li>
3515
- * <p>
3516
- * <a>ReplicateKey</a>
3517
- * </p>
3518
- * </li>
3519
- * <li>
3520
- * <p>
3521
- * <a>UntagResource</a>
3522
- * </p>
3523
- * </li>
3524
- * </ul>
3525
- */
3526
- public tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise<TagResourceCommandOutput>;
3527
- public tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
3528
- public tagResource(
3529
- args: TagResourceCommandInput,
3530
- options: __HttpHandlerOptions,
3531
- cb: (err: any, data?: TagResourceCommandOutput) => void
3532
- ): void;
3533
- public tagResource(
3534
- args: TagResourceCommandInput,
3535
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: TagResourceCommandOutput) => void),
3536
- cb?: (err: any, data?: TagResourceCommandOutput) => void
3537
- ): Promise<TagResourceCommandOutput> | void {
3538
- const command = new TagResourceCommand(args);
3539
- if (typeof optionsOrCb === "function") {
3540
- this.send(command, optionsOrCb);
3541
- } else if (typeof cb === "function") {
3542
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
3543
- this.send(command, optionsOrCb || {}, cb);
3544
- } else {
3545
- return this.send(command, optionsOrCb);
3546
- }
3547
- }
3548
-
3549
- /**
3550
- * <p>Deletes tags from a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a>. To delete a tag,
3551
- * specify the tag key and the KMS key.</p>
3552
- * <note>
3553
- * <p>Tagging or untagging a KMS key can allow or deny permission to the KMS key. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/abac.html">Using ABAC in KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
3554
- * </note>
3555
- * <p>When it succeeds, the <code>UntagResource</code> operation doesn't return any output.
3556
- * Also, if the specified tag key isn't found on the KMS key, it doesn't throw an exception or return
3557
- * a response. To confirm that the operation worked, use the <a>ListResourceTags</a> operation.</p>
3558
- *
3559
- * <p>For information about using tags in KMS, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html">Tagging keys</a>. For general information about
3560
- * tags, including the format and syntax, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon
3561
- * Web Services General Reference</i>. </p>
3562
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
3563
- * 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>
3564
- * <p>
3565
- * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.</p>
3566
- *
3567
- * <p>
3568
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:UntagResource</a> (key policy)</p>
3569
- * <p>
3570
- * <b>Related operations</b>
3571
- * </p>
3572
- * <ul>
3573
- * <li>
3574
- * <p>
3575
- * <a>CreateKey</a>
3576
- * </p>
3577
- * </li>
3578
- * <li>
3579
- * <p>
3580
- * <a>ListResourceTags</a>
3581
- * </p>
3582
- * </li>
3583
- * <li>
3584
- * <p>
3585
- * <a>ReplicateKey</a>
3586
- * </p>
3587
- * </li>
3588
- * <li>
3589
- * <p>
3590
- * <a>TagResource</a>
3591
- * </p>
3592
- * </li>
3593
- * </ul>
3594
- */
3595
- public untagResource(
3596
- args: UntagResourceCommandInput,
3597
- options?: __HttpHandlerOptions
3598
- ): Promise<UntagResourceCommandOutput>;
3599
- public untagResource(
3600
- args: UntagResourceCommandInput,
3601
- cb: (err: any, data?: UntagResourceCommandOutput) => void
3602
- ): void;
3603
- public untagResource(
3604
- args: UntagResourceCommandInput,
3605
- options: __HttpHandlerOptions,
3606
- cb: (err: any, data?: UntagResourceCommandOutput) => void
3607
- ): void;
3608
- public untagResource(
3609
- args: UntagResourceCommandInput,
3610
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UntagResourceCommandOutput) => void),
3611
- cb?: (err: any, data?: UntagResourceCommandOutput) => void
3612
- ): Promise<UntagResourceCommandOutput> | void {
3613
- const command = new UntagResourceCommand(args);
3614
- if (typeof optionsOrCb === "function") {
3615
- this.send(command, optionsOrCb);
3616
- } else if (typeof cb === "function") {
3617
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
3618
- this.send(command, optionsOrCb || {}, cb);
3619
- } else {
3620
- return this.send(command, optionsOrCb);
3621
- }
3622
- }
3623
-
3624
- /**
3625
- * <p>Associates an existing KMS alias with a different KMS key. Each alias
3626
- * is associated with only one KMS key at a time, although a KMS key can have multiple aliases. The alias
3627
- * and the KMS key must be in the same Amazon Web Services account and Region.</p>
3628
- * <note>
3629
- * <p>Adding, deleting, or updating an alias can allow or deny permission to the KMS key. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/abac.html">Using ABAC in KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
3630
- * </note>
3631
- * <p>The current and new KMS key must be the same type (both symmetric or both asymmetric), and
3632
- * they must have the same key usage (<code>ENCRYPT_DECRYPT</code> or <code>SIGN_VERIFY</code>).
3633
- * This restriction prevents errors in code that uses aliases. If you must assign an alias to a
3634
- * different type of KMS key, use <a>DeleteAlias</a> to delete the old alias and <a>CreateAlias</a> to create a new alias.</p>
3635
- * <p>You cannot use <code>UpdateAlias</code> to change an alias name. To change an alias name,
3636
- * use <a>DeleteAlias</a> to delete the old alias and <a>CreateAlias</a> to
3637
- * create a new alias.</p>
3638
- * <p>Because an alias is not a property of a KMS key, you can create, update, and delete the
3639
- * aliases of a KMS key without affecting the KMS key. Also, aliases do not appear in the response from
3640
- * the <a>DescribeKey</a> operation. To get the aliases of all KMS keys in the account,
3641
- * use the <a>ListAliases</a> operation. </p>
3642
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
3643
- * 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>
3644
- * <p>
3645
- * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account. </p>
3646
- * <p>
3647
- * <b>Required permissions</b>
3648
- * </p>
3649
- * <ul>
3650
- * <li>
3651
- * <p>
3652
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:UpdateAlias</a> on the alias (IAM policy).</p>
3653
- * </li>
3654
- * <li>
3655
- * <p>
3656
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:UpdateAlias</a> on the current KMS key (key policy).</p>
3657
- * </li>
3658
- * <li>
3659
- * <p>
3660
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:UpdateAlias</a> on the new KMS key (key policy).</p>
3661
- * </li>
3662
- * </ul>
3663
- * <p>For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access">Controlling access to aliases</a> in the <i>Key Management Service Developer Guide</i>.</p>
3664
- * <p>
3665
- * <b>Related operations:</b>
3666
- * </p>
3667
- * <ul>
3668
- * <li>
3669
- * <p>
3670
- * <a>CreateAlias</a>
3671
- * </p>
3672
- * </li>
3673
- * <li>
3674
- * <p>
3675
- * <a>DeleteAlias</a>
3676
- * </p>
3677
- * </li>
3678
- * <li>
3679
- * <p>
3680
- * <a>ListAliases</a>
3681
- * </p>
3682
- * </li>
3683
- * </ul>
3684
- */
3685
- public updateAlias(args: UpdateAliasCommandInput, options?: __HttpHandlerOptions): Promise<UpdateAliasCommandOutput>;
3686
- public updateAlias(args: UpdateAliasCommandInput, cb: (err: any, data?: UpdateAliasCommandOutput) => void): void;
3687
- public updateAlias(
3688
- args: UpdateAliasCommandInput,
3689
- options: __HttpHandlerOptions,
3690
- cb: (err: any, data?: UpdateAliasCommandOutput) => void
3691
- ): void;
3692
- public updateAlias(
3693
- args: UpdateAliasCommandInput,
3694
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateAliasCommandOutput) => void),
3695
- cb?: (err: any, data?: UpdateAliasCommandOutput) => void
3696
- ): Promise<UpdateAliasCommandOutput> | void {
3697
- const command = new UpdateAliasCommand(args);
3698
- if (typeof optionsOrCb === "function") {
3699
- this.send(command, optionsOrCb);
3700
- } else if (typeof cb === "function") {
3701
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
3702
- this.send(command, optionsOrCb || {}, cb);
3703
- } else {
3704
- return this.send(command, optionsOrCb);
3705
- }
3706
- }
3707
-
3708
- /**
3709
- * <p>Changes the properties of a custom key store. Use the <code>CustomKeyStoreId</code>
3710
- * parameter to identify the custom key store you want to edit. Use the remaining parameters to
3711
- * change the properties of the custom key store.</p>
3712
- * <p>You can only update a custom key store that is disconnected. To disconnect the custom key
3713
- * store, use <a>DisconnectCustomKeyStore</a>. To reconnect the custom key store after
3714
- * the update completes, use <a>ConnectCustomKeyStore</a>. To find the connection
3715
- * state of a custom key store, use the <a>DescribeCustomKeyStores</a>
3716
- * operation.</p>
3717
- * <p>Use the parameters of <code>UpdateCustomKeyStore</code> to edit your keystore
3718
- * settings.</p>
3719
- * <ul>
3720
- * <li>
3721
- * <p>Use the <b>NewCustomKeyStoreName</b> parameter to change the
3722
- * friendly name of the custom key store to the value that you specify.</p>
3723
- * <p> </p>
3724
- * </li>
3725
- * <li>
3726
- * <p>Use the <b>KeyStorePassword</b> parameter tell KMS the
3727
- * current password of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser">
3728
- * <code>kmsuser</code> crypto
3729
- * user (CU)</a> in the associated CloudHSM cluster. You can use this parameter to <a href="https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-password">fix
3730
- * connection failures</a> that occur when KMS cannot log into the associated cluster
3731
- * because the <code>kmsuser</code> password has changed. This value does not change the
3732
- * password in the CloudHSM cluster.</p>
3733
- * <p> </p>
3734
- * </li>
3735
- * <li>
3736
- * <p>Use the <b>CloudHsmClusterId</b> parameter to associate the
3737
- * custom key store with a different, but related, CloudHSM cluster. You can use this parameter
3738
- * to repair a custom key store if its CloudHSM cluster becomes corrupted or is deleted, or when
3739
- * you need to create or restore a cluster from a backup. </p>
3740
- * </li>
3741
- * </ul>
3742
- * <p>If the operation succeeds, it returns a JSON object with no
3743
- * properties.</p>
3744
- * <p>This operation is part of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">Custom Key Store feature</a> feature in KMS, which
3745
- * combines the convenience and extensive integration of KMS with the isolation and control of a
3746
- * single-tenant key store.</p>
3747
- *
3748
- * <p>
3749
- * <b>Cross-account use</b>: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account. </p>
3750
- * <p>
3751
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:UpdateCustomKeyStore</a> (IAM policy)</p>
3752
- * <p>
3753
- * <b>Related operations:</b>
3754
- * </p>
3755
- * <ul>
3756
- * <li>
3757
- * <p>
3758
- * <a>ConnectCustomKeyStore</a>
3759
- * </p>
3760
- * </li>
3761
- * <li>
3762
- * <p>
3763
- * <a>CreateCustomKeyStore</a>
3764
- * </p>
3765
- * </li>
3766
- * <li>
3767
- * <p>
3768
- * <a>DeleteCustomKeyStore</a>
3769
- * </p>
3770
- * </li>
3771
- * <li>
3772
- * <p>
3773
- * <a>DescribeCustomKeyStores</a>
3774
- * </p>
3775
- * </li>
3776
- * <li>
3777
- * <p>
3778
- * <a>DisconnectCustomKeyStore</a>
3779
- * </p>
3780
- * </li>
3781
- * </ul>
3782
- */
3783
- public updateCustomKeyStore(
3784
- args: UpdateCustomKeyStoreCommandInput,
3785
- options?: __HttpHandlerOptions
3786
- ): Promise<UpdateCustomKeyStoreCommandOutput>;
3787
- public updateCustomKeyStore(
3788
- args: UpdateCustomKeyStoreCommandInput,
3789
- cb: (err: any, data?: UpdateCustomKeyStoreCommandOutput) => void
3790
- ): void;
3791
- public updateCustomKeyStore(
3792
- args: UpdateCustomKeyStoreCommandInput,
3793
- options: __HttpHandlerOptions,
3794
- cb: (err: any, data?: UpdateCustomKeyStoreCommandOutput) => void
3795
- ): void;
3796
- public updateCustomKeyStore(
3797
- args: UpdateCustomKeyStoreCommandInput,
3798
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateCustomKeyStoreCommandOutput) => void),
3799
- cb?: (err: any, data?: UpdateCustomKeyStoreCommandOutput) => void
3800
- ): Promise<UpdateCustomKeyStoreCommandOutput> | void {
3801
- const command = new UpdateCustomKeyStoreCommand(args);
3802
- if (typeof optionsOrCb === "function") {
3803
- this.send(command, optionsOrCb);
3804
- } else if (typeof cb === "function") {
3805
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
3806
- this.send(command, optionsOrCb || {}, cb);
3807
- } else {
3808
- return this.send(command, optionsOrCb);
3809
- }
3810
- }
3811
-
3812
- /**
3813
- * <p>Updates the description of a KMS key. To see the description of a KMS key,
3814
- * use <a>DescribeKey</a>. </p>
3815
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
3816
- * 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>
3817
- * <p>
3818
- * <b>Cross-account use</b>: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account. </p>
3819
- *
3820
- * <p>
3821
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:UpdateKeyDescription</a> (key policy)</p>
3822
- * <p>
3823
- * <b>Related operations</b>
3824
- * </p>
3825
- * <ul>
3826
- * <li>
3827
- * <p>
3828
- * <a>CreateKey</a>
3829
- * </p>
3830
- * </li>
3831
- * <li>
3832
- * <p>
3833
- * <a>DescribeKey</a>
3834
- * </p>
3835
- * </li>
3836
- * </ul>
3837
- */
3838
- public updateKeyDescription(
3839
- args: UpdateKeyDescriptionCommandInput,
3840
- options?: __HttpHandlerOptions
3841
- ): Promise<UpdateKeyDescriptionCommandOutput>;
3842
- public updateKeyDescription(
3843
- args: UpdateKeyDescriptionCommandInput,
3844
- cb: (err: any, data?: UpdateKeyDescriptionCommandOutput) => void
3845
- ): void;
3846
- public updateKeyDescription(
3847
- args: UpdateKeyDescriptionCommandInput,
3848
- options: __HttpHandlerOptions,
3849
- cb: (err: any, data?: UpdateKeyDescriptionCommandOutput) => void
3850
- ): void;
3851
- public updateKeyDescription(
3852
- args: UpdateKeyDescriptionCommandInput,
3853
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateKeyDescriptionCommandOutput) => void),
3854
- cb?: (err: any, data?: UpdateKeyDescriptionCommandOutput) => void
3855
- ): Promise<UpdateKeyDescriptionCommandOutput> | void {
3856
- const command = new UpdateKeyDescriptionCommand(args);
3857
- if (typeof optionsOrCb === "function") {
3858
- this.send(command, optionsOrCb);
3859
- } else if (typeof cb === "function") {
3860
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
3861
- this.send(command, optionsOrCb || {}, cb);
3862
- } else {
3863
- return this.send(command, optionsOrCb);
3864
- }
3865
- }
3866
-
3867
- /**
3868
- * <p>Changes the primary key of a multi-Region key. </p>
3869
- * <p>This operation changes the replica key in the specified Region to a primary key and
3870
- * changes the former primary key to a replica key. For example, suppose you have a primary key
3871
- * in <code>us-east-1</code> and a replica key in <code>eu-west-2</code>. If you run
3872
- * <code>UpdatePrimaryRegion</code> with a <code>PrimaryRegion</code> value of
3873
- * <code>eu-west-2</code>, the primary key is now the key in <code>eu-west-2</code>, and the
3874
- * key in <code>us-east-1</code> becomes a replica key. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-update">Updating the primary Region</a> in the <i>Key Management Service Developer Guide</i>.</p>
3875
- * <p>This operation supports <i>multi-Region keys</i>, an KMS feature that lets you create multiple
3876
- * interoperable KMS keys in different Amazon Web Services Regions. Because these KMS keys have the same key ID, key
3877
- * material, and other metadata, you can use them interchangeably to encrypt data in one Amazon Web Services Region and decrypt
3878
- * it in a different Amazon Web Services Region without re-encrypting the data or making a cross-Region call. For more information about multi-Region keys, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html">Using multi-Region keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
3879
- * <p>The <i>primary key</i> of a multi-Region key is the source for properties
3880
- * that are always shared by primary and replica keys, including the key material, <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-id">key ID</a>, <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-spec">key spec</a>, <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-usage">key usage</a>, <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-origin">key material
3881
- * origin</a>, and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html">automatic
3882
- * key rotation</a>. It's the only key that can be replicated. You cannot <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_ScheduleKeyDeletion.html">delete the primary
3883
- * key</a> until all replica keys are deleted.</p>
3884
- * <p>The key ID and primary Region that you specify uniquely identify the replica key that will
3885
- * become the primary key. The primary Region must already have a replica key. This operation
3886
- * does not create a KMS key in the specified Region. To find the replica keys, use the <a>DescribeKey</a> operation on the primary key or any replica key. To create a replica
3887
- * key, use the <a>ReplicateKey</a> operation.</p>
3888
- * <p>You can run this operation while using the affected multi-Region keys in cryptographic
3889
- * operations. This operation should not delay, interrupt, or cause failures in cryptographic
3890
- * operations. </p>
3891
- * <p>Even after this operation completes, the process of updating the primary Region might
3892
- * still be in progress for a few more seconds. Operations such as <code>DescribeKey</code> might
3893
- * display both the old and new primary keys as replicas. The old and new primary keys have a
3894
- * transient key state of <code>Updating</code>. The original key state is restored when the
3895
- * update is complete. While the key state is <code>Updating</code>, you can use the keys in
3896
- * cryptographic operations, but you cannot replicate the new primary key or perform certain
3897
- * management operations, such as enabling or disabling these keys. For details about the
3898
- * <code>Updating</code> key state, see <a href="kms/latest/developerguide/key-state.html">Key state:
3899
- * Effect on your KMS key</a> in the <i>Key Management Service Developer Guide</i>.</p>
3900
- * <p>This operation does not return any output. To verify that primary key is changed, use the
3901
- * <a>DescribeKey</a> operation.</p>
3902
- * <p>
3903
- * <b>Cross-account use</b>: No. You cannot use this operation in a
3904
- * different Amazon Web Services account. </p>
3905
- * <p>
3906
- * <b>Required permissions</b>: </p>
3907
- * <ul>
3908
- * <li>
3909
- * <p>
3910
- * <code>kms:UpdatePrimaryRegion</code> on the current primary key (in the primary key's
3911
- * Region). Include this permission primary key's key policy.</p>
3912
- * </li>
3913
- * <li>
3914
- * <p>
3915
- * <code>kms:UpdatePrimaryRegion</code> on the current replica key (in the replica key's
3916
- * Region). Include this permission in the replica key's key policy.</p>
3917
- * </li>
3918
- * </ul>
3919
- * <p>
3920
- * <b>Related operations</b>
3921
- * </p>
3922
- * <ul>
3923
- * <li>
3924
- * <p>
3925
- * <a>CreateKey</a>
3926
- * </p>
3927
- * </li>
3928
- * <li>
3929
- * <p>
3930
- * <a>ReplicateKey</a>
3931
- * </p>
3932
- * </li>
3933
- * </ul>
3934
- */
3935
- public updatePrimaryRegion(
3936
- args: UpdatePrimaryRegionCommandInput,
3937
- options?: __HttpHandlerOptions
3938
- ): Promise<UpdatePrimaryRegionCommandOutput>;
3939
- public updatePrimaryRegion(
3940
- args: UpdatePrimaryRegionCommandInput,
3941
- cb: (err: any, data?: UpdatePrimaryRegionCommandOutput) => void
3942
- ): void;
3943
- public updatePrimaryRegion(
3944
- args: UpdatePrimaryRegionCommandInput,
3945
- options: __HttpHandlerOptions,
3946
- cb: (err: any, data?: UpdatePrimaryRegionCommandOutput) => void
3947
- ): void;
3948
- public updatePrimaryRegion(
3949
- args: UpdatePrimaryRegionCommandInput,
3950
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdatePrimaryRegionCommandOutput) => void),
3951
- cb?: (err: any, data?: UpdatePrimaryRegionCommandOutput) => void
3952
- ): Promise<UpdatePrimaryRegionCommandOutput> | void {
3953
- const command = new UpdatePrimaryRegionCommand(args);
3954
- if (typeof optionsOrCb === "function") {
3955
- this.send(command, optionsOrCb);
3956
- } else if (typeof cb === "function") {
3957
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
3958
- this.send(command, optionsOrCb || {}, cb);
3959
- } else {
3960
- return this.send(command, optionsOrCb);
3961
- }
3962
- }
3963
-
3964
- /**
3965
- * <p>Verifies a digital signature that was generated by the <a>Sign</a> operation. </p>
3966
- * <p></p>
3967
- * <p>Verification confirms that an authorized user signed the message with the specified KMS key
3968
- * and signing algorithm, and the message hasn't changed since it was signed. If the signature is
3969
- * verified, the value of the <code>SignatureValid</code> field in the response is
3970
- * <code>True</code>. If the signature verification fails, the <code>Verify</code> operation
3971
- * fails with an <code>KMSInvalidSignatureException</code> exception.</p>
3972
- * <p>A digital signature is generated by using the private key in an asymmetric KMS key. The
3973
- * signature is verified by using the public key in the same asymmetric KMS key.
3974
- * For information about symmetric and asymmetric KMS keys, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using Symmetric and Asymmetric KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
3975
- * <p>To verify a digital signature, you can use the <code>Verify</code> operation. Specify the
3976
- * same asymmetric KMS key, message, and signing algorithm that were used to produce the
3977
- * signature.</p>
3978
- * <p>You can also verify the digital signature by using the public key of the KMS key outside of
3979
- * KMS. Use the <a>GetPublicKey</a> operation to download the public key in the
3980
- * asymmetric KMS key and then use the public key to verify the signature outside of KMS. The
3981
- * advantage of using the <code>Verify</code> operation is that it is performed within KMS. As
3982
- * a result, it's easy to call, the operation is performed within the FIPS boundary, it is logged
3983
- * in CloudTrail, and you can use key policy and IAM policy to determine who is authorized to use
3984
- * the KMS key to verify signatures.</p>
3985
- * <p>The KMS key that you use for this operation must be in a compatible key state. For
3986
- * 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>
3987
- * <p>
3988
- * <b>Cross-account use</b>: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
3989
- * the key ARN or alias ARN in the value of the <code>KeyId</code> parameter. </p>
3990
- *
3991
- * <p>
3992
- * <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:Verify</a> (key policy)</p>
3993
- * <p>
3994
- * <b>Related operations</b>: <a>Sign</a>
3995
- * </p>
3996
- */
3997
- public verify(args: VerifyCommandInput, options?: __HttpHandlerOptions): Promise<VerifyCommandOutput>;
3998
- public verify(args: VerifyCommandInput, cb: (err: any, data?: VerifyCommandOutput) => void): void;
3999
- public verify(
4000
- args: VerifyCommandInput,
4001
- options: __HttpHandlerOptions,
4002
- cb: (err: any, data?: VerifyCommandOutput) => void
4003
- ): void;
4004
- public verify(
4005
- args: VerifyCommandInput,
4006
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: VerifyCommandOutput) => void),
4007
- cb?: (err: any, data?: VerifyCommandOutput) => void
4008
- ): Promise<VerifyCommandOutput> | void {
4009
- const command = new VerifyCommand(args);
4010
- if (typeof optionsOrCb === "function") {
4011
- this.send(command, optionsOrCb);
4012
- } else if (typeof cb === "function") {
4013
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
4014
- this.send(command, optionsOrCb || {}, cb);
4015
- } else {
4016
- return this.send(command, optionsOrCb);
4017
- }
4018
- }
4019
- }