@aws-sdk/client-kms 3.35.0 → 3.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (421) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +8 -7
  3. package/dist-cjs/KMS.js +8 -8
  4. package/dist-cjs/KMSClient.js +8 -8
  5. package/dist-cjs/commands/CancelKeyDeletionCommand.js +6 -5
  6. package/dist-cjs/commands/ConnectCustomKeyStoreCommand.js +3 -4
  7. package/dist-cjs/commands/CreateAliasCommand.js +11 -8
  8. package/dist-cjs/commands/CreateCustomKeyStoreCommand.js +0 -1
  9. package/dist-cjs/commands/CreateGrantCommand.js +14 -12
  10. package/dist-cjs/commands/CreateKeyCommand.js +16 -15
  11. package/dist-cjs/commands/DecryptCommand.js +24 -22
  12. package/dist-cjs/commands/DeleteAliasCommand.js +11 -8
  13. package/dist-cjs/commands/DeleteCustomKeyStoreCommand.js +10 -12
  14. package/dist-cjs/commands/DeleteImportedKeyMaterialCommand.js +5 -7
  15. package/dist-cjs/commands/DescribeCustomKeyStoresCommand.js +4 -5
  16. package/dist-cjs/commands/DescribeKeyCommand.js +12 -11
  17. package/dist-cjs/commands/DisableKeyCommand.js +5 -5
  18. package/dist-cjs/commands/DisableKeyRotationCommand.js +2 -2
  19. package/dist-cjs/commands/DisconnectCustomKeyStoreCommand.js +6 -5
  20. package/dist-cjs/commands/EnableKeyCommand.js +4 -3
  21. package/dist-cjs/commands/EnableKeyRotationCommand.js +2 -2
  22. package/dist-cjs/commands/EncryptCommand.js +14 -13
  23. package/dist-cjs/commands/GenerateDataKeyCommand.js +15 -13
  24. package/dist-cjs/commands/GenerateDataKeyPairCommand.js +15 -14
  25. package/dist-cjs/commands/GenerateDataKeyPairWithoutPlaintextCommand.js +16 -14
  26. package/dist-cjs/commands/GenerateDataKeyWithoutPlaintextCommand.js +11 -10
  27. package/dist-cjs/commands/GenerateRandomCommand.js +2 -2
  28. package/dist-cjs/commands/GetKeyPolicyCommand.js +0 -1
  29. package/dist-cjs/commands/GetKeyRotationStatusCommand.js +2 -2
  30. package/dist-cjs/commands/GetParametersForImportCommand.js +7 -9
  31. package/dist-cjs/commands/GetPublicKeyCommand.js +7 -6
  32. package/dist-cjs/commands/ImportKeyMaterialCommand.js +13 -14
  33. package/dist-cjs/commands/ListAliasesCommand.js +13 -11
  34. package/dist-cjs/commands/ListGrantsCommand.js +2 -3
  35. package/dist-cjs/commands/ListKeyPoliciesCommand.js +3 -4
  36. package/dist-cjs/commands/ListKeysCommand.js +1 -3
  37. package/dist-cjs/commands/ListResourceTagsCommand.js +0 -1
  38. package/dist-cjs/commands/ListRetirableGrantsCommand.js +7 -7
  39. package/dist-cjs/commands/PutKeyPolicyCommand.js +0 -1
  40. package/dist-cjs/commands/ReEncryptCommand.js +33 -28
  41. package/dist-cjs/commands/ReplicateKeyCommand.js +5 -6
  42. package/dist-cjs/commands/RetireGrantCommand.js +7 -6
  43. package/dist-cjs/commands/RevokeGrantCommand.js +1 -3
  44. package/dist-cjs/commands/ScheduleKeyDeletionCommand.js +19 -16
  45. package/dist-cjs/commands/SignCommand.js +10 -10
  46. package/dist-cjs/commands/TagResourceCommand.js +6 -5
  47. package/dist-cjs/commands/UntagResourceCommand.js +3 -4
  48. package/dist-cjs/commands/UpdateAliasCommand.js +15 -12
  49. package/dist-cjs/commands/UpdateCustomKeyStoreCommand.js +17 -18
  50. package/dist-cjs/commands/UpdateKeyDescriptionCommand.js +3 -4
  51. package/dist-cjs/commands/UpdatePrimaryRegionCommand.js +1 -2
  52. package/dist-cjs/commands/VerifyCommand.js +5 -6
  53. package/dist-cjs/endpoints.js +0 -1
  54. package/dist-cjs/index.js +0 -1
  55. package/dist-cjs/models/index.js +0 -1
  56. package/dist-cjs/models/models_0.js +0 -1
  57. package/dist-cjs/pagination/Interfaces.js +0 -1
  58. package/dist-cjs/pagination/ListAliasesPaginator.js +0 -1
  59. package/dist-cjs/pagination/ListGrantsPaginator.js +0 -1
  60. package/dist-cjs/pagination/ListKeyPoliciesPaginator.js +0 -1
  61. package/dist-cjs/pagination/ListKeysPaginator.js +0 -1
  62. package/dist-cjs/protocols/Aws_json1_1.js +0 -1
  63. package/dist-cjs/runtimeConfig.browser.js +2 -3
  64. package/dist-cjs/runtimeConfig.js +3 -4
  65. package/dist-cjs/runtimeConfig.native.js +0 -1
  66. package/dist-cjs/runtimeConfig.shared.js +0 -1
  67. package/dist-es/KMS.js +0 -1
  68. package/dist-es/KMSClient.js +0 -1
  69. package/dist-es/commands/CancelKeyDeletionCommand.js +0 -1
  70. package/dist-es/commands/ConnectCustomKeyStoreCommand.js +0 -1
  71. package/dist-es/commands/CreateAliasCommand.js +0 -1
  72. package/dist-es/commands/CreateCustomKeyStoreCommand.js +0 -1
  73. package/dist-es/commands/CreateGrantCommand.js +0 -1
  74. package/dist-es/commands/CreateKeyCommand.js +0 -1
  75. package/dist-es/commands/DecryptCommand.js +0 -1
  76. package/dist-es/commands/DeleteAliasCommand.js +0 -1
  77. package/dist-es/commands/DeleteCustomKeyStoreCommand.js +0 -1
  78. package/dist-es/commands/DeleteImportedKeyMaterialCommand.js +0 -1
  79. package/dist-es/commands/DescribeCustomKeyStoresCommand.js +0 -1
  80. package/dist-es/commands/DescribeKeyCommand.js +0 -1
  81. package/dist-es/commands/DisableKeyCommand.js +0 -1
  82. package/dist-es/commands/DisableKeyRotationCommand.js +0 -1
  83. package/dist-es/commands/DisconnectCustomKeyStoreCommand.js +0 -1
  84. package/dist-es/commands/EnableKeyCommand.js +0 -1
  85. package/dist-es/commands/EnableKeyRotationCommand.js +0 -1
  86. package/dist-es/commands/EncryptCommand.js +0 -1
  87. package/dist-es/commands/GenerateDataKeyCommand.js +0 -1
  88. package/dist-es/commands/GenerateDataKeyPairCommand.js +0 -1
  89. package/dist-es/commands/GenerateDataKeyPairWithoutPlaintextCommand.js +0 -1
  90. package/dist-es/commands/GenerateDataKeyWithoutPlaintextCommand.js +0 -1
  91. package/dist-es/commands/GenerateRandomCommand.js +0 -1
  92. package/dist-es/commands/GetKeyPolicyCommand.js +0 -1
  93. package/dist-es/commands/GetKeyRotationStatusCommand.js +0 -1
  94. package/dist-es/commands/GetParametersForImportCommand.js +0 -1
  95. package/dist-es/commands/GetPublicKeyCommand.js +0 -1
  96. package/dist-es/commands/ImportKeyMaterialCommand.js +0 -1
  97. package/dist-es/commands/ListAliasesCommand.js +0 -1
  98. package/dist-es/commands/ListGrantsCommand.js +0 -1
  99. package/dist-es/commands/ListKeyPoliciesCommand.js +0 -1
  100. package/dist-es/commands/ListKeysCommand.js +0 -1
  101. package/dist-es/commands/ListResourceTagsCommand.js +0 -1
  102. package/dist-es/commands/ListRetirableGrantsCommand.js +0 -1
  103. package/dist-es/commands/PutKeyPolicyCommand.js +0 -1
  104. package/dist-es/commands/ReEncryptCommand.js +0 -1
  105. package/dist-es/commands/ReplicateKeyCommand.js +0 -1
  106. package/dist-es/commands/RetireGrantCommand.js +0 -1
  107. package/dist-es/commands/RevokeGrantCommand.js +0 -1
  108. package/dist-es/commands/ScheduleKeyDeletionCommand.js +0 -1
  109. package/dist-es/commands/SignCommand.js +0 -1
  110. package/dist-es/commands/TagResourceCommand.js +0 -1
  111. package/dist-es/commands/UntagResourceCommand.js +0 -1
  112. package/dist-es/commands/UpdateAliasCommand.js +0 -1
  113. package/dist-es/commands/UpdateCustomKeyStoreCommand.js +0 -1
  114. package/dist-es/commands/UpdateKeyDescriptionCommand.js +0 -1
  115. package/dist-es/commands/UpdatePrimaryRegionCommand.js +0 -1
  116. package/dist-es/commands/VerifyCommand.js +0 -1
  117. package/dist-es/endpoints.js +0 -1
  118. package/dist-es/index.js +0 -1
  119. package/dist-es/models/index.js +0 -1
  120. package/dist-es/models/models_0.js +0 -1
  121. package/dist-es/pagination/Interfaces.js +0 -1
  122. package/dist-es/pagination/ListAliasesPaginator.js +0 -1
  123. package/dist-es/pagination/ListGrantsPaginator.js +0 -1
  124. package/dist-es/pagination/ListKeyPoliciesPaginator.js +0 -1
  125. package/dist-es/pagination/ListKeysPaginator.js +0 -1
  126. package/dist-es/protocols/Aws_json1_1.js +0 -1
  127. package/dist-es/runtimeConfig.browser.js +1 -2
  128. package/dist-es/runtimeConfig.js +2 -3
  129. package/dist-es/runtimeConfig.native.js +0 -1
  130. package/dist-es/runtimeConfig.shared.js +0 -1
  131. package/dist-types/KMS.d.ts +396 -334
  132. package/dist-types/KMSClient.d.ts +8 -7
  133. package/dist-types/commands/CancelKeyDeletionCommand.d.ts +6 -4
  134. package/dist-types/commands/ConnectCustomKeyStoreCommand.d.ts +3 -3
  135. package/dist-types/commands/CreateAliasCommand.d.ts +11 -7
  136. package/dist-types/commands/CreateGrantCommand.d.ts +14 -11
  137. package/dist-types/commands/CreateKeyCommand.d.ts +16 -14
  138. package/dist-types/commands/DecryptCommand.d.ts +24 -21
  139. package/dist-types/commands/DeleteAliasCommand.d.ts +11 -7
  140. package/dist-types/commands/DeleteCustomKeyStoreCommand.d.ts +10 -11
  141. package/dist-types/commands/DeleteImportedKeyMaterialCommand.d.ts +5 -6
  142. package/dist-types/commands/DescribeCustomKeyStoresCommand.d.ts +4 -4
  143. package/dist-types/commands/DescribeKeyCommand.d.ts +12 -10
  144. package/dist-types/commands/DisableKeyCommand.d.ts +5 -4
  145. package/dist-types/commands/DisableKeyRotationCommand.d.ts +2 -1
  146. package/dist-types/commands/DisconnectCustomKeyStoreCommand.d.ts +6 -4
  147. package/dist-types/commands/EnableKeyCommand.d.ts +4 -2
  148. package/dist-types/commands/EnableKeyRotationCommand.d.ts +2 -1
  149. package/dist-types/commands/EncryptCommand.d.ts +14 -12
  150. package/dist-types/commands/GenerateDataKeyCommand.d.ts +15 -12
  151. package/dist-types/commands/GenerateDataKeyPairCommand.d.ts +15 -13
  152. package/dist-types/commands/GenerateDataKeyPairWithoutPlaintextCommand.d.ts +16 -13
  153. package/dist-types/commands/GenerateDataKeyWithoutPlaintextCommand.d.ts +11 -9
  154. package/dist-types/commands/GenerateRandomCommand.d.ts +2 -1
  155. package/dist-types/commands/GetKeyRotationStatusCommand.d.ts +2 -1
  156. package/dist-types/commands/GetParametersForImportCommand.d.ts +7 -8
  157. package/dist-types/commands/GetPublicKeyCommand.d.ts +7 -5
  158. package/dist-types/commands/ImportKeyMaterialCommand.d.ts +13 -13
  159. package/dist-types/commands/ListAliasesCommand.d.ts +13 -10
  160. package/dist-types/commands/ListGrantsCommand.d.ts +2 -2
  161. package/dist-types/commands/ListKeyPoliciesCommand.d.ts +3 -3
  162. package/dist-types/commands/ListKeysCommand.d.ts +1 -2
  163. package/dist-types/commands/ListRetirableGrantsCommand.d.ts +7 -6
  164. package/dist-types/commands/ReEncryptCommand.d.ts +33 -27
  165. package/dist-types/commands/ReplicateKeyCommand.d.ts +5 -5
  166. package/dist-types/commands/RetireGrantCommand.d.ts +7 -5
  167. package/dist-types/commands/RevokeGrantCommand.d.ts +1 -2
  168. package/dist-types/commands/ScheduleKeyDeletionCommand.d.ts +19 -15
  169. package/dist-types/commands/SignCommand.d.ts +10 -9
  170. package/dist-types/commands/TagResourceCommand.d.ts +6 -4
  171. package/dist-types/commands/UntagResourceCommand.d.ts +3 -3
  172. package/dist-types/commands/UpdateAliasCommand.d.ts +15 -11
  173. package/dist-types/commands/UpdateCustomKeyStoreCommand.d.ts +17 -17
  174. package/dist-types/commands/UpdateKeyDescriptionCommand.d.ts +3 -3
  175. package/dist-types/commands/UpdatePrimaryRegionCommand.d.ts +1 -1
  176. package/dist-types/commands/VerifyCommand.d.ts +5 -5
  177. package/dist-types/models/models_0.d.ts +296 -249
  178. package/dist-types/ts3.4/KMS.d.ts +396 -334
  179. package/dist-types/ts3.4/KMSClient.d.ts +8 -7
  180. package/dist-types/ts3.4/commands/CancelKeyDeletionCommand.d.ts +6 -4
  181. package/dist-types/ts3.4/commands/ConnectCustomKeyStoreCommand.d.ts +3 -3
  182. package/dist-types/ts3.4/commands/CreateAliasCommand.d.ts +11 -7
  183. package/dist-types/ts3.4/commands/CreateGrantCommand.d.ts +14 -11
  184. package/dist-types/ts3.4/commands/CreateKeyCommand.d.ts +16 -14
  185. package/dist-types/ts3.4/commands/DecryptCommand.d.ts +24 -21
  186. package/dist-types/ts3.4/commands/DeleteAliasCommand.d.ts +11 -7
  187. package/dist-types/ts3.4/commands/DeleteCustomKeyStoreCommand.d.ts +10 -11
  188. package/dist-types/ts3.4/commands/DeleteImportedKeyMaterialCommand.d.ts +5 -6
  189. package/dist-types/ts3.4/commands/DescribeCustomKeyStoresCommand.d.ts +4 -4
  190. package/dist-types/ts3.4/commands/DescribeKeyCommand.d.ts +12 -10
  191. package/dist-types/ts3.4/commands/DisableKeyCommand.d.ts +5 -4
  192. package/dist-types/ts3.4/commands/DisableKeyRotationCommand.d.ts +2 -1
  193. package/dist-types/ts3.4/commands/DisconnectCustomKeyStoreCommand.d.ts +6 -4
  194. package/dist-types/ts3.4/commands/EnableKeyCommand.d.ts +4 -2
  195. package/dist-types/ts3.4/commands/EnableKeyRotationCommand.d.ts +2 -1
  196. package/dist-types/ts3.4/commands/EncryptCommand.d.ts +14 -12
  197. package/dist-types/ts3.4/commands/GenerateDataKeyCommand.d.ts +15 -12
  198. package/dist-types/ts3.4/commands/GenerateDataKeyPairCommand.d.ts +15 -13
  199. package/dist-types/ts3.4/commands/GenerateDataKeyPairWithoutPlaintextCommand.d.ts +16 -13
  200. package/dist-types/ts3.4/commands/GenerateDataKeyWithoutPlaintextCommand.d.ts +11 -9
  201. package/dist-types/ts3.4/commands/GenerateRandomCommand.d.ts +2 -1
  202. package/dist-types/ts3.4/commands/GetKeyRotationStatusCommand.d.ts +2 -1
  203. package/dist-types/ts3.4/commands/GetParametersForImportCommand.d.ts +7 -8
  204. package/dist-types/ts3.4/commands/GetPublicKeyCommand.d.ts +7 -5
  205. package/dist-types/ts3.4/commands/ImportKeyMaterialCommand.d.ts +13 -13
  206. package/dist-types/ts3.4/commands/ListAliasesCommand.d.ts +13 -10
  207. package/dist-types/ts3.4/commands/ListGrantsCommand.d.ts +2 -2
  208. package/dist-types/ts3.4/commands/ListKeyPoliciesCommand.d.ts +3 -3
  209. package/dist-types/ts3.4/commands/ListKeysCommand.d.ts +1 -2
  210. package/dist-types/ts3.4/commands/ListRetirableGrantsCommand.d.ts +7 -6
  211. package/dist-types/ts3.4/commands/ReEncryptCommand.d.ts +33 -27
  212. package/dist-types/ts3.4/commands/ReplicateKeyCommand.d.ts +5 -5
  213. package/dist-types/ts3.4/commands/RetireGrantCommand.d.ts +7 -5
  214. package/dist-types/ts3.4/commands/RevokeGrantCommand.d.ts +1 -2
  215. package/dist-types/ts3.4/commands/ScheduleKeyDeletionCommand.d.ts +19 -15
  216. package/dist-types/ts3.4/commands/SignCommand.d.ts +10 -9
  217. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +6 -4
  218. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +3 -3
  219. package/dist-types/ts3.4/commands/UpdateAliasCommand.d.ts +15 -11
  220. package/dist-types/ts3.4/commands/UpdateCustomKeyStoreCommand.d.ts +17 -17
  221. package/dist-types/ts3.4/commands/UpdateKeyDescriptionCommand.d.ts +3 -3
  222. package/dist-types/ts3.4/commands/UpdatePrimaryRegionCommand.d.ts +1 -1
  223. package/dist-types/ts3.4/commands/VerifyCommand.d.ts +5 -5
  224. package/dist-types/ts3.4/models/models_0.d.ts +296 -249
  225. package/package.json +33 -30
  226. package/dist-cjs/KMS.js.map +0 -1
  227. package/dist-cjs/KMSClient.js.map +0 -1
  228. package/dist-cjs/commands/CancelKeyDeletionCommand.js.map +0 -1
  229. package/dist-cjs/commands/ConnectCustomKeyStoreCommand.js.map +0 -1
  230. package/dist-cjs/commands/CreateAliasCommand.js.map +0 -1
  231. package/dist-cjs/commands/CreateCustomKeyStoreCommand.js.map +0 -1
  232. package/dist-cjs/commands/CreateGrantCommand.js.map +0 -1
  233. package/dist-cjs/commands/CreateKeyCommand.js.map +0 -1
  234. package/dist-cjs/commands/DecryptCommand.js.map +0 -1
  235. package/dist-cjs/commands/DeleteAliasCommand.js.map +0 -1
  236. package/dist-cjs/commands/DeleteCustomKeyStoreCommand.js.map +0 -1
  237. package/dist-cjs/commands/DeleteImportedKeyMaterialCommand.js.map +0 -1
  238. package/dist-cjs/commands/DescribeCustomKeyStoresCommand.js.map +0 -1
  239. package/dist-cjs/commands/DescribeKeyCommand.js.map +0 -1
  240. package/dist-cjs/commands/DisableKeyCommand.js.map +0 -1
  241. package/dist-cjs/commands/DisableKeyRotationCommand.js.map +0 -1
  242. package/dist-cjs/commands/DisconnectCustomKeyStoreCommand.js.map +0 -1
  243. package/dist-cjs/commands/EnableKeyCommand.js.map +0 -1
  244. package/dist-cjs/commands/EnableKeyRotationCommand.js.map +0 -1
  245. package/dist-cjs/commands/EncryptCommand.js.map +0 -1
  246. package/dist-cjs/commands/GenerateDataKeyCommand.js.map +0 -1
  247. package/dist-cjs/commands/GenerateDataKeyPairCommand.js.map +0 -1
  248. package/dist-cjs/commands/GenerateDataKeyPairWithoutPlaintextCommand.js.map +0 -1
  249. package/dist-cjs/commands/GenerateDataKeyWithoutPlaintextCommand.js.map +0 -1
  250. package/dist-cjs/commands/GenerateRandomCommand.js.map +0 -1
  251. package/dist-cjs/commands/GetKeyPolicyCommand.js.map +0 -1
  252. package/dist-cjs/commands/GetKeyRotationStatusCommand.js.map +0 -1
  253. package/dist-cjs/commands/GetParametersForImportCommand.js.map +0 -1
  254. package/dist-cjs/commands/GetPublicKeyCommand.js.map +0 -1
  255. package/dist-cjs/commands/ImportKeyMaterialCommand.js.map +0 -1
  256. package/dist-cjs/commands/ListAliasesCommand.js.map +0 -1
  257. package/dist-cjs/commands/ListGrantsCommand.js.map +0 -1
  258. package/dist-cjs/commands/ListKeyPoliciesCommand.js.map +0 -1
  259. package/dist-cjs/commands/ListKeysCommand.js.map +0 -1
  260. package/dist-cjs/commands/ListResourceTagsCommand.js.map +0 -1
  261. package/dist-cjs/commands/ListRetirableGrantsCommand.js.map +0 -1
  262. package/dist-cjs/commands/PutKeyPolicyCommand.js.map +0 -1
  263. package/dist-cjs/commands/ReEncryptCommand.js.map +0 -1
  264. package/dist-cjs/commands/ReplicateKeyCommand.js.map +0 -1
  265. package/dist-cjs/commands/RetireGrantCommand.js.map +0 -1
  266. package/dist-cjs/commands/RevokeGrantCommand.js.map +0 -1
  267. package/dist-cjs/commands/ScheduleKeyDeletionCommand.js.map +0 -1
  268. package/dist-cjs/commands/SignCommand.js.map +0 -1
  269. package/dist-cjs/commands/TagResourceCommand.js.map +0 -1
  270. package/dist-cjs/commands/UntagResourceCommand.js.map +0 -1
  271. package/dist-cjs/commands/UpdateAliasCommand.js.map +0 -1
  272. package/dist-cjs/commands/UpdateCustomKeyStoreCommand.js.map +0 -1
  273. package/dist-cjs/commands/UpdateKeyDescriptionCommand.js.map +0 -1
  274. package/dist-cjs/commands/UpdatePrimaryRegionCommand.js.map +0 -1
  275. package/dist-cjs/commands/VerifyCommand.js.map +0 -1
  276. package/dist-cjs/endpoints.js.map +0 -1
  277. package/dist-cjs/index.js.map +0 -1
  278. package/dist-cjs/models/index.js.map +0 -1
  279. package/dist-cjs/models/models_0.js.map +0 -1
  280. package/dist-cjs/pagination/Interfaces.js.map +0 -1
  281. package/dist-cjs/pagination/ListAliasesPaginator.js.map +0 -1
  282. package/dist-cjs/pagination/ListGrantsPaginator.js.map +0 -1
  283. package/dist-cjs/pagination/ListKeyPoliciesPaginator.js.map +0 -1
  284. package/dist-cjs/pagination/ListKeysPaginator.js.map +0 -1
  285. package/dist-cjs/protocols/Aws_json1_1.js.map +0 -1
  286. package/dist-cjs/runtimeConfig.browser.js.map +0 -1
  287. package/dist-cjs/runtimeConfig.js.map +0 -1
  288. package/dist-cjs/runtimeConfig.native.js.map +0 -1
  289. package/dist-cjs/runtimeConfig.shared.js.map +0 -1
  290. package/dist-es/KMS.js.map +0 -1
  291. package/dist-es/KMSClient.js.map +0 -1
  292. package/dist-es/commands/CancelKeyDeletionCommand.js.map +0 -1
  293. package/dist-es/commands/ConnectCustomKeyStoreCommand.js.map +0 -1
  294. package/dist-es/commands/CreateAliasCommand.js.map +0 -1
  295. package/dist-es/commands/CreateCustomKeyStoreCommand.js.map +0 -1
  296. package/dist-es/commands/CreateGrantCommand.js.map +0 -1
  297. package/dist-es/commands/CreateKeyCommand.js.map +0 -1
  298. package/dist-es/commands/DecryptCommand.js.map +0 -1
  299. package/dist-es/commands/DeleteAliasCommand.js.map +0 -1
  300. package/dist-es/commands/DeleteCustomKeyStoreCommand.js.map +0 -1
  301. package/dist-es/commands/DeleteImportedKeyMaterialCommand.js.map +0 -1
  302. package/dist-es/commands/DescribeCustomKeyStoresCommand.js.map +0 -1
  303. package/dist-es/commands/DescribeKeyCommand.js.map +0 -1
  304. package/dist-es/commands/DisableKeyCommand.js.map +0 -1
  305. package/dist-es/commands/DisableKeyRotationCommand.js.map +0 -1
  306. package/dist-es/commands/DisconnectCustomKeyStoreCommand.js.map +0 -1
  307. package/dist-es/commands/EnableKeyCommand.js.map +0 -1
  308. package/dist-es/commands/EnableKeyRotationCommand.js.map +0 -1
  309. package/dist-es/commands/EncryptCommand.js.map +0 -1
  310. package/dist-es/commands/GenerateDataKeyCommand.js.map +0 -1
  311. package/dist-es/commands/GenerateDataKeyPairCommand.js.map +0 -1
  312. package/dist-es/commands/GenerateDataKeyPairWithoutPlaintextCommand.js.map +0 -1
  313. package/dist-es/commands/GenerateDataKeyWithoutPlaintextCommand.js.map +0 -1
  314. package/dist-es/commands/GenerateRandomCommand.js.map +0 -1
  315. package/dist-es/commands/GetKeyPolicyCommand.js.map +0 -1
  316. package/dist-es/commands/GetKeyRotationStatusCommand.js.map +0 -1
  317. package/dist-es/commands/GetParametersForImportCommand.js.map +0 -1
  318. package/dist-es/commands/GetPublicKeyCommand.js.map +0 -1
  319. package/dist-es/commands/ImportKeyMaterialCommand.js.map +0 -1
  320. package/dist-es/commands/ListAliasesCommand.js.map +0 -1
  321. package/dist-es/commands/ListGrantsCommand.js.map +0 -1
  322. package/dist-es/commands/ListKeyPoliciesCommand.js.map +0 -1
  323. package/dist-es/commands/ListKeysCommand.js.map +0 -1
  324. package/dist-es/commands/ListResourceTagsCommand.js.map +0 -1
  325. package/dist-es/commands/ListRetirableGrantsCommand.js.map +0 -1
  326. package/dist-es/commands/PutKeyPolicyCommand.js.map +0 -1
  327. package/dist-es/commands/ReEncryptCommand.js.map +0 -1
  328. package/dist-es/commands/ReplicateKeyCommand.js.map +0 -1
  329. package/dist-es/commands/RetireGrantCommand.js.map +0 -1
  330. package/dist-es/commands/RevokeGrantCommand.js.map +0 -1
  331. package/dist-es/commands/ScheduleKeyDeletionCommand.js.map +0 -1
  332. package/dist-es/commands/SignCommand.js.map +0 -1
  333. package/dist-es/commands/TagResourceCommand.js.map +0 -1
  334. package/dist-es/commands/UntagResourceCommand.js.map +0 -1
  335. package/dist-es/commands/UpdateAliasCommand.js.map +0 -1
  336. package/dist-es/commands/UpdateCustomKeyStoreCommand.js.map +0 -1
  337. package/dist-es/commands/UpdateKeyDescriptionCommand.js.map +0 -1
  338. package/dist-es/commands/UpdatePrimaryRegionCommand.js.map +0 -1
  339. package/dist-es/commands/VerifyCommand.js.map +0 -1
  340. package/dist-es/endpoints.js.map +0 -1
  341. package/dist-es/index.js.map +0 -1
  342. package/dist-es/models/index.js.map +0 -1
  343. package/dist-es/models/models_0.js.map +0 -1
  344. package/dist-es/pagination/Interfaces.js.map +0 -1
  345. package/dist-es/pagination/ListAliasesPaginator.js.map +0 -1
  346. package/dist-es/pagination/ListGrantsPaginator.js.map +0 -1
  347. package/dist-es/pagination/ListKeyPoliciesPaginator.js.map +0 -1
  348. package/dist-es/pagination/ListKeysPaginator.js.map +0 -1
  349. package/dist-es/protocols/Aws_json1_1.js.map +0 -1
  350. package/dist-es/runtimeConfig.browser.js.map +0 -1
  351. package/dist-es/runtimeConfig.js.map +0 -1
  352. package/dist-es/runtimeConfig.native.js.map +0 -1
  353. package/dist-es/runtimeConfig.shared.js.map +0 -1
  354. package/jest.config.js +0 -4
  355. package/src/KMS.ts +0 -4019
  356. package/src/KMSClient.ts +0 -516
  357. package/src/commands/CancelKeyDeletionCommand.ts +0 -106
  358. package/src/commands/ConnectCustomKeyStoreCommand.ts +0 -156
  359. package/src/commands/CreateAliasCommand.ts +0 -148
  360. package/src/commands/CreateCustomKeyStoreCommand.ts +0 -144
  361. package/src/commands/CreateGrantCommand.ts +0 -154
  362. package/src/commands/CreateKeyCommand.ts +0 -210
  363. package/src/commands/DecryptCommand.ts +0 -173
  364. package/src/commands/DeleteAliasCommand.ts +0 -138
  365. package/src/commands/DeleteCustomKeyStoreCommand.ts +0 -150
  366. package/src/commands/DeleteImportedKeyMaterialCommand.ts +0 -128
  367. package/src/commands/DescribeCustomKeyStoresCommand.ts +0 -148
  368. package/src/commands/DescribeKeyCommand.ts +0 -172
  369. package/src/commands/DisableKeyCommand.ts +0 -109
  370. package/src/commands/DisableKeyRotationCommand.ts +0 -119
  371. package/src/commands/DisconnectCustomKeyStoreCommand.ts +0 -145
  372. package/src/commands/EnableKeyCommand.ts +0 -98
  373. package/src/commands/EnableKeyRotationCommand.ts +0 -119
  374. package/src/commands/EncryptCommand.ts +0 -210
  375. package/src/commands/GenerateDataKeyCommand.ts +0 -189
  376. package/src/commands/GenerateDataKeyPairCommand.ts +0 -169
  377. package/src/commands/GenerateDataKeyPairWithoutPlaintextCommand.ts +0 -169
  378. package/src/commands/GenerateDataKeyWithoutPlaintextCommand.ts +0 -172
  379. package/src/commands/GenerateRandomCommand.ts +0 -103
  380. package/src/commands/GetKeyPolicyCommand.ts +0 -103
  381. package/src/commands/GetKeyRotationStatusCommand.ts +0 -131
  382. package/src/commands/GetParametersForImportCommand.ts +0 -130
  383. package/src/commands/GetPublicKeyCommand.ts +0 -139
  384. package/src/commands/ImportKeyMaterialCommand.ts +0 -158
  385. package/src/commands/ListAliasesCommand.ts +0 -134
  386. package/src/commands/ListGrantsCommand.ts +0 -140
  387. package/src/commands/ListKeyPoliciesCommand.ts +0 -117
  388. package/src/commands/ListKeysCommand.ts +0 -119
  389. package/src/commands/ListResourceTagsCommand.ts +0 -129
  390. package/src/commands/ListRetirableGrantsCommand.ts +0 -137
  391. package/src/commands/PutKeyPolicyCommand.ts +0 -108
  392. package/src/commands/ReEncryptCommand.ts +0 -180
  393. package/src/commands/ReplicateKeyCommand.ts +0 -172
  394. package/src/commands/RetireGrantCommand.ts +0 -139
  395. package/src/commands/RevokeGrantCommand.ts +0 -139
  396. package/src/commands/ScheduleKeyDeletionCommand.ts +0 -145
  397. package/src/commands/SignCommand.ts +0 -132
  398. package/src/commands/TagResourceCommand.ts +0 -140
  399. package/src/commands/UntagResourceCommand.ts +0 -138
  400. package/src/commands/UpdateAliasCommand.ts +0 -153
  401. package/src/commands/UpdateCustomKeyStoreCommand.ts +0 -167
  402. package/src/commands/UpdateKeyDescriptionCommand.ts +0 -118
  403. package/src/commands/UpdatePrimaryRegionCommand.ts +0 -160
  404. package/src/commands/VerifyCommand.ts +0 -118
  405. package/src/endpoints.ts +0 -62
  406. package/src/index.ts +0 -56
  407. package/src/models/index.ts +0 -1
  408. package/src/models/models_0.ts +0 -4742
  409. package/src/pagination/Interfaces.ts +0 -8
  410. package/src/pagination/ListAliasesPaginator.ts +0 -55
  411. package/src/pagination/ListGrantsPaginator.ts +0 -55
  412. package/src/pagination/ListKeyPoliciesPaginator.ts +0 -59
  413. package/src/pagination/ListKeysPaginator.ts +0 -55
  414. package/src/protocols/Aws_json1_1.ts +0 -7632
  415. package/src/runtimeConfig.browser.ts +0 -41
  416. package/src/runtimeConfig.native.ts +0 -17
  417. package/src/runtimeConfig.shared.ts +0 -17
  418. package/src/runtimeConfig.ts +0 -46
  419. package/tsconfig.es.json +0 -10
  420. package/tsconfig.json +0 -33
  421. package/tsconfig.types.json +0 -9
@@ -1,4742 +0,0 @@
1
- import { SENSITIVE_STRING } from "@aws-sdk/smithy-client";
2
- import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types";
3
-
4
- export enum AlgorithmSpec {
5
- RSAES_OAEP_SHA_1 = "RSAES_OAEP_SHA_1",
6
- RSAES_OAEP_SHA_256 = "RSAES_OAEP_SHA_256",
7
- RSAES_PKCS1_V1_5 = "RSAES_PKCS1_V1_5",
8
- }
9
-
10
- /**
11
- * <p>Contains information about an alias.</p>
12
- */
13
- export interface AliasListEntry {
14
- /**
15
- * <p>String that contains the alias. This value begins with <code>alias/</code>.</p>
16
- */
17
- AliasName?: string;
18
-
19
- /**
20
- * <p>String that contains the key ARN.</p>
21
- */
22
- AliasArn?: string;
23
-
24
- /**
25
- * <p>String that contains the key identifier of the KMS key associated with the alias.</p>
26
- */
27
- TargetKeyId?: string;
28
-
29
- /**
30
- * <p>Date and time that the alias was most recently created in the account and Region. Formatted as Unix time.</p>
31
- */
32
- CreationDate?: Date;
33
-
34
- /**
35
- * <p>Date and time that the alias was most recently associated with a KMS key in the account and Region. Formatted as Unix time.</p>
36
- */
37
- LastUpdatedDate?: Date;
38
- }
39
-
40
- export namespace AliasListEntry {
41
- /**
42
- * @internal
43
- */
44
- export const filterSensitiveLog = (obj: AliasListEntry): any => ({
45
- ...obj,
46
- });
47
- }
48
-
49
- /**
50
- * <p>The request was rejected because it attempted to create a resource that already
51
- * exists.</p>
52
- */
53
- export interface AlreadyExistsException extends __SmithyException, $MetadataBearer {
54
- name: "AlreadyExistsException";
55
- $fault: "client";
56
- message?: string;
57
- }
58
-
59
- export namespace AlreadyExistsException {
60
- /**
61
- * @internal
62
- */
63
- export const filterSensitiveLog = (obj: AlreadyExistsException): any => ({
64
- ...obj,
65
- });
66
- }
67
-
68
- export interface CancelKeyDeletionRequest {
69
- /**
70
- * <p>Identifies the KMS key whose deletion is being canceled.</p>
71
- * <p>Specify the key ID or key ARN of the KMS key.</p>
72
- * <p>For example:</p>
73
- * <ul>
74
- * <li>
75
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
76
- * </p>
77
- * </li>
78
- * <li>
79
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
80
- * </p>
81
- * </li>
82
- * </ul>
83
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
84
- */
85
- KeyId: string | undefined;
86
- }
87
-
88
- export namespace CancelKeyDeletionRequest {
89
- /**
90
- * @internal
91
- */
92
- export const filterSensitiveLog = (obj: CancelKeyDeletionRequest): any => ({
93
- ...obj,
94
- });
95
- }
96
-
97
- export interface CancelKeyDeletionResponse {
98
- /**
99
- * <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">key ARN</a>) of the KMS key whose deletion is canceled.</p>
100
- */
101
- KeyId?: string;
102
- }
103
-
104
- export namespace CancelKeyDeletionResponse {
105
- /**
106
- * @internal
107
- */
108
- export const filterSensitiveLog = (obj: CancelKeyDeletionResponse): any => ({
109
- ...obj,
110
- });
111
- }
112
-
113
- /**
114
- * <p>The system timed out while trying to fulfill the request. The request can be
115
- * retried.</p>
116
- */
117
- export interface DependencyTimeoutException extends __SmithyException, $MetadataBearer {
118
- name: "DependencyTimeoutException";
119
- $fault: "server";
120
- message?: string;
121
- }
122
-
123
- export namespace DependencyTimeoutException {
124
- /**
125
- * @internal
126
- */
127
- export const filterSensitiveLog = (obj: DependencyTimeoutException): any => ({
128
- ...obj,
129
- });
130
- }
131
-
132
- /**
133
- * <p>The request was rejected because a specified ARN, or an ARN in a key policy, is not
134
- * valid.</p>
135
- */
136
- export interface InvalidArnException extends __SmithyException, $MetadataBearer {
137
- name: "InvalidArnException";
138
- $fault: "client";
139
- message?: string;
140
- }
141
-
142
- export namespace InvalidArnException {
143
- /**
144
- * @internal
145
- */
146
- export const filterSensitiveLog = (obj: InvalidArnException): any => ({
147
- ...obj,
148
- });
149
- }
150
-
151
- /**
152
- * <p>The request was rejected because an internal exception occurred. The request can be
153
- * retried.</p>
154
- */
155
- export interface KMSInternalException extends __SmithyException, $MetadataBearer {
156
- name: "KMSInternalException";
157
- $fault: "server";
158
- message?: string;
159
- }
160
-
161
- export namespace KMSInternalException {
162
- /**
163
- * @internal
164
- */
165
- export const filterSensitiveLog = (obj: KMSInternalException): any => ({
166
- ...obj,
167
- });
168
- }
169
-
170
- /**
171
- * <p>The request was rejected because the state of the specified resource is not valid for this
172
- * request.</p>
173
- * <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>
174
- * <i>Key Management Service Developer Guide</i>
175
- * </i>.</p>
176
- */
177
- export interface KMSInvalidStateException extends __SmithyException, $MetadataBearer {
178
- name: "KMSInvalidStateException";
179
- $fault: "client";
180
- message?: string;
181
- }
182
-
183
- export namespace KMSInvalidStateException {
184
- /**
185
- * @internal
186
- */
187
- export const filterSensitiveLog = (obj: KMSInvalidStateException): any => ({
188
- ...obj,
189
- });
190
- }
191
-
192
- /**
193
- * <p>The request was rejected because the specified entity or resource could not be
194
- * found.</p>
195
- */
196
- export interface NotFoundException extends __SmithyException, $MetadataBearer {
197
- name: "NotFoundException";
198
- $fault: "client";
199
- message?: string;
200
- }
201
-
202
- export namespace NotFoundException {
203
- /**
204
- * @internal
205
- */
206
- export const filterSensitiveLog = (obj: NotFoundException): any => ({
207
- ...obj,
208
- });
209
- }
210
-
211
- /**
212
- * <p>The request was rejected because the specified CloudHSM cluster is already associated with a
213
- * custom key store or it shares a backup history with a cluster that is associated with a custom
214
- * key store. Each custom key store must be associated with a different CloudHSM cluster.</p>
215
- * <p>Clusters that share a backup history have the same cluster certificate. To view the
216
- * cluster certificate of a cluster, use the <a href="https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html">DescribeClusters</a> operation.</p>
217
- */
218
- export interface CloudHsmClusterInUseException extends __SmithyException, $MetadataBearer {
219
- name: "CloudHsmClusterInUseException";
220
- $fault: "client";
221
- message?: string;
222
- }
223
-
224
- export namespace CloudHsmClusterInUseException {
225
- /**
226
- * @internal
227
- */
228
- export const filterSensitiveLog = (obj: CloudHsmClusterInUseException): any => ({
229
- ...obj,
230
- });
231
- }
232
-
233
- /**
234
- * <p>The request was rejected because the associated CloudHSM cluster did not meet the
235
- * configuration requirements for a custom key store.</p>
236
- *
237
- * <ul>
238
- * <li>
239
- * <p>The cluster must be configured with private subnets in at least two different
240
- * Availability Zones in the Region.</p>
241
- * </li>
242
- * <li>
243
- * <p>The <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html">security group for
244
- * the cluster</a> (cloudhsm-cluster-<i><cluster-id></i>-sg) must
245
- * include inbound rules and outbound rules that allow TCP traffic on ports 2223-2225. The
246
- * <b>Source</b> in the inbound rules and the <b>Destination</b> in the outbound rules must match the security group
247
- * ID. These rules are set by default when you create the cluster. Do not delete or change
248
- * them. To get information about a particular security group, use the <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroups.html">DescribeSecurityGroups</a> operation.</p>
249
- * </li>
250
- * <li>
251
- * <p>The cluster must contain at least as many HSMs as the operation requires. To add HSMs,
252
- * use the CloudHSM <a href="https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html">CreateHsm</a> operation.</p>
253
- * <p>For the <a>CreateCustomKeyStore</a>, <a>UpdateCustomKeyStore</a>, and <a>CreateKey</a> operations, the CloudHSM cluster must have at least two
254
- * active HSMs, each in a different Availability Zone. For the <a>ConnectCustomKeyStore</a> operation, the CloudHSM must contain at least one active
255
- * HSM.</p>
256
- * </li>
257
- * </ul>
258
- * <p>For information about the requirements for an CloudHSM cluster that is associated with a
259
- * custom key store, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore">Assemble the Prerequisites</a>
260
- * in the <i>Key Management Service Developer Guide</i>. For information about creating a private subnet for an CloudHSM cluster,
261
- * see <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html">Create a Private
262
- * Subnet</a> in the <i>CloudHSM User Guide</i>. For information about cluster security groups, see
263
- * <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html">Configure a Default Security
264
- * Group</a> in the <i>
265
- * <i>CloudHSM User Guide</i>
266
- * </i>. </p>
267
- */
268
- export interface CloudHsmClusterInvalidConfigurationException extends __SmithyException, $MetadataBearer {
269
- name: "CloudHsmClusterInvalidConfigurationException";
270
- $fault: "client";
271
- message?: string;
272
- }
273
-
274
- export namespace CloudHsmClusterInvalidConfigurationException {
275
- /**
276
- * @internal
277
- */
278
- export const filterSensitiveLog = (obj: CloudHsmClusterInvalidConfigurationException): any => ({
279
- ...obj,
280
- });
281
- }
282
-
283
- /**
284
- * <p>The request was rejected because the CloudHSM cluster that is associated with the custom key
285
- * store is not active. Initialize and activate the cluster and try the command again. For
286
- * detailed instructions, see <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/getting-started.html">Getting Started</a> in the <i>CloudHSM User Guide</i>.</p>
287
- */
288
- export interface CloudHsmClusterNotActiveException extends __SmithyException, $MetadataBearer {
289
- name: "CloudHsmClusterNotActiveException";
290
- $fault: "client";
291
- message?: string;
292
- }
293
-
294
- export namespace CloudHsmClusterNotActiveException {
295
- /**
296
- * @internal
297
- */
298
- export const filterSensitiveLog = (obj: CloudHsmClusterNotActiveException): any => ({
299
- ...obj,
300
- });
301
- }
302
-
303
- /**
304
- * <p>The request was rejected because KMS cannot find the CloudHSM cluster with the specified
305
- * cluster ID. Retry the request with a different cluster ID.</p>
306
- */
307
- export interface CloudHsmClusterNotFoundException extends __SmithyException, $MetadataBearer {
308
- name: "CloudHsmClusterNotFoundException";
309
- $fault: "client";
310
- message?: string;
311
- }
312
-
313
- export namespace CloudHsmClusterNotFoundException {
314
- /**
315
- * @internal
316
- */
317
- export const filterSensitiveLog = (obj: CloudHsmClusterNotFoundException): any => ({
318
- ...obj,
319
- });
320
- }
321
-
322
- /**
323
- * <p>The request was rejected because the specified CloudHSM cluster has a different cluster
324
- * certificate than the original cluster. You cannot use the operation to specify an unrelated
325
- * cluster.</p>
326
- * <p>Specify a cluster that shares a backup history with the original cluster. This includes
327
- * clusters that were created from a backup of the current cluster, and clusters that were
328
- * created from the same backup that produced the current cluster.</p>
329
- * <p>Clusters that share a backup history have the same cluster certificate. To view the
330
- * cluster certificate of a cluster, use the <a href="https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html">DescribeClusters</a> operation.</p>
331
- */
332
- export interface CloudHsmClusterNotRelatedException extends __SmithyException, $MetadataBearer {
333
- name: "CloudHsmClusterNotRelatedException";
334
- $fault: "client";
335
- message?: string;
336
- }
337
-
338
- export namespace CloudHsmClusterNotRelatedException {
339
- /**
340
- * @internal
341
- */
342
- export const filterSensitiveLog = (obj: CloudHsmClusterNotRelatedException): any => ({
343
- ...obj,
344
- });
345
- }
346
-
347
- export interface ConnectCustomKeyStoreRequest {
348
- /**
349
- * <p>Enter the key store ID of the custom key store that you want to connect.
350
- * To find the ID of a custom key store, use the <a>DescribeCustomKeyStores</a> operation.</p>
351
- */
352
- CustomKeyStoreId: string | undefined;
353
- }
354
-
355
- export namespace ConnectCustomKeyStoreRequest {
356
- /**
357
- * @internal
358
- */
359
- export const filterSensitiveLog = (obj: ConnectCustomKeyStoreRequest): any => ({
360
- ...obj,
361
- });
362
- }
363
-
364
- export interface ConnectCustomKeyStoreResponse {}
365
-
366
- export namespace ConnectCustomKeyStoreResponse {
367
- /**
368
- * @internal
369
- */
370
- export const filterSensitiveLog = (obj: ConnectCustomKeyStoreResponse): any => ({
371
- ...obj,
372
- });
373
- }
374
-
375
- /**
376
- * <p>The request was rejected because of the <code>ConnectionState</code> of the custom key
377
- * store. To get the <code>ConnectionState</code> of a custom key store, use the <a>DescribeCustomKeyStores</a> operation.</p>
378
- * <p>This exception is thrown under the following conditions:</p>
379
- * <ul>
380
- * <li>
381
- * <p>You requested the <a>CreateKey</a> or <a>GenerateRandom</a>
382
- * operation in a custom key store that is not connected. These operations are valid only
383
- * when the custom key store <code>ConnectionState</code> is <code>CONNECTED</code>.</p>
384
- * </li>
385
- * <li>
386
- * <p>You requested the <a>UpdateCustomKeyStore</a> or <a>DeleteCustomKeyStore</a> operation on a custom key store that is not
387
- * disconnected. This operation is valid only when the custom key store
388
- * <code>ConnectionState</code> is <code>DISCONNECTED</code>.</p>
389
- * </li>
390
- * <li>
391
- * <p>You requested the <a>ConnectCustomKeyStore</a> operation on a custom key
392
- * store with a <code>ConnectionState</code> of <code>DISCONNECTING</code> or
393
- * <code>FAILED</code>. This operation is valid for all other <code>ConnectionState</code>
394
- * values.</p>
395
- * </li>
396
- * </ul>
397
- */
398
- export interface CustomKeyStoreInvalidStateException extends __SmithyException, $MetadataBearer {
399
- name: "CustomKeyStoreInvalidStateException";
400
- $fault: "client";
401
- message?: string;
402
- }
403
-
404
- export namespace CustomKeyStoreInvalidStateException {
405
- /**
406
- * @internal
407
- */
408
- export const filterSensitiveLog = (obj: CustomKeyStoreInvalidStateException): any => ({
409
- ...obj,
410
- });
411
- }
412
-
413
- /**
414
- * <p>The request was rejected because KMS cannot find a custom key store with the specified
415
- * key store name or ID.</p>
416
- */
417
- export interface CustomKeyStoreNotFoundException extends __SmithyException, $MetadataBearer {
418
- name: "CustomKeyStoreNotFoundException";
419
- $fault: "client";
420
- message?: string;
421
- }
422
-
423
- export namespace CustomKeyStoreNotFoundException {
424
- /**
425
- * @internal
426
- */
427
- export const filterSensitiveLog = (obj: CustomKeyStoreNotFoundException): any => ({
428
- ...obj,
429
- });
430
- }
431
-
432
- export enum ConnectionErrorCodeType {
433
- CLUSTER_NOT_FOUND = "CLUSTER_NOT_FOUND",
434
- INSUFFICIENT_CLOUDHSM_HSMS = "INSUFFICIENT_CLOUDHSM_HSMS",
435
- INTERNAL_ERROR = "INTERNAL_ERROR",
436
- INVALID_CREDENTIALS = "INVALID_CREDENTIALS",
437
- NETWORK_ERRORS = "NETWORK_ERRORS",
438
- SUBNET_NOT_FOUND = "SUBNET_NOT_FOUND",
439
- USER_LOCKED_OUT = "USER_LOCKED_OUT",
440
- USER_LOGGED_IN = "USER_LOGGED_IN",
441
- USER_NOT_FOUND = "USER_NOT_FOUND",
442
- }
443
-
444
- export enum ConnectionStateType {
445
- CONNECTED = "CONNECTED",
446
- CONNECTING = "CONNECTING",
447
- DISCONNECTED = "DISCONNECTED",
448
- DISCONNECTING = "DISCONNECTING",
449
- FAILED = "FAILED",
450
- }
451
-
452
- export interface CreateAliasRequest {
453
- /**
454
- * <p>Specifies the alias name. This value must begin with <code>alias/</code> followed by a
455
- * name, such as <code>alias/ExampleAlias</code>. </p>
456
- * <p>The <code>AliasName</code> value must be string of 1-256 characters. It can contain only alphanumeric characters,
457
- * forward slashes (/), underscores (_), and dashes (-). The alias name cannot begin with <code>alias/aws/</code>. The <code>alias/aws/</code> prefix is reserved
458
- * for <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed keys</a>.</p>
459
- */
460
- AliasName: string | undefined;
461
-
462
- /**
463
- * <p>Associates the alias with the specified <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a>. The KMS key must be
464
- * in the same Amazon Web Services Region. </p>
465
- * <p>A valid key ID is required. If you supply a null or empty string value, this operation
466
- * returns an error.</p>
467
- * <p>For help finding the key ID and ARN, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html#find-cmk-id-arn">Finding the Key ID and
468
- * ARN</a> in the <i>
469
- * <i>Key Management Service Developer Guide</i>
470
- * </i>.</p>
471
- *
472
- * <p>Specify the key ID or key ARN of the KMS key.</p>
473
- * <p>For example:</p>
474
- * <ul>
475
- * <li>
476
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
477
- * </p>
478
- * </li>
479
- * <li>
480
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
481
- * </p>
482
- * </li>
483
- * </ul>
484
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
485
- */
486
- TargetKeyId: string | undefined;
487
- }
488
-
489
- export namespace CreateAliasRequest {
490
- /**
491
- * @internal
492
- */
493
- export const filterSensitiveLog = (obj: CreateAliasRequest): any => ({
494
- ...obj,
495
- });
496
- }
497
-
498
- /**
499
- * <p>The request was rejected because the specified alias name is not valid.</p>
500
- */
501
- export interface InvalidAliasNameException extends __SmithyException, $MetadataBearer {
502
- name: "InvalidAliasNameException";
503
- $fault: "client";
504
- message?: string;
505
- }
506
-
507
- export namespace InvalidAliasNameException {
508
- /**
509
- * @internal
510
- */
511
- export const filterSensitiveLog = (obj: InvalidAliasNameException): any => ({
512
- ...obj,
513
- });
514
- }
515
-
516
- /**
517
- * <p>The request was rejected because a quota was exceeded. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/limits.html">Quotas</a> in the
518
- * <i>Key Management Service Developer Guide</i>.</p>
519
- */
520
- export interface LimitExceededException extends __SmithyException, $MetadataBearer {
521
- name: "LimitExceededException";
522
- $fault: "client";
523
- message?: string;
524
- }
525
-
526
- export namespace LimitExceededException {
527
- /**
528
- * @internal
529
- */
530
- export const filterSensitiveLog = (obj: LimitExceededException): any => ({
531
- ...obj,
532
- });
533
- }
534
-
535
- export interface CreateCustomKeyStoreRequest {
536
- /**
537
- * <p>Specifies a friendly name for the custom key store. The name must be unique in your Amazon Web Services account.</p>
538
- */
539
- CustomKeyStoreName: string | undefined;
540
-
541
- /**
542
- * <p>Identifies the CloudHSM cluster for the custom key store. Enter the cluster ID of any active
543
- * CloudHSM cluster that is not already associated with a custom key store. To find the cluster ID,
544
- * use the <a href="https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html">DescribeClusters</a> operation.</p>
545
- */
546
- CloudHsmClusterId: string | undefined;
547
-
548
- /**
549
- * <p>Enter the content of the trust anchor certificate for the cluster. This is the content of
550
- * the <code>customerCA.crt</code> file that you created when you <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html">initialized the cluster</a>.</p>
551
- */
552
- TrustAnchorCertificate: string | undefined;
553
-
554
- /**
555
- * <p>Enter the password of the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser">
556
- * <code>kmsuser</code> crypto user
557
- * (CU) account</a> in the specified CloudHSM cluster. KMS logs into the cluster as this
558
- * user to manage key material on your behalf.</p>
559
- * <p>The password must be a string of 7 to 32 characters. Its value is case sensitive.</p>
560
- * <p>This parameter tells KMS the <code>kmsuser</code> account password; it does not change
561
- * the password in the CloudHSM cluster.</p>
562
- */
563
- KeyStorePassword: string | undefined;
564
- }
565
-
566
- export namespace CreateCustomKeyStoreRequest {
567
- /**
568
- * @internal
569
- */
570
- export const filterSensitiveLog = (obj: CreateCustomKeyStoreRequest): any => ({
571
- ...obj,
572
- ...(obj.KeyStorePassword && { KeyStorePassword: SENSITIVE_STRING }),
573
- });
574
- }
575
-
576
- export interface CreateCustomKeyStoreResponse {
577
- /**
578
- * <p>A unique identifier for the new custom key store.</p>
579
- */
580
- CustomKeyStoreId?: string;
581
- }
582
-
583
- export namespace CreateCustomKeyStoreResponse {
584
- /**
585
- * @internal
586
- */
587
- export const filterSensitiveLog = (obj: CreateCustomKeyStoreResponse): any => ({
588
- ...obj,
589
- });
590
- }
591
-
592
- /**
593
- * <p>The request was rejected because the specified custom key store name is already assigned
594
- * to another custom key store in the account. Try again with a custom key store name that is
595
- * unique in the account.</p>
596
- */
597
- export interface CustomKeyStoreNameInUseException extends __SmithyException, $MetadataBearer {
598
- name: "CustomKeyStoreNameInUseException";
599
- $fault: "client";
600
- message?: string;
601
- }
602
-
603
- export namespace CustomKeyStoreNameInUseException {
604
- /**
605
- * @internal
606
- */
607
- export const filterSensitiveLog = (obj: CustomKeyStoreNameInUseException): any => ({
608
- ...obj,
609
- });
610
- }
611
-
612
- /**
613
- * <p>The request was rejected because the trust anchor certificate in the request is not the
614
- * trust anchor certificate for the specified CloudHSM cluster.</p>
615
- * <p>When you <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html#sign-csr">initialize the cluster</a>, you create the trust anchor certificate and save it in the
616
- * <code>customerCA.crt</code> file.</p>
617
- */
618
- export interface IncorrectTrustAnchorException extends __SmithyException, $MetadataBearer {
619
- name: "IncorrectTrustAnchorException";
620
- $fault: "client";
621
- message?: string;
622
- }
623
-
624
- export namespace IncorrectTrustAnchorException {
625
- /**
626
- * @internal
627
- */
628
- export const filterSensitiveLog = (obj: IncorrectTrustAnchorException): any => ({
629
- ...obj,
630
- });
631
- }
632
-
633
- /**
634
- * <p>Use this structure to allow <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations">cryptographic operations</a> in the grant only when the operation request
635
- * includes the specified <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">encryption context</a>. </p>
636
- * <p>KMS applies the grant constraints only to cryptographic operations that support an
637
- * encryption context, that is, all cryptographic operations with a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#symmetric-cmks">symmetric KMS key</a>. Grant
638
- * constraints are not applied to operations that do not support an encryption context, such as
639
- * cryptographic operations with asymmetric KMS keys and management operations, such as <a>DescribeKey</a> or <a>RetireGrant</a>.</p>
640
- * <important>
641
- * <p>In a cryptographic operation, the encryption context in the decryption operation must be
642
- * an exact, case-sensitive match for the keys and values in the encryption context of the
643
- * encryption operation. Only the order of the pairs can vary.</p>
644
- * <p>However, in a grant constraint, the key in each key-value pair is not case sensitive,
645
- * but the value is case sensitive.</p>
646
- * <p>To avoid confusion, do not use multiple encryption context pairs that differ only by
647
- * case. To require a fully case-sensitive encryption context, use the
648
- * <code>kms:EncryptionContext:</code> and <code>kms:EncryptionContextKeys</code> conditions
649
- * in an IAM or key policy. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-encryption-context">kms:EncryptionContext:</a> in the <i>
650
- * <i>Key Management Service Developer Guide</i>
651
- * </i>.</p>
652
- * </important>
653
- */
654
- export interface GrantConstraints {
655
- /**
656
- * <p>A list of key-value pairs that must be included in the encryption context of the
657
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations">cryptographic operation</a> request. The grant allows the cryptographic operation only when the encryption
658
- * context in the request includes the key-value pairs specified in this constraint, although it
659
- * can include additional key-value pairs.</p>
660
- */
661
- EncryptionContextSubset?: { [key: string]: string };
662
-
663
- /**
664
- * <p>A list of key-value pairs that must match the encryption context in the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations">cryptographic operation</a>
665
- * request. The grant allows the operation only when the encryption context in the request is the
666
- * same as the encryption context specified in this constraint.</p>
667
- */
668
- EncryptionContextEquals?: { [key: string]: string };
669
- }
670
-
671
- export namespace GrantConstraints {
672
- /**
673
- * @internal
674
- */
675
- export const filterSensitiveLog = (obj: GrantConstraints): any => ({
676
- ...obj,
677
- });
678
- }
679
-
680
- export enum GrantOperation {
681
- CreateGrant = "CreateGrant",
682
- Decrypt = "Decrypt",
683
- DescribeKey = "DescribeKey",
684
- Encrypt = "Encrypt",
685
- GenerateDataKey = "GenerateDataKey",
686
- GenerateDataKeyPair = "GenerateDataKeyPair",
687
- GenerateDataKeyPairWithoutPlaintext = "GenerateDataKeyPairWithoutPlaintext",
688
- GenerateDataKeyWithoutPlaintext = "GenerateDataKeyWithoutPlaintext",
689
- GetPublicKey = "GetPublicKey",
690
- ReEncryptFrom = "ReEncryptFrom",
691
- ReEncryptTo = "ReEncryptTo",
692
- RetireGrant = "RetireGrant",
693
- Sign = "Sign",
694
- Verify = "Verify",
695
- }
696
-
697
- export interface CreateGrantRequest {
698
- /**
699
- * <p>Identifies the KMS key for the grant. The grant gives principals permission to use this KMS key.</p>
700
- *
701
- * <p>Specify the key ID or key ARN of the KMS key. To specify a KMS key in a
702
- * different Amazon Web Services account, you must use the key ARN.</p>
703
- * <p>For example:</p>
704
- * <ul>
705
- * <li>
706
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
707
- * </p>
708
- * </li>
709
- * <li>
710
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
711
- * </p>
712
- * </li>
713
- * </ul>
714
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
715
- */
716
- KeyId: string | undefined;
717
-
718
- /**
719
- * <p>The identity that gets the permissions specified in the grant.</p>
720
- * <p>To specify the principal, use the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of an Amazon Web Services principal. Valid Amazon Web Services principals include Amazon Web Services accounts (root), IAM users, IAM roles, federated
721
- * users, and assumed role users. For examples of the ARN syntax to use for specifying a
722
- * principal, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam">Amazon Web Services Identity and Access
723
- * Management (IAM)</a> in the Example ARNs section of the <i>Amazon Web Services General
724
- * Reference</i>.</p>
725
- */
726
- GranteePrincipal: string | undefined;
727
-
728
- /**
729
- * <p>The principal that has permission to use the <a>RetireGrant</a> operation to
730
- * retire the grant. </p>
731
- * <p>To specify the principal, use the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of an Amazon Web Services principal. Valid Amazon Web Services principals include Amazon Web Services accounts (root), IAM users, federated users, and
732
- * assumed role users. For examples of the ARN syntax to use for specifying a principal, see
733
- * <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam">Amazon Web Services Identity and Access Management (IAM)</a> in the Example ARNs section of the
734
- * <i>Amazon Web Services General Reference</i>.</p>
735
- * <p>The grant determines the retiring principal. Other principals might have permission to
736
- * retire the grant or revoke the grant. For details, see <a>RevokeGrant</a> and
737
- * <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>
738
- */
739
- RetiringPrincipal?: string;
740
-
741
- /**
742
- * <p>A list of operations that the grant permits. </p>
743
- * <p>The operation must be supported on the KMS key. For example, you cannot create a grant for a
744
- * symmetric KMS key that allows the <a>Sign</a> operation, or a grant for an asymmetric KMS key that allows the <a>GenerateDataKey</a> operation. If you try, KMS returns a
745
- * <code>ValidationError</code> exception. For details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-grant-operations">Grant operations</a> in the
746
- * <i>Key Management Service Developer Guide</i>.</p>
747
- */
748
- Operations: (GrantOperation | string)[] | undefined;
749
-
750
- /**
751
- * <p>Specifies a grant constraint. </p>
752
- * <p>KMS supports the <code>EncryptionContextEquals</code> and
753
- * <code>EncryptionContextSubset</code> grant constraints. Each constraint value can include up
754
- * to 8 encryption context pairs. The encryption context value in each constraint cannot exceed
755
- * 384 characters.</p>
756
- * <p>These grant constraints allow the permissions in the grant only when the encryption
757
- * context in the request matches (<code>EncryptionContextEquals</code>) or includes
758
- * (<code>EncryptionContextSubset</code>) the encryption context specified in this structure.
759
- * For information about grant constraints, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/create-grant-overview.html#grant-constraints">Using grant
760
- * constraints</a> in the <i>Key Management Service Developer Guide</i>. For more information about encryption context,
761
- * see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">Encryption
762
- * Context</a> in the <i>
763
- * <i>Key Management Service Developer Guide</i>
764
- * </i>. </p>
765
- * <p>The encryption context grant constraints are supported only on operations that include an
766
- * encryption context. You cannot use an encryption context grant constraint for cryptographic
767
- * operations with asymmetric KMS keys or for management operations, such as <a>DescribeKey</a> or <a>RetireGrant</a>.</p>
768
- */
769
- Constraints?: GrantConstraints;
770
-
771
- /**
772
- * <p>A list of grant tokens. </p>
773
- * <p>Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved <i>eventual consistency</i>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token">Grant token</a> and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token">Using a grant token</a> in the
774
- * <i>Key Management Service Developer Guide</i>.</p>
775
- */
776
- GrantTokens?: string[];
777
-
778
- /**
779
- * <p>A friendly name for the grant. Use this value to prevent the unintended
780
- * creation of duplicate grants when retrying this request.</p>
781
- * <p>When this value is absent, all <code>CreateGrant</code> requests result in a new grant
782
- * with a unique <code>GrantId</code> even if all the supplied parameters are identical. This can
783
- * result in unintended duplicates when you retry the <code>CreateGrant</code> request.</p>
784
- * <p>When this value is present, you can retry a <code>CreateGrant</code> request with
785
- * identical parameters; if the grant already exists, the original <code>GrantId</code> is
786
- * returned without creating a new grant. Note that the returned grant token is unique with every
787
- * <code>CreateGrant</code> request, even when a duplicate <code>GrantId</code> is returned.
788
- * All grant tokens for the same grant ID can be used interchangeably.</p>
789
- */
790
- Name?: string;
791
- }
792
-
793
- export namespace CreateGrantRequest {
794
- /**
795
- * @internal
796
- */
797
- export const filterSensitiveLog = (obj: CreateGrantRequest): any => ({
798
- ...obj,
799
- });
800
- }
801
-
802
- export interface CreateGrantResponse {
803
- /**
804
- * <p>The grant token.</p>
805
- * <p>Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved <i>eventual consistency</i>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token">Grant token</a> and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token">Using a grant token</a> in the
806
- * <i>Key Management Service Developer Guide</i>.</p>
807
- */
808
- GrantToken?: string;
809
-
810
- /**
811
- * <p>The unique identifier for the grant.</p>
812
- * <p>You can use the <code>GrantId</code> in a <a>ListGrants</a>, <a>RetireGrant</a>, or <a>RevokeGrant</a> operation.</p>
813
- */
814
- GrantId?: string;
815
- }
816
-
817
- export namespace CreateGrantResponse {
818
- /**
819
- * @internal
820
- */
821
- export const filterSensitiveLog = (obj: CreateGrantResponse): any => ({
822
- ...obj,
823
- });
824
- }
825
-
826
- /**
827
- * <p>The request was rejected because the specified KMS key is not enabled.</p>
828
- */
829
- export interface DisabledException extends __SmithyException, $MetadataBearer {
830
- name: "DisabledException";
831
- $fault: "client";
832
- message?: string;
833
- }
834
-
835
- export namespace DisabledException {
836
- /**
837
- * @internal
838
- */
839
- export const filterSensitiveLog = (obj: DisabledException): any => ({
840
- ...obj,
841
- });
842
- }
843
-
844
- /**
845
- * <p>The request was rejected because the specified grant token is not valid.</p>
846
- */
847
- export interface InvalidGrantTokenException extends __SmithyException, $MetadataBearer {
848
- name: "InvalidGrantTokenException";
849
- $fault: "client";
850
- message?: string;
851
- }
852
-
853
- export namespace InvalidGrantTokenException {
854
- /**
855
- * @internal
856
- */
857
- export const filterSensitiveLog = (obj: InvalidGrantTokenException): any => ({
858
- ...obj,
859
- });
860
- }
861
-
862
- export enum CustomerMasterKeySpec {
863
- ECC_NIST_P256 = "ECC_NIST_P256",
864
- ECC_NIST_P384 = "ECC_NIST_P384",
865
- ECC_NIST_P521 = "ECC_NIST_P521",
866
- ECC_SECG_P256K1 = "ECC_SECG_P256K1",
867
- RSA_2048 = "RSA_2048",
868
- RSA_3072 = "RSA_3072",
869
- RSA_4096 = "RSA_4096",
870
- SYMMETRIC_DEFAULT = "SYMMETRIC_DEFAULT",
871
- }
872
-
873
- export enum KeySpec {
874
- ECC_NIST_P256 = "ECC_NIST_P256",
875
- ECC_NIST_P384 = "ECC_NIST_P384",
876
- ECC_NIST_P521 = "ECC_NIST_P521",
877
- ECC_SECG_P256K1 = "ECC_SECG_P256K1",
878
- RSA_2048 = "RSA_2048",
879
- RSA_3072 = "RSA_3072",
880
- RSA_4096 = "RSA_4096",
881
- SYMMETRIC_DEFAULT = "SYMMETRIC_DEFAULT",
882
- }
883
-
884
- export enum KeyUsageType {
885
- ENCRYPT_DECRYPT = "ENCRYPT_DECRYPT",
886
- SIGN_VERIFY = "SIGN_VERIFY",
887
- }
888
-
889
- export enum OriginType {
890
- AWS_CLOUDHSM = "AWS_CLOUDHSM",
891
- AWS_KMS = "AWS_KMS",
892
- EXTERNAL = "EXTERNAL",
893
- }
894
-
895
- /**
896
- * <p>A key-value pair. A tag consists of a tag key and a tag value. Tag keys and tag values are
897
- * both required, but tag values can be empty (null) strings.</p>
898
- * <p>For information about the rules that apply to tag keys and tag values, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html">User-Defined Tag Restrictions</a> in the <i>Amazon Web Services Billing and Cost Management User
899
- * Guide</i>.</p>
900
- */
901
- export interface Tag {
902
- /**
903
- * <p>The key of the tag.</p>
904
- */
905
- TagKey: string | undefined;
906
-
907
- /**
908
- * <p>The value of the tag.</p>
909
- */
910
- TagValue: string | undefined;
911
- }
912
-
913
- export namespace Tag {
914
- /**
915
- * @internal
916
- */
917
- export const filterSensitiveLog = (obj: Tag): any => ({
918
- ...obj,
919
- });
920
- }
921
-
922
- export interface CreateKeyRequest {
923
- /**
924
- * <p>The key policy to attach to the KMS key.</p>
925
- * <p>If you provide a key policy, it must meet the following criteria:</p>
926
- * <ul>
927
- * <li>
928
- * <p>If you don't set <code>BypassPolicyLockoutSafetyCheck</code> to true, the key policy
929
- * must allow the principal that is making the <code>CreateKey</code> request to make a
930
- * subsequent <a>PutKeyPolicy</a> request on the KMS key. This reduces the risk that
931
- * the KMS key becomes unmanageable. For more information, refer to the scenario in the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam">Default Key Policy</a> section of the <i>
932
- * <i>Key Management Service Developer Guide</i>
933
- * </i>.</p>
934
- * </li>
935
- * <li>
936
- * <p>Each statement in the key policy must contain one or more principals. The principals
937
- * in the key policy must exist and be visible to KMS. When you create a new Amazon Web Services principal
938
- * (for example, an IAM user or role), you might need to enforce a delay before including the
939
- * new principal in a key policy because the new principal might not be immediately visible
940
- * to KMS. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency">Changes that I make are not always immediately visible</a> in the <i>Amazon Web Services Identity and Access Management User Guide</i>.</p>
941
- * </li>
942
- * </ul>
943
- * <p>If you do not provide a key policy, KMS attaches a default key policy to the KMS key. For
944
- * more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default">Default Key Policy</a> in the
945
- * <i>Key Management Service Developer Guide</i>. </p>
946
- * <p>The key policy size quota is 32 kilobytes (32768 bytes).</p>
947
- * <p>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>
948
- * <i>Identity and Access Management User Guide</i>
949
- * </i>.</p>
950
- */
951
- Policy?: string;
952
-
953
- /**
954
- * <p>A description of the KMS key.</p>
955
- * <p>Use a description that helps you decide whether the KMS key is
956
- * appropriate for a task. The default value is an empty string (no description).</p>
957
- * <p>To set or change the description after the key is created, use <a>UpdateKeyDescription</a>.</p>
958
- */
959
- Description?: string;
960
-
961
- /**
962
- * <p>Determines the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations">cryptographic operations</a> for which you can use the KMS key. The default value is
963
- * <code>ENCRYPT_DECRYPT</code>. This parameter is required only for asymmetric KMS keys. You can't
964
- * change the <code>KeyUsage</code> value after the KMS key is created.</p>
965
- * <p>Select only one valid value.</p>
966
- * <ul>
967
- * <li>
968
- * <p>For symmetric KMS keys, omit the parameter or specify <code>ENCRYPT_DECRYPT</code>.</p>
969
- * </li>
970
- * <li>
971
- * <p>For asymmetric KMS keys with RSA key material, specify <code>ENCRYPT_DECRYPT</code> or
972
- * <code>SIGN_VERIFY</code>.</p>
973
- * </li>
974
- * <li>
975
- * <p>For asymmetric KMS keys with ECC key material, specify <code>SIGN_VERIFY</code>.</p>
976
- * </li>
977
- * </ul>
978
- */
979
- KeyUsage?: KeyUsageType | string;
980
-
981
- /**
982
- * @deprecated
983
- *
984
- * <p>Instead, use the <code>KeySpec</code> parameter.</p>
985
- * <p>The <code>KeySpec</code> and <code>CustomerMasterKeySpec</code> parameters work the same way. Only the names differ. We recommend that you use <code>KeySpec</code> parameter in your code. However, to avoid breaking changes, KMS will support both parameters.</p>
986
- */
987
- CustomerMasterKeySpec?: CustomerMasterKeySpec | string;
988
-
989
- /**
990
- * <p>Specifies the type of KMS key to create. The default value, <code>SYMMETRIC_DEFAULT</code>,
991
- * creates a KMS key with a 256-bit symmetric key for encryption and decryption. For help choosing a
992
- * key spec for your KMS key, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-choose.html">How to Choose Your KMS key
993
- * Configuration</a> in the <i>
994
- * <i>Key Management Service Developer Guide</i>
995
- * </i>.</p>
996
- * <p>The <code>KeySpec</code> determines whether the KMS key contains a symmetric key or an
997
- * asymmetric key pair. It also determines the encryption algorithms or signing algorithms that
998
- * the KMS key supports. You can't change the <code>KeySpec</code> after the KMS key is created.
999
- * To further restrict the algorithms that can be used with the KMS key, use a condition key in
1000
- * its key policy or IAM policy. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-encryption-algorithm">kms:EncryptionAlgorithm</a> or <a href="https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-signing-algorithm">kms:Signing Algorithm</a> in the <i>
1001
- * <i>Key Management Service Developer Guide</i>
1002
- * </i>.</p>
1003
- * <important>
1004
- * <p>
1005
- * <a href="http://aws.amazon.com/kms/features/#AWS_Service_Integration">Amazon Web Services services that
1006
- * are integrated with KMS</a> use symmetric KMS keys to protect your data. These
1007
- * services do not support asymmetric KMS keys. For help determining whether a KMS key is symmetric or
1008
- * asymmetric, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/find-symm-asymm.html">Identifying Symmetric and Asymmetric KMS keys</a> in the <i>Key Management Service Developer
1009
- * Guide</i>.</p>
1010
- * </important>
1011
- * <p>KMS supports the following key specs for KMS keys:</p>
1012
- * <ul>
1013
- * <li>
1014
- * <p>Symmetric key (default)</p>
1015
- * <ul>
1016
- * <li>
1017
- * <p>
1018
- * <code>SYMMETRIC_DEFAULT</code> (AES-256-GCM)</p>
1019
- * </li>
1020
- * </ul>
1021
- * </li>
1022
- * <li>
1023
- * <p>Asymmetric RSA key pairs</p>
1024
- * <ul>
1025
- * <li>
1026
- * <p>
1027
- * <code>RSA_2048</code>
1028
- * </p>
1029
- * </li>
1030
- * <li>
1031
- * <p>
1032
- * <code>RSA_3072</code>
1033
- * </p>
1034
- * </li>
1035
- * <li>
1036
- * <p>
1037
- * <code>RSA_4096</code>
1038
- * </p>
1039
- * </li>
1040
- * </ul>
1041
- * </li>
1042
- * <li>
1043
- * <p>Asymmetric NIST-recommended elliptic curve key pairs</p>
1044
- * <ul>
1045
- * <li>
1046
- * <p>
1047
- * <code>ECC_NIST_P256</code> (secp256r1)</p>
1048
- * </li>
1049
- * <li>
1050
- * <p>
1051
- * <code>ECC_NIST_P384</code> (secp384r1)</p>
1052
- * </li>
1053
- * <li>
1054
- * <p>
1055
- * <code>ECC_NIST_P521</code> (secp521r1)</p>
1056
- * </li>
1057
- * </ul>
1058
- * </li>
1059
- * <li>
1060
- * <p>Other asymmetric elliptic curve key pairs</p>
1061
- * <ul>
1062
- * <li>
1063
- * <p>
1064
- * <code>ECC_SECG_P256K1</code> (secp256k1), commonly used for
1065
- * cryptocurrencies.</p>
1066
- * </li>
1067
- * </ul>
1068
- * </li>
1069
- * </ul>
1070
- */
1071
- KeySpec?: KeySpec | string;
1072
-
1073
- /**
1074
- * <p>The source of the key material for the KMS key. You cannot change the origin after you create
1075
- * the KMS key. The default is <code>AWS_KMS</code>, which means that KMS creates the key
1076
- * material.</p>
1077
- * <p>To create a KMS key with no key material (for imported key material), set the value to
1078
- * <code>EXTERNAL</code>. For more information about importing key material into KMS, see
1079
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html">Importing Key
1080
- * Material</a> in the <i>Key Management Service Developer Guide</i>. This value is valid only for symmetric KMS keys.</p>
1081
- * <p>To create a KMS key in an KMS <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a> and create its key material in the associated
1082
- * CloudHSM cluster, set this value to <code>AWS_CLOUDHSM</code>. You must also use the
1083
- * <code>CustomKeyStoreId</code> parameter to identify the custom key store. This value is
1084
- * valid only for symmetric KMS keys.</p>
1085
- */
1086
- Origin?: OriginType | string;
1087
-
1088
- /**
1089
- * <p>Creates the KMS key in the specified <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a> and the key material in its associated
1090
- * CloudHSM cluster. To create a KMS key in a custom key store, you must also specify the
1091
- * <code>Origin</code> parameter with a value of <code>AWS_CLOUDHSM</code>. The CloudHSM cluster
1092
- * that is associated with the custom key store must have at least two active HSMs, each in a
1093
- * different Availability Zone in the Region.</p>
1094
- * <p>This parameter is valid only for symmetric KMS keys and regional KMS keys. You cannot create an
1095
- * asymmetric KMS key or a multi-Region key in a custom key store.</p>
1096
- * <p>To find the ID of a custom key store, use the <a>DescribeCustomKeyStores</a> operation.</p>
1097
- * <p>The response includes the custom key store ID and the ID of the CloudHSM cluster.</p>
1098
- * <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
1099
- * combines the convenience and extensive integration of KMS with the isolation and control of a
1100
- * single-tenant key store.</p>
1101
- */
1102
- CustomKeyStoreId?: string;
1103
-
1104
- /**
1105
- * <p>A flag to indicate whether to bypass the key policy lockout safety check.</p>
1106
- * <important>
1107
- * <p>Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not
1108
- * set this value to true indiscriminately.</p>
1109
- * <p>For more information, refer to the scenario in the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam">Default Key Policy</a> section in the <i>
1110
- * <i>Key Management Service Developer Guide</i>
1111
- * </i>.</p>
1112
- * </important>
1113
- * <p>Use this parameter only when you include a policy in the request and you intend to prevent
1114
- * the principal that is making the request from making a subsequent <a>PutKeyPolicy</a> request on the KMS key.</p>
1115
- * <p>The default value is false.</p>
1116
- */
1117
- BypassPolicyLockoutSafetyCheck?: boolean;
1118
-
1119
- /**
1120
- * <p>Assigns one or more tags to the KMS key. Use this parameter to tag the KMS key when it is created.
1121
- * To tag an existing KMS key, use the <a>TagResource</a> operation.</p>
1122
- * <note>
1123
- * <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>
1124
- * </note>
1125
- * <p>To use this parameter, you must have <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:TagResource</a> permission in an IAM policy.</p>
1126
- * <p>Each tag consists of a tag key and a tag value. Both the tag key and the tag value are
1127
- * required, but the tag value can be an empty (null) string. You cannot have more than one tag
1128
- * on a KMS key with the same tag key. If you specify an existing tag key with a different tag value,
1129
- * KMS replaces the current tag value with the specified one.</p>
1130
- * <p>When you add tags to an Amazon Web Services resource, Amazon Web Services generates a cost allocation
1131
- * report with usage and costs aggregated by tags. Tags can also be used to control access to a KMS key. For details,
1132
- * see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html">Tagging Keys</a>.</p>
1133
- */
1134
- Tags?: Tag[];
1135
-
1136
- /**
1137
- * <p>Creates a multi-Region primary key that you can replicate into other Amazon Web Services Regions. You
1138
- * cannot change this value after you create the KMS key. </p>
1139
- * <p>For a multi-Region key, set this parameter to <code>True</code>. For a single-Region KMS key,
1140
- * omit this parameter or set it to <code>False</code>. The default value is
1141
- * <code>False</code>.</p>
1142
- * <p>This operation supports <i>multi-Region keys</i>, an KMS feature that lets you create multiple
1143
- * interoperable KMS keys in different Amazon Web Services Regions. Because these KMS keys have the same key ID, key
1144
- * material, and other metadata, you can use them interchangeably to encrypt data in one Amazon Web Services Region and decrypt
1145
- * 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>
1146
- * <p>This value creates a <i>primary key</i>, not a replica. To create a
1147
- * <i>replica key</i>, use the <a>ReplicateKey</a> operation. </p>
1148
- * <p>You can create a symmetric or asymmetric multi-Region key, and you can create a
1149
- * multi-Region key with imported key material. However, you cannot create a multi-Region key in
1150
- * a custom key store.</p>
1151
- */
1152
- MultiRegion?: boolean;
1153
- }
1154
-
1155
- export namespace CreateKeyRequest {
1156
- /**
1157
- * @internal
1158
- */
1159
- export const filterSensitiveLog = (obj: CreateKeyRequest): any => ({
1160
- ...obj,
1161
- });
1162
- }
1163
-
1164
- export enum EncryptionAlgorithmSpec {
1165
- RSAES_OAEP_SHA_1 = "RSAES_OAEP_SHA_1",
1166
- RSAES_OAEP_SHA_256 = "RSAES_OAEP_SHA_256",
1167
- SYMMETRIC_DEFAULT = "SYMMETRIC_DEFAULT",
1168
- }
1169
-
1170
- export enum ExpirationModelType {
1171
- KEY_MATERIAL_DOES_NOT_EXPIRE = "KEY_MATERIAL_DOES_NOT_EXPIRE",
1172
- KEY_MATERIAL_EXPIRES = "KEY_MATERIAL_EXPIRES",
1173
- }
1174
-
1175
- export enum KeyManagerType {
1176
- AWS = "AWS",
1177
- CUSTOMER = "CUSTOMER",
1178
- }
1179
-
1180
- export enum KeyState {
1181
- Creating = "Creating",
1182
- Disabled = "Disabled",
1183
- Enabled = "Enabled",
1184
- PendingDeletion = "PendingDeletion",
1185
- PendingImport = "PendingImport",
1186
- PendingReplicaDeletion = "PendingReplicaDeletion",
1187
- Unavailable = "Unavailable",
1188
- Updating = "Updating",
1189
- }
1190
-
1191
- export enum MultiRegionKeyType {
1192
- PRIMARY = "PRIMARY",
1193
- REPLICA = "REPLICA",
1194
- }
1195
-
1196
- /**
1197
- * <p>Describes the primary or replica key in a multi-Region key.</p>
1198
- */
1199
- export interface MultiRegionKey {
1200
- /**
1201
- * <p>Displays the key ARN of a primary or replica key of a multi-Region key.</p>
1202
- */
1203
- Arn?: string;
1204
-
1205
- /**
1206
- * <p>Displays the Amazon Web Services Region of a primary or replica key in a multi-Region key.</p>
1207
- */
1208
- Region?: string;
1209
- }
1210
-
1211
- export namespace MultiRegionKey {
1212
- /**
1213
- * @internal
1214
- */
1215
- export const filterSensitiveLog = (obj: MultiRegionKey): any => ({
1216
- ...obj,
1217
- });
1218
- }
1219
-
1220
- /**
1221
- * <p>Describes the configuration of this multi-Region key. This field appears only when the KMS key
1222
- * is a primary or replica of a multi-Region key.</p>
1223
- * <p>For more information about any listed KMS key, use the <a>DescribeKey</a>
1224
- * operation.</p>
1225
- */
1226
- export interface MultiRegionConfiguration {
1227
- /**
1228
- * <p>Indicates whether the KMS key is a <code>PRIMARY</code> or <code>REPLICA</code> key.</p>
1229
- */
1230
- MultiRegionKeyType?: MultiRegionKeyType | string;
1231
-
1232
- /**
1233
- * <p>Displays the key ARN and Region of the primary key. This field includes the current KMS key if
1234
- * it is the primary key.</p>
1235
- */
1236
- PrimaryKey?: MultiRegionKey;
1237
-
1238
- /**
1239
- * <p>displays the key ARNs and Regions of all replica keys. This field includes the current KMS key
1240
- * if it is a replica key.</p>
1241
- */
1242
- ReplicaKeys?: MultiRegionKey[];
1243
- }
1244
-
1245
- export namespace MultiRegionConfiguration {
1246
- /**
1247
- * @internal
1248
- */
1249
- export const filterSensitiveLog = (obj: MultiRegionConfiguration): any => ({
1250
- ...obj,
1251
- });
1252
- }
1253
-
1254
- export enum SigningAlgorithmSpec {
1255
- ECDSA_SHA_256 = "ECDSA_SHA_256",
1256
- ECDSA_SHA_384 = "ECDSA_SHA_384",
1257
- ECDSA_SHA_512 = "ECDSA_SHA_512",
1258
- RSASSA_PKCS1_V1_5_SHA_256 = "RSASSA_PKCS1_V1_5_SHA_256",
1259
- RSASSA_PKCS1_V1_5_SHA_384 = "RSASSA_PKCS1_V1_5_SHA_384",
1260
- RSASSA_PKCS1_V1_5_SHA_512 = "RSASSA_PKCS1_V1_5_SHA_512",
1261
- RSASSA_PSS_SHA_256 = "RSASSA_PSS_SHA_256",
1262
- RSASSA_PSS_SHA_384 = "RSASSA_PSS_SHA_384",
1263
- RSASSA_PSS_SHA_512 = "RSASSA_PSS_SHA_512",
1264
- }
1265
-
1266
- /**
1267
- * <p>Contains metadata about a KMS key.</p>
1268
- * <p>This data type is used as a response element for the <a>CreateKey</a> and <a>DescribeKey</a> operations.</p>
1269
- */
1270
- export interface KeyMetadata {
1271
- /**
1272
- * <p>The twelve-digit account ID of the Amazon Web Services account that owns the KMS key.</p>
1273
- */
1274
- AWSAccountId?: string;
1275
-
1276
- /**
1277
- * <p>The globally unique identifier for the KMS key.</p>
1278
- */
1279
- KeyId: string | undefined;
1280
-
1281
- /**
1282
- * <p>The Amazon Resource Name (ARN) of the KMS key. For examples, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms">Key Management Service
1283
- * (KMS)</a> in the Example ARNs section of the <i>Amazon Web Services General
1284
- * Reference</i>.</p>
1285
- */
1286
- Arn?: string;
1287
-
1288
- /**
1289
- * <p>The date and time when the KMS key was created.</p>
1290
- */
1291
- CreationDate?: Date;
1292
-
1293
- /**
1294
- * <p>Specifies whether the KMS key is enabled. When <code>KeyState</code> is <code>Enabled</code>
1295
- * this value is true, otherwise it is false.</p>
1296
- */
1297
- Enabled?: boolean;
1298
-
1299
- /**
1300
- * <p>The description of the KMS key.</p>
1301
- */
1302
- Description?: string;
1303
-
1304
- /**
1305
- * <p>The <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations">cryptographic operations</a> for which you can use the KMS key.</p>
1306
- */
1307
- KeyUsage?: KeyUsageType | string;
1308
-
1309
- /**
1310
- * <p>The current status of the KMS key.</p>
1311
- * <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>
1312
- * in the <i>Key Management Service Developer Guide</i>.</p>
1313
- */
1314
- KeyState?: KeyState | string;
1315
-
1316
- /**
1317
- * <p>The date and time after which KMS deletes this KMS key. This value is present only when the KMS key is scheduled for deletion, that is, when its <code>KeyState</code> is
1318
- * <code>PendingDeletion</code>.</p>
1319
- * <p>When the primary key in a multi-Region key is scheduled for deletion but still has replica
1320
- * keys, its key state is <code>PendingReplicaDeletion</code> and the length of its waiting
1321
- * period is displayed in the <code>PendingDeletionWindowInDays</code> field.</p>
1322
- */
1323
- DeletionDate?: Date;
1324
-
1325
- /**
1326
- * <p>The time at which the imported key material expires. When the key material expires, KMS
1327
- * deletes the key material and the KMS key becomes unusable. This value is present only for KMS keys
1328
- * whose <code>Origin</code> is <code>EXTERNAL</code> and whose <code>ExpirationModel</code> is
1329
- * <code>KEY_MATERIAL_EXPIRES</code>, otherwise this value is omitted.</p>
1330
- */
1331
- ValidTo?: Date;
1332
-
1333
- /**
1334
- * <p>The source of the key material for the KMS key. When this value is <code>AWS_KMS</code>, KMS
1335
- * created the key material. When this value is <code>EXTERNAL</code>, the key material was
1336
- * imported or the KMS key doesn't have any key material. When
1337
- * this value is <code>AWS_CLOUDHSM</code>, the key material was created in the CloudHSM cluster
1338
- * associated with a custom key store.</p>
1339
- */
1340
- Origin?: OriginType | string;
1341
-
1342
- /**
1343
- * <p>A unique identifier for the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a> that contains the KMS key. This value is present
1344
- * only when the KMS key is created in a custom key store.</p>
1345
- */
1346
- CustomKeyStoreId?: string;
1347
-
1348
- /**
1349
- * <p>The cluster ID of the CloudHSM cluster that contains the key material for the KMS key. When you
1350
- * create a KMS key in a <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a>, KMS creates the key material for the KMS key in the
1351
- * associated CloudHSM cluster. This value is present only when the KMS key is created in a custom key
1352
- * store.</p>
1353
- */
1354
- CloudHsmClusterId?: string;
1355
-
1356
- /**
1357
- * <p>Specifies whether the KMS key's key material expires. This value is present only when
1358
- * <code>Origin</code> is <code>EXTERNAL</code>, otherwise this value is omitted.</p>
1359
- */
1360
- ExpirationModel?: ExpirationModelType | string;
1361
-
1362
- /**
1363
- * <p>The manager of the KMS key. KMS keys in your Amazon Web Services account are either customer managed or Amazon Web Services managed. For more information about the difference, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys">KMS keys</a> in the
1364
- * <i>Key Management Service Developer Guide</i>.</p>
1365
- */
1366
- KeyManager?: KeyManagerType | string;
1367
-
1368
- /**
1369
- * @deprecated
1370
- *
1371
- * <p>Instead, use the <code>KeySpec</code> field.</p>
1372
- * <p>The <code>KeySpec</code> and <code>CustomerMasterKeySpec</code> fields have the same value. We recommend that you use the <code>KeySpec</code> field in your code. However, to avoid breaking changes, KMS will support both fields.</p>
1373
- */
1374
- CustomerMasterKeySpec?: CustomerMasterKeySpec | string;
1375
-
1376
- /**
1377
- * <p>Describes the type of key material in the KMS key.</p>
1378
- */
1379
- KeySpec?: KeySpec | string;
1380
-
1381
- /**
1382
- * <p>The encryption algorithms that the KMS key supports. You cannot use the KMS key with other
1383
- * encryption algorithms within KMS.</p>
1384
- * <p>This value is present only when the <code>KeyUsage</code> of the KMS key is
1385
- * <code>ENCRYPT_DECRYPT</code>.</p>
1386
- */
1387
- EncryptionAlgorithms?: (EncryptionAlgorithmSpec | string)[];
1388
-
1389
- /**
1390
- * <p>The signing algorithms that the KMS key supports. You cannot use the KMS key with other signing
1391
- * algorithms within KMS.</p>
1392
- * <p>This field appears only when the <code>KeyUsage</code> of the KMS key is
1393
- * <code>SIGN_VERIFY</code>.</p>
1394
- */
1395
- SigningAlgorithms?: (SigningAlgorithmSpec | string)[];
1396
-
1397
- /**
1398
- * <p>Indicates whether the KMS key is a multi-Region (<code>True</code>) or regional
1399
- * (<code>False</code>) key. This value is <code>True</code> for multi-Region primary and
1400
- * replica keys and <code>False</code> for regional KMS keys.</p>
1401
- * <p>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>
1402
- */
1403
- MultiRegion?: boolean;
1404
-
1405
- /**
1406
- * <p>Lists the primary and replica keys in same multi-Region key. This field is present only
1407
- * when the value of the <code>MultiRegion</code> field is <code>True</code>.</p>
1408
- * <p>For more information about any listed KMS key, use the <a>DescribeKey</a>
1409
- * operation.</p>
1410
- * <ul>
1411
- * <li>
1412
- * <p>
1413
- * <code>MultiRegionKeyType</code> indicates whether the KMS key is a <code>PRIMARY</code> or
1414
- * <code>REPLICA</code> key.</p>
1415
- * </li>
1416
- * <li>
1417
- * <p>
1418
- * <code>PrimaryKey</code> displays the key ARN and Region of the primary key. This field
1419
- * displays the current KMS key if it is the primary key.</p>
1420
- * </li>
1421
- * <li>
1422
- * <p>
1423
- * <code>ReplicaKeys</code> displays the key ARNs and Regions of all replica keys. This
1424
- * field includes the current KMS key if it is a replica key.</p>
1425
- * </li>
1426
- * </ul>
1427
- */
1428
- MultiRegionConfiguration?: MultiRegionConfiguration;
1429
-
1430
- /**
1431
- * <p>The waiting period before the primary key in a multi-Region key is deleted. This waiting
1432
- * period begins when the last of its replica keys is deleted. This value is present only when
1433
- * the <code>KeyState</code> of the KMS key is <code>PendingReplicaDeletion</code>. That indicates
1434
- * that the KMS key is the primary key in a multi-Region key, it is scheduled for deletion, and it
1435
- * still has existing replica keys.</p>
1436
- * <p>When a single-Region KMS key or a multi-Region replica key is scheduled for deletion, its
1437
- * deletion date is displayed in the <code>DeletionDate</code> field. However, when the primary
1438
- * key in a multi-Region key is scheduled for deletion, its waiting period doesn't begin until
1439
- * all of its replica keys are deleted. This value displays that waiting period. When the last
1440
- * replica key in the multi-Region key is deleted, the <code>KeyState</code> of the scheduled
1441
- * primary key changes from <code>PendingReplicaDeletion</code> to <code>PendingDeletion</code>
1442
- * and the deletion date appears in the <code>DeletionDate</code> field.</p>
1443
- */
1444
- PendingDeletionWindowInDays?: number;
1445
- }
1446
-
1447
- export namespace KeyMetadata {
1448
- /**
1449
- * @internal
1450
- */
1451
- export const filterSensitiveLog = (obj: KeyMetadata): any => ({
1452
- ...obj,
1453
- });
1454
- }
1455
-
1456
- export interface CreateKeyResponse {
1457
- /**
1458
- * <p>Metadata associated with the KMS key.</p>
1459
- */
1460
- KeyMetadata?: KeyMetadata;
1461
- }
1462
-
1463
- export namespace CreateKeyResponse {
1464
- /**
1465
- * @internal
1466
- */
1467
- export const filterSensitiveLog = (obj: CreateKeyResponse): any => ({
1468
- ...obj,
1469
- });
1470
- }
1471
-
1472
- /**
1473
- * <p>The request was rejected because the specified policy is not syntactically or semantically
1474
- * correct.</p>
1475
- */
1476
- export interface MalformedPolicyDocumentException extends __SmithyException, $MetadataBearer {
1477
- name: "MalformedPolicyDocumentException";
1478
- $fault: "client";
1479
- message?: string;
1480
- }
1481
-
1482
- export namespace MalformedPolicyDocumentException {
1483
- /**
1484
- * @internal
1485
- */
1486
- export const filterSensitiveLog = (obj: MalformedPolicyDocumentException): any => ({
1487
- ...obj,
1488
- });
1489
- }
1490
-
1491
- /**
1492
- * <p>The request was rejected because one or more tags are not valid.</p>
1493
- */
1494
- export interface TagException extends __SmithyException, $MetadataBearer {
1495
- name: "TagException";
1496
- $fault: "client";
1497
- message?: string;
1498
- }
1499
-
1500
- export namespace TagException {
1501
- /**
1502
- * @internal
1503
- */
1504
- export const filterSensitiveLog = (obj: TagException): any => ({
1505
- ...obj,
1506
- });
1507
- }
1508
-
1509
- /**
1510
- * <p>The request was rejected because a specified parameter is not supported or a specified
1511
- * resource is not valid for this operation.</p>
1512
- */
1513
- export interface UnsupportedOperationException extends __SmithyException, $MetadataBearer {
1514
- name: "UnsupportedOperationException";
1515
- $fault: "client";
1516
- message?: string;
1517
- }
1518
-
1519
- export namespace UnsupportedOperationException {
1520
- /**
1521
- * @internal
1522
- */
1523
- export const filterSensitiveLog = (obj: UnsupportedOperationException): any => ({
1524
- ...obj,
1525
- });
1526
- }
1527
-
1528
- /**
1529
- * <p>The request was rejected because the custom key store contains KMS keys. After verifying that you do not need to use the KMS keys, use the <a>ScheduleKeyDeletion</a> operation to delete the KMS keys. After they are deleted, you
1530
- * can delete the custom key store.</p>
1531
- */
1532
- export interface CustomKeyStoreHasCMKsException extends __SmithyException, $MetadataBearer {
1533
- name: "CustomKeyStoreHasCMKsException";
1534
- $fault: "client";
1535
- message?: string;
1536
- }
1537
-
1538
- export namespace CustomKeyStoreHasCMKsException {
1539
- /**
1540
- * @internal
1541
- */
1542
- export const filterSensitiveLog = (obj: CustomKeyStoreHasCMKsException): any => ({
1543
- ...obj,
1544
- });
1545
- }
1546
-
1547
- /**
1548
- * <p>Contains information about each custom key store in the custom key store list.</p>
1549
- */
1550
- export interface CustomKeyStoresListEntry {
1551
- /**
1552
- * <p>A unique identifier for the custom key store.</p>
1553
- */
1554
- CustomKeyStoreId?: string;
1555
-
1556
- /**
1557
- * <p>The user-specified friendly name for the custom key store.</p>
1558
- */
1559
- CustomKeyStoreName?: string;
1560
-
1561
- /**
1562
- * <p>A unique identifier for the CloudHSM cluster that is associated with the custom key
1563
- * store.</p>
1564
- */
1565
- CloudHsmClusterId?: string;
1566
-
1567
- /**
1568
- * <p>The trust anchor certificate of the associated CloudHSM cluster. When you <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html#sign-csr">initialize the
1569
- * cluster</a>, you create this certificate and save it in the <code>customerCA.crt</code>
1570
- * file.</p>
1571
- */
1572
- TrustAnchorCertificate?: string;
1573
-
1574
- /**
1575
- * <p>Indicates whether the custom key store is connected to its CloudHSM cluster.</p>
1576
- * <p>You can create and use KMS keys in your custom key stores only when its connection state is
1577
- * <code>CONNECTED</code>.</p>
1578
- * <p>The value is <code>DISCONNECTED</code> if the key store has never been connected or you
1579
- * use the <a>DisconnectCustomKeyStore</a> operation to disconnect it. If the value is
1580
- * <code>CONNECTED</code> but you are having trouble using the custom key store, make sure that
1581
- * its associated CloudHSM cluster is active and contains at least one active HSM.</p>
1582
- * <p>A value of <code>FAILED</code> indicates that an attempt to connect was unsuccessful. The
1583
- * <code>ConnectionErrorCode</code> field in the response indicates the cause of the failure.
1584
- * For help resolving a connection failure, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html">Troubleshooting a Custom Key Store</a> in the
1585
- * <i>Key Management Service Developer Guide</i>.</p>
1586
- */
1587
- ConnectionState?: ConnectionStateType | string;
1588
-
1589
- /**
1590
- * <p>Describes the connection error. This field appears in the response only when the
1591
- * <code>ConnectionState</code> is <code>FAILED</code>. For help resolving these errors, see
1592
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-failed">How to
1593
- * Fix a Connection Failure</a> in <i>Key Management Service Developer Guide</i>.</p>
1594
- * <p>Valid values are:</p>
1595
- * <ul>
1596
- * <li>
1597
- * <p>
1598
- * <code>CLUSTER_NOT_FOUND</code> - KMS cannot find the CloudHSM cluster with the
1599
- * specified cluster ID.</p>
1600
- * </li>
1601
- * <li>
1602
- * <p>
1603
- * <code>INSUFFICIENT_CLOUDHSM_HSMS</code> - The associated CloudHSM cluster does not
1604
- * contain any active HSMs. To connect a custom key store to its CloudHSM cluster, the cluster
1605
- * must contain at least one active HSM.</p>
1606
- * </li>
1607
- * <li>
1608
- * <p>
1609
- * <code>INTERNAL_ERROR</code> - KMS could not complete the request due to an internal
1610
- * error. Retry the request. For <code>ConnectCustomKeyStore</code> requests, disconnect the
1611
- * custom key store before trying to connect again.</p>
1612
- * </li>
1613
- * <li>
1614
- * <p>
1615
- * <code>INVALID_CREDENTIALS</code> - KMS does not have the correct password for the
1616
- * <code>kmsuser</code> crypto user in the CloudHSM cluster. Before you can connect your
1617
- * custom key store to its CloudHSM cluster, you must change the <code>kmsuser</code> account
1618
- * password and update the key store password value for the custom key store.</p>
1619
- * </li>
1620
- * <li>
1621
- * <p>
1622
- * <code>NETWORK_ERRORS</code> - Network errors are preventing KMS from connecting to
1623
- * the custom key store.</p>
1624
- * </li>
1625
- * <li>
1626
- * <p>
1627
- * <code>SUBNET_NOT_FOUND</code> - A subnet in the CloudHSM cluster configuration was
1628
- * deleted. If KMS cannot find all of the subnets in the cluster configuration, attempts to
1629
- * connect the custom key store to the CloudHSM cluster fail. To fix this error, create a
1630
- * cluster from a recent backup and associate it with your custom key store. (This process
1631
- * creates a new cluster configuration with a VPC and private subnets.) For details, see
1632
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-failed">How
1633
- * to Fix a Connection Failure</a> in the <i>Key Management Service Developer Guide</i>.</p>
1634
- * </li>
1635
- * <li>
1636
- * <p>
1637
- * <code>USER_LOCKED_OUT</code> - The <code>kmsuser</code> CU account is locked out of
1638
- * the associated CloudHSM cluster due to too many failed password attempts. Before you can
1639
- * connect your custom key store to its CloudHSM cluster, you must change the
1640
- * <code>kmsuser</code> account password and update the key store password value for the
1641
- * custom key store.</p>
1642
- * </li>
1643
- * <li>
1644
- * <p>
1645
- * <code>USER_LOGGED_IN</code> - The <code>kmsuser</code> CU account is logged into the
1646
- * the associated CloudHSM cluster. This prevents KMS from rotating the <code>kmsuser</code>
1647
- * account password and logging into the cluster. Before you can connect your custom key
1648
- * store to its CloudHSM cluster, you must log the <code>kmsuser</code> CU out of the cluster.
1649
- * If you changed the <code>kmsuser</code> password to log into the cluster, you must also
1650
- * and update the key store password value for the custom key store. For help, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#login-kmsuser-2">How to Log Out
1651
- * and Reconnect</a> in the <i>Key Management Service Developer Guide</i>.</p>
1652
- * </li>
1653
- * <li>
1654
- * <p>
1655
- * <code>USER_NOT_FOUND</code> - KMS cannot find a <code>kmsuser</code> CU account in
1656
- * the associated CloudHSM cluster. Before you can connect your custom key store to its CloudHSM
1657
- * cluster, you must create a <code>kmsuser</code> CU account in the cluster, and then update
1658
- * the key store password value for the custom key store.</p>
1659
- * </li>
1660
- * </ul>
1661
- */
1662
- ConnectionErrorCode?: ConnectionErrorCodeType | string;
1663
-
1664
- /**
1665
- * <p>The date and time when the custom key store was created.</p>
1666
- */
1667
- CreationDate?: Date;
1668
- }
1669
-
1670
- export namespace CustomKeyStoresListEntry {
1671
- /**
1672
- * @internal
1673
- */
1674
- export const filterSensitiveLog = (obj: CustomKeyStoresListEntry): any => ({
1675
- ...obj,
1676
- });
1677
- }
1678
-
1679
- export enum DataKeyPairSpec {
1680
- ECC_NIST_P256 = "ECC_NIST_P256",
1681
- ECC_NIST_P384 = "ECC_NIST_P384",
1682
- ECC_NIST_P521 = "ECC_NIST_P521",
1683
- ECC_SECG_P256K1 = "ECC_SECG_P256K1",
1684
- RSA_2048 = "RSA_2048",
1685
- RSA_3072 = "RSA_3072",
1686
- RSA_4096 = "RSA_4096",
1687
- }
1688
-
1689
- export enum DataKeySpec {
1690
- AES_128 = "AES_128",
1691
- AES_256 = "AES_256",
1692
- }
1693
-
1694
- export interface DecryptRequest {
1695
- /**
1696
- * <p>Ciphertext to be decrypted. The blob includes metadata.</p>
1697
- */
1698
- CiphertextBlob: Uint8Array | undefined;
1699
-
1700
- /**
1701
- * <p>Specifies the encryption context to use when decrypting the data.
1702
- * An encryption context is valid only for <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations">cryptographic operations</a> with a symmetric KMS key. The standard asymmetric encryption algorithms that KMS uses do not support an encryption context.</p>
1703
- * <p>An <i>encryption context</i> is a collection of non-secret key-value pairs that represents additional authenticated data. When you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data. An encryption context is optional when encrypting with a symmetric KMS key, but it is highly recommended.</p>
1704
- * <p>For more information, see
1705
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">Encryption
1706
- * Context</a> in the <i>Key Management Service Developer Guide</i>.</p>
1707
- */
1708
- EncryptionContext?: { [key: string]: string };
1709
-
1710
- /**
1711
- * <p>A list of grant tokens. </p>
1712
- * <p>Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved <i>eventual consistency</i>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token">Grant token</a> and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token">Using a grant token</a> in the
1713
- * <i>Key Management Service Developer Guide</i>.</p>
1714
- */
1715
- GrantTokens?: string[];
1716
-
1717
- /**
1718
- * <p>Specifies the KMS key that KMS uses to decrypt the ciphertext. Enter a
1719
- * key ID of the KMS key that was used to encrypt the ciphertext. </p>
1720
- *
1721
- * <p>This parameter is required only when the ciphertext was encrypted under an asymmetric KMS key.
1722
- * If you used a symmetric KMS key, KMS can get the KMS key from metadata that it adds to the
1723
- * symmetric ciphertext blob. However, it is always recommended as a best practice. This practice
1724
- * ensures that you use the KMS key that you intend.</p>
1725
- *
1726
- * <p>To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with <code>"alias/"</code>. To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p>
1727
- * <p>For example:</p>
1728
- * <ul>
1729
- * <li>
1730
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
1731
- * </p>
1732
- * </li>
1733
- * <li>
1734
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
1735
- * </p>
1736
- * </li>
1737
- * <li>
1738
- * <p>Alias name: <code>alias/ExampleAlias</code>
1739
- * </p>
1740
- * </li>
1741
- * <li>
1742
- * <p>Alias ARN: <code>arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</code>
1743
- * </p>
1744
- * </li>
1745
- * </ul>
1746
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>. To get the alias name and alias ARN, use <a>ListAliases</a>.</p>
1747
- */
1748
- KeyId?: string;
1749
-
1750
- /**
1751
- * <p>Specifies the encryption algorithm that will be used to decrypt the ciphertext. Specify
1752
- * the same algorithm that was used to encrypt the data. If you specify a different algorithm,
1753
- * the <code>Decrypt</code> operation fails.</p>
1754
- * <p>This parameter is required only when the ciphertext was encrypted under an asymmetric KMS key.
1755
- * The default value, <code>SYMMETRIC_DEFAULT</code>, represents the only supported algorithm
1756
- * that is valid for symmetric KMS keys.</p>
1757
- */
1758
- EncryptionAlgorithm?: EncryptionAlgorithmSpec | string;
1759
- }
1760
-
1761
- export namespace DecryptRequest {
1762
- /**
1763
- * @internal
1764
- */
1765
- export const filterSensitiveLog = (obj: DecryptRequest): any => ({
1766
- ...obj,
1767
- });
1768
- }
1769
-
1770
- export interface DecryptResponse {
1771
- /**
1772
- * <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">key ARN</a>) of the KMS key that was used to decrypt the ciphertext.</p>
1773
- */
1774
- KeyId?: string;
1775
-
1776
- /**
1777
- * <p>Decrypted plaintext data. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.</p>
1778
- */
1779
- Plaintext?: Uint8Array;
1780
-
1781
- /**
1782
- * <p>The encryption algorithm that was used to decrypt the ciphertext.</p>
1783
- */
1784
- EncryptionAlgorithm?: EncryptionAlgorithmSpec | string;
1785
- }
1786
-
1787
- export namespace DecryptResponse {
1788
- /**
1789
- * @internal
1790
- */
1791
- export const filterSensitiveLog = (obj: DecryptResponse): any => ({
1792
- ...obj,
1793
- ...(obj.Plaintext && { Plaintext: SENSITIVE_STRING }),
1794
- });
1795
- }
1796
-
1797
- /**
1798
- * <p>The request was rejected because the specified KMS key cannot decrypt the data. The
1799
- * <code>KeyId</code> in a <a>Decrypt</a> request and the <code>SourceKeyId</code>
1800
- * in a <a>ReEncrypt</a> request must identify the same KMS key that was used to encrypt
1801
- * the ciphertext.</p>
1802
- */
1803
- export interface IncorrectKeyException extends __SmithyException, $MetadataBearer {
1804
- name: "IncorrectKeyException";
1805
- $fault: "client";
1806
- message?: string;
1807
- }
1808
-
1809
- export namespace IncorrectKeyException {
1810
- /**
1811
- * @internal
1812
- */
1813
- export const filterSensitiveLog = (obj: IncorrectKeyException): any => ({
1814
- ...obj,
1815
- });
1816
- }
1817
-
1818
- /**
1819
- * <p>From the <a>Decrypt</a> or <a>ReEncrypt</a> operation, the request
1820
- * was rejected because the specified ciphertext, or additional authenticated data incorporated
1821
- * into the ciphertext, such as the encryption context, is corrupted, missing, or otherwise
1822
- * invalid.</p>
1823
- * <p>From the <a>ImportKeyMaterial</a> operation, the request was rejected because
1824
- * KMS could not decrypt the encrypted (wrapped) key material. </p>
1825
- */
1826
- export interface InvalidCiphertextException extends __SmithyException, $MetadataBearer {
1827
- name: "InvalidCiphertextException";
1828
- $fault: "client";
1829
- message?: string;
1830
- }
1831
-
1832
- export namespace InvalidCiphertextException {
1833
- /**
1834
- * @internal
1835
- */
1836
- export const filterSensitiveLog = (obj: InvalidCiphertextException): any => ({
1837
- ...obj,
1838
- });
1839
- }
1840
-
1841
- /**
1842
- * <p>The request was rejected for one of the following reasons: </p>
1843
- * <ul>
1844
- * <li>
1845
- * <p>The <code>KeyUsage</code> value of the KMS key is incompatible with the API
1846
- * operation.</p>
1847
- * </li>
1848
- * <li>
1849
- * <p>The encryption algorithm or signing algorithm specified for the operation is
1850
- * incompatible with the type of key material in the KMS key
1851
- * <code>(KeySpec</code>).</p>
1852
- * </li>
1853
- * </ul>
1854
- * <p>For encrypting, decrypting, re-encrypting, and generating data keys, the
1855
- * <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying, the
1856
- * <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. To find the <code>KeyUsage</code> of
1857
- * a KMS key, use the <a>DescribeKey</a> operation.</p>
1858
- * <p>To find the encryption or signing algorithms supported for a particular KMS key, use the <a>DescribeKey</a> operation.</p>
1859
- */
1860
- export interface InvalidKeyUsageException extends __SmithyException, $MetadataBearer {
1861
- name: "InvalidKeyUsageException";
1862
- $fault: "client";
1863
- message?: string;
1864
- }
1865
-
1866
- export namespace InvalidKeyUsageException {
1867
- /**
1868
- * @internal
1869
- */
1870
- export const filterSensitiveLog = (obj: InvalidKeyUsageException): any => ({
1871
- ...obj,
1872
- });
1873
- }
1874
-
1875
- /**
1876
- * <p>The request was rejected because the specified KMS key was not available. You can retry the
1877
- * request.</p>
1878
- */
1879
- export interface KeyUnavailableException extends __SmithyException, $MetadataBearer {
1880
- name: "KeyUnavailableException";
1881
- $fault: "server";
1882
- message?: string;
1883
- }
1884
-
1885
- export namespace KeyUnavailableException {
1886
- /**
1887
- * @internal
1888
- */
1889
- export const filterSensitiveLog = (obj: KeyUnavailableException): any => ({
1890
- ...obj,
1891
- });
1892
- }
1893
-
1894
- export interface DeleteAliasRequest {
1895
- /**
1896
- * <p>The alias to be deleted. The alias name must begin with <code>alias/</code> followed by
1897
- * the alias name, such as <code>alias/ExampleAlias</code>.</p>
1898
- */
1899
- AliasName: string | undefined;
1900
- }
1901
-
1902
- export namespace DeleteAliasRequest {
1903
- /**
1904
- * @internal
1905
- */
1906
- export const filterSensitiveLog = (obj: DeleteAliasRequest): any => ({
1907
- ...obj,
1908
- });
1909
- }
1910
-
1911
- export interface DeleteCustomKeyStoreRequest {
1912
- /**
1913
- * <p>Enter the ID of the custom key store you want to delete. To find the ID of a custom key store, use the <a>DescribeCustomKeyStores</a> operation.</p>
1914
- */
1915
- CustomKeyStoreId: string | undefined;
1916
- }
1917
-
1918
- export namespace DeleteCustomKeyStoreRequest {
1919
- /**
1920
- * @internal
1921
- */
1922
- export const filterSensitiveLog = (obj: DeleteCustomKeyStoreRequest): any => ({
1923
- ...obj,
1924
- });
1925
- }
1926
-
1927
- export interface DeleteCustomKeyStoreResponse {}
1928
-
1929
- export namespace DeleteCustomKeyStoreResponse {
1930
- /**
1931
- * @internal
1932
- */
1933
- export const filterSensitiveLog = (obj: DeleteCustomKeyStoreResponse): any => ({
1934
- ...obj,
1935
- });
1936
- }
1937
-
1938
- export interface DeleteImportedKeyMaterialRequest {
1939
- /**
1940
- * <p>Identifies the KMS key from which you are deleting imported key material. The
1941
- * <code>Origin</code> of the KMS key must be <code>EXTERNAL</code>.</p>
1942
- * <p>Specify the key ID or key ARN of the KMS key.</p>
1943
- * <p>For example:</p>
1944
- * <ul>
1945
- * <li>
1946
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
1947
- * </p>
1948
- * </li>
1949
- * <li>
1950
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
1951
- * </p>
1952
- * </li>
1953
- * </ul>
1954
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
1955
- */
1956
- KeyId: string | undefined;
1957
- }
1958
-
1959
- export namespace DeleteImportedKeyMaterialRequest {
1960
- /**
1961
- * @internal
1962
- */
1963
- export const filterSensitiveLog = (obj: DeleteImportedKeyMaterialRequest): any => ({
1964
- ...obj,
1965
- });
1966
- }
1967
-
1968
- export interface DescribeCustomKeyStoresRequest {
1969
- /**
1970
- * <p>Gets only information about the specified custom key store. Enter the key store ID.</p>
1971
- * <p>By default, this operation gets information about all custom key stores in the account and
1972
- * Region. To limit the output to a particular custom key store, you can use either the
1973
- * <code>CustomKeyStoreId</code> or <code>CustomKeyStoreName</code> parameter, but not
1974
- * both.</p>
1975
- */
1976
- CustomKeyStoreId?: string;
1977
-
1978
- /**
1979
- * <p>Gets only information about the specified custom key store. Enter the friendly name of the
1980
- * custom key store.</p>
1981
- * <p>By default, this operation gets information about all custom key stores in the account and
1982
- * Region. To limit the output to a particular custom key store, you can use either the
1983
- * <code>CustomKeyStoreId</code> or <code>CustomKeyStoreName</code> parameter, but not
1984
- * both.</p>
1985
- */
1986
- CustomKeyStoreName?: string;
1987
-
1988
- /**
1989
- * <p>Use this parameter to specify the maximum number of items to return. When this
1990
- * value is present, KMS does not return more than the specified number of items, but it might
1991
- * return fewer.</p>
1992
- */
1993
- Limit?: number;
1994
-
1995
- /**
1996
- * <p>Use this parameter in a subsequent request after you receive a response with
1997
- * truncated results. Set it to the value of <code>NextMarker</code> from the truncated response
1998
- * you just received.</p>
1999
- */
2000
- Marker?: string;
2001
- }
2002
-
2003
- export namespace DescribeCustomKeyStoresRequest {
2004
- /**
2005
- * @internal
2006
- */
2007
- export const filterSensitiveLog = (obj: DescribeCustomKeyStoresRequest): any => ({
2008
- ...obj,
2009
- });
2010
- }
2011
-
2012
- export interface DescribeCustomKeyStoresResponse {
2013
- /**
2014
- * <p>Contains metadata about each custom key store.</p>
2015
- */
2016
- CustomKeyStores?: CustomKeyStoresListEntry[];
2017
-
2018
- /**
2019
- * <p>When <code>Truncated</code> is true, this element is present and contains the
2020
- * value to use for the <code>Marker</code> parameter in a subsequent request.</p>
2021
- */
2022
- NextMarker?: string;
2023
-
2024
- /**
2025
- * <p>A flag that indicates whether there are more items in the list. When this
2026
- * value is true, the list in this response is truncated. To get more items, pass the value of
2027
- * the <code>NextMarker</code> element in thisresponse to the <code>Marker</code> parameter in a
2028
- * subsequent request.</p>
2029
- */
2030
- Truncated?: boolean;
2031
- }
2032
-
2033
- export namespace DescribeCustomKeyStoresResponse {
2034
- /**
2035
- * @internal
2036
- */
2037
- export const filterSensitiveLog = (obj: DescribeCustomKeyStoresResponse): any => ({
2038
- ...obj,
2039
- });
2040
- }
2041
-
2042
- /**
2043
- * <p>The request was rejected because the marker that specifies where pagination should next
2044
- * begin is not valid.</p>
2045
- */
2046
- export interface InvalidMarkerException extends __SmithyException, $MetadataBearer {
2047
- name: "InvalidMarkerException";
2048
- $fault: "client";
2049
- message?: string;
2050
- }
2051
-
2052
- export namespace InvalidMarkerException {
2053
- /**
2054
- * @internal
2055
- */
2056
- export const filterSensitiveLog = (obj: InvalidMarkerException): any => ({
2057
- ...obj,
2058
- });
2059
- }
2060
-
2061
- export interface DescribeKeyRequest {
2062
- /**
2063
- * <p>Describes the specified KMS key. </p>
2064
- * <p>If you specify a predefined Amazon Web Services alias (an Amazon Web Services alias with no key ID), KMS associates the
2065
- * alias with an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html##aws-managed-cmk">Amazon Web Services managed key</a> and returns its <code>KeyId</code> and <code>Arn</code> in the
2066
- * response.</p>
2067
- * <p>To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with <code>"alias/"</code>. To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p>
2068
- * <p>For example:</p>
2069
- * <ul>
2070
- * <li>
2071
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
2072
- * </p>
2073
- * </li>
2074
- * <li>
2075
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
2076
- * </p>
2077
- * </li>
2078
- * <li>
2079
- * <p>Alias name: <code>alias/ExampleAlias</code>
2080
- * </p>
2081
- * </li>
2082
- * <li>
2083
- * <p>Alias ARN: <code>arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</code>
2084
- * </p>
2085
- * </li>
2086
- * </ul>
2087
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>. To get the alias name and alias ARN, use <a>ListAliases</a>.</p>
2088
- */
2089
- KeyId: string | undefined;
2090
-
2091
- /**
2092
- * <p>A list of grant tokens.</p>
2093
- * <p>Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved <i>eventual consistency</i>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token">Grant token</a> and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token">Using a grant token</a> in the
2094
- * <i>Key Management Service Developer Guide</i>.</p>
2095
- */
2096
- GrantTokens?: string[];
2097
- }
2098
-
2099
- export namespace DescribeKeyRequest {
2100
- /**
2101
- * @internal
2102
- */
2103
- export const filterSensitiveLog = (obj: DescribeKeyRequest): any => ({
2104
- ...obj,
2105
- });
2106
- }
2107
-
2108
- export interface DescribeKeyResponse {
2109
- /**
2110
- * <p>Metadata associated with the key.</p>
2111
- */
2112
- KeyMetadata?: KeyMetadata;
2113
- }
2114
-
2115
- export namespace DescribeKeyResponse {
2116
- /**
2117
- * @internal
2118
- */
2119
- export const filterSensitiveLog = (obj: DescribeKeyResponse): any => ({
2120
- ...obj,
2121
- });
2122
- }
2123
-
2124
- export interface DisableKeyRequest {
2125
- /**
2126
- * <p>Identifies the KMS key to disable.</p>
2127
- * <p>Specify the key ID or key ARN of the KMS key.</p>
2128
- * <p>For example:</p>
2129
- * <ul>
2130
- * <li>
2131
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
2132
- * </p>
2133
- * </li>
2134
- * <li>
2135
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
2136
- * </p>
2137
- * </li>
2138
- * </ul>
2139
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
2140
- */
2141
- KeyId: string | undefined;
2142
- }
2143
-
2144
- export namespace DisableKeyRequest {
2145
- /**
2146
- * @internal
2147
- */
2148
- export const filterSensitiveLog = (obj: DisableKeyRequest): any => ({
2149
- ...obj,
2150
- });
2151
- }
2152
-
2153
- export interface DisableKeyRotationRequest {
2154
- /**
2155
- * <p>Identifies a symmetric KMS key. You cannot enable or disable automatic
2156
- * rotation of <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html#asymmetric-cmks">asymmetric KMS keys</a>, KMS keys
2157
- * with <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html">imported key
2158
- * 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>.</p>
2159
- * <p>Specify the key ID or key ARN of the KMS key.</p>
2160
- * <p>For example:</p>
2161
- * <ul>
2162
- * <li>
2163
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
2164
- * </p>
2165
- * </li>
2166
- * <li>
2167
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
2168
- * </p>
2169
- * </li>
2170
- * </ul>
2171
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
2172
- */
2173
- KeyId: string | undefined;
2174
- }
2175
-
2176
- export namespace DisableKeyRotationRequest {
2177
- /**
2178
- * @internal
2179
- */
2180
- export const filterSensitiveLog = (obj: DisableKeyRotationRequest): any => ({
2181
- ...obj,
2182
- });
2183
- }
2184
-
2185
- export interface DisconnectCustomKeyStoreRequest {
2186
- /**
2187
- * <p>Enter the ID of the custom key store you want to disconnect. To find the ID of a custom key store, use the <a>DescribeCustomKeyStores</a> operation.</p>
2188
- */
2189
- CustomKeyStoreId: string | undefined;
2190
- }
2191
-
2192
- export namespace DisconnectCustomKeyStoreRequest {
2193
- /**
2194
- * @internal
2195
- */
2196
- export const filterSensitiveLog = (obj: DisconnectCustomKeyStoreRequest): any => ({
2197
- ...obj,
2198
- });
2199
- }
2200
-
2201
- export interface DisconnectCustomKeyStoreResponse {}
2202
-
2203
- export namespace DisconnectCustomKeyStoreResponse {
2204
- /**
2205
- * @internal
2206
- */
2207
- export const filterSensitiveLog = (obj: DisconnectCustomKeyStoreResponse): any => ({
2208
- ...obj,
2209
- });
2210
- }
2211
-
2212
- export interface EnableKeyRequest {
2213
- /**
2214
- * <p>Identifies the KMS key to enable.</p>
2215
- * <p>Specify the key ID or key ARN of the KMS key.</p>
2216
- * <p>For example:</p>
2217
- * <ul>
2218
- * <li>
2219
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
2220
- * </p>
2221
- * </li>
2222
- * <li>
2223
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
2224
- * </p>
2225
- * </li>
2226
- * </ul>
2227
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
2228
- */
2229
- KeyId: string | undefined;
2230
- }
2231
-
2232
- export namespace EnableKeyRequest {
2233
- /**
2234
- * @internal
2235
- */
2236
- export const filterSensitiveLog = (obj: EnableKeyRequest): any => ({
2237
- ...obj,
2238
- });
2239
- }
2240
-
2241
- export interface EnableKeyRotationRequest {
2242
- /**
2243
- * <p>Identifies a symmetric KMS key. 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>
2244
- *
2245
- * <p>Specify the key ID or key ARN of the KMS key.</p>
2246
- * <p>For example:</p>
2247
- * <ul>
2248
- * <li>
2249
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
2250
- * </p>
2251
- * </li>
2252
- * <li>
2253
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
2254
- * </p>
2255
- * </li>
2256
- * </ul>
2257
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
2258
- */
2259
- KeyId: string | undefined;
2260
- }
2261
-
2262
- export namespace EnableKeyRotationRequest {
2263
- /**
2264
- * @internal
2265
- */
2266
- export const filterSensitiveLog = (obj: EnableKeyRotationRequest): any => ({
2267
- ...obj,
2268
- });
2269
- }
2270
-
2271
- export interface EncryptRequest {
2272
- /**
2273
- * <p>Identifies the KMS key to use in the encryption operation.</p>
2274
- * <p>To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with <code>"alias/"</code>. To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p>
2275
- * <p>For example:</p>
2276
- * <ul>
2277
- * <li>
2278
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
2279
- * </p>
2280
- * </li>
2281
- * <li>
2282
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
2283
- * </p>
2284
- * </li>
2285
- * <li>
2286
- * <p>Alias name: <code>alias/ExampleAlias</code>
2287
- * </p>
2288
- * </li>
2289
- * <li>
2290
- * <p>Alias ARN: <code>arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</code>
2291
- * </p>
2292
- * </li>
2293
- * </ul>
2294
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>. To get the alias name and alias ARN, use <a>ListAliases</a>.</p>
2295
- */
2296
- KeyId: string | undefined;
2297
-
2298
- /**
2299
- * <p>Data to be encrypted.</p>
2300
- */
2301
- Plaintext: Uint8Array | undefined;
2302
-
2303
- /**
2304
- * <p>Specifies the encryption context that will be used to encrypt the data.
2305
- * An encryption context is valid only for <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations">cryptographic operations</a> with a symmetric KMS key. The standard asymmetric encryption algorithms that KMS uses do not support an encryption context. </p>
2306
- * <p>An <i>encryption context</i> is a collection of non-secret key-value pairs that represents additional authenticated data. When you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data. An encryption context is optional when encrypting with a symmetric KMS key, but it is highly recommended.</p>
2307
- * <p>For more information, see
2308
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">Encryption
2309
- * Context</a> in the <i>Key Management Service Developer Guide</i>.</p>
2310
- */
2311
- EncryptionContext?: { [key: string]: string };
2312
-
2313
- /**
2314
- * <p>A list of grant tokens.</p>
2315
- * <p>Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved <i>eventual consistency</i>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token">Grant token</a> and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token">Using a grant token</a> in the
2316
- * <i>Key Management Service Developer Guide</i>.</p>
2317
- */
2318
- GrantTokens?: string[];
2319
-
2320
- /**
2321
- * <p>Specifies the encryption algorithm that KMS will use to encrypt the plaintext message.
2322
- * The algorithm must be compatible with the KMS key that you specify.</p>
2323
- * <p>This parameter is required only for asymmetric KMS keys. The default value,
2324
- * <code>SYMMETRIC_DEFAULT</code>, is the algorithm used for symmetric KMS keys. If you are using
2325
- * an asymmetric KMS key, we recommend RSAES_OAEP_SHA_256.</p>
2326
- */
2327
- EncryptionAlgorithm?: EncryptionAlgorithmSpec | string;
2328
- }
2329
-
2330
- export namespace EncryptRequest {
2331
- /**
2332
- * @internal
2333
- */
2334
- export const filterSensitiveLog = (obj: EncryptRequest): any => ({
2335
- ...obj,
2336
- ...(obj.Plaintext && { Plaintext: SENSITIVE_STRING }),
2337
- });
2338
- }
2339
-
2340
- export interface EncryptResponse {
2341
- /**
2342
- * <p>The encrypted plaintext. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.</p>
2343
- */
2344
- CiphertextBlob?: Uint8Array;
2345
-
2346
- /**
2347
- * <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">key ARN</a>) of the KMS key that was used to encrypt the plaintext.</p>
2348
- */
2349
- KeyId?: string;
2350
-
2351
- /**
2352
- * <p>The encryption algorithm that was used to encrypt the plaintext.</p>
2353
- */
2354
- EncryptionAlgorithm?: EncryptionAlgorithmSpec | string;
2355
- }
2356
-
2357
- export namespace EncryptResponse {
2358
- /**
2359
- * @internal
2360
- */
2361
- export const filterSensitiveLog = (obj: EncryptResponse): any => ({
2362
- ...obj,
2363
- });
2364
- }
2365
-
2366
- /**
2367
- * <p>The request was rejected because the specified import token is expired. Use <a>GetParametersForImport</a> to get a new import token and public key, use the new
2368
- * public key to encrypt the key material, and then try the request again.</p>
2369
- */
2370
- export interface ExpiredImportTokenException extends __SmithyException, $MetadataBearer {
2371
- name: "ExpiredImportTokenException";
2372
- $fault: "client";
2373
- message?: string;
2374
- }
2375
-
2376
- export namespace ExpiredImportTokenException {
2377
- /**
2378
- * @internal
2379
- */
2380
- export const filterSensitiveLog = (obj: ExpiredImportTokenException): any => ({
2381
- ...obj,
2382
- });
2383
- }
2384
-
2385
- export interface GenerateDataKeyRequest {
2386
- /**
2387
- * <p>Identifies the symmetric KMS key that encrypts the data key.</p>
2388
- *
2389
- * <p>To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with <code>"alias/"</code>. To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p>
2390
- * <p>For example:</p>
2391
- * <ul>
2392
- * <li>
2393
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
2394
- * </p>
2395
- * </li>
2396
- * <li>
2397
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
2398
- * </p>
2399
- * </li>
2400
- * <li>
2401
- * <p>Alias name: <code>alias/ExampleAlias</code>
2402
- * </p>
2403
- * </li>
2404
- * <li>
2405
- * <p>Alias ARN: <code>arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</code>
2406
- * </p>
2407
- * </li>
2408
- * </ul>
2409
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>. To get the alias name and alias ARN, use <a>ListAliases</a>.</p>
2410
- */
2411
- KeyId: string | undefined;
2412
-
2413
- /**
2414
- * <p>Specifies the encryption context that will be used when encrypting the data key.</p>
2415
- * <p>An <i>encryption context</i> is a collection of non-secret key-value pairs that represents additional authenticated data. When you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data. An encryption context is optional when encrypting with a symmetric KMS key, but it is highly recommended.</p>
2416
- * <p>For more information, see
2417
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">Encryption
2418
- * Context</a> in the <i>Key Management Service Developer Guide</i>.</p>
2419
- */
2420
- EncryptionContext?: { [key: string]: string };
2421
-
2422
- /**
2423
- * <p>Specifies the length of the data key in bytes. For example, use the value 64 to generate a
2424
- * 512-bit data key (64 bytes is 512 bits). For 128-bit (16-byte) and 256-bit (32-byte) data
2425
- * keys, use the <code>KeySpec</code> parameter.</p>
2426
- * <p>You must specify either the <code>KeySpec</code> or the <code>NumberOfBytes</code>
2427
- * parameter (but not both) in every <code>GenerateDataKey</code> request.</p>
2428
- */
2429
- NumberOfBytes?: number;
2430
-
2431
- /**
2432
- * <p>Specifies the length of the data key. Use <code>AES_128</code> to generate a 128-bit
2433
- * symmetric key, or <code>AES_256</code> to generate a 256-bit symmetric key.</p>
2434
- * <p>You must specify either the <code>KeySpec</code> or the <code>NumberOfBytes</code>
2435
- * parameter (but not both) in every <code>GenerateDataKey</code> request.</p>
2436
- */
2437
- KeySpec?: DataKeySpec | string;
2438
-
2439
- /**
2440
- * <p>A list of grant tokens.</p>
2441
- * <p>Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved <i>eventual consistency</i>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token">Grant token</a> and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token">Using a grant token</a> in the
2442
- * <i>Key Management Service Developer Guide</i>.</p>
2443
- */
2444
- GrantTokens?: string[];
2445
- }
2446
-
2447
- export namespace GenerateDataKeyRequest {
2448
- /**
2449
- * @internal
2450
- */
2451
- export const filterSensitiveLog = (obj: GenerateDataKeyRequest): any => ({
2452
- ...obj,
2453
- });
2454
- }
2455
-
2456
- export interface GenerateDataKeyResponse {
2457
- /**
2458
- * <p>The encrypted copy of the data key. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.</p>
2459
- */
2460
- CiphertextBlob?: Uint8Array;
2461
-
2462
- /**
2463
- * <p>The plaintext data key. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded. Use this data key to encrypt your data outside of
2464
- * KMS. Then, remove it from memory as soon as possible.</p>
2465
- */
2466
- Plaintext?: Uint8Array;
2467
-
2468
- /**
2469
- * <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">key ARN</a>) of the KMS key that encrypted the data key.</p>
2470
- */
2471
- KeyId?: string;
2472
- }
2473
-
2474
- export namespace GenerateDataKeyResponse {
2475
- /**
2476
- * @internal
2477
- */
2478
- export const filterSensitiveLog = (obj: GenerateDataKeyResponse): any => ({
2479
- ...obj,
2480
- ...(obj.Plaintext && { Plaintext: SENSITIVE_STRING }),
2481
- });
2482
- }
2483
-
2484
- export interface GenerateDataKeyPairRequest {
2485
- /**
2486
- * <p>Specifies the encryption context that will be used when encrypting the private key in the
2487
- * data key pair.</p>
2488
- * <p>An <i>encryption context</i> is a collection of non-secret key-value pairs that represents additional authenticated data. When you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data. An encryption context is optional when encrypting with a symmetric KMS key, but it is highly recommended.</p>
2489
- * <p>For more information, see
2490
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">Encryption
2491
- * Context</a> in the <i>Key Management Service Developer Guide</i>.</p>
2492
- */
2493
- EncryptionContext?: { [key: string]: string };
2494
-
2495
- /**
2496
- * <p>Specifies the symmetric KMS key that encrypts the private key in the data key pair. You cannot
2497
- * specify an asymmetric KMS key or a KMS key in a custom key store. To get the type and origin of your KMS key, use the <a>DescribeKey</a> operation.</p>
2498
- *
2499
- * <p>To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with <code>"alias/"</code>. To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p>
2500
- * <p>For example:</p>
2501
- * <ul>
2502
- * <li>
2503
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
2504
- * </p>
2505
- * </li>
2506
- * <li>
2507
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
2508
- * </p>
2509
- * </li>
2510
- * <li>
2511
- * <p>Alias name: <code>alias/ExampleAlias</code>
2512
- * </p>
2513
- * </li>
2514
- * <li>
2515
- * <p>Alias ARN: <code>arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</code>
2516
- * </p>
2517
- * </li>
2518
- * </ul>
2519
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>. To get the alias name and alias ARN, use <a>ListAliases</a>.</p>
2520
- */
2521
- KeyId: string | undefined;
2522
-
2523
- /**
2524
- * <p>Determines the type of data key pair that is generated. </p>
2525
- * <p>The KMS rule that restricts the use of asymmetric RSA KMS keys to encrypt and decrypt or to sign and verify (but not both), and the rule that permits you to use ECC KMS keys only to sign and verify, are not effective on data key pairs, which are used outside of KMS.</p>
2526
- */
2527
- KeyPairSpec: DataKeyPairSpec | string | undefined;
2528
-
2529
- /**
2530
- * <p>A list of grant tokens.</p>
2531
- * <p>Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved <i>eventual consistency</i>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token">Grant token</a> and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token">Using a grant token</a> in the
2532
- * <i>Key Management Service Developer Guide</i>.</p>
2533
- */
2534
- GrantTokens?: string[];
2535
- }
2536
-
2537
- export namespace GenerateDataKeyPairRequest {
2538
- /**
2539
- * @internal
2540
- */
2541
- export const filterSensitiveLog = (obj: GenerateDataKeyPairRequest): any => ({
2542
- ...obj,
2543
- });
2544
- }
2545
-
2546
- export interface GenerateDataKeyPairResponse {
2547
- /**
2548
- * <p>The encrypted copy of the private key. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.</p>
2549
- */
2550
- PrivateKeyCiphertextBlob?: Uint8Array;
2551
-
2552
- /**
2553
- * <p>The plaintext copy of the private key. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.</p>
2554
- */
2555
- PrivateKeyPlaintext?: Uint8Array;
2556
-
2557
- /**
2558
- * <p>The public key (in plaintext).</p>
2559
- */
2560
- PublicKey?: Uint8Array;
2561
-
2562
- /**
2563
- * <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">key ARN</a>) of the KMS key that encrypted the private key.</p>
2564
- */
2565
- KeyId?: string;
2566
-
2567
- /**
2568
- * <p>The type of data key pair that was generated.</p>
2569
- */
2570
- KeyPairSpec?: DataKeyPairSpec | string;
2571
- }
2572
-
2573
- export namespace GenerateDataKeyPairResponse {
2574
- /**
2575
- * @internal
2576
- */
2577
- export const filterSensitiveLog = (obj: GenerateDataKeyPairResponse): any => ({
2578
- ...obj,
2579
- ...(obj.PrivateKeyPlaintext && { PrivateKeyPlaintext: SENSITIVE_STRING }),
2580
- });
2581
- }
2582
-
2583
- export interface GenerateDataKeyPairWithoutPlaintextRequest {
2584
- /**
2585
- * <p>Specifies the encryption context that will be used when encrypting the private key in the
2586
- * data key pair.</p>
2587
- * <p>An <i>encryption context</i> is a collection of non-secret key-value pairs that represents additional authenticated data. When you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data. An encryption context is optional when encrypting with a symmetric KMS key, but it is highly recommended.</p>
2588
- * <p>For more information, see
2589
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">Encryption
2590
- * Context</a> in the <i>Key Management Service Developer Guide</i>.</p>
2591
- */
2592
- EncryptionContext?: { [key: string]: string };
2593
-
2594
- /**
2595
- * <p>Specifies the KMS key that encrypts the private key in the data key pair. You must specify a
2596
- * symmetric KMS key. You cannot use an asymmetric KMS key or a KMS key in a custom key store. To get the
2597
- * type and origin of your KMS key, use the <a>DescribeKey</a> operation. </p>
2598
- * <p>To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with <code>"alias/"</code>. To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p>
2599
- * <p>For example:</p>
2600
- * <ul>
2601
- * <li>
2602
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
2603
- * </p>
2604
- * </li>
2605
- * <li>
2606
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
2607
- * </p>
2608
- * </li>
2609
- * <li>
2610
- * <p>Alias name: <code>alias/ExampleAlias</code>
2611
- * </p>
2612
- * </li>
2613
- * <li>
2614
- * <p>Alias ARN: <code>arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</code>
2615
- * </p>
2616
- * </li>
2617
- * </ul>
2618
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>. To get the alias name and alias ARN, use <a>ListAliases</a>.</p>
2619
- */
2620
- KeyId: string | undefined;
2621
-
2622
- /**
2623
- * <p>Determines the type of data key pair that is generated.</p>
2624
- * <p>The KMS rule that restricts the use of asymmetric RSA KMS keys to encrypt and decrypt or to sign and verify (but not both), and the rule that permits you to use ECC KMS keys only to sign and verify, are not effective on data key pairs, which are used outside of KMS.</p>
2625
- */
2626
- KeyPairSpec: DataKeyPairSpec | string | undefined;
2627
-
2628
- /**
2629
- * <p>A list of grant tokens.</p>
2630
- * <p>Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved <i>eventual consistency</i>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token">Grant token</a> and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token">Using a grant token</a> in the
2631
- * <i>Key Management Service Developer Guide</i>.</p>
2632
- */
2633
- GrantTokens?: string[];
2634
- }
2635
-
2636
- export namespace GenerateDataKeyPairWithoutPlaintextRequest {
2637
- /**
2638
- * @internal
2639
- */
2640
- export const filterSensitiveLog = (obj: GenerateDataKeyPairWithoutPlaintextRequest): any => ({
2641
- ...obj,
2642
- });
2643
- }
2644
-
2645
- export interface GenerateDataKeyPairWithoutPlaintextResponse {
2646
- /**
2647
- * <p>The encrypted copy of the private key. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.</p>
2648
- */
2649
- PrivateKeyCiphertextBlob?: Uint8Array;
2650
-
2651
- /**
2652
- * <p>The public key (in plaintext).</p>
2653
- */
2654
- PublicKey?: Uint8Array;
2655
-
2656
- /**
2657
- * <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">key ARN</a>) of the KMS key that encrypted the private key.</p>
2658
- */
2659
- KeyId?: string;
2660
-
2661
- /**
2662
- * <p>The type of data key pair that was generated.</p>
2663
- */
2664
- KeyPairSpec?: DataKeyPairSpec | string;
2665
- }
2666
-
2667
- export namespace GenerateDataKeyPairWithoutPlaintextResponse {
2668
- /**
2669
- * @internal
2670
- */
2671
- export const filterSensitiveLog = (obj: GenerateDataKeyPairWithoutPlaintextResponse): any => ({
2672
- ...obj,
2673
- });
2674
- }
2675
-
2676
- export interface GenerateDataKeyWithoutPlaintextRequest {
2677
- /**
2678
- * <p>The identifier of the symmetric KMS key that encrypts the data
2679
- * key.</p>
2680
- * <p>To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with <code>"alias/"</code>. To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p>
2681
- * <p>For example:</p>
2682
- * <ul>
2683
- * <li>
2684
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
2685
- * </p>
2686
- * </li>
2687
- * <li>
2688
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
2689
- * </p>
2690
- * </li>
2691
- * <li>
2692
- * <p>Alias name: <code>alias/ExampleAlias</code>
2693
- * </p>
2694
- * </li>
2695
- * <li>
2696
- * <p>Alias ARN: <code>arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</code>
2697
- * </p>
2698
- * </li>
2699
- * </ul>
2700
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>. To get the alias name and alias ARN, use <a>ListAliases</a>.</p>
2701
- */
2702
- KeyId: string | undefined;
2703
-
2704
- /**
2705
- * <p>Specifies the encryption context that will be used when encrypting the data key.</p>
2706
- * <p>An <i>encryption context</i> is a collection of non-secret key-value pairs that represents additional authenticated data. When you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data. An encryption context is optional when encrypting with a symmetric KMS key, but it is highly recommended.</p>
2707
- * <p>For more information, see
2708
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">Encryption
2709
- * Context</a> in the <i>Key Management Service Developer Guide</i>.</p>
2710
- */
2711
- EncryptionContext?: { [key: string]: string };
2712
-
2713
- /**
2714
- * <p>The length of the data key. Use <code>AES_128</code> to generate a 128-bit symmetric key,
2715
- * or <code>AES_256</code> to generate a 256-bit symmetric key.</p>
2716
- */
2717
- KeySpec?: DataKeySpec | string;
2718
-
2719
- /**
2720
- * <p>The length of the data key in bytes. For example, use the value 64 to generate a 512-bit
2721
- * data key (64 bytes is 512 bits). For common key lengths (128-bit and 256-bit symmetric keys),
2722
- * we recommend that you use the <code>KeySpec</code> field instead of this one.</p>
2723
- */
2724
- NumberOfBytes?: number;
2725
-
2726
- /**
2727
- * <p>A list of grant tokens.</p>
2728
- * <p>Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved <i>eventual consistency</i>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token">Grant token</a> and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token">Using a grant token</a> in the
2729
- * <i>Key Management Service Developer Guide</i>.</p>
2730
- */
2731
- GrantTokens?: string[];
2732
- }
2733
-
2734
- export namespace GenerateDataKeyWithoutPlaintextRequest {
2735
- /**
2736
- * @internal
2737
- */
2738
- export const filterSensitiveLog = (obj: GenerateDataKeyWithoutPlaintextRequest): any => ({
2739
- ...obj,
2740
- });
2741
- }
2742
-
2743
- export interface GenerateDataKeyWithoutPlaintextResponse {
2744
- /**
2745
- * <p>The encrypted data key. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.</p>
2746
- */
2747
- CiphertextBlob?: Uint8Array;
2748
-
2749
- /**
2750
- * <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">key ARN</a>) of the KMS key that encrypted the data key.</p>
2751
- */
2752
- KeyId?: string;
2753
- }
2754
-
2755
- export namespace GenerateDataKeyWithoutPlaintextResponse {
2756
- /**
2757
- * @internal
2758
- */
2759
- export const filterSensitiveLog = (obj: GenerateDataKeyWithoutPlaintextResponse): any => ({
2760
- ...obj,
2761
- });
2762
- }
2763
-
2764
- export interface GenerateRandomRequest {
2765
- /**
2766
- * <p>The length of the byte string.</p>
2767
- */
2768
- NumberOfBytes?: number;
2769
-
2770
- /**
2771
- * <p>Generates the random byte string in the CloudHSM cluster that is associated with the
2772
- * specified <a href="https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html">custom key store</a>. To find the ID of a custom key store, use the <a>DescribeCustomKeyStores</a> operation.</p>
2773
- */
2774
- CustomKeyStoreId?: string;
2775
- }
2776
-
2777
- export namespace GenerateRandomRequest {
2778
- /**
2779
- * @internal
2780
- */
2781
- export const filterSensitiveLog = (obj: GenerateRandomRequest): any => ({
2782
- ...obj,
2783
- });
2784
- }
2785
-
2786
- export interface GenerateRandomResponse {
2787
- /**
2788
- * <p>The random byte string. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.</p>
2789
- */
2790
- Plaintext?: Uint8Array;
2791
- }
2792
-
2793
- export namespace GenerateRandomResponse {
2794
- /**
2795
- * @internal
2796
- */
2797
- export const filterSensitiveLog = (obj: GenerateRandomResponse): any => ({
2798
- ...obj,
2799
- ...(obj.Plaintext && { Plaintext: SENSITIVE_STRING }),
2800
- });
2801
- }
2802
-
2803
- export interface GetKeyPolicyRequest {
2804
- /**
2805
- * <p>Gets the key policy for the specified KMS key.</p>
2806
- * <p>Specify the key ID or key ARN of the KMS key.</p>
2807
- * <p>For example:</p>
2808
- * <ul>
2809
- * <li>
2810
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
2811
- * </p>
2812
- * </li>
2813
- * <li>
2814
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
2815
- * </p>
2816
- * </li>
2817
- * </ul>
2818
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
2819
- */
2820
- KeyId: string | undefined;
2821
-
2822
- /**
2823
- * <p>Specifies the name of the key policy. The only valid name is <code>default</code>. To get
2824
- * the names of key policies, use <a>ListKeyPolicies</a>.</p>
2825
- */
2826
- PolicyName: string | undefined;
2827
- }
2828
-
2829
- export namespace GetKeyPolicyRequest {
2830
- /**
2831
- * @internal
2832
- */
2833
- export const filterSensitiveLog = (obj: GetKeyPolicyRequest): any => ({
2834
- ...obj,
2835
- });
2836
- }
2837
-
2838
- export interface GetKeyPolicyResponse {
2839
- /**
2840
- * <p>A key policy document in JSON format.</p>
2841
- */
2842
- Policy?: string;
2843
- }
2844
-
2845
- export namespace GetKeyPolicyResponse {
2846
- /**
2847
- * @internal
2848
- */
2849
- export const filterSensitiveLog = (obj: GetKeyPolicyResponse): any => ({
2850
- ...obj,
2851
- });
2852
- }
2853
-
2854
- export interface GetKeyRotationStatusRequest {
2855
- /**
2856
- * <p>Gets the rotation status for the specified KMS key.</p>
2857
- * <p>Specify the key ID or key ARN of the KMS key. To specify a KMS key in a
2858
- * different Amazon Web Services account, you must use the key ARN.</p>
2859
- * <p>For example:</p>
2860
- * <ul>
2861
- * <li>
2862
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
2863
- * </p>
2864
- * </li>
2865
- * <li>
2866
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
2867
- * </p>
2868
- * </li>
2869
- * </ul>
2870
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
2871
- */
2872
- KeyId: string | undefined;
2873
- }
2874
-
2875
- export namespace GetKeyRotationStatusRequest {
2876
- /**
2877
- * @internal
2878
- */
2879
- export const filterSensitiveLog = (obj: GetKeyRotationStatusRequest): any => ({
2880
- ...obj,
2881
- });
2882
- }
2883
-
2884
- export interface GetKeyRotationStatusResponse {
2885
- /**
2886
- * <p>A Boolean value that specifies whether key rotation is enabled.</p>
2887
- */
2888
- KeyRotationEnabled?: boolean;
2889
- }
2890
-
2891
- export namespace GetKeyRotationStatusResponse {
2892
- /**
2893
- * @internal
2894
- */
2895
- export const filterSensitiveLog = (obj: GetKeyRotationStatusResponse): any => ({
2896
- ...obj,
2897
- });
2898
- }
2899
-
2900
- export enum WrappingKeySpec {
2901
- RSA_2048 = "RSA_2048",
2902
- }
2903
-
2904
- export interface GetParametersForImportRequest {
2905
- /**
2906
- * <p>The identifier of the symmetric KMS key into which you will import key material. The
2907
- * <code>Origin</code> of the KMS key must be <code>EXTERNAL</code>.</p>
2908
- * <p>Specify the key ID or key ARN of the KMS key.</p>
2909
- * <p>For example:</p>
2910
- * <ul>
2911
- * <li>
2912
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
2913
- * </p>
2914
- * </li>
2915
- * <li>
2916
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
2917
- * </p>
2918
- * </li>
2919
- * </ul>
2920
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
2921
- */
2922
- KeyId: string | undefined;
2923
-
2924
- /**
2925
- * <p>The algorithm you will use to encrypt the key material before importing it with <a>ImportKeyMaterial</a>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-encrypt-key-material.html">Encrypt the Key Material</a>
2926
- * in the <i>Key Management Service Developer Guide</i>.</p>
2927
- */
2928
- WrappingAlgorithm: AlgorithmSpec | string | undefined;
2929
-
2930
- /**
2931
- * <p>The type of wrapping key (public key) to return in the response. Only 2048-bit RSA public
2932
- * keys are supported.</p>
2933
- */
2934
- WrappingKeySpec: WrappingKeySpec | string | undefined;
2935
- }
2936
-
2937
- export namespace GetParametersForImportRequest {
2938
- /**
2939
- * @internal
2940
- */
2941
- export const filterSensitiveLog = (obj: GetParametersForImportRequest): any => ({
2942
- ...obj,
2943
- });
2944
- }
2945
-
2946
- export interface GetParametersForImportResponse {
2947
- /**
2948
- * <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">key ARN</a>) of the KMS key to use in a subsequent <a>ImportKeyMaterial</a>
2949
- * request. This is the same KMS key specified in the <code>GetParametersForImport</code>
2950
- * request.</p>
2951
- */
2952
- KeyId?: string;
2953
-
2954
- /**
2955
- * <p>The import token to send in a subsequent <a>ImportKeyMaterial</a>
2956
- * request.</p>
2957
- */
2958
- ImportToken?: Uint8Array;
2959
-
2960
- /**
2961
- * <p>The public key to use to encrypt the key material before importing it with <a>ImportKeyMaterial</a>.</p>
2962
- */
2963
- PublicKey?: Uint8Array;
2964
-
2965
- /**
2966
- * <p>The time at which the import token and public key are no longer valid. After this time,
2967
- * you cannot use them to make an <a>ImportKeyMaterial</a> request and you must send
2968
- * another <code>GetParametersForImport</code> request to get new ones.</p>
2969
- */
2970
- ParametersValidTo?: Date;
2971
- }
2972
-
2973
- export namespace GetParametersForImportResponse {
2974
- /**
2975
- * @internal
2976
- */
2977
- export const filterSensitiveLog = (obj: GetParametersForImportResponse): any => ({
2978
- ...obj,
2979
- ...(obj.PublicKey && { PublicKey: SENSITIVE_STRING }),
2980
- });
2981
- }
2982
-
2983
- export interface GetPublicKeyRequest {
2984
- /**
2985
- * <p>Identifies the asymmetric KMS key that includes the public key.</p>
2986
- *
2987
- * <p>To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with <code>"alias/"</code>. To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p>
2988
- * <p>For example:</p>
2989
- * <ul>
2990
- * <li>
2991
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
2992
- * </p>
2993
- * </li>
2994
- * <li>
2995
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
2996
- * </p>
2997
- * </li>
2998
- * <li>
2999
- * <p>Alias name: <code>alias/ExampleAlias</code>
3000
- * </p>
3001
- * </li>
3002
- * <li>
3003
- * <p>Alias ARN: <code>arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</code>
3004
- * </p>
3005
- * </li>
3006
- * </ul>
3007
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>. To get the alias name and alias ARN, use <a>ListAliases</a>.</p>
3008
- */
3009
- KeyId: string | undefined;
3010
-
3011
- /**
3012
- * <p>A list of grant tokens.</p>
3013
- * <p>Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved <i>eventual consistency</i>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token">Grant token</a> and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token">Using a grant token</a> in the
3014
- * <i>Key Management Service Developer Guide</i>.</p>
3015
- */
3016
- GrantTokens?: string[];
3017
- }
3018
-
3019
- export namespace GetPublicKeyRequest {
3020
- /**
3021
- * @internal
3022
- */
3023
- export const filterSensitiveLog = (obj: GetPublicKeyRequest): any => ({
3024
- ...obj,
3025
- });
3026
- }
3027
-
3028
- export interface GetPublicKeyResponse {
3029
- /**
3030
- * <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">key ARN</a>) of the asymmetric KMS key from which the public key was downloaded.</p>
3031
- */
3032
- KeyId?: string;
3033
-
3034
- /**
3035
- * <p>The exported public key. </p>
3036
- * <p>The value is a DER-encoded X.509 public key, also known as
3037
- * <code>SubjectPublicKeyInfo</code> (SPKI), as defined in <a href="https://tools.ietf.org/html/rfc5280">RFC 5280</a>. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.</p>
3038
- * <p></p>
3039
- */
3040
- PublicKey?: Uint8Array;
3041
-
3042
- /**
3043
- * @deprecated
3044
- *
3045
- * <p>Instead, use the <code>KeySpec</code> field in the <code>GetPublicKey</code> response.</p>
3046
- * <p>The <code>KeySpec</code> and <code>CustomerMasterKeySpec</code> fields have the same value. We recommend that you use the <code>KeySpec</code> field in your code. However, to avoid breaking changes, KMS will support both fields.</p>
3047
- */
3048
- CustomerMasterKeySpec?: CustomerMasterKeySpec | string;
3049
-
3050
- /**
3051
- * <p>The type of the of the public key that was downloaded.</p>
3052
- */
3053
- KeySpec?: KeySpec | string;
3054
-
3055
- /**
3056
- * <p>The permitted use of the public key. Valid values are <code>ENCRYPT_DECRYPT</code> or
3057
- * <code>SIGN_VERIFY</code>. </p>
3058
- * <p>This information is critical. If a public key with <code>SIGN_VERIFY</code> key usage
3059
- * encrypts data outside of KMS, the ciphertext cannot be decrypted. </p>
3060
- */
3061
- KeyUsage?: KeyUsageType | string;
3062
-
3063
- /**
3064
- * <p>The encryption algorithms that KMS supports for this key. </p>
3065
- * <p>This information is critical. If a public key encrypts data outside of KMS by using an
3066
- * unsupported encryption algorithm, the ciphertext cannot be decrypted. </p>
3067
- * <p>This field appears in the response only when the <code>KeyUsage</code> of the public key
3068
- * is <code>ENCRYPT_DECRYPT</code>.</p>
3069
- */
3070
- EncryptionAlgorithms?: (EncryptionAlgorithmSpec | string)[];
3071
-
3072
- /**
3073
- * <p>The signing algorithms that KMS supports for this key.</p>
3074
- * <p>This field appears in the response only when the <code>KeyUsage</code> of the public key
3075
- * is <code>SIGN_VERIFY</code>.</p>
3076
- */
3077
- SigningAlgorithms?: (SigningAlgorithmSpec | string)[];
3078
- }
3079
-
3080
- export namespace GetPublicKeyResponse {
3081
- /**
3082
- * @internal
3083
- */
3084
- export const filterSensitiveLog = (obj: GetPublicKeyResponse): any => ({
3085
- ...obj,
3086
- });
3087
- }
3088
-
3089
- /**
3090
- * <p>Contains information about a grant.</p>
3091
- */
3092
- export interface GrantListEntry {
3093
- /**
3094
- * <p>The unique identifier for the KMS key to which the grant applies.</p>
3095
- */
3096
- KeyId?: string;
3097
-
3098
- /**
3099
- * <p>The unique identifier for the grant.</p>
3100
- */
3101
- GrantId?: string;
3102
-
3103
- /**
3104
- * <p>The friendly name that identifies the grant. If a name was provided in the <a>CreateGrant</a> request, that name is returned. Otherwise this value is null.</p>
3105
- */
3106
- Name?: string;
3107
-
3108
- /**
3109
- * <p>The date and time when the grant was created.</p>
3110
- */
3111
- CreationDate?: Date;
3112
-
3113
- /**
3114
- * <p>The identity that gets the permissions in the grant.</p>
3115
- * <p>The <code>GranteePrincipal</code> field in the <code>ListGrants</code> response usually contains the
3116
- * user or role designated as the grantee principal in the grant. However, when the grantee
3117
- * principal in the grant is an Amazon Web Services service, the <code>GranteePrincipal</code> field contains
3118
- * the <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services">service
3119
- * principal</a>, which might represent several different grantee principals.</p>
3120
- */
3121
- GranteePrincipal?: string;
3122
-
3123
- /**
3124
- * <p>The principal that can retire the grant.</p>
3125
- */
3126
- RetiringPrincipal?: string;
3127
-
3128
- /**
3129
- * <p>The Amazon Web Services account under which the grant was issued.</p>
3130
- */
3131
- IssuingAccount?: string;
3132
-
3133
- /**
3134
- * <p>The list of operations permitted by the grant.</p>
3135
- */
3136
- Operations?: (GrantOperation | string)[];
3137
-
3138
- /**
3139
- * <p>A list of key-value pairs that must be present in the encryption context of certain
3140
- * subsequent operations that the grant allows.</p>
3141
- */
3142
- Constraints?: GrantConstraints;
3143
- }
3144
-
3145
- export namespace GrantListEntry {
3146
- /**
3147
- * @internal
3148
- */
3149
- export const filterSensitiveLog = (obj: GrantListEntry): any => ({
3150
- ...obj,
3151
- });
3152
- }
3153
-
3154
- export interface ImportKeyMaterialRequest {
3155
- /**
3156
- * <p>The identifier of the symmetric KMS key that receives the imported key material. The KMS key's
3157
- * <code>Origin</code> must be <code>EXTERNAL</code>. This must be the same KMS key specified in
3158
- * the <code>KeyID</code> parameter of the corresponding <a>GetParametersForImport</a>
3159
- * request.</p>
3160
- * <p>Specify the key ID or key ARN of the KMS key.</p>
3161
- * <p>For example:</p>
3162
- * <ul>
3163
- * <li>
3164
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
3165
- * </p>
3166
- * </li>
3167
- * <li>
3168
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
3169
- * </p>
3170
- * </li>
3171
- * </ul>
3172
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
3173
- */
3174
- KeyId: string | undefined;
3175
-
3176
- /**
3177
- * <p>The import token that you received in the response to a previous <a>GetParametersForImport</a> request. It must be from the same response that contained
3178
- * the public key that you used to encrypt the key material.</p>
3179
- */
3180
- ImportToken: Uint8Array | undefined;
3181
-
3182
- /**
3183
- * <p>The encrypted key material to import. The key material must be encrypted with the public
3184
- * wrapping key that <a>GetParametersForImport</a> returned, using the wrapping
3185
- * algorithm that you specified in the same <code>GetParametersForImport</code> request.</p>
3186
- */
3187
- EncryptedKeyMaterial: Uint8Array | undefined;
3188
-
3189
- /**
3190
- * <p>The time at which the imported key material expires. When the key material expires, KMS
3191
- * deletes the key material and the KMS key becomes unusable. You must omit this parameter when the
3192
- * <code>ExpirationModel</code> parameter is set to <code>KEY_MATERIAL_DOES_NOT_EXPIRE</code>.
3193
- * Otherwise it is required.</p>
3194
- */
3195
- ValidTo?: Date;
3196
-
3197
- /**
3198
- * <p>Specifies whether the key material expires. The default is
3199
- * <code>KEY_MATERIAL_EXPIRES</code>, in which case you must include the <code>ValidTo</code>
3200
- * parameter. When this parameter is set to <code>KEY_MATERIAL_DOES_NOT_EXPIRE</code>, you must
3201
- * omit the <code>ValidTo</code> parameter.</p>
3202
- */
3203
- ExpirationModel?: ExpirationModelType | string;
3204
- }
3205
-
3206
- export namespace ImportKeyMaterialRequest {
3207
- /**
3208
- * @internal
3209
- */
3210
- export const filterSensitiveLog = (obj: ImportKeyMaterialRequest): any => ({
3211
- ...obj,
3212
- });
3213
- }
3214
-
3215
- export interface ImportKeyMaterialResponse {}
3216
-
3217
- export namespace ImportKeyMaterialResponse {
3218
- /**
3219
- * @internal
3220
- */
3221
- export const filterSensitiveLog = (obj: ImportKeyMaterialResponse): any => ({
3222
- ...obj,
3223
- });
3224
- }
3225
-
3226
- /**
3227
- * <p>The request was rejected because the key material in the request is, expired, invalid, or
3228
- * is not the same key material that was previously imported into this KMS key.</p>
3229
- */
3230
- export interface IncorrectKeyMaterialException extends __SmithyException, $MetadataBearer {
3231
- name: "IncorrectKeyMaterialException";
3232
- $fault: "client";
3233
- message?: string;
3234
- }
3235
-
3236
- export namespace IncorrectKeyMaterialException {
3237
- /**
3238
- * @internal
3239
- */
3240
- export const filterSensitiveLog = (obj: IncorrectKeyMaterialException): any => ({
3241
- ...obj,
3242
- });
3243
- }
3244
-
3245
- /**
3246
- * <p>The request was rejected because the provided import token is invalid or is associated
3247
- * with a different KMS key.</p>
3248
- */
3249
- export interface InvalidImportTokenException extends __SmithyException, $MetadataBearer {
3250
- name: "InvalidImportTokenException";
3251
- $fault: "client";
3252
- message?: string;
3253
- }
3254
-
3255
- export namespace InvalidImportTokenException {
3256
- /**
3257
- * @internal
3258
- */
3259
- export const filterSensitiveLog = (obj: InvalidImportTokenException): any => ({
3260
- ...obj,
3261
- });
3262
- }
3263
-
3264
- /**
3265
- * <p>The request was rejected because the specified <code>GrantId</code> is not valid.</p>
3266
- */
3267
- export interface InvalidGrantIdException extends __SmithyException, $MetadataBearer {
3268
- name: "InvalidGrantIdException";
3269
- $fault: "client";
3270
- message?: string;
3271
- }
3272
-
3273
- export namespace InvalidGrantIdException {
3274
- /**
3275
- * @internal
3276
- */
3277
- export const filterSensitiveLog = (obj: InvalidGrantIdException): any => ({
3278
- ...obj,
3279
- });
3280
- }
3281
-
3282
- /**
3283
- * <p>Contains information about each entry in the key list.</p>
3284
- */
3285
- export interface KeyListEntry {
3286
- /**
3287
- * <p>Unique identifier of the key.</p>
3288
- */
3289
- KeyId?: string;
3290
-
3291
- /**
3292
- * <p>ARN of the key.</p>
3293
- */
3294
- KeyArn?: string;
3295
- }
3296
-
3297
- export namespace KeyListEntry {
3298
- /**
3299
- * @internal
3300
- */
3301
- export const filterSensitiveLog = (obj: KeyListEntry): any => ({
3302
- ...obj,
3303
- });
3304
- }
3305
-
3306
- /**
3307
- * <p>The request was rejected because the signature verification failed. Signature verification
3308
- * fails when it cannot confirm that signature was produced by signing the specified message with
3309
- * the specified KMS key and signing algorithm.</p>
3310
- */
3311
- export interface KMSInvalidSignatureException extends __SmithyException, $MetadataBearer {
3312
- name: "KMSInvalidSignatureException";
3313
- $fault: "client";
3314
- message?: string;
3315
- }
3316
-
3317
- export namespace KMSInvalidSignatureException {
3318
- /**
3319
- * @internal
3320
- */
3321
- export const filterSensitiveLog = (obj: KMSInvalidSignatureException): any => ({
3322
- ...obj,
3323
- });
3324
- }
3325
-
3326
- export interface ListAliasesRequest {
3327
- /**
3328
- * <p>Lists only aliases that are associated with the specified KMS key. Enter a KMS key in your Amazon Web Services account. </p>
3329
- * <p>This parameter is optional. If you omit it, <code>ListAliases</code> returns all aliases
3330
- * in the account and Region.</p>
3331
- *
3332
- * <p>Specify the key ID or key ARN of the KMS key.</p>
3333
- * <p>For example:</p>
3334
- * <ul>
3335
- * <li>
3336
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
3337
- * </p>
3338
- * </li>
3339
- * <li>
3340
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
3341
- * </p>
3342
- * </li>
3343
- * </ul>
3344
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
3345
- */
3346
- KeyId?: string;
3347
-
3348
- /**
3349
- * <p>Use this parameter to specify the maximum number of items to return. When this
3350
- * value is present, KMS does not return more than the specified number of items, but it might
3351
- * return fewer.</p>
3352
- * <p>This value is optional. If you include a value, it must be between 1
3353
- * and 100, inclusive. If you do not include a value, it defaults to 50.</p>
3354
- */
3355
- Limit?: number;
3356
-
3357
- /**
3358
- * <p>Use this parameter in a subsequent request after you receive a response with
3359
- * truncated results. Set it to the value of <code>NextMarker</code> from the truncated response
3360
- * you just received.</p>
3361
- */
3362
- Marker?: string;
3363
- }
3364
-
3365
- export namespace ListAliasesRequest {
3366
- /**
3367
- * @internal
3368
- */
3369
- export const filterSensitiveLog = (obj: ListAliasesRequest): any => ({
3370
- ...obj,
3371
- });
3372
- }
3373
-
3374
- export interface ListAliasesResponse {
3375
- /**
3376
- * <p>A list of aliases.</p>
3377
- */
3378
- Aliases?: AliasListEntry[];
3379
-
3380
- /**
3381
- * <p>When <code>Truncated</code> is true, this element is present and contains the
3382
- * value to use for the <code>Marker</code> parameter in a subsequent request.</p>
3383
- */
3384
- NextMarker?: string;
3385
-
3386
- /**
3387
- * <p>A flag that indicates whether there are more items in the list. When this
3388
- * value is true, the list in this response is truncated. To get more items, pass the value of
3389
- * the <code>NextMarker</code> element in thisresponse to the <code>Marker</code> parameter in a
3390
- * subsequent request.</p>
3391
- */
3392
- Truncated?: boolean;
3393
- }
3394
-
3395
- export namespace ListAliasesResponse {
3396
- /**
3397
- * @internal
3398
- */
3399
- export const filterSensitiveLog = (obj: ListAliasesResponse): any => ({
3400
- ...obj,
3401
- });
3402
- }
3403
-
3404
- export interface ListGrantsRequest {
3405
- /**
3406
- * <p>Use this parameter to specify the maximum number of items to return. When this
3407
- * value is present, KMS does not return more than the specified number of items, but it might
3408
- * return fewer.</p>
3409
- * <p>This value is optional. If you include a value, it must be between 1
3410
- * and 100, inclusive. If you do not include a value, it defaults to 50.</p>
3411
- */
3412
- Limit?: number;
3413
-
3414
- /**
3415
- * <p>Use this parameter in a subsequent request after you receive a response with
3416
- * truncated results. Set it to the value of <code>NextMarker</code> from the truncated response
3417
- * you just received.</p>
3418
- */
3419
- Marker?: string;
3420
-
3421
- /**
3422
- * <p>Returns only grants for the specified KMS key. This parameter is
3423
- * required.</p>
3424
- * <p>Specify the key ID or key ARN of the KMS key. To specify a KMS key in a
3425
- * different Amazon Web Services account, you must use the key ARN.</p>
3426
- * <p>For example:</p>
3427
- * <ul>
3428
- * <li>
3429
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
3430
- * </p>
3431
- * </li>
3432
- * <li>
3433
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
3434
- * </p>
3435
- * </li>
3436
- * </ul>
3437
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
3438
- */
3439
- KeyId: string | undefined;
3440
-
3441
- /**
3442
- * <p>Returns only the grant with the specified grant ID. The grant ID uniquely identifies the
3443
- * grant. </p>
3444
- */
3445
- GrantId?: string;
3446
-
3447
- /**
3448
- * <p>Returns only grants where the specified principal is the grantee principal for the
3449
- * grant.</p>
3450
- */
3451
- GranteePrincipal?: string;
3452
- }
3453
-
3454
- export namespace ListGrantsRequest {
3455
- /**
3456
- * @internal
3457
- */
3458
- export const filterSensitiveLog = (obj: ListGrantsRequest): any => ({
3459
- ...obj,
3460
- });
3461
- }
3462
-
3463
- export interface ListGrantsResponse {
3464
- /**
3465
- * <p>A list of grants.</p>
3466
- */
3467
- Grants?: GrantListEntry[];
3468
-
3469
- /**
3470
- * <p>When <code>Truncated</code> is true, this element is present and contains the
3471
- * value to use for the <code>Marker</code> parameter in a subsequent request.</p>
3472
- */
3473
- NextMarker?: string;
3474
-
3475
- /**
3476
- * <p>A flag that indicates whether there are more items in the list. When this
3477
- * value is true, the list in this response is truncated. To get more items, pass the value of
3478
- * the <code>NextMarker</code> element in thisresponse to the <code>Marker</code> parameter in a
3479
- * subsequent request.</p>
3480
- */
3481
- Truncated?: boolean;
3482
- }
3483
-
3484
- export namespace ListGrantsResponse {
3485
- /**
3486
- * @internal
3487
- */
3488
- export const filterSensitiveLog = (obj: ListGrantsResponse): any => ({
3489
- ...obj,
3490
- });
3491
- }
3492
-
3493
- export interface ListKeyPoliciesRequest {
3494
- /**
3495
- * <p>Gets the names of key policies for the specified KMS key.</p>
3496
- * <p>Specify the key ID or key ARN of the KMS key.</p>
3497
- * <p>For example:</p>
3498
- * <ul>
3499
- * <li>
3500
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
3501
- * </p>
3502
- * </li>
3503
- * <li>
3504
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
3505
- * </p>
3506
- * </li>
3507
- * </ul>
3508
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
3509
- */
3510
- KeyId: string | undefined;
3511
-
3512
- /**
3513
- * <p>Use this parameter to specify the maximum number of items to return. When this
3514
- * value is present, KMS does not return more than the specified number of items, but it might
3515
- * return fewer.</p>
3516
- * <p>This value is optional. If you include a value, it must be between
3517
- * 1 and 1000, inclusive. If you do not include a value, it defaults to 100.</p>
3518
- * <p>Only one policy can be attached to a key.</p>
3519
- */
3520
- Limit?: number;
3521
-
3522
- /**
3523
- * <p>Use this parameter in a subsequent request after you receive a response with
3524
- * truncated results. Set it to the value of <code>NextMarker</code> from the truncated response
3525
- * you just received.</p>
3526
- */
3527
- Marker?: string;
3528
- }
3529
-
3530
- export namespace ListKeyPoliciesRequest {
3531
- /**
3532
- * @internal
3533
- */
3534
- export const filterSensitiveLog = (obj: ListKeyPoliciesRequest): any => ({
3535
- ...obj,
3536
- });
3537
- }
3538
-
3539
- export interface ListKeyPoliciesResponse {
3540
- /**
3541
- * <p>A list of key policy names. The only valid value is <code>default</code>.</p>
3542
- */
3543
- PolicyNames?: string[];
3544
-
3545
- /**
3546
- * <p>When <code>Truncated</code> is true, this element is present and contains the
3547
- * value to use for the <code>Marker</code> parameter in a subsequent request.</p>
3548
- */
3549
- NextMarker?: string;
3550
-
3551
- /**
3552
- * <p>A flag that indicates whether there are more items in the list. When this
3553
- * value is true, the list in this response is truncated. To get more items, pass the value of
3554
- * the <code>NextMarker</code> element in thisresponse to the <code>Marker</code> parameter in a
3555
- * subsequent request.</p>
3556
- */
3557
- Truncated?: boolean;
3558
- }
3559
-
3560
- export namespace ListKeyPoliciesResponse {
3561
- /**
3562
- * @internal
3563
- */
3564
- export const filterSensitiveLog = (obj: ListKeyPoliciesResponse): any => ({
3565
- ...obj,
3566
- });
3567
- }
3568
-
3569
- export interface ListKeysRequest {
3570
- /**
3571
- * <p>Use this parameter to specify the maximum number of items to return. When this
3572
- * value is present, KMS does not return more than the specified number of items, but it might
3573
- * return fewer.</p>
3574
- * <p>This value is optional. If you include a value, it must be between
3575
- * 1 and 1000, inclusive. If you do not include a value, it defaults to 100.</p>
3576
- */
3577
- Limit?: number;
3578
-
3579
- /**
3580
- * <p>Use this parameter in a subsequent request after you receive a response with
3581
- * truncated results. Set it to the value of <code>NextMarker</code> from the truncated response
3582
- * you just received.</p>
3583
- */
3584
- Marker?: string;
3585
- }
3586
-
3587
- export namespace ListKeysRequest {
3588
- /**
3589
- * @internal
3590
- */
3591
- export const filterSensitiveLog = (obj: ListKeysRequest): any => ({
3592
- ...obj,
3593
- });
3594
- }
3595
-
3596
- export interface ListKeysResponse {
3597
- /**
3598
- * <p>A list of KMS keys.</p>
3599
- */
3600
- Keys?: KeyListEntry[];
3601
-
3602
- /**
3603
- * <p>When <code>Truncated</code> is true, this element is present and contains the
3604
- * value to use for the <code>Marker</code> parameter in a subsequent request.</p>
3605
- */
3606
- NextMarker?: string;
3607
-
3608
- /**
3609
- * <p>A flag that indicates whether there are more items in the list. When this
3610
- * value is true, the list in this response is truncated. To get more items, pass the value of
3611
- * the <code>NextMarker</code> element in thisresponse to the <code>Marker</code> parameter in a
3612
- * subsequent request.</p>
3613
- */
3614
- Truncated?: boolean;
3615
- }
3616
-
3617
- export namespace ListKeysResponse {
3618
- /**
3619
- * @internal
3620
- */
3621
- export const filterSensitiveLog = (obj: ListKeysResponse): any => ({
3622
- ...obj,
3623
- });
3624
- }
3625
-
3626
- export interface ListResourceTagsRequest {
3627
- /**
3628
- * <p>Gets tags on the specified KMS key.</p>
3629
- * <p>Specify the key ID or key ARN of the KMS key.</p>
3630
- * <p>For example:</p>
3631
- * <ul>
3632
- * <li>
3633
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
3634
- * </p>
3635
- * </li>
3636
- * <li>
3637
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
3638
- * </p>
3639
- * </li>
3640
- * </ul>
3641
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
3642
- */
3643
- KeyId: string | undefined;
3644
-
3645
- /**
3646
- * <p>Use this parameter to specify the maximum number of items to return. When this
3647
- * value is present, KMS does not return more than the specified number of items, but it might
3648
- * return fewer.</p>
3649
- * <p>This value is optional. If you include a value, it must be between 1 and 50, inclusive. If
3650
- * you do not include a value, it defaults to 50.</p>
3651
- */
3652
- Limit?: number;
3653
-
3654
- /**
3655
- * <p>Use this parameter in a subsequent request after you receive a response with
3656
- * truncated results. Set it to the value of <code>NextMarker</code> from the truncated response
3657
- * you just received.</p>
3658
- * <p>Do not attempt to construct this value. Use only the value of <code>NextMarker</code> from
3659
- * the truncated response you just received.</p>
3660
- */
3661
- Marker?: string;
3662
- }
3663
-
3664
- export namespace ListResourceTagsRequest {
3665
- /**
3666
- * @internal
3667
- */
3668
- export const filterSensitiveLog = (obj: ListResourceTagsRequest): any => ({
3669
- ...obj,
3670
- });
3671
- }
3672
-
3673
- export interface ListResourceTagsResponse {
3674
- /**
3675
- * <p>A list of tags. Each tag consists of a tag key and a tag value.</p>
3676
- * <note>
3677
- * <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>
3678
- * </note>
3679
- */
3680
- Tags?: Tag[];
3681
-
3682
- /**
3683
- * <p>When <code>Truncated</code> is true, this element is present and contains the
3684
- * value to use for the <code>Marker</code> parameter in a subsequent request.</p>
3685
- * <p>Do not assume or infer any information from this value.</p>
3686
- */
3687
- NextMarker?: string;
3688
-
3689
- /**
3690
- * <p>A flag that indicates whether there are more items in the list. When this
3691
- * value is true, the list in this response is truncated. To get more items, pass the value of
3692
- * the <code>NextMarker</code> element in thisresponse to the <code>Marker</code> parameter in a
3693
- * subsequent request.</p>
3694
- */
3695
- Truncated?: boolean;
3696
- }
3697
-
3698
- export namespace ListResourceTagsResponse {
3699
- /**
3700
- * @internal
3701
- */
3702
- export const filterSensitiveLog = (obj: ListResourceTagsResponse): any => ({
3703
- ...obj,
3704
- });
3705
- }
3706
-
3707
- export interface ListRetirableGrantsRequest {
3708
- /**
3709
- * <p>Use this parameter to specify the maximum number of items to return. When this
3710
- * value is present, KMS does not return more than the specified number of items, but it might
3711
- * return fewer.</p>
3712
- * <p>This value is optional. If you include a value, it must be between 1
3713
- * and 100, inclusive. If you do not include a value, it defaults to 50.</p>
3714
- */
3715
- Limit?: number;
3716
-
3717
- /**
3718
- * <p>Use this parameter in a subsequent request after you receive a response with
3719
- * truncated results. Set it to the value of <code>NextMarker</code> from the truncated response
3720
- * you just received.</p>
3721
- */
3722
- Marker?: string;
3723
-
3724
- /**
3725
- * <p>The retiring principal for which to list grants. Enter a principal in your Amazon Web Services account.</p>
3726
- * <p>To specify the retiring principal, use the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of an Amazon Web Services principal. Valid Amazon Web Services principals include Amazon Web Services accounts (root), IAM users, federated users, and
3727
- * assumed role users. For examples of the ARN syntax for specifying a principal, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam">Amazon Web Services Identity and Access Management (IAM)</a> in the Example ARNs section of the
3728
- * <i>Amazon Web Services General Reference</i>.</p>
3729
- */
3730
- RetiringPrincipal: string | undefined;
3731
- }
3732
-
3733
- export namespace ListRetirableGrantsRequest {
3734
- /**
3735
- * @internal
3736
- */
3737
- export const filterSensitiveLog = (obj: ListRetirableGrantsRequest): any => ({
3738
- ...obj,
3739
- });
3740
- }
3741
-
3742
- export enum MessageType {
3743
- DIGEST = "DIGEST",
3744
- RAW = "RAW",
3745
- }
3746
-
3747
- export interface PutKeyPolicyRequest {
3748
- /**
3749
- * <p>Sets the key policy on the specified KMS key.</p>
3750
- * <p>Specify the key ID or key ARN of the KMS key.</p>
3751
- * <p>For example:</p>
3752
- * <ul>
3753
- * <li>
3754
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
3755
- * </p>
3756
- * </li>
3757
- * <li>
3758
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
3759
- * </p>
3760
- * </li>
3761
- * </ul>
3762
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
3763
- */
3764
- KeyId: string | undefined;
3765
-
3766
- /**
3767
- * <p>The name of the key policy. The only valid value is <code>default</code>.</p>
3768
- */
3769
- PolicyName: string | undefined;
3770
-
3771
- /**
3772
- * <p>The key policy to attach to the KMS key.</p>
3773
- * <p>The key policy must meet the following criteria:</p>
3774
- * <ul>
3775
- * <li>
3776
- * <p>If you don't set <code>BypassPolicyLockoutSafetyCheck</code> to true, the key policy
3777
- * must allow the principal that is making the <code>PutKeyPolicy</code> request to make a
3778
- * subsequent <code>PutKeyPolicy</code> request on the KMS key. This reduces the risk that the KMS key becomes unmanageable. For more information, refer to the scenario in the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam">Default Key Policy</a> section of the <i>Key Management Service Developer Guide</i>.</p>
3779
- * </li>
3780
- * <li>
3781
- * <p>Each statement in the key policy must contain one or more principals. The principals
3782
- * in the key policy must exist and be visible to KMS. When you create a new Amazon Web Services principal
3783
- * (for example, an IAM user or role), you might need to enforce a delay before including the
3784
- * new principal in a key policy because the new principal might not be immediately visible
3785
- * to KMS. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency">Changes that I make are not always immediately visible</a> in the <i>Amazon Web Services Identity and Access Management User Guide</i>.</p>
3786
- * </li>
3787
- * </ul>
3788
- * <p>The key policy cannot exceed 32 kilobytes (32768 bytes). For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/resource-limits.html">Resource Quotas</a> in the
3789
- * <i>Key Management Service Developer Guide</i>.</p>
3790
- */
3791
- Policy: string | undefined;
3792
-
3793
- /**
3794
- * <p>A flag to indicate whether to bypass the key policy lockout safety check.</p>
3795
- * <important>
3796
- * <p>Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not
3797
- * set this value to true indiscriminately.</p>
3798
- * <p>For more information, refer to the scenario in the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam">Default Key Policy</a> section in the <i>Key Management Service Developer Guide</i>.</p>
3799
- * </important>
3800
- * <p>Use this parameter only when you intend to prevent the principal that is making the
3801
- * request from making a subsequent <code>PutKeyPolicy</code> request on the KMS key.</p>
3802
- * <p>The default value is false.</p>
3803
- */
3804
- BypassPolicyLockoutSafetyCheck?: boolean;
3805
- }
3806
-
3807
- export namespace PutKeyPolicyRequest {
3808
- /**
3809
- * @internal
3810
- */
3811
- export const filterSensitiveLog = (obj: PutKeyPolicyRequest): any => ({
3812
- ...obj,
3813
- });
3814
- }
3815
-
3816
- export interface ReEncryptRequest {
3817
- /**
3818
- * <p>Ciphertext of the data to reencrypt.</p>
3819
- */
3820
- CiphertextBlob: Uint8Array | undefined;
3821
-
3822
- /**
3823
- * <p>Specifies the encryption context to use to decrypt the ciphertext. Enter the same
3824
- * encryption context that was used to encrypt the ciphertext.</p>
3825
- * <p>An <i>encryption context</i> is a collection of non-secret key-value pairs that represents additional authenticated data. When you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data. An encryption context is optional when encrypting with a symmetric KMS key, but it is highly recommended.</p>
3826
- * <p>For more information, see
3827
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">Encryption
3828
- * Context</a> in the <i>Key Management Service Developer Guide</i>.</p>
3829
- */
3830
- SourceEncryptionContext?: { [key: string]: string };
3831
-
3832
- /**
3833
- * <p>Specifies the KMS key that
3834
- * KMS will use to decrypt the ciphertext before it is re-encrypted. Enter a key ID of the KMS key
3835
- * that was used to encrypt the ciphertext.</p>
3836
- * <p>This parameter is required only when the ciphertext was encrypted under an asymmetric KMS key.
3837
- * If you used a symmetric KMS key, KMS can get the KMS key from metadata that it adds to the
3838
- * symmetric ciphertext blob. However, it is always recommended as a best practice. This practice
3839
- * ensures that you use the KMS key that you intend.</p>
3840
- *
3841
- * <p>To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with <code>"alias/"</code>. To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p>
3842
- * <p>For example:</p>
3843
- * <ul>
3844
- * <li>
3845
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
3846
- * </p>
3847
- * </li>
3848
- * <li>
3849
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
3850
- * </p>
3851
- * </li>
3852
- * <li>
3853
- * <p>Alias name: <code>alias/ExampleAlias</code>
3854
- * </p>
3855
- * </li>
3856
- * <li>
3857
- * <p>Alias ARN: <code>arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</code>
3858
- * </p>
3859
- * </li>
3860
- * </ul>
3861
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>. To get the alias name and alias ARN, use <a>ListAliases</a>.</p>
3862
- */
3863
- SourceKeyId?: string;
3864
-
3865
- /**
3866
- * <p>A unique identifier for the KMS key that is used to reencrypt the data. Specify a symmetric or
3867
- * asymmetric KMS key with a <code>KeyUsage</code> value of <code>ENCRYPT_DECRYPT</code>. To find the
3868
- * <code>KeyUsage</code> value of a KMS key, use the <a>DescribeKey</a>
3869
- * operation.</p>
3870
- * <p>To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with <code>"alias/"</code>. To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p>
3871
- * <p>For example:</p>
3872
- * <ul>
3873
- * <li>
3874
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
3875
- * </p>
3876
- * </li>
3877
- * <li>
3878
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
3879
- * </p>
3880
- * </li>
3881
- * <li>
3882
- * <p>Alias name: <code>alias/ExampleAlias</code>
3883
- * </p>
3884
- * </li>
3885
- * <li>
3886
- * <p>Alias ARN: <code>arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</code>
3887
- * </p>
3888
- * </li>
3889
- * </ul>
3890
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>. To get the alias name and alias ARN, use <a>ListAliases</a>.</p>
3891
- */
3892
- DestinationKeyId: string | undefined;
3893
-
3894
- /**
3895
- * <p>Specifies that encryption context to use when the reencrypting the data.</p>
3896
- * <p>A destination encryption context is valid only when the destination KMS key is a symmetric KMS key. The standard ciphertext format for asymmetric KMS keys does not include fields for
3897
- * metadata.</p>
3898
- * <p>An <i>encryption context</i> is a collection of non-secret key-value pairs that represents additional authenticated data. When you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data. An encryption context is optional when encrypting with a symmetric KMS key, but it is highly recommended.</p>
3899
- * <p>For more information, see
3900
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">Encryption
3901
- * Context</a> in the <i>Key Management Service Developer Guide</i>.</p>
3902
- */
3903
- DestinationEncryptionContext?: { [key: string]: string };
3904
-
3905
- /**
3906
- * <p>Specifies the encryption algorithm that KMS will use to decrypt the ciphertext before it
3907
- * is reencrypted. The default value, <code>SYMMETRIC_DEFAULT</code>, represents the algorithm
3908
- * used for symmetric KMS keys.</p>
3909
- * <p>Specify the same algorithm that was used to encrypt the ciphertext. If you specify a
3910
- * different algorithm, the decrypt attempt fails.</p>
3911
- * <p>This parameter is required only when the ciphertext was encrypted under an asymmetric KMS key.</p>
3912
- */
3913
- SourceEncryptionAlgorithm?: EncryptionAlgorithmSpec | string;
3914
-
3915
- /**
3916
- * <p>Specifies the encryption algorithm that KMS will use to reecrypt the data after it has
3917
- * decrypted it. The default value, <code>SYMMETRIC_DEFAULT</code>, represents the encryption
3918
- * algorithm used for symmetric KMS keys.</p>
3919
- * <p>This parameter is required only when the destination KMS key is an asymmetric KMS key.</p>
3920
- */
3921
- DestinationEncryptionAlgorithm?: EncryptionAlgorithmSpec | string;
3922
-
3923
- /**
3924
- * <p>A list of grant tokens.</p>
3925
- * <p>Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved <i>eventual consistency</i>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token">Grant token</a> and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token">Using a grant token</a> in the
3926
- * <i>Key Management Service Developer Guide</i>.</p>
3927
- */
3928
- GrantTokens?: string[];
3929
- }
3930
-
3931
- export namespace ReEncryptRequest {
3932
- /**
3933
- * @internal
3934
- */
3935
- export const filterSensitiveLog = (obj: ReEncryptRequest): any => ({
3936
- ...obj,
3937
- });
3938
- }
3939
-
3940
- export interface ReEncryptResponse {
3941
- /**
3942
- * <p>The reencrypted data. When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.</p>
3943
- */
3944
- CiphertextBlob?: Uint8Array;
3945
-
3946
- /**
3947
- * <p>Unique identifier of the KMS key used to originally encrypt the data.</p>
3948
- */
3949
- SourceKeyId?: string;
3950
-
3951
- /**
3952
- * <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">key ARN</a>) of the KMS key that was used to reencrypt the data.</p>
3953
- */
3954
- KeyId?: string;
3955
-
3956
- /**
3957
- * <p>The encryption algorithm that was used to decrypt the ciphertext before it was
3958
- * reencrypted.</p>
3959
- */
3960
- SourceEncryptionAlgorithm?: EncryptionAlgorithmSpec | string;
3961
-
3962
- /**
3963
- * <p>The encryption algorithm that was used to reencrypt the data.</p>
3964
- */
3965
- DestinationEncryptionAlgorithm?: EncryptionAlgorithmSpec | string;
3966
- }
3967
-
3968
- export namespace ReEncryptResponse {
3969
- /**
3970
- * @internal
3971
- */
3972
- export const filterSensitiveLog = (obj: ReEncryptResponse): any => ({
3973
- ...obj,
3974
- });
3975
- }
3976
-
3977
- export interface ReplicateKeyRequest {
3978
- /**
3979
- * <p>Identifies the multi-Region primary key that is being replicated. To determine whether a KMS key is a multi-Region primary key, use the <a>DescribeKey</a> operation to check
3980
- * the value of the <code>MultiRegionKeyType</code> property.</p>
3981
- *
3982
- * <p>Specify the key ID or key ARN of a multi-Region primary key.</p>
3983
- * <p>For example:</p>
3984
- * <ul>
3985
- * <li>
3986
- * <p>Key ID: <code>mrk-1234abcd12ab34cd56ef1234567890ab</code>
3987
- * </p>
3988
- * </li>
3989
- * <li>
3990
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab</code>
3991
- * </p>
3992
- * </li>
3993
- * </ul>
3994
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
3995
- */
3996
- KeyId: string | undefined;
3997
-
3998
- /**
3999
- * <p>The Region ID of the Amazon Web Services Region for this replica key. </p>
4000
- * <p>Enter the Region ID, such as <code>us-east-1</code> or <code>ap-southeast-2</code>. For a
4001
- * list of Amazon Web Services Regions in which KMS is supported, see <a href="https://docs.aws.amazon.com/general/latest/gr/kms.html#kms_region">KMS service endpoints</a> in the
4002
- * <i>Amazon Web Services General Reference</i>.</p>
4003
- * <p>The replica must be in a different Amazon Web Services Region than its primary key and other replicas of
4004
- * that primary key, but in the same Amazon Web Services partition. KMS must be available in the replica
4005
- * Region. If the Region is not enabled by default, the Amazon Web Services account must be enabled in the
4006
- * Region. </p>
4007
- * <p>For information about Amazon Web Services partitions, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Names (ARNs) in the
4008
- * <i>Amazon Web Services General Reference</i>.</a> For information about enabling and disabling Regions, see <a href="https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-enable">Enabling a
4009
- * Region</a> and <a href="https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-disable">Disabling a Region</a> in the
4010
- * <i>Amazon Web Services General Reference</i>.</p>
4011
- */
4012
- ReplicaRegion: string | undefined;
4013
-
4014
- /**
4015
- * <p>The key policy to attach to the KMS key. This parameter is optional. If you do not provide a key policy, KMS attaches the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default">default key policy</a> to the KMS key.</p>
4016
- * <p>The key policy is not a shared property of multi-Region keys. You can specify the same key
4017
- * policy or a different key policy for each key in a set of related multi-Region keys. KMS
4018
- * does not synchronize this property.</p>
4019
- * <p>If you provide a key policy, it must meet the following criteria:</p>
4020
- * <ul>
4021
- * <li>
4022
- * <p>If you don't set <code>BypassPolicyLockoutSafetyCheck</code> to true, the key policy
4023
- * must give the caller <code>kms:PutKeyPolicy</code> permission on the replica key. This reduces the
4024
- * risk that the KMS key becomes unmanageable. For more information, refer to the scenario in the
4025
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam">Default Key Policy</a> section of the <i>
4026
- * <i>Key Management Service Developer Guide</i>
4027
- * </i>.</p>
4028
- * </li>
4029
- * <li>
4030
- * <p>Each statement in the key policy must contain one or more principals. The principals
4031
- * in the key policy must exist and be visible to KMS. When you create a new Amazon Web Services principal
4032
- * (for example, an IAM user or role), you might need to enforce a delay before including the
4033
- * new principal in a key policy because the new principal might not be immediately visible
4034
- * to KMS. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency">Changes that I make are not always immediately visible</a> in the <i>
4035
- * <i>Identity and Access Management User Guide</i>
4036
- * </i>.</p>
4037
- * </li>
4038
- * <li>
4039
- * <p>The key policy size quota is 32 kilobytes (32768 bytes).</p>
4040
- * </li>
4041
- * </ul>
4042
- */
4043
- Policy?: string;
4044
-
4045
- /**
4046
- * <p>A flag to indicate whether to bypass the key policy lockout safety check.</p>
4047
- * <important>
4048
- * <p>Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not
4049
- * set this value to true indiscriminately.</p>
4050
- * <p>For more information, refer to the scenario in the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam">Default Key Policy</a> section in the <i>Key Management Service Developer Guide</i>.</p>
4051
- * </important>
4052
- * <p>Use this parameter only when you intend to prevent the principal that is making the
4053
- * request from making a subsequent <code>PutKeyPolicy</code> request on the KMS key.</p>
4054
- * <p>The default value is false.</p>
4055
- */
4056
- BypassPolicyLockoutSafetyCheck?: boolean;
4057
-
4058
- /**
4059
- * <p>A description of the KMS key. The default value is an empty string (no description).</p>
4060
- * <p>The description is not a shared property of multi-Region keys. You can specify the same
4061
- * description or a different description for each key in a set of related multi-Region keys. KMS does not synchronize this property.</p>
4062
- */
4063
- Description?: string;
4064
-
4065
- /**
4066
- * <p>Assigns one or more tags to the replica key. Use this parameter to tag the KMS key when it is created.
4067
- * To tag an existing KMS key, use the <a>TagResource</a> operation.</p>
4068
- * <note>
4069
- * <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>
4070
- * </note>
4071
- * <p>To use this parameter, you must have <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:TagResource</a> permission in an IAM policy.</p>
4072
- * <p>Tags are not a shared property of multi-Region keys. You can specify the same tags or
4073
- * different tags for each key in a set of related multi-Region keys. KMS does not
4074
- * synchronize this property.</p>
4075
- * <p>Each tag consists of a tag key and a tag value. Both the tag key and the tag value are
4076
- * required, but the tag value can be an empty (null) string. You cannot have more than one tag
4077
- * on a KMS key with the same tag key. If you specify an existing tag key with a different tag value,
4078
- * KMS replaces the current tag value with the specified one.</p>
4079
- * <p>When you add tags to an Amazon Web Services resource, Amazon Web Services generates a cost allocation
4080
- * report with usage and costs aggregated by tags. Tags can also be used to control access to a KMS key. For details,
4081
- * see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html">Tagging Keys</a>.</p>
4082
- */
4083
- Tags?: Tag[];
4084
- }
4085
-
4086
- export namespace ReplicateKeyRequest {
4087
- /**
4088
- * @internal
4089
- */
4090
- export const filterSensitiveLog = (obj: ReplicateKeyRequest): any => ({
4091
- ...obj,
4092
- });
4093
- }
4094
-
4095
- export interface ReplicateKeyResponse {
4096
- /**
4097
- * <p>Displays details about the new replica key, including its Amazon Resource Name (<a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">key
4098
- * ARN</a>) and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">key state</a>. It also includes the ARN and Amazon Web Services Region of its primary key and other
4099
- * replica keys.</p>
4100
- */
4101
- ReplicaKeyMetadata?: KeyMetadata;
4102
-
4103
- /**
4104
- * <p>The key policy of the new replica key. The value is a key policy document in JSON
4105
- * format.</p>
4106
- */
4107
- ReplicaPolicy?: string;
4108
-
4109
- /**
4110
- * <p>The tags on the new replica key. The value is a list of tag key and tag value
4111
- * pairs.</p>
4112
- */
4113
- ReplicaTags?: Tag[];
4114
- }
4115
-
4116
- export namespace ReplicateKeyResponse {
4117
- /**
4118
- * @internal
4119
- */
4120
- export const filterSensitiveLog = (obj: ReplicateKeyResponse): any => ({
4121
- ...obj,
4122
- });
4123
- }
4124
-
4125
- export interface RetireGrantRequest {
4126
- /**
4127
- * <p>Identifies the grant to be retired. You can use a grant token to identify a new grant even
4128
- * before it has achieved eventual consistency.</p>
4129
- * <p>Only the <a>CreateGrant</a> operation returns a grant token. For details, see
4130
- * <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token">Grant token</a>
4131
- * and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-eventual-consistency">Eventual consistency</a> in the <i>Key Management Service Developer Guide</i>.</p>
4132
- */
4133
- GrantToken?: string;
4134
-
4135
- /**
4136
- * <p>The key ARN KMS key associated with the grant. To find the key ARN, use the <a>ListKeys</a> operation.</p>
4137
- * <p>For example: <code>arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
4138
- * </p>
4139
- */
4140
- KeyId?: string;
4141
-
4142
- /**
4143
- * <p>Identifies the grant to retire. To get the grant ID, use <a>CreateGrant</a>,
4144
- * <a>ListGrants</a>, or <a>ListRetirableGrants</a>.</p>
4145
- * <ul>
4146
- * <li>
4147
- * <p>Grant ID Example -
4148
- * 0123456789012345678901234567890123456789012345678901234567890123</p>
4149
- * </li>
4150
- * </ul>
4151
- */
4152
- GrantId?: string;
4153
- }
4154
-
4155
- export namespace RetireGrantRequest {
4156
- /**
4157
- * @internal
4158
- */
4159
- export const filterSensitiveLog = (obj: RetireGrantRequest): any => ({
4160
- ...obj,
4161
- });
4162
- }
4163
-
4164
- export interface RevokeGrantRequest {
4165
- /**
4166
- * <p>A unique identifier for the KMS key associated with the grant. To get
4167
- * the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
4168
- *
4169
- * <p>Specify the key ID or key ARN of the KMS key. To specify a KMS key in a
4170
- * different Amazon Web Services account, you must use the key ARN.</p>
4171
- * <p>For example:</p>
4172
- * <ul>
4173
- * <li>
4174
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
4175
- * </p>
4176
- * </li>
4177
- * <li>
4178
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
4179
- * </p>
4180
- * </li>
4181
- * </ul>
4182
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
4183
- */
4184
- KeyId: string | undefined;
4185
-
4186
- /**
4187
- * <p>Identifies the grant to revoke. To get the grant ID, use <a>CreateGrant</a>,
4188
- * <a>ListGrants</a>, or <a>ListRetirableGrants</a>.</p>
4189
- */
4190
- GrantId: string | undefined;
4191
- }
4192
-
4193
- export namespace RevokeGrantRequest {
4194
- /**
4195
- * @internal
4196
- */
4197
- export const filterSensitiveLog = (obj: RevokeGrantRequest): any => ({
4198
- ...obj,
4199
- });
4200
- }
4201
-
4202
- export interface ScheduleKeyDeletionRequest {
4203
- /**
4204
- * <p>The unique identifier of the KMS key to delete.</p>
4205
- *
4206
- * <p>Specify the key ID or key ARN of the KMS key.</p>
4207
- * <p>For example:</p>
4208
- * <ul>
4209
- * <li>
4210
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
4211
- * </p>
4212
- * </li>
4213
- * <li>
4214
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
4215
- * </p>
4216
- * </li>
4217
- * </ul>
4218
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
4219
- */
4220
- KeyId: string | undefined;
4221
-
4222
- /**
4223
- * <p>The waiting period, specified in number of days. After the waiting period ends, KMS
4224
- * deletes the KMS key.</p>
4225
- * <p>If the KMS key is a multi-Region primary key with replicas, the waiting period begins when the
4226
- * last of its replica keys is deleted. Otherwise, the waiting period begins immediately.</p>
4227
- * <p>This value is optional. If you include a value, it must be between 7 and 30, inclusive. If
4228
- * you do not include a value, it defaults to 30.</p>
4229
- */
4230
- PendingWindowInDays?: number;
4231
- }
4232
-
4233
- export namespace ScheduleKeyDeletionRequest {
4234
- /**
4235
- * @internal
4236
- */
4237
- export const filterSensitiveLog = (obj: ScheduleKeyDeletionRequest): any => ({
4238
- ...obj,
4239
- });
4240
- }
4241
-
4242
- export interface ScheduleKeyDeletionResponse {
4243
- /**
4244
- * <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">key ARN</a>) of the KMS key whose deletion is scheduled.</p>
4245
- */
4246
- KeyId?: string;
4247
-
4248
- /**
4249
- * <p>The date and time after which KMS deletes the KMS key.</p>
4250
- * <p>If the KMS key is a multi-Region primary key with replica keys, this field does not appear.
4251
- * The deletion date for the primary key isn't known until its last replica key is
4252
- * deleted.</p>
4253
- */
4254
- DeletionDate?: Date;
4255
-
4256
- /**
4257
- * <p>The current status of the KMS key.</p>
4258
- * <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>
4259
- * in the <i>Key Management Service Developer Guide</i>.</p>
4260
- */
4261
- KeyState?: KeyState | string;
4262
-
4263
- /**
4264
- * <p>The waiting period before the KMS key is deleted. </p>
4265
- * <p>If the KMS key is a multi-Region primary key with replicas, the waiting period begins when the
4266
- * last of its replica keys is deleted. Otherwise, the waiting period begins immediately.</p>
4267
- */
4268
- PendingWindowInDays?: number;
4269
- }
4270
-
4271
- export namespace ScheduleKeyDeletionResponse {
4272
- /**
4273
- * @internal
4274
- */
4275
- export const filterSensitiveLog = (obj: ScheduleKeyDeletionResponse): any => ({
4276
- ...obj,
4277
- });
4278
- }
4279
-
4280
- export interface SignRequest {
4281
- /**
4282
- * <p>Identifies an asymmetric KMS key. KMS uses the private key in the asymmetric KMS key to sign the
4283
- * message. The <code>KeyUsage</code> type of the KMS key must be <code>SIGN_VERIFY</code>. To find
4284
- * the <code>KeyUsage</code> of a KMS key, use the <a>DescribeKey</a> operation.</p>
4285
- *
4286
- * <p>To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with <code>"alias/"</code>. To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p>
4287
- * <p>For example:</p>
4288
- * <ul>
4289
- * <li>
4290
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
4291
- * </p>
4292
- * </li>
4293
- * <li>
4294
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
4295
- * </p>
4296
- * </li>
4297
- * <li>
4298
- * <p>Alias name: <code>alias/ExampleAlias</code>
4299
- * </p>
4300
- * </li>
4301
- * <li>
4302
- * <p>Alias ARN: <code>arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</code>
4303
- * </p>
4304
- * </li>
4305
- * </ul>
4306
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>. To get the alias name and alias ARN, use <a>ListAliases</a>.</p>
4307
- */
4308
- KeyId: string | undefined;
4309
-
4310
- /**
4311
- * <p>Specifies the message or message digest to sign. Messages can be 0-4096 bytes. To sign a
4312
- * larger message, provide the message digest.</p>
4313
- * <p>If you provide a message, KMS generates a hash digest of the message and then signs
4314
- * it.</p>
4315
- */
4316
- Message: Uint8Array | undefined;
4317
-
4318
- /**
4319
- * <p>Tells KMS whether the value of the <code>Message</code> parameter is a message or
4320
- * message digest. The default value, RAW, indicates a message. To indicate a message digest,
4321
- * enter <code>DIGEST</code>.</p>
4322
- */
4323
- MessageType?: MessageType | string;
4324
-
4325
- /**
4326
- * <p>A list of grant tokens.</p>
4327
- * <p>Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved <i>eventual consistency</i>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token">Grant token</a> and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token">Using a grant token</a> in the
4328
- * <i>Key Management Service Developer Guide</i>.</p>
4329
- */
4330
- GrantTokens?: string[];
4331
-
4332
- /**
4333
- * <p>Specifies the signing algorithm to use when signing the message. </p>
4334
- * <p>Choose an algorithm that is compatible with the type and size of the specified asymmetric KMS key.</p>
4335
- */
4336
- SigningAlgorithm: SigningAlgorithmSpec | string | undefined;
4337
- }
4338
-
4339
- export namespace SignRequest {
4340
- /**
4341
- * @internal
4342
- */
4343
- export const filterSensitiveLog = (obj: SignRequest): any => ({
4344
- ...obj,
4345
- ...(obj.Message && { Message: SENSITIVE_STRING }),
4346
- });
4347
- }
4348
-
4349
- export interface SignResponse {
4350
- /**
4351
- * <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">key ARN</a>) of the asymmetric KMS key that was used to sign the message.</p>
4352
- */
4353
- KeyId?: string;
4354
-
4355
- /**
4356
- * <p>The cryptographic signature that was generated for the message. </p>
4357
- * <ul>
4358
- * <li>
4359
- * <p>When used with the supported RSA signing algorithms, the encoding of this value is
4360
- * defined by <a href="https://tools.ietf.org/html/rfc8017">PKCS #1 in RFC
4361
- * 8017</a>.</p>
4362
- * </li>
4363
- * <li>
4364
- * <p>When used with the <code>ECDSA_SHA_256</code>, <code>ECDSA_SHA_384</code>, or
4365
- * <code>ECDSA_SHA_512</code> signing algorithms, this value is a DER-encoded object as
4366
- * defined by ANS X9.62–2005 and <a href="https://tools.ietf.org/html/rfc3279#section-2.2.3">RFC 3279 Section 2.2.3</a>.
4367
- * This is the most commonly used signature format and is appropriate for most uses.
4368
- * </p>
4369
- * </li>
4370
- * </ul>
4371
- * <p>When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.</p>
4372
- */
4373
- Signature?: Uint8Array;
4374
-
4375
- /**
4376
- * <p>The signing algorithm that was used to sign the message.</p>
4377
- */
4378
- SigningAlgorithm?: SigningAlgorithmSpec | string;
4379
- }
4380
-
4381
- export namespace SignResponse {
4382
- /**
4383
- * @internal
4384
- */
4385
- export const filterSensitiveLog = (obj: SignResponse): any => ({
4386
- ...obj,
4387
- });
4388
- }
4389
-
4390
- export interface TagResourceRequest {
4391
- /**
4392
- * <p>Identifies a customer managed key in the account and Region.</p>
4393
- *
4394
- * <p>Specify the key ID or key ARN of the KMS key.</p>
4395
- * <p>For example:</p>
4396
- * <ul>
4397
- * <li>
4398
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
4399
- * </p>
4400
- * </li>
4401
- * <li>
4402
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
4403
- * </p>
4404
- * </li>
4405
- * </ul>
4406
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
4407
- */
4408
- KeyId: string | undefined;
4409
-
4410
- /**
4411
- * <p>One or more tags. </p>
4412
- * <p>Each tag consists of a tag key and a tag value. The tag value can be an empty (null)
4413
- * string. </p>
4414
- * <p>You cannot have more than one tag on a KMS key with the same tag key. If you specify an
4415
- * existing tag key with a different tag value, KMS replaces the current tag value with the
4416
- * specified one.</p>
4417
- */
4418
- Tags: Tag[] | undefined;
4419
- }
4420
-
4421
- export namespace TagResourceRequest {
4422
- /**
4423
- * @internal
4424
- */
4425
- export const filterSensitiveLog = (obj: TagResourceRequest): any => ({
4426
- ...obj,
4427
- });
4428
- }
4429
-
4430
- export interface UntagResourceRequest {
4431
- /**
4432
- * <p>Identifies the KMS key from which you are removing tags.</p>
4433
- *
4434
- * <p>Specify the key ID or key ARN of the KMS key.</p>
4435
- * <p>For example:</p>
4436
- * <ul>
4437
- * <li>
4438
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
4439
- * </p>
4440
- * </li>
4441
- * <li>
4442
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
4443
- * </p>
4444
- * </li>
4445
- * </ul>
4446
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
4447
- */
4448
- KeyId: string | undefined;
4449
-
4450
- /**
4451
- * <p>One or more tag keys. Specify only the tag keys, not the tag values.</p>
4452
- */
4453
- TagKeys: string[] | undefined;
4454
- }
4455
-
4456
- export namespace UntagResourceRequest {
4457
- /**
4458
- * @internal
4459
- */
4460
- export const filterSensitiveLog = (obj: UntagResourceRequest): any => ({
4461
- ...obj,
4462
- });
4463
- }
4464
-
4465
- export interface UpdateAliasRequest {
4466
- /**
4467
- * <p>Identifies the alias that is changing its KMS key. This value must begin with
4468
- * <code>alias/</code> followed by the alias name, such as <code>alias/ExampleAlias</code>. You
4469
- * cannot use UpdateAlias to change the alias name.</p>
4470
- */
4471
- AliasName: string | undefined;
4472
-
4473
- /**
4474
- * <p>Identifies the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk">customer managed key</a> to associate with the alias. You don't have permission
4475
- * to associate an alias with an <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk">Amazon Web Services managed key</a>.</p>
4476
- * <p>The KMS key must be in the same Amazon Web Services account and Region as the alias. Also, the new target KMS key
4477
- * must be the same type as the current target KMS key (both symmetric or both asymmetric) and they
4478
- * must have the same key usage. </p>
4479
- * <p>Specify the key ID or key ARN of the KMS key.</p>
4480
- * <p>For example:</p>
4481
- * <ul>
4482
- * <li>
4483
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
4484
- * </p>
4485
- * </li>
4486
- * <li>
4487
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
4488
- * </p>
4489
- * </li>
4490
- * </ul>
4491
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
4492
- * <p>To verify that the alias
4493
- * is mapped to the correct KMS key, use <a>ListAliases</a>.</p>
4494
- */
4495
- TargetKeyId: string | undefined;
4496
- }
4497
-
4498
- export namespace UpdateAliasRequest {
4499
- /**
4500
- * @internal
4501
- */
4502
- export const filterSensitiveLog = (obj: UpdateAliasRequest): any => ({
4503
- ...obj,
4504
- });
4505
- }
4506
-
4507
- export interface UpdateCustomKeyStoreRequest {
4508
- /**
4509
- * <p>Identifies the custom key store that you want to update. Enter the ID of the custom key
4510
- * store. To find the ID of a custom key store, use the <a>DescribeCustomKeyStores</a> operation.</p>
4511
- */
4512
- CustomKeyStoreId: string | undefined;
4513
-
4514
- /**
4515
- * <p>Changes the friendly name of the custom key store to the value that you specify. The
4516
- * custom key store name must be unique in the Amazon Web Services account.</p>
4517
- */
4518
- NewCustomKeyStoreName?: string;
4519
-
4520
- /**
4521
- * <p>Enter the current password of the <code>kmsuser</code> crypto user (CU) in the CloudHSM
4522
- * cluster that is associated with the custom key store.</p>
4523
- * <p>This parameter tells KMS the current password of the <code>kmsuser</code> crypto user
4524
- * (CU). It does not set or change the password of any users in the CloudHSM cluster.</p>
4525
- */
4526
- KeyStorePassword?: string;
4527
-
4528
- /**
4529
- * <p>Associates the custom key store with a related CloudHSM cluster. </p>
4530
- * <p>Enter the cluster ID of the cluster that you used to create the custom key store or a
4531
- * cluster that shares a backup history and has the same cluster certificate as the original
4532
- * cluster. You cannot use this parameter to associate a custom key store with an unrelated
4533
- * cluster. In addition, the replacement cluster must <a href="https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore">fulfill the requirements</a> for
4534
- * a cluster associated with a custom key store. To view the cluster certificate of a cluster,
4535
- * use the <a href="https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html">DescribeClusters</a> operation.</p>
4536
- */
4537
- CloudHsmClusterId?: string;
4538
- }
4539
-
4540
- export namespace UpdateCustomKeyStoreRequest {
4541
- /**
4542
- * @internal
4543
- */
4544
- export const filterSensitiveLog = (obj: UpdateCustomKeyStoreRequest): any => ({
4545
- ...obj,
4546
- ...(obj.KeyStorePassword && { KeyStorePassword: SENSITIVE_STRING }),
4547
- });
4548
- }
4549
-
4550
- export interface UpdateCustomKeyStoreResponse {}
4551
-
4552
- export namespace UpdateCustomKeyStoreResponse {
4553
- /**
4554
- * @internal
4555
- */
4556
- export const filterSensitiveLog = (obj: UpdateCustomKeyStoreResponse): any => ({
4557
- ...obj,
4558
- });
4559
- }
4560
-
4561
- export interface UpdateKeyDescriptionRequest {
4562
- /**
4563
- * <p>Updates the description of the specified KMS key.</p>
4564
- * <p>Specify the key ID or key ARN of the KMS key.</p>
4565
- * <p>For example:</p>
4566
- * <ul>
4567
- * <li>
4568
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
4569
- * </p>
4570
- * </li>
4571
- * <li>
4572
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
4573
- * </p>
4574
- * </li>
4575
- * </ul>
4576
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
4577
- */
4578
- KeyId: string | undefined;
4579
-
4580
- /**
4581
- * <p>New description for the KMS key.</p>
4582
- */
4583
- Description: string | undefined;
4584
- }
4585
-
4586
- export namespace UpdateKeyDescriptionRequest {
4587
- /**
4588
- * @internal
4589
- */
4590
- export const filterSensitiveLog = (obj: UpdateKeyDescriptionRequest): any => ({
4591
- ...obj,
4592
- });
4593
- }
4594
-
4595
- export interface UpdatePrimaryRegionRequest {
4596
- /**
4597
- * <p>Identifies the current primary key. When the operation completes, this KMS key will be a
4598
- * replica key.</p>
4599
- *
4600
- * <p>Specify the key ID or key ARN of a multi-Region primary key.</p>
4601
- * <p>For example:</p>
4602
- * <ul>
4603
- * <li>
4604
- * <p>Key ID: <code>mrk-1234abcd12ab34cd56ef1234567890ab</code>
4605
- * </p>
4606
- * </li>
4607
- * <li>
4608
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab</code>
4609
- * </p>
4610
- * </li>
4611
- * </ul>
4612
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
4613
- */
4614
- KeyId: string | undefined;
4615
-
4616
- /**
4617
- * <p>The Amazon Web Services Region of the new primary key. Enter the Region ID, such as <code>us-east-1</code>
4618
- * or <code>ap-southeast-2</code>. There must be an existing replica key in this Region. </p>
4619
- * <p>When the operation completes, the multi-Region key in this Region will be the primary
4620
- * key.</p>
4621
- */
4622
- PrimaryRegion: string | undefined;
4623
- }
4624
-
4625
- export namespace UpdatePrimaryRegionRequest {
4626
- /**
4627
- * @internal
4628
- */
4629
- export const filterSensitiveLog = (obj: UpdatePrimaryRegionRequest): any => ({
4630
- ...obj,
4631
- });
4632
- }
4633
-
4634
- export interface VerifyRequest {
4635
- /**
4636
- * <p>Identifies the asymmetric KMS key that will be used to verify the signature. This must be the
4637
- * same KMS key that was used to generate the signature. If you specify a different KMS key, the
4638
- * signature verification fails.</p>
4639
- * <p>To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with <code>"alias/"</code>. To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.</p>
4640
- * <p>For example:</p>
4641
- * <ul>
4642
- * <li>
4643
- * <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code>
4644
- * </p>
4645
- * </li>
4646
- * <li>
4647
- * <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>
4648
- * </p>
4649
- * </li>
4650
- * <li>
4651
- * <p>Alias name: <code>alias/ExampleAlias</code>
4652
- * </p>
4653
- * </li>
4654
- * <li>
4655
- * <p>Alias ARN: <code>arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias</code>
4656
- * </p>
4657
- * </li>
4658
- * </ul>
4659
- * <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>. To get the alias name and alias ARN, use <a>ListAliases</a>.</p>
4660
- */
4661
- KeyId: string | undefined;
4662
-
4663
- /**
4664
- * <p>Specifies the message that was signed. You can submit a raw message of up to 4096 bytes,
4665
- * or a hash digest of the message. If you submit a digest, use the <code>MessageType</code>
4666
- * parameter with a value of <code>DIGEST</code>.</p>
4667
- * <p>If the message specified here is different from the message that was signed, the signature
4668
- * verification fails. A message and its hash digest are considered to be the same
4669
- * message.</p>
4670
- */
4671
- Message: Uint8Array | undefined;
4672
-
4673
- /**
4674
- * <p>Tells KMS whether the value of the <code>Message</code> parameter is a message or
4675
- * message digest. The default value, RAW, indicates a message. To indicate a message digest,
4676
- * enter <code>DIGEST</code>.</p>
4677
- * <important>
4678
- * <p>Use the <code>DIGEST</code> value only when the value of the <code>Message</code>
4679
- * parameter is a message digest. If you use the <code>DIGEST</code> value with a raw message,
4680
- * the security of the verification operation can be compromised.</p>
4681
- * </important>
4682
- */
4683
- MessageType?: MessageType | string;
4684
-
4685
- /**
4686
- * <p>The signature that the <code>Sign</code> operation generated.</p>
4687
- */
4688
- Signature: Uint8Array | undefined;
4689
-
4690
- /**
4691
- * <p>The signing algorithm that was used to sign the message. If you submit a different
4692
- * algorithm, the signature verification fails.</p>
4693
- */
4694
- SigningAlgorithm: SigningAlgorithmSpec | string | undefined;
4695
-
4696
- /**
4697
- * <p>A list of grant tokens.</p>
4698
- * <p>Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved <i>eventual consistency</i>. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token">Grant token</a> and <a href="https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token">Using a grant token</a> in the
4699
- * <i>Key Management Service Developer Guide</i>.</p>
4700
- */
4701
- GrantTokens?: string[];
4702
- }
4703
-
4704
- export namespace VerifyRequest {
4705
- /**
4706
- * @internal
4707
- */
4708
- export const filterSensitiveLog = (obj: VerifyRequest): any => ({
4709
- ...obj,
4710
- ...(obj.Message && { Message: SENSITIVE_STRING }),
4711
- });
4712
- }
4713
-
4714
- export interface VerifyResponse {
4715
- /**
4716
- * <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">key ARN</a>) of the asymmetric KMS key that was used to verify the signature.</p>
4717
- */
4718
- KeyId?: string;
4719
-
4720
- /**
4721
- * <p>A Boolean value that indicates whether the signature was verified. A value of
4722
- * <code>True</code> indicates that the <code>Signature</code> was produced by signing the
4723
- * <code>Message</code> with the specified <code>KeyID</code> and
4724
- * <code>SigningAlgorithm.</code> If the signature is not verified, the <code>Verify</code>
4725
- * operation fails with a <code>KMSInvalidSignatureException</code> exception. </p>
4726
- */
4727
- SignatureValid?: boolean;
4728
-
4729
- /**
4730
- * <p>The signing algorithm that was used to verify the signature.</p>
4731
- */
4732
- SigningAlgorithm?: SigningAlgorithmSpec | string;
4733
- }
4734
-
4735
- export namespace VerifyResponse {
4736
- /**
4737
- * @internal
4738
- */
4739
- export const filterSensitiveLog = (obj: VerifyResponse): any => ({
4740
- ...obj,
4741
- });
4742
- }