@aws-sdk/client-kms 3.32.0 → 3.36.0

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