@aws-sdk/client-secrets-manager 3.34.0 → 3.37.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 (303) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/{dist/cjs → dist-cjs}/SecretsManager.js +2 -68
  3. package/dist-cjs/SecretsManagerClient.js +35 -0
  4. package/dist-cjs/commands/CancelRotateSecretCommand.js +36 -0
  5. package/dist-cjs/commands/CreateSecretCommand.js +36 -0
  6. package/dist-cjs/commands/DeleteResourcePolicyCommand.js +36 -0
  7. package/dist-cjs/commands/DeleteSecretCommand.js +36 -0
  8. package/dist-cjs/commands/DescribeSecretCommand.js +36 -0
  9. package/{dist/cjs → dist-cjs}/commands/GetRandomPasswordCommand.js +2 -39
  10. package/dist-cjs/commands/GetResourcePolicyCommand.js +36 -0
  11. package/dist-cjs/commands/GetSecretValueCommand.js +36 -0
  12. package/dist-cjs/commands/ListSecretVersionIdsCommand.js +36 -0
  13. package/dist-cjs/commands/ListSecretsCommand.js +36 -0
  14. package/dist-cjs/commands/PutResourcePolicyCommand.js +36 -0
  15. package/dist-cjs/commands/PutSecretValueCommand.js +36 -0
  16. package/{dist/cjs → dist-cjs}/commands/RemoveRegionsFromReplicationCommand.js +2 -27
  17. package/{dist/cjs → dist-cjs}/commands/ReplicateSecretToRegionsCommand.js +2 -28
  18. package/dist-cjs/commands/RestoreSecretCommand.js +36 -0
  19. package/dist-cjs/commands/RotateSecretCommand.js +36 -0
  20. package/{dist/cjs → dist-cjs}/commands/StopReplicationToReplicaCommand.js +2 -27
  21. package/dist-cjs/commands/TagResourceCommand.js +36 -0
  22. package/dist-cjs/commands/UntagResourceCommand.js +36 -0
  23. package/dist-cjs/commands/UpdateSecretCommand.js +36 -0
  24. package/dist-cjs/commands/UpdateSecretVersionStageCommand.js +36 -0
  25. package/dist-cjs/commands/ValidateResourcePolicyCommand.js +36 -0
  26. package/{dist/cjs → dist-cjs}/endpoints.js +1 -2
  27. package/{dist/cjs → dist-cjs}/index.js +0 -1
  28. package/{dist/cjs → dist-cjs}/models/index.js +0 -1
  29. package/{dist/cjs → dist-cjs}/models/models_0.js +0 -187
  30. package/{dist/cjs → dist-cjs}/pagination/Interfaces.js +0 -1
  31. package/{dist/cjs → dist-cjs}/pagination/ListSecretVersionIdsPaginator.js +1 -12
  32. package/{dist/cjs → dist-cjs}/pagination/ListSecretsPaginator.js +1 -12
  33. package/{dist/cjs → dist-cjs}/protocols/Aws_json1_1.js +0 -6
  34. package/{dist/cjs → dist-cjs}/runtimeConfig.browser.js +1 -5
  35. package/{dist/cjs → dist-cjs}/runtimeConfig.js +1 -5
  36. package/{dist/cjs → dist-cjs}/runtimeConfig.native.js +0 -4
  37. package/{dist/cjs → dist-cjs}/runtimeConfig.shared.js +1 -5
  38. package/{dist/es → dist-es}/SecretsManager.js +2 -3
  39. package/{dist/es → dist-es}/SecretsManagerClient.js +1 -2
  40. package/{dist/es → dist-es}/commands/CancelRotateSecretCommand.js +2 -3
  41. package/{dist/es → dist-es}/commands/CreateSecretCommand.js +2 -3
  42. package/{dist/es → dist-es}/commands/DeleteResourcePolicyCommand.js +2 -3
  43. package/{dist/es → dist-es}/commands/DeleteSecretCommand.js +2 -3
  44. package/{dist/es → dist-es}/commands/DescribeSecretCommand.js +2 -3
  45. package/{dist/es → dist-es}/commands/GetRandomPasswordCommand.js +2 -3
  46. package/{dist/es → dist-es}/commands/GetResourcePolicyCommand.js +2 -3
  47. package/{dist/es → dist-es}/commands/GetSecretValueCommand.js +2 -3
  48. package/{dist/es → dist-es}/commands/ListSecretVersionIdsCommand.js +2 -3
  49. package/{dist/es → dist-es}/commands/ListSecretsCommand.js +2 -3
  50. package/{dist/es → dist-es}/commands/PutResourcePolicyCommand.js +2 -3
  51. package/{dist/es → dist-es}/commands/PutSecretValueCommand.js +2 -3
  52. package/{dist/es → dist-es}/commands/RemoveRegionsFromReplicationCommand.js +2 -3
  53. package/{dist/es → dist-es}/commands/ReplicateSecretToRegionsCommand.js +2 -3
  54. package/{dist/es → dist-es}/commands/RestoreSecretCommand.js +2 -3
  55. package/{dist/es → dist-es}/commands/RotateSecretCommand.js +2 -3
  56. package/{dist/es → dist-es}/commands/StopReplicationToReplicaCommand.js +2 -3
  57. package/{dist/es → dist-es}/commands/TagResourceCommand.js +2 -3
  58. package/{dist/es → dist-es}/commands/UntagResourceCommand.js +2 -3
  59. package/{dist/es → dist-es}/commands/UpdateSecretCommand.js +2 -3
  60. package/{dist/es → dist-es}/commands/UpdateSecretVersionStageCommand.js +2 -3
  61. package/{dist/es → dist-es}/commands/ValidateResourcePolicyCommand.js +2 -3
  62. package/{dist/es → dist-es}/endpoints.js +1 -2
  63. package/{dist/types/index.d.ts → dist-es/index.js} +0 -0
  64. package/{dist/types/models/index.d.ts → dist-es/models/index.js} +0 -0
  65. package/{dist/es → dist-es}/models/models_0.js +0 -1
  66. package/dist-es/pagination/Interfaces.js +1 -0
  67. package/{dist/es → dist-es}/pagination/ListSecretVersionIdsPaginator.js +1 -2
  68. package/{dist/es → dist-es}/pagination/ListSecretsPaginator.js +1 -2
  69. package/{dist/es → dist-es}/protocols/Aws_json1_1.js +0 -1
  70. package/{dist/es → dist-es}/runtimeConfig.browser.js +1 -2
  71. package/{dist/es → dist-es}/runtimeConfig.js +1 -2
  72. package/{dist/es → dist-es}/runtimeConfig.native.js +0 -1
  73. package/{dist/es → dist-es}/runtimeConfig.shared.js +1 -2
  74. package/{dist/types → dist-types}/SecretsManager.d.ts +19 -13
  75. package/{dist/types → dist-types}/SecretsManagerClient.d.ts +9 -9
  76. package/{dist/types → dist-types}/commands/CancelRotateSecretCommand.d.ts +3 -3
  77. package/{dist/types → dist-types}/commands/CreateSecretCommand.d.ts +3 -3
  78. package/{dist/types → dist-types}/commands/DeleteResourcePolicyCommand.d.ts +3 -3
  79. package/{dist/types → dist-types}/commands/DeleteSecretCommand.d.ts +3 -3
  80. package/{dist/types → dist-types}/commands/DescribeSecretCommand.d.ts +3 -3
  81. package/{dist/types → dist-types}/commands/GetRandomPasswordCommand.d.ts +3 -3
  82. package/{dist/types → dist-types}/commands/GetResourcePolicyCommand.d.ts +3 -3
  83. package/{dist/types → dist-types}/commands/GetSecretValueCommand.d.ts +3 -3
  84. package/{dist/types → dist-types}/commands/ListSecretVersionIdsCommand.d.ts +3 -3
  85. package/{dist/types → dist-types}/commands/ListSecretsCommand.d.ts +3 -3
  86. package/{dist/types → dist-types}/commands/PutResourcePolicyCommand.d.ts +3 -3
  87. package/{dist/types/ts3.4 → dist-types}/commands/PutSecretValueCommand.d.ts +123 -122
  88. package/{dist/types → dist-types}/commands/RemoveRegionsFromReplicationCommand.d.ts +3 -3
  89. package/{dist/types → dist-types}/commands/ReplicateSecretToRegionsCommand.d.ts +3 -3
  90. package/{dist/types → dist-types}/commands/RestoreSecretCommand.d.ts +3 -3
  91. package/{dist/types → dist-types}/commands/RotateSecretCommand.d.ts +3 -3
  92. package/{dist/types → dist-types}/commands/StopReplicationToReplicaCommand.d.ts +3 -3
  93. package/{dist/types → dist-types}/commands/TagResourceCommand.d.ts +3 -3
  94. package/{dist/types → dist-types}/commands/UntagResourceCommand.d.ts +3 -3
  95. package/{dist/types/ts3.4 → dist-types}/commands/UpdateSecretCommand.d.ts +124 -119
  96. package/{dist/types → dist-types}/commands/UpdateSecretVersionStageCommand.d.ts +3 -3
  97. package/{dist/types → dist-types}/commands/ValidateResourcePolicyCommand.d.ts +3 -3
  98. package/{dist/types → dist-types}/endpoints.d.ts +0 -0
  99. package/{index.ts → dist-types/index.d.ts} +0 -0
  100. package/{models/index.ts → dist-types/models/index.d.ts} +0 -0
  101. package/{dist/types → dist-types}/models/models_0.d.ts +54 -268
  102. package/{dist/types → dist-types}/pagination/Interfaces.d.ts +1 -1
  103. package/{dist/types → dist-types}/pagination/ListSecretVersionIdsPaginator.d.ts +1 -1
  104. package/{dist/types → dist-types}/pagination/ListSecretsPaginator.d.ts +1 -1
  105. package/{dist/types → dist-types}/protocols/Aws_json1_1.d.ts +3 -3
  106. package/{dist/types → dist-types}/runtimeConfig.browser.d.ts +0 -0
  107. package/{dist/types → dist-types}/runtimeConfig.d.ts +1 -1
  108. package/{dist/types → dist-types}/runtimeConfig.native.d.ts +0 -0
  109. package/{dist/types → dist-types}/runtimeConfig.shared.d.ts +0 -0
  110. package/dist-types/ts3.4/SecretsManager.d.ts +115 -0
  111. package/dist-types/ts3.4/SecretsManagerClient.d.ts +89 -0
  112. package/dist-types/ts3.4/commands/CancelRotateSecretCommand.d.ts +17 -0
  113. package/dist-types/ts3.4/commands/CreateSecretCommand.d.ts +17 -0
  114. package/dist-types/ts3.4/commands/DeleteResourcePolicyCommand.d.ts +17 -0
  115. package/dist-types/ts3.4/commands/DeleteSecretCommand.d.ts +17 -0
  116. package/dist-types/ts3.4/commands/DescribeSecretCommand.d.ts +17 -0
  117. package/dist-types/ts3.4/commands/GetRandomPasswordCommand.d.ts +17 -0
  118. package/dist-types/ts3.4/commands/GetResourcePolicyCommand.d.ts +17 -0
  119. package/dist-types/ts3.4/commands/GetSecretValueCommand.d.ts +17 -0
  120. package/dist-types/ts3.4/commands/ListSecretVersionIdsCommand.d.ts +17 -0
  121. package/dist-types/ts3.4/commands/ListSecretsCommand.d.ts +17 -0
  122. package/dist-types/ts3.4/commands/PutResourcePolicyCommand.d.ts +17 -0
  123. package/dist-types/ts3.4/commands/PutSecretValueCommand.d.ts +17 -0
  124. package/{dist/types → dist-types}/ts3.4/commands/RemoveRegionsFromReplicationCommand.d.ts +5 -23
  125. package/dist-types/ts3.4/commands/ReplicateSecretToRegionsCommand.d.ts +17 -0
  126. package/dist-types/ts3.4/commands/RestoreSecretCommand.d.ts +17 -0
  127. package/dist-types/ts3.4/commands/RotateSecretCommand.d.ts +17 -0
  128. package/{dist/types → dist-types}/ts3.4/commands/StopReplicationToReplicaCommand.d.ts +5 -23
  129. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +17 -0
  130. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +17 -0
  131. package/dist-types/ts3.4/commands/UpdateSecretCommand.d.ts +17 -0
  132. package/dist-types/ts3.4/commands/UpdateSecretVersionStageCommand.d.ts +17 -0
  133. package/dist-types/ts3.4/commands/ValidateResourcePolicyCommand.d.ts +17 -0
  134. package/{dist/types → dist-types}/ts3.4/endpoints.d.ts +0 -0
  135. package/{dist/types → dist-types}/ts3.4/index.d.ts +0 -0
  136. package/{dist/types → dist-types}/ts3.4/models/index.d.ts +0 -0
  137. package/dist-types/ts3.4/models/models_0.d.ts +791 -0
  138. package/{dist/types → dist-types}/ts3.4/pagination/Interfaces.d.ts +1 -1
  139. package/{dist/types → dist-types}/ts3.4/pagination/ListSecretVersionIdsPaginator.d.ts +1 -1
  140. package/{dist/types → dist-types}/ts3.4/pagination/ListSecretsPaginator.d.ts +1 -1
  141. package/{dist/types → dist-types}/ts3.4/protocols/Aws_json1_1.d.ts +3 -3
  142. package/{dist/types → dist-types}/ts3.4/runtimeConfig.browser.d.ts +1 -3
  143. package/{dist/types → dist-types}/ts3.4/runtimeConfig.d.ts +2 -4
  144. package/{dist/types → dist-types}/ts3.4/runtimeConfig.native.d.ts +1 -3
  145. package/{dist/types → dist-types}/ts3.4/runtimeConfig.shared.d.ts +1 -3
  146. package/package.json +45 -42
  147. package/SecretsManager.ts +0 -1642
  148. package/SecretsManagerClient.ts +0 -384
  149. package/commands/CancelRotateSecretCommand.ts +0 -146
  150. package/commands/CreateSecretCommand.ts +0 -181
  151. package/commands/DeleteResourcePolicyCommand.ts +0 -117
  152. package/commands/DeleteSecretCommand.ts +0 -139
  153. package/commands/DescribeSecretCommand.ts +0 -121
  154. package/commands/GetRandomPasswordCommand.ts +0 -106
  155. package/commands/GetResourcePolicyCommand.ts +0 -120
  156. package/commands/GetSecretValueCommand.ts +0 -121
  157. package/commands/ListSecretVersionIdsCommand.ts +0 -122
  158. package/commands/ListSecretsCommand.ts +0 -123
  159. package/commands/PutResourcePolicyCommand.ts +0 -125
  160. package/commands/PutSecretValueCommand.ts +0 -181
  161. package/commands/RemoveRegionsFromReplicationCommand.ts +0 -99
  162. package/commands/ReplicateSecretToRegionsCommand.ts +0 -95
  163. package/commands/RestoreSecretCommand.ts +0 -112
  164. package/commands/RotateSecretCommand.ts +0 -155
  165. package/commands/StopReplicationToReplicaCommand.ts +0 -94
  166. package/commands/TagResourceCommand.ts +0 -149
  167. package/commands/UntagResourceCommand.ts +0 -122
  168. package/commands/UpdateSecretCommand.ts +0 -178
  169. package/commands/UpdateSecretVersionStageCommand.ts +0 -130
  170. package/commands/ValidateResourcePolicyCommand.ts +0 -128
  171. package/dist/cjs/SecretsManager.js.map +0 -1
  172. package/dist/cjs/SecretsManagerClient.js +0 -106
  173. package/dist/cjs/SecretsManagerClient.js.map +0 -1
  174. package/dist/cjs/commands/CancelRotateSecretCommand.js +0 -113
  175. package/dist/cjs/commands/CancelRotateSecretCommand.js.map +0 -1
  176. package/dist/cjs/commands/CreateSecretCommand.js +0 -148
  177. package/dist/cjs/commands/CreateSecretCommand.js.map +0 -1
  178. package/dist/cjs/commands/DeleteResourcePolicyCommand.js +0 -84
  179. package/dist/cjs/commands/DeleteResourcePolicyCommand.js.map +0 -1
  180. package/dist/cjs/commands/DeleteSecretCommand.js +0 -106
  181. package/dist/cjs/commands/DeleteSecretCommand.js.map +0 -1
  182. package/dist/cjs/commands/DescribeSecretCommand.js +0 -88
  183. package/dist/cjs/commands/DescribeSecretCommand.js.map +0 -1
  184. package/dist/cjs/commands/GetRandomPasswordCommand.js.map +0 -1
  185. package/dist/cjs/commands/GetResourcePolicyCommand.js +0 -87
  186. package/dist/cjs/commands/GetResourcePolicyCommand.js.map +0 -1
  187. package/dist/cjs/commands/GetSecretValueCommand.js +0 -88
  188. package/dist/cjs/commands/GetSecretValueCommand.js.map +0 -1
  189. package/dist/cjs/commands/ListSecretVersionIdsCommand.js +0 -89
  190. package/dist/cjs/commands/ListSecretVersionIdsCommand.js.map +0 -1
  191. package/dist/cjs/commands/ListSecretsCommand.js +0 -90
  192. package/dist/cjs/commands/ListSecretsCommand.js.map +0 -1
  193. package/dist/cjs/commands/PutResourcePolicyCommand.js +0 -92
  194. package/dist/cjs/commands/PutResourcePolicyCommand.js.map +0 -1
  195. package/dist/cjs/commands/PutSecretValueCommand.js +0 -148
  196. package/dist/cjs/commands/PutSecretValueCommand.js.map +0 -1
  197. package/dist/cjs/commands/RemoveRegionsFromReplicationCommand.js.map +0 -1
  198. package/dist/cjs/commands/ReplicateSecretToRegionsCommand.js.map +0 -1
  199. package/dist/cjs/commands/RestoreSecretCommand.js +0 -79
  200. package/dist/cjs/commands/RestoreSecretCommand.js.map +0 -1
  201. package/dist/cjs/commands/RotateSecretCommand.js +0 -122
  202. package/dist/cjs/commands/RotateSecretCommand.js.map +0 -1
  203. package/dist/cjs/commands/StopReplicationToReplicaCommand.js.map +0 -1
  204. package/dist/cjs/commands/TagResourceCommand.js +0 -116
  205. package/dist/cjs/commands/TagResourceCommand.js.map +0 -1
  206. package/dist/cjs/commands/UntagResourceCommand.js +0 -89
  207. package/dist/cjs/commands/UntagResourceCommand.js.map +0 -1
  208. package/dist/cjs/commands/UpdateSecretCommand.js +0 -145
  209. package/dist/cjs/commands/UpdateSecretCommand.js.map +0 -1
  210. package/dist/cjs/commands/UpdateSecretVersionStageCommand.js +0 -97
  211. package/dist/cjs/commands/UpdateSecretVersionStageCommand.js.map +0 -1
  212. package/dist/cjs/commands/ValidateResourcePolicyCommand.js +0 -95
  213. package/dist/cjs/commands/ValidateResourcePolicyCommand.js.map +0 -1
  214. package/dist/cjs/endpoints.js.map +0 -1
  215. package/dist/cjs/index.js.map +0 -1
  216. package/dist/cjs/models/index.js.map +0 -1
  217. package/dist/cjs/models/models_0.js.map +0 -1
  218. package/dist/cjs/package.json +0 -93
  219. package/dist/cjs/pagination/Interfaces.js.map +0 -1
  220. package/dist/cjs/pagination/ListSecretVersionIdsPaginator.js.map +0 -1
  221. package/dist/cjs/pagination/ListSecretsPaginator.js.map +0 -1
  222. package/dist/cjs/protocols/Aws_json1_1.js.map +0 -1
  223. package/dist/cjs/runtimeConfig.browser.js.map +0 -1
  224. package/dist/cjs/runtimeConfig.js.map +0 -1
  225. package/dist/cjs/runtimeConfig.native.js.map +0 -1
  226. package/dist/cjs/runtimeConfig.shared.js.map +0 -1
  227. package/dist/es/SecretsManager.js.map +0 -1
  228. package/dist/es/SecretsManagerClient.js.map +0 -1
  229. package/dist/es/commands/CancelRotateSecretCommand.js.map +0 -1
  230. package/dist/es/commands/CreateSecretCommand.js.map +0 -1
  231. package/dist/es/commands/DeleteResourcePolicyCommand.js.map +0 -1
  232. package/dist/es/commands/DeleteSecretCommand.js.map +0 -1
  233. package/dist/es/commands/DescribeSecretCommand.js.map +0 -1
  234. package/dist/es/commands/GetRandomPasswordCommand.js.map +0 -1
  235. package/dist/es/commands/GetResourcePolicyCommand.js.map +0 -1
  236. package/dist/es/commands/GetSecretValueCommand.js.map +0 -1
  237. package/dist/es/commands/ListSecretVersionIdsCommand.js.map +0 -1
  238. package/dist/es/commands/ListSecretsCommand.js.map +0 -1
  239. package/dist/es/commands/PutResourcePolicyCommand.js.map +0 -1
  240. package/dist/es/commands/PutSecretValueCommand.js.map +0 -1
  241. package/dist/es/commands/RemoveRegionsFromReplicationCommand.js.map +0 -1
  242. package/dist/es/commands/ReplicateSecretToRegionsCommand.js.map +0 -1
  243. package/dist/es/commands/RestoreSecretCommand.js.map +0 -1
  244. package/dist/es/commands/RotateSecretCommand.js.map +0 -1
  245. package/dist/es/commands/StopReplicationToReplicaCommand.js.map +0 -1
  246. package/dist/es/commands/TagResourceCommand.js.map +0 -1
  247. package/dist/es/commands/UntagResourceCommand.js.map +0 -1
  248. package/dist/es/commands/UpdateSecretCommand.js.map +0 -1
  249. package/dist/es/commands/UpdateSecretVersionStageCommand.js.map +0 -1
  250. package/dist/es/commands/ValidateResourcePolicyCommand.js.map +0 -1
  251. package/dist/es/endpoints.js.map +0 -1
  252. package/dist/es/index.js +0 -29
  253. package/dist/es/index.js.map +0 -1
  254. package/dist/es/models/index.js +0 -2
  255. package/dist/es/models/index.js.map +0 -1
  256. package/dist/es/models/models_0.js.map +0 -1
  257. package/dist/es/package.json +0 -93
  258. package/dist/es/pagination/Interfaces.js +0 -2
  259. package/dist/es/pagination/Interfaces.js.map +0 -1
  260. package/dist/es/pagination/ListSecretVersionIdsPaginator.js.map +0 -1
  261. package/dist/es/pagination/ListSecretsPaginator.js.map +0 -1
  262. package/dist/es/protocols/Aws_json1_1.js.map +0 -1
  263. package/dist/es/runtimeConfig.browser.js.map +0 -1
  264. package/dist/es/runtimeConfig.js.map +0 -1
  265. package/dist/es/runtimeConfig.native.js.map +0 -1
  266. package/dist/es/runtimeConfig.shared.js.map +0 -1
  267. package/dist/types/commands/PutSecretValueCommand.d.ts +0 -122
  268. package/dist/types/commands/UpdateSecretCommand.d.ts +0 -119
  269. package/dist/types/ts3.4/SecretsManager.d.ts +0 -1014
  270. package/dist/types/ts3.4/SecretsManagerClient.d.ts +0 -216
  271. package/dist/types/ts3.4/commands/CancelRotateSecretCommand.d.ts +0 -87
  272. package/dist/types/ts3.4/commands/CreateSecretCommand.d.ts +0 -122
  273. package/dist/types/ts3.4/commands/DeleteResourcePolicyCommand.d.ts +0 -58
  274. package/dist/types/ts3.4/commands/DeleteSecretCommand.d.ts +0 -80
  275. package/dist/types/ts3.4/commands/DescribeSecretCommand.d.ts +0 -62
  276. package/dist/types/ts3.4/commands/GetRandomPasswordCommand.d.ts +0 -47
  277. package/dist/types/ts3.4/commands/GetResourcePolicyCommand.d.ts +0 -61
  278. package/dist/types/ts3.4/commands/GetSecretValueCommand.d.ts +0 -62
  279. package/dist/types/ts3.4/commands/ListSecretVersionIdsCommand.d.ts +0 -63
  280. package/dist/types/ts3.4/commands/ListSecretsCommand.d.ts +0 -64
  281. package/dist/types/ts3.4/commands/PutResourcePolicyCommand.d.ts +0 -66
  282. package/dist/types/ts3.4/commands/ReplicateSecretToRegionsCommand.d.ts +0 -36
  283. package/dist/types/ts3.4/commands/RestoreSecretCommand.d.ts +0 -53
  284. package/dist/types/ts3.4/commands/RotateSecretCommand.d.ts +0 -96
  285. package/dist/types/ts3.4/commands/TagResourceCommand.d.ts +0 -90
  286. package/dist/types/ts3.4/commands/UntagResourceCommand.d.ts +0 -63
  287. package/dist/types/ts3.4/commands/UpdateSecretVersionStageCommand.d.ts +0 -71
  288. package/dist/types/ts3.4/commands/ValidateResourcePolicyCommand.d.ts +0 -69
  289. package/dist/types/ts3.4/models/models_0.d.ts +0 -2041
  290. package/endpoints.ts +0 -86
  291. package/jest.config.js +0 -4
  292. package/models/models_0.ts +0 -2422
  293. package/pagination/Interfaces.ts +0 -7
  294. package/pagination/ListSecretVersionIdsPaginator.ts +0 -58
  295. package/pagination/ListSecretsPaginator.ts +0 -54
  296. package/protocols/Aws_json1_1.ts +0 -3421
  297. package/runtimeConfig.browser.ts +0 -40
  298. package/runtimeConfig.native.ts +0 -16
  299. package/runtimeConfig.shared.ts +0 -16
  300. package/runtimeConfig.ts +0 -45
  301. package/tsconfig.es.json +0 -10
  302. package/tsconfig.json +0 -31
  303. package/tsconfig.types.json +0 -8
package/SecretsManager.ts DELETED
@@ -1,1642 +0,0 @@
1
- import { SecretsManagerClient } from "./SecretsManagerClient";
2
- import {
3
- CancelRotateSecretCommand,
4
- CancelRotateSecretCommandInput,
5
- CancelRotateSecretCommandOutput,
6
- } from "./commands/CancelRotateSecretCommand";
7
- import {
8
- CreateSecretCommand,
9
- CreateSecretCommandInput,
10
- CreateSecretCommandOutput,
11
- } from "./commands/CreateSecretCommand";
12
- import {
13
- DeleteResourcePolicyCommand,
14
- DeleteResourcePolicyCommandInput,
15
- DeleteResourcePolicyCommandOutput,
16
- } from "./commands/DeleteResourcePolicyCommand";
17
- import {
18
- DeleteSecretCommand,
19
- DeleteSecretCommandInput,
20
- DeleteSecretCommandOutput,
21
- } from "./commands/DeleteSecretCommand";
22
- import {
23
- DescribeSecretCommand,
24
- DescribeSecretCommandInput,
25
- DescribeSecretCommandOutput,
26
- } from "./commands/DescribeSecretCommand";
27
- import {
28
- GetRandomPasswordCommand,
29
- GetRandomPasswordCommandInput,
30
- GetRandomPasswordCommandOutput,
31
- } from "./commands/GetRandomPasswordCommand";
32
- import {
33
- GetResourcePolicyCommand,
34
- GetResourcePolicyCommandInput,
35
- GetResourcePolicyCommandOutput,
36
- } from "./commands/GetResourcePolicyCommand";
37
- import {
38
- GetSecretValueCommand,
39
- GetSecretValueCommandInput,
40
- GetSecretValueCommandOutput,
41
- } from "./commands/GetSecretValueCommand";
42
- import {
43
- ListSecretVersionIdsCommand,
44
- ListSecretVersionIdsCommandInput,
45
- ListSecretVersionIdsCommandOutput,
46
- } from "./commands/ListSecretVersionIdsCommand";
47
- import { ListSecretsCommand, ListSecretsCommandInput, ListSecretsCommandOutput } from "./commands/ListSecretsCommand";
48
- import {
49
- PutResourcePolicyCommand,
50
- PutResourcePolicyCommandInput,
51
- PutResourcePolicyCommandOutput,
52
- } from "./commands/PutResourcePolicyCommand";
53
- import {
54
- PutSecretValueCommand,
55
- PutSecretValueCommandInput,
56
- PutSecretValueCommandOutput,
57
- } from "./commands/PutSecretValueCommand";
58
- import {
59
- RemoveRegionsFromReplicationCommand,
60
- RemoveRegionsFromReplicationCommandInput,
61
- RemoveRegionsFromReplicationCommandOutput,
62
- } from "./commands/RemoveRegionsFromReplicationCommand";
63
- import {
64
- ReplicateSecretToRegionsCommand,
65
- ReplicateSecretToRegionsCommandInput,
66
- ReplicateSecretToRegionsCommandOutput,
67
- } from "./commands/ReplicateSecretToRegionsCommand";
68
- import {
69
- RestoreSecretCommand,
70
- RestoreSecretCommandInput,
71
- RestoreSecretCommandOutput,
72
- } from "./commands/RestoreSecretCommand";
73
- import {
74
- RotateSecretCommand,
75
- RotateSecretCommandInput,
76
- RotateSecretCommandOutput,
77
- } from "./commands/RotateSecretCommand";
78
- import {
79
- StopReplicationToReplicaCommand,
80
- StopReplicationToReplicaCommandInput,
81
- StopReplicationToReplicaCommandOutput,
82
- } from "./commands/StopReplicationToReplicaCommand";
83
- import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
84
- import {
85
- UntagResourceCommand,
86
- UntagResourceCommandInput,
87
- UntagResourceCommandOutput,
88
- } from "./commands/UntagResourceCommand";
89
- import {
90
- UpdateSecretCommand,
91
- UpdateSecretCommandInput,
92
- UpdateSecretCommandOutput,
93
- } from "./commands/UpdateSecretCommand";
94
- import {
95
- UpdateSecretVersionStageCommand,
96
- UpdateSecretVersionStageCommandInput,
97
- UpdateSecretVersionStageCommandOutput,
98
- } from "./commands/UpdateSecretVersionStageCommand";
99
- import {
100
- ValidateResourcePolicyCommand,
101
- ValidateResourcePolicyCommandInput,
102
- ValidateResourcePolicyCommandOutput,
103
- } from "./commands/ValidateResourcePolicyCommand";
104
- import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
105
-
106
- /**
107
- * <fullname>Amazon Web Services Secrets Manager</fullname>
108
- * <p>Amazon Web Services Secrets Manager provides a service to enable you to store, manage, and retrieve, secrets.</p>
109
- *
110
- * <p>This guide provides descriptions of the Secrets Manager API. For more information about using this
111
- * service, see the <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/introduction.html">Amazon Web Services Secrets Manager User Guide</a>.</p>
112
- *
113
- * <p>
114
- * <b>API Version</b>
115
- * </p>
116
- *
117
- * <p>This version of the Secrets Manager API Reference documents the Secrets Manager API version 2017-10-17.</p>
118
- * <note>
119
- * <p>As an alternative to using the API, you can use one of the Amazon Web Services SDKs, which consist of
120
- * libraries and sample code for various programming languages and platforms such as Java,
121
- * Ruby, .NET, iOS, and Android. The SDKs provide a convenient way to create programmatic
122
- * access to Amazon Web Services Secrets Manager. For example, the SDKs provide cryptographically signing requests,
123
- * managing errors, and retrying requests automatically. For more information about the Amazon Web Services
124
- * SDKs, including downloading and installing them, see <a href="http://aws.amazon.com/tools/">Tools for Amazon Web Services</a>.</p>
125
- * </note>
126
- * <p>We recommend you use the Amazon Web Services SDKs to make programmatic API calls to Secrets Manager. However, you
127
- * also can use the Secrets Manager HTTP Query API to make direct calls to the Secrets Manager web service. To learn
128
- * more about the Secrets Manager HTTP Query API, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/query-requests.html">Making Query Requests</a> in the
129
- * <i>Amazon Web Services Secrets Manager User Guide</i>. </p>
130
- * <p>Secrets Manager API supports GET and POST requests for all actions, and doesn't require you to use
131
- * GET for some actions and POST for others. However, GET requests are subject to the limitation
132
- * size of a URL. Therefore, for operations that require larger sizes, use a POST request.</p>
133
- *
134
- *
135
- *
136
- *
137
- *
138
- *
139
- *
140
- * <p>
141
- * <b>Support and Feedback for Amazon Web Services Secrets Manager</b>
142
- * </p>
143
- *
144
- * <p>We welcome your feedback. Send your comments to <a href="mailto:awssecretsmanager-feedback@amazon.com">awssecretsmanager-feedback@amazon.com</a>, or post your feedback and questions in the <a href="http://forums.aws.amazon.com/forum.jspa?forumID=296">Amazon Web Services Secrets Manager Discussion Forum</a>. For more
145
- * information about the Amazon Web Services Discussion Forums, see <a href="http://forums.aws.amazon.com/help.jspa">Forums
146
- * Help</a>.</p>
147
- *
148
- * <p>
149
- * <b>How examples are presented</b>
150
- * </p>
151
- *
152
- * <p>The JSON that Amazon Web Services Secrets Manager expects as your request parameters and the service returns as a
153
- * response to HTTP query requests contain single, long strings without line breaks or white
154
- * space formatting. The JSON shown in the examples displays the code formatted with both line
155
- * breaks and white space to improve readability. When example input parameters can also cause
156
- * long strings extending beyond the screen, you can insert line breaks to enhance readability.
157
- * You should always submit the input as a single JSON text string.</p>
158
- *
159
- *
160
- * <p>
161
- * <b>Logging API Requests</b>
162
- * </p>
163
- * <p>Amazon Web Services Secrets Manager supports Amazon Web Services CloudTrail, a service that records Amazon Web Services API calls for your Amazon Web Services
164
- * account and delivers log files to an Amazon S3 bucket. By using information that's collected
165
- * by Amazon Web Services CloudTrail, you can determine the requests successfully made to Secrets Manager, who made the
166
- * request, when it was made, and so on. For more about Amazon Web Services Secrets Manager and support for Amazon Web Services
167
- * CloudTrail, see <a href="http://docs.aws.amazon.com/secretsmanager/latest/userguide/monitoring.html#monitoring_cloudtrail">Logging
168
- * Amazon Web Services Secrets Manager Events with Amazon Web Services CloudTrail</a> in the <i>Amazon Web Services Secrets Manager User Guide</i>.
169
- * To learn more about CloudTrail, including enabling it and find your log files, see the <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html">Amazon Web Services CloudTrail User Guide</a>.</p>
170
- */
171
- export class SecretsManager extends SecretsManagerClient {
172
- /**
173
- * <p>Disables automatic scheduled rotation and cancels the rotation of a secret if currently in
174
- * progress.</p>
175
- * <p>To re-enable scheduled rotation, call <a>RotateSecret</a> with
176
- * <code>AutomaticallyRotateAfterDays</code> set to a value greater than 0. This immediately
177
- * rotates your secret and then enables the automatic schedule.</p>
178
- * <note>
179
- * <p>If you cancel a rotation while in progress, it can leave the <code>VersionStage</code>
180
- * labels in an unexpected state. Depending on the step of the rotation in progress, you might
181
- * need to remove the staging label <code>AWSPENDING</code> from the partially created version, specified
182
- * by the <code>VersionId</code> response value. You should also evaluate the partially rotated
183
- * new version to see if it should be deleted, which you can do by removing all staging labels
184
- * from the new version <code>VersionStage</code> field.</p>
185
- * </note>
186
- * <p>To successfully start a rotation, the staging label <code>AWSPENDING</code> must be in one of the
187
- * following states:</p>
188
- * <ul>
189
- * <li>
190
- * <p>Not attached to any version at all</p>
191
- * </li>
192
- * <li>
193
- * <p>Attached to the same version as the staging label <code>AWSCURRENT</code>
194
- * </p>
195
- * </li>
196
- * </ul>
197
- * <p>If the staging label <code>AWSPENDING</code> attached to a different version than the version with
198
- * <code>AWSCURRENT</code> then the attempt to rotate fails.</p>
199
- *
200
- * <p>
201
- * <b>Minimum permissions</b>
202
- * </p>
203
- * <p>To run this command, you must have the following permissions:</p>
204
- * <ul>
205
- * <li>
206
- * <p>secretsmanager:CancelRotateSecret</p>
207
- * </li>
208
- * </ul>
209
- * <p>
210
- * <b>Related operations</b>
211
- * </p>
212
- * <ul>
213
- * <li>
214
- * <p>To configure rotation for a secret or to manually trigger a rotation, use <a>RotateSecret</a>.</p>
215
- * </li>
216
- * <li>
217
- * <p>To get the rotation configuration details for a secret, use <a>DescribeSecret</a>.</p>
218
- * </li>
219
- * <li>
220
- * <p>To list all of the currently available secrets, use <a>ListSecrets</a>.</p>
221
- * </li>
222
- * <li>
223
- * <p>To list all of the versions currently associated with a secret, use <a>ListSecretVersionIds</a>.</p>
224
- * </li>
225
- * </ul>
226
- */
227
- public cancelRotateSecret(
228
- args: CancelRotateSecretCommandInput,
229
- options?: __HttpHandlerOptions
230
- ): Promise<CancelRotateSecretCommandOutput>;
231
- public cancelRotateSecret(
232
- args: CancelRotateSecretCommandInput,
233
- cb: (err: any, data?: CancelRotateSecretCommandOutput) => void
234
- ): void;
235
- public cancelRotateSecret(
236
- args: CancelRotateSecretCommandInput,
237
- options: __HttpHandlerOptions,
238
- cb: (err: any, data?: CancelRotateSecretCommandOutput) => void
239
- ): void;
240
- public cancelRotateSecret(
241
- args: CancelRotateSecretCommandInput,
242
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CancelRotateSecretCommandOutput) => void),
243
- cb?: (err: any, data?: CancelRotateSecretCommandOutput) => void
244
- ): Promise<CancelRotateSecretCommandOutput> | void {
245
- const command = new CancelRotateSecretCommand(args);
246
- if (typeof optionsOrCb === "function") {
247
- this.send(command, optionsOrCb);
248
- } else if (typeof cb === "function") {
249
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
250
- this.send(command, optionsOrCb || {}, cb);
251
- } else {
252
- return this.send(command, optionsOrCb);
253
- }
254
- }
255
-
256
- /**
257
- * <p>Creates a new secret. A secret in Secrets Manager consists of both the protected secret data and the
258
- * important information needed to manage the secret.</p>
259
- * <p>Secrets Manager stores the encrypted secret data in one of a collection of "versions"
260
- * associated with the secret. Each version contains a copy of the encrypted secret data. Each
261
- * version is associated with one or more "staging labels" that identify where the version is in
262
- * the rotation cycle. The <code>SecretVersionsToStages</code> field of the secret contains the
263
- * mapping of staging labels to the active versions of the secret. Versions without a staging
264
- * label are considered deprecated and not included in the list.</p>
265
- * <p>You provide the secret data to be encrypted by putting text in either the
266
- * <code>SecretString</code> parameter or binary data in the <code>SecretBinary</code>
267
- * parameter, but not both. If you include <code>SecretString</code> or <code>SecretBinary</code>
268
- * then Secrets Manager also creates an initial secret version and automatically attaches the staging
269
- * label <code>AWSCURRENT</code> to the new version.</p>
270
- * <note>
271
- * <ul>
272
- * <li>
273
- * <p>If you call an operation to encrypt or decrypt the <code>SecretString</code>
274
- * or <code>SecretBinary</code> for a secret in the same account as the calling user and that
275
- * secret doesn't specify a Amazon Web Services KMS encryption key, Secrets Manager uses the account's default
276
- * Amazon Web Services managed customer master key (CMK) with the alias <code>aws/secretsmanager</code>. If this key
277
- * doesn't already exist in your account then Secrets Manager creates it for you automatically. All
278
- * users and roles in the same Amazon Web Services account automatically have access to use the default CMK.
279
- * Note that if an Secrets Manager API call results in Amazon Web Services creating the account's
280
- * Amazon Web Services-managed CMK, it can result in a one-time significant delay in returning the
281
- * result.</p>
282
- * </li>
283
- * <li>
284
- * <p>If the secret resides in a different Amazon Web Services account from the credentials calling an API that
285
- * requires encryption or decryption of the secret value then you must create and use a custom
286
- * Amazon Web Services KMS CMK because you can't access the default CMK for the account using credentials
287
- * from a different Amazon Web Services account. Store the ARN of the CMK in the secret when you create the
288
- * secret or when you update it by including it in the <code>KMSKeyId</code>. If you call an
289
- * API that must encrypt or decrypt <code>SecretString</code> or <code>SecretBinary</code>
290
- * using credentials from a different account then the Amazon Web Services KMS key policy must grant cross-account
291
- * access to that other account's user or role for both the kms:GenerateDataKey and
292
- * kms:Decrypt operations.</p>
293
- * </li>
294
- * </ul>
295
- * </note>
296
- * <p> </p>
297
- * <p>
298
- * <b>Minimum permissions</b>
299
- * </p>
300
- * <p>To run this command, you must have the following permissions:</p>
301
- * <ul>
302
- * <li>
303
- * <p>secretsmanager:CreateSecret</p>
304
- * </li>
305
- * <li>
306
- * <p>kms:GenerateDataKey - needed only if you use a customer-managed Amazon Web Services KMS key to encrypt
307
- * the secret. You do not need this permission to use the account default Amazon Web Services managed CMK
308
- * for Secrets Manager.</p>
309
- * </li>
310
- * <li>
311
- * <p>kms:Decrypt - needed only if you use a customer-managed Amazon Web Services KMS key to encrypt the
312
- * secret. You do not need this permission to use the account default Amazon Web Services managed CMK for
313
- * Secrets Manager.</p>
314
- * </li>
315
- * <li>
316
- * <p>secretsmanager:TagResource - needed only if you include the <code>Tags</code>
317
- * parameter. </p>
318
- * </li>
319
- * </ul>
320
- * <p>
321
- * <b>Related operations</b>
322
- * </p>
323
- * <ul>
324
- * <li>
325
- * <p>To delete a secret, use <a>DeleteSecret</a>.</p>
326
- * </li>
327
- * <li>
328
- * <p>To modify an existing secret, use <a>UpdateSecret</a>.</p>
329
- * </li>
330
- * <li>
331
- * <p>To create a new version of a secret, use <a>PutSecretValue</a>.</p>
332
- * </li>
333
- * <li>
334
- * <p>To retrieve the encrypted secure string and secure binary values, use <a>GetSecretValue</a>.</p>
335
- * </li>
336
- * <li>
337
- * <p>To retrieve all other details for a secret, use <a>DescribeSecret</a>. This
338
- * does not include the encrypted secure string and secure binary values.</p>
339
- * </li>
340
- * <li>
341
- * <p>To retrieve the list of secret versions associated with the current secret, use <a>DescribeSecret</a> and examine the <code>SecretVersionsToStages</code> response
342
- * value.</p>
343
- * </li>
344
- * </ul>
345
- */
346
- public createSecret(
347
- args: CreateSecretCommandInput,
348
- options?: __HttpHandlerOptions
349
- ): Promise<CreateSecretCommandOutput>;
350
- public createSecret(args: CreateSecretCommandInput, cb: (err: any, data?: CreateSecretCommandOutput) => void): void;
351
- public createSecret(
352
- args: CreateSecretCommandInput,
353
- options: __HttpHandlerOptions,
354
- cb: (err: any, data?: CreateSecretCommandOutput) => void
355
- ): void;
356
- public createSecret(
357
- args: CreateSecretCommandInput,
358
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateSecretCommandOutput) => void),
359
- cb?: (err: any, data?: CreateSecretCommandOutput) => void
360
- ): Promise<CreateSecretCommandOutput> | void {
361
- const command = new CreateSecretCommand(args);
362
- if (typeof optionsOrCb === "function") {
363
- this.send(command, optionsOrCb);
364
- } else if (typeof cb === "function") {
365
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
366
- this.send(command, optionsOrCb || {}, cb);
367
- } else {
368
- return this.send(command, optionsOrCb);
369
- }
370
- }
371
-
372
- /**
373
- * <p>Deletes the resource-based permission policy attached to the secret.</p>
374
- * <p>
375
- * <b>Minimum permissions</b>
376
- * </p>
377
- * <p>To run this command, you must have the following permissions:</p>
378
- * <ul>
379
- * <li>
380
- * <p>secretsmanager:DeleteResourcePolicy</p>
381
- * </li>
382
- * </ul>
383
- * <p>
384
- * <b>Related operations</b>
385
- * </p>
386
- * <ul>
387
- * <li>
388
- * <p>To attach a resource policy to a secret, use <a>PutResourcePolicy</a>.</p>
389
- * </li>
390
- * <li>
391
- * <p>To retrieve the current resource-based policy attached to a secret, use <a>GetResourcePolicy</a>.</p>
392
- * </li>
393
- * <li>
394
- * <p>To list all of the currently available secrets, use <a>ListSecrets</a>.</p>
395
- * </li>
396
- * </ul>
397
- */
398
- public deleteResourcePolicy(
399
- args: DeleteResourcePolicyCommandInput,
400
- options?: __HttpHandlerOptions
401
- ): Promise<DeleteResourcePolicyCommandOutput>;
402
- public deleteResourcePolicy(
403
- args: DeleteResourcePolicyCommandInput,
404
- cb: (err: any, data?: DeleteResourcePolicyCommandOutput) => void
405
- ): void;
406
- public deleteResourcePolicy(
407
- args: DeleteResourcePolicyCommandInput,
408
- options: __HttpHandlerOptions,
409
- cb: (err: any, data?: DeleteResourcePolicyCommandOutput) => void
410
- ): void;
411
- public deleteResourcePolicy(
412
- args: DeleteResourcePolicyCommandInput,
413
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteResourcePolicyCommandOutput) => void),
414
- cb?: (err: any, data?: DeleteResourcePolicyCommandOutput) => void
415
- ): Promise<DeleteResourcePolicyCommandOutput> | void {
416
- const command = new DeleteResourcePolicyCommand(args);
417
- if (typeof optionsOrCb === "function") {
418
- this.send(command, optionsOrCb);
419
- } else if (typeof cb === "function") {
420
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
421
- this.send(command, optionsOrCb || {}, cb);
422
- } else {
423
- return this.send(command, optionsOrCb);
424
- }
425
- }
426
-
427
- /**
428
- * <p>Deletes an entire secret and all of the versions. You can optionally include a recovery
429
- * window during which you can restore the secret. If you don't specify a recovery window value,
430
- * the operation defaults to 30 days. Secrets Manager attaches a <code>DeletionDate</code> stamp to
431
- * the secret that specifies the end of the recovery window. At the end of the recovery window,
432
- * Secrets Manager deletes the secret permanently.</p>
433
- * <p>At any time before recovery window ends, you can use <a>RestoreSecret</a> to
434
- * remove the <code>DeletionDate</code> and cancel the deletion of the secret.</p>
435
- * <p>You cannot access the encrypted secret information in any secret scheduled for deletion.
436
- * If you need to access that information, you must cancel the deletion with <a>RestoreSecret</a> and then retrieve the information.</p>
437
- * <note>
438
- * <ul>
439
- * <li>
440
- * <p>There is no explicit operation to delete a version of a secret. Instead, remove all
441
- * staging labels from the <code>VersionStage</code> field of a version. That marks the
442
- * version as deprecated and allows Secrets Manager to delete it as needed. Versions without any
443
- * staging labels do not show up in <a>ListSecretVersionIds</a> unless you
444
- * specify <code>IncludeDeprecated</code>.</p>
445
- * </li>
446
- * <li>
447
- * <p>The permanent secret deletion at the end of the waiting period is performed as a
448
- * background task with low priority. There is no guarantee of a specific time after the
449
- * recovery window for the actual delete operation to occur.</p>
450
- * </li>
451
- * </ul>
452
- * </note>
453
- * <p>
454
- * <b>Minimum permissions</b>
455
- * </p>
456
- * <p>To run this command, you must have the following permissions:</p>
457
- * <ul>
458
- * <li>
459
- * <p>secretsmanager:DeleteSecret</p>
460
- * </li>
461
- * </ul>
462
- * <p>
463
- * <b>Related operations</b>
464
- * </p>
465
- * <ul>
466
- * <li>
467
- * <p>To create a secret, use <a>CreateSecret</a>.</p>
468
- * </li>
469
- * <li>
470
- * <p>To cancel deletion of a version of a secret before the recovery window has expired,
471
- * use <a>RestoreSecret</a>.</p>
472
- * </li>
473
- * </ul>
474
- */
475
- public deleteSecret(
476
- args: DeleteSecretCommandInput,
477
- options?: __HttpHandlerOptions
478
- ): Promise<DeleteSecretCommandOutput>;
479
- public deleteSecret(args: DeleteSecretCommandInput, cb: (err: any, data?: DeleteSecretCommandOutput) => void): void;
480
- public deleteSecret(
481
- args: DeleteSecretCommandInput,
482
- options: __HttpHandlerOptions,
483
- cb: (err: any, data?: DeleteSecretCommandOutput) => void
484
- ): void;
485
- public deleteSecret(
486
- args: DeleteSecretCommandInput,
487
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteSecretCommandOutput) => void),
488
- cb?: (err: any, data?: DeleteSecretCommandOutput) => void
489
- ): Promise<DeleteSecretCommandOutput> | void {
490
- const command = new DeleteSecretCommand(args);
491
- if (typeof optionsOrCb === "function") {
492
- this.send(command, optionsOrCb);
493
- } else if (typeof cb === "function") {
494
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
495
- this.send(command, optionsOrCb || {}, cb);
496
- } else {
497
- return this.send(command, optionsOrCb);
498
- }
499
- }
500
-
501
- /**
502
- * <p>Retrieves the details of a secret. It does not include the encrypted fields. Secrets
503
- * Manager only returns fields populated with a value in the response. </p>
504
- * <p>
505
- * <b>Minimum permissions</b>
506
- * </p>
507
- * <p>To run this command, you must have the following permissions:</p>
508
- * <ul>
509
- * <li>
510
- * <p>secretsmanager:DescribeSecret</p>
511
- * </li>
512
- * </ul>
513
- * <p>
514
- * <b>Related operations</b>
515
- * </p>
516
- * <ul>
517
- * <li>
518
- * <p>To create a secret, use <a>CreateSecret</a>.</p>
519
- * </li>
520
- * <li>
521
- * <p>To modify a secret, use <a>UpdateSecret</a>.</p>
522
- * </li>
523
- * <li>
524
- * <p>To retrieve the encrypted secret information in a version of the secret, use <a>GetSecretValue</a>.</p>
525
- * </li>
526
- * <li>
527
- * <p>To list all of the secrets in the Amazon Web Services account, use <a>ListSecrets</a>.</p>
528
- * </li>
529
- * </ul>
530
- */
531
- public describeSecret(
532
- args: DescribeSecretCommandInput,
533
- options?: __HttpHandlerOptions
534
- ): Promise<DescribeSecretCommandOutput>;
535
- public describeSecret(
536
- args: DescribeSecretCommandInput,
537
- cb: (err: any, data?: DescribeSecretCommandOutput) => void
538
- ): void;
539
- public describeSecret(
540
- args: DescribeSecretCommandInput,
541
- options: __HttpHandlerOptions,
542
- cb: (err: any, data?: DescribeSecretCommandOutput) => void
543
- ): void;
544
- public describeSecret(
545
- args: DescribeSecretCommandInput,
546
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeSecretCommandOutput) => void),
547
- cb?: (err: any, data?: DescribeSecretCommandOutput) => void
548
- ): Promise<DescribeSecretCommandOutput> | void {
549
- const command = new DescribeSecretCommand(args);
550
- if (typeof optionsOrCb === "function") {
551
- this.send(command, optionsOrCb);
552
- } else if (typeof cb === "function") {
553
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
554
- this.send(command, optionsOrCb || {}, cb);
555
- } else {
556
- return this.send(command, optionsOrCb);
557
- }
558
- }
559
-
560
- /**
561
- * <p>Generates a random password of the specified complexity. This operation is intended for
562
- * use in the Lambda rotation function. Per best practice, we recommend that you specify the
563
- * maximum length and include every character type that the system you are generating a password
564
- * for can support.</p>
565
- * <p>
566
- * <b>Minimum permissions</b>
567
- * </p>
568
- * <p>To run this command, you must have the following permissions:</p>
569
- * <ul>
570
- * <li>
571
- * <p>secretsmanager:GetRandomPassword</p>
572
- * </li>
573
- * </ul>
574
- */
575
- public getRandomPassword(
576
- args: GetRandomPasswordCommandInput,
577
- options?: __HttpHandlerOptions
578
- ): Promise<GetRandomPasswordCommandOutput>;
579
- public getRandomPassword(
580
- args: GetRandomPasswordCommandInput,
581
- cb: (err: any, data?: GetRandomPasswordCommandOutput) => void
582
- ): void;
583
- public getRandomPassword(
584
- args: GetRandomPasswordCommandInput,
585
- options: __HttpHandlerOptions,
586
- cb: (err: any, data?: GetRandomPasswordCommandOutput) => void
587
- ): void;
588
- public getRandomPassword(
589
- args: GetRandomPasswordCommandInput,
590
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetRandomPasswordCommandOutput) => void),
591
- cb?: (err: any, data?: GetRandomPasswordCommandOutput) => void
592
- ): Promise<GetRandomPasswordCommandOutput> | void {
593
- const command = new GetRandomPasswordCommand(args);
594
- if (typeof optionsOrCb === "function") {
595
- this.send(command, optionsOrCb);
596
- } else if (typeof cb === "function") {
597
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
598
- this.send(command, optionsOrCb || {}, cb);
599
- } else {
600
- return this.send(command, optionsOrCb);
601
- }
602
- }
603
-
604
- /**
605
- * <p>Retrieves the JSON text of the resource-based policy document attached to the specified
606
- * secret. The JSON request string input and response output displays formatted code
607
- * with white space and line breaks for better readability. Submit your input as a single line
608
- * JSON string.</p>
609
- * <p>
610
- * <b>Minimum permissions</b>
611
- * </p>
612
- * <p>To run this command, you must have the following permissions:</p>
613
- * <ul>
614
- * <li>
615
- * <p>secretsmanager:GetResourcePolicy</p>
616
- * </li>
617
- * </ul>
618
- * <p>
619
- * <b>Related operations</b>
620
- * </p>
621
- * <ul>
622
- * <li>
623
- * <p>To attach a resource policy to a secret, use <a>PutResourcePolicy</a>.</p>
624
- * </li>
625
- * <li>
626
- * <p>To delete the resource-based policy attached to a secret, use <a>DeleteResourcePolicy</a>.</p>
627
- * </li>
628
- * <li>
629
- * <p>To list all of the currently available secrets, use <a>ListSecrets</a>.</p>
630
- * </li>
631
- * </ul>
632
- */
633
- public getResourcePolicy(
634
- args: GetResourcePolicyCommandInput,
635
- options?: __HttpHandlerOptions
636
- ): Promise<GetResourcePolicyCommandOutput>;
637
- public getResourcePolicy(
638
- args: GetResourcePolicyCommandInput,
639
- cb: (err: any, data?: GetResourcePolicyCommandOutput) => void
640
- ): void;
641
- public getResourcePolicy(
642
- args: GetResourcePolicyCommandInput,
643
- options: __HttpHandlerOptions,
644
- cb: (err: any, data?: GetResourcePolicyCommandOutput) => void
645
- ): void;
646
- public getResourcePolicy(
647
- args: GetResourcePolicyCommandInput,
648
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetResourcePolicyCommandOutput) => void),
649
- cb?: (err: any, data?: GetResourcePolicyCommandOutput) => void
650
- ): Promise<GetResourcePolicyCommandOutput> | void {
651
- const command = new GetResourcePolicyCommand(args);
652
- if (typeof optionsOrCb === "function") {
653
- this.send(command, optionsOrCb);
654
- } else if (typeof cb === "function") {
655
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
656
- this.send(command, optionsOrCb || {}, cb);
657
- } else {
658
- return this.send(command, optionsOrCb);
659
- }
660
- }
661
-
662
- /**
663
- * <p>Retrieves the contents of the encrypted fields <code>SecretString</code> or
664
- * <code>SecretBinary</code> from the specified version of a secret, whichever contains
665
- * content.</p>
666
- * <p>
667
- * <b>Minimum permissions</b>
668
- * </p>
669
- * <p>To run this command, you must have the following permissions:</p>
670
- * <ul>
671
- * <li>
672
- * <p>secretsmanager:GetSecretValue</p>
673
- * </li>
674
- * <li>
675
- * <p>kms:Decrypt - required only if you use a customer-managed Amazon Web Services KMS key to encrypt the
676
- * secret. You do not need this permission to use the account's default Amazon Web Services managed CMK for
677
- * Secrets Manager.</p>
678
- * </li>
679
- * </ul>
680
- * <p>
681
- * <b>Related operations</b>
682
- * </p>
683
- * <ul>
684
- * <li>
685
- * <p>To create a new version of the secret with different encrypted information, use <a>PutSecretValue</a>.</p>
686
- * </li>
687
- * <li>
688
- * <p>To retrieve the non-encrypted details for the secret, use <a>DescribeSecret</a>.</p>
689
- * </li>
690
- * </ul>
691
- */
692
- public getSecretValue(
693
- args: GetSecretValueCommandInput,
694
- options?: __HttpHandlerOptions
695
- ): Promise<GetSecretValueCommandOutput>;
696
- public getSecretValue(
697
- args: GetSecretValueCommandInput,
698
- cb: (err: any, data?: GetSecretValueCommandOutput) => void
699
- ): void;
700
- public getSecretValue(
701
- args: GetSecretValueCommandInput,
702
- options: __HttpHandlerOptions,
703
- cb: (err: any, data?: GetSecretValueCommandOutput) => void
704
- ): void;
705
- public getSecretValue(
706
- args: GetSecretValueCommandInput,
707
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetSecretValueCommandOutput) => void),
708
- cb?: (err: any, data?: GetSecretValueCommandOutput) => void
709
- ): Promise<GetSecretValueCommandOutput> | void {
710
- const command = new GetSecretValueCommand(args);
711
- if (typeof optionsOrCb === "function") {
712
- this.send(command, optionsOrCb);
713
- } else if (typeof cb === "function") {
714
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
715
- this.send(command, optionsOrCb || {}, cb);
716
- } else {
717
- return this.send(command, optionsOrCb);
718
- }
719
- }
720
-
721
- /**
722
- * <p>Lists all of the secrets that are stored by Secrets Manager in the Amazon Web Services account. To list the
723
- * versions currently stored for a specific secret, use <a>ListSecretVersionIds</a>.
724
- * The encrypted fields <code>SecretString</code> and <code>SecretBinary</code> are not included
725
- * in the output. To get that information, call the <a>GetSecretValue</a>
726
- * operation.</p>
727
- * <note>
728
- * <p>Always check the <code>NextToken</code> response parameter
729
- * when calling any of the <code>List*</code> operations. These operations can occasionally return
730
- * an empty or shorter than expected list of results even when there more results become available.
731
- * When this happens, the <code>NextToken</code> response parameter contains a value to pass to the
732
- * next call to the same API to request the next part of the list.</p>
733
- * </note>
734
- * <p>
735
- * <b>Minimum
736
- * permissions</b>
737
- * </p>
738
- * <p>To run this command, you must have the following permissions:</p>
739
- * <ul>
740
- * <li>
741
- * <p>secretsmanager:ListSecrets</p>
742
- * </li>
743
- * </ul>
744
- * <p>
745
- * <b>Related operations</b>
746
- * </p>
747
- * <ul>
748
- * <li>
749
- * <p>To list the versions attached to a secret, use <a>ListSecretVersionIds</a>.</p>
750
- * </li>
751
- * </ul>
752
- */
753
- public listSecrets(args: ListSecretsCommandInput, options?: __HttpHandlerOptions): Promise<ListSecretsCommandOutput>;
754
- public listSecrets(args: ListSecretsCommandInput, cb: (err: any, data?: ListSecretsCommandOutput) => void): void;
755
- public listSecrets(
756
- args: ListSecretsCommandInput,
757
- options: __HttpHandlerOptions,
758
- cb: (err: any, data?: ListSecretsCommandOutput) => void
759
- ): void;
760
- public listSecrets(
761
- args: ListSecretsCommandInput,
762
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListSecretsCommandOutput) => void),
763
- cb?: (err: any, data?: ListSecretsCommandOutput) => void
764
- ): Promise<ListSecretsCommandOutput> | void {
765
- const command = new ListSecretsCommand(args);
766
- if (typeof optionsOrCb === "function") {
767
- this.send(command, optionsOrCb);
768
- } else if (typeof cb === "function") {
769
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
770
- this.send(command, optionsOrCb || {}, cb);
771
- } else {
772
- return this.send(command, optionsOrCb);
773
- }
774
- }
775
-
776
- /**
777
- * <p>Lists all of the versions attached to the specified secret. The output does not include
778
- * the <code>SecretString</code> or <code>SecretBinary</code> fields. By default, the list
779
- * includes only versions that have at least one staging label in <code>VersionStage</code>
780
- * attached.</p>
781
- * <note>
782
- * <p>Always check the <code>NextToken</code> response parameter
783
- * when calling any of the <code>List*</code> operations. These operations can occasionally return
784
- * an empty or shorter than expected list of results even when there more results become available.
785
- * When this happens, the <code>NextToken</code> response parameter contains a value to pass to the
786
- * next call to the same API to request the next part of the list.</p>
787
- * </note>
788
- * <p>
789
- * <b>Minimum
790
- * permissions</b>
791
- * </p>
792
- * <p>To run this command, you must have the following permissions:</p>
793
- * <ul>
794
- * <li>
795
- * <p>secretsmanager:ListSecretVersionIds</p>
796
- * </li>
797
- * </ul>
798
- * <p>
799
- * <b>Related operations</b>
800
- * </p>
801
- * <ul>
802
- * <li>
803
- * <p>To list the secrets in an account, use <a>ListSecrets</a>.</p>
804
- * </li>
805
- * </ul>
806
- */
807
- public listSecretVersionIds(
808
- args: ListSecretVersionIdsCommandInput,
809
- options?: __HttpHandlerOptions
810
- ): Promise<ListSecretVersionIdsCommandOutput>;
811
- public listSecretVersionIds(
812
- args: ListSecretVersionIdsCommandInput,
813
- cb: (err: any, data?: ListSecretVersionIdsCommandOutput) => void
814
- ): void;
815
- public listSecretVersionIds(
816
- args: ListSecretVersionIdsCommandInput,
817
- options: __HttpHandlerOptions,
818
- cb: (err: any, data?: ListSecretVersionIdsCommandOutput) => void
819
- ): void;
820
- public listSecretVersionIds(
821
- args: ListSecretVersionIdsCommandInput,
822
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListSecretVersionIdsCommandOutput) => void),
823
- cb?: (err: any, data?: ListSecretVersionIdsCommandOutput) => void
824
- ): Promise<ListSecretVersionIdsCommandOutput> | void {
825
- const command = new ListSecretVersionIdsCommand(args);
826
- if (typeof optionsOrCb === "function") {
827
- this.send(command, optionsOrCb);
828
- } else if (typeof cb === "function") {
829
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
830
- this.send(command, optionsOrCb || {}, cb);
831
- } else {
832
- return this.send(command, optionsOrCb);
833
- }
834
- }
835
-
836
- /**
837
- * <p>Attaches the contents of the specified resource-based permission policy to a secret. A
838
- * resource-based policy is optional. Alternatively, you can use IAM identity-based policies
839
- * that specify the secret's Amazon Resource Name (ARN) in the policy statement's
840
- * <code>Resources</code> element. You can also use a combination of both identity-based and
841
- * resource-based policies. The affected users and roles receive the permissions that are
842
- * permitted by all of the relevant policies. For more information, see <a href="http://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_resource-based-policies.html">Using Resource-Based
843
- * Policies for Amazon Web Services Secrets Manager</a>. For the complete description of the Amazon Web Services policy syntax and
844
- * grammar, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html">IAM JSON
845
- * Policy Reference</a> in the <i>IAM User Guide</i>.</p>
846
- * <p>
847
- * <b>Minimum permissions</b>
848
- * </p>
849
- * <p>To run this command, you must have the following permissions:</p>
850
- * <ul>
851
- * <li>
852
- * <p>secretsmanager:PutResourcePolicy</p>
853
- * </li>
854
- * </ul>
855
- * <p>
856
- * <b>Related operations</b>
857
- * </p>
858
- * <ul>
859
- * <li>
860
- * <p>To retrieve the resource policy attached to a secret, use <a>GetResourcePolicy</a>.</p>
861
- * </li>
862
- * <li>
863
- * <p>To delete the resource-based policy attached to a secret, use <a>DeleteResourcePolicy</a>.</p>
864
- * </li>
865
- * <li>
866
- * <p>To list all of the currently available secrets, use <a>ListSecrets</a>.</p>
867
- * </li>
868
- * </ul>
869
- */
870
- public putResourcePolicy(
871
- args: PutResourcePolicyCommandInput,
872
- options?: __HttpHandlerOptions
873
- ): Promise<PutResourcePolicyCommandOutput>;
874
- public putResourcePolicy(
875
- args: PutResourcePolicyCommandInput,
876
- cb: (err: any, data?: PutResourcePolicyCommandOutput) => void
877
- ): void;
878
- public putResourcePolicy(
879
- args: PutResourcePolicyCommandInput,
880
- options: __HttpHandlerOptions,
881
- cb: (err: any, data?: PutResourcePolicyCommandOutput) => void
882
- ): void;
883
- public putResourcePolicy(
884
- args: PutResourcePolicyCommandInput,
885
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: PutResourcePolicyCommandOutput) => void),
886
- cb?: (err: any, data?: PutResourcePolicyCommandOutput) => void
887
- ): Promise<PutResourcePolicyCommandOutput> | void {
888
- const command = new PutResourcePolicyCommand(args);
889
- if (typeof optionsOrCb === "function") {
890
- this.send(command, optionsOrCb);
891
- } else if (typeof cb === "function") {
892
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
893
- this.send(command, optionsOrCb || {}, cb);
894
- } else {
895
- return this.send(command, optionsOrCb);
896
- }
897
- }
898
-
899
- /**
900
- * <p>Stores a new encrypted secret value in the specified secret. To do this, the operation
901
- * creates a new version and attaches it to the secret. The version can contain a new
902
- * <code>SecretString</code> value or a new <code>SecretBinary</code> value. You can also
903
- * specify the staging labels that are initially attached to the new version.</p>
904
- * <note>
905
- * <p>The Secrets Manager console uses only the <code>SecretString</code> field. To add binary data to a
906
- * secret with the <code>SecretBinary</code> field you must use the Amazon Web Services CLI or one of the
907
- * Amazon Web Services SDKs.</p>
908
- * </note>
909
- * <ul>
910
- * <li>
911
- * <p>If this operation creates the first version for the secret then Secrets Manager
912
- * automatically attaches the staging label <code>AWSCURRENT</code> to the new version.</p>
913
- * </li>
914
- * <li>
915
- * <p>If you do not specify a value for VersionStages then Secrets Manager automatically
916
- * moves the staging label <code>AWSCURRENT</code> to this new version.</p>
917
- * </li>
918
- * <li>
919
- * <p>If this operation moves the staging label <code>AWSCURRENT</code> from another version to this
920
- * version, then Secrets Manager also automatically moves the staging label <code>AWSPREVIOUS</code> to
921
- * the version that <code>AWSCURRENT</code> was removed from.</p>
922
- * </li>
923
- * <li>
924
- * <p>This operation is idempotent. If a version with a <code>VersionId</code> with the same
925
- * value as the <code>ClientRequestToken</code> parameter already exists and you specify the
926
- * same secret data, the operation succeeds but does nothing. However, if the secret data is
927
- * different, then the operation fails because you cannot modify an existing version; you can
928
- * only create new ones.</p>
929
- * </li>
930
- * </ul>
931
- * <note>
932
- * <ul>
933
- * <li>
934
- * <p>If you call an operation to encrypt or decrypt the <code>SecretString</code>
935
- * or <code>SecretBinary</code> for a secret in the same account as the calling user and that
936
- * secret doesn't specify a Amazon Web Services KMS encryption key, Secrets Manager uses the account's default
937
- * Amazon Web Services managed customer master key (CMK) with the alias <code>aws/secretsmanager</code>. If this key
938
- * doesn't already exist in your account then Secrets Manager creates it for you automatically. All
939
- * users and roles in the same Amazon Web Services account automatically have access to use the default CMK.
940
- * Note that if an Secrets Manager API call results in Amazon Web Services creating the account's
941
- * Amazon Web Services-managed CMK, it can result in a one-time significant delay in returning the
942
- * result.</p>
943
- * </li>
944
- * <li>
945
- * <p>If the secret resides in a different Amazon Web Services account from the credentials calling an API that
946
- * requires encryption or decryption of the secret value then you must create and use a custom
947
- * Amazon Web Services KMS CMK because you can't access the default CMK for the account using credentials
948
- * from a different Amazon Web Services account. Store the ARN of the CMK in the secret when you create the
949
- * secret or when you update it by including it in the <code>KMSKeyId</code>. If you call an
950
- * API that must encrypt or decrypt <code>SecretString</code> or <code>SecretBinary</code>
951
- * using credentials from a different account then the Amazon Web Services KMS key policy must grant cross-account
952
- * access to that other account's user or role for both the kms:GenerateDataKey and
953
- * kms:Decrypt operations.</p>
954
- * </li>
955
- * </ul>
956
- * </note>
957
- * <p>
958
- * <b>Minimum permissions</b>
959
- * </p>
960
- * <p>To run this command, you must have the following permissions:</p>
961
- * <ul>
962
- * <li>
963
- * <p>secretsmanager:PutSecretValue</p>
964
- * </li>
965
- * <li>
966
- * <p>kms:GenerateDataKey - needed only if you use a customer-managed Amazon Web Services KMS key to encrypt
967
- * the secret. You do not need this permission to use the account's default Amazon Web Services managed CMK
968
- * for Secrets Manager.</p>
969
- * </li>
970
- * </ul>
971
- * <p>
972
- * <b>Related operations</b>
973
- * </p>
974
- * <ul>
975
- * <li>
976
- * <p>To retrieve the encrypted value you store in the version of a secret, use <a>GetSecretValue</a>.</p>
977
- * </li>
978
- * <li>
979
- * <p>To create a secret, use <a>CreateSecret</a>.</p>
980
- * </li>
981
- * <li>
982
- * <p>To get the details for a secret, use <a>DescribeSecret</a>.</p>
983
- * </li>
984
- * <li>
985
- * <p>To list the versions attached to a secret, use <a>ListSecretVersionIds</a>.</p>
986
- * </li>
987
- * </ul>
988
- */
989
- public putSecretValue(
990
- args: PutSecretValueCommandInput,
991
- options?: __HttpHandlerOptions
992
- ): Promise<PutSecretValueCommandOutput>;
993
- public putSecretValue(
994
- args: PutSecretValueCommandInput,
995
- cb: (err: any, data?: PutSecretValueCommandOutput) => void
996
- ): void;
997
- public putSecretValue(
998
- args: PutSecretValueCommandInput,
999
- options: __HttpHandlerOptions,
1000
- cb: (err: any, data?: PutSecretValueCommandOutput) => void
1001
- ): void;
1002
- public putSecretValue(
1003
- args: PutSecretValueCommandInput,
1004
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: PutSecretValueCommandOutput) => void),
1005
- cb?: (err: any, data?: PutSecretValueCommandOutput) => void
1006
- ): Promise<PutSecretValueCommandOutput> | void {
1007
- const command = new PutSecretValueCommand(args);
1008
- if (typeof optionsOrCb === "function") {
1009
- this.send(command, optionsOrCb);
1010
- } else if (typeof cb === "function") {
1011
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1012
- this.send(command, optionsOrCb || {}, cb);
1013
- } else {
1014
- return this.send(command, optionsOrCb);
1015
- }
1016
- }
1017
-
1018
- /**
1019
- * <p>Remove regions from replication.</p>
1020
- */
1021
- public removeRegionsFromReplication(
1022
- args: RemoveRegionsFromReplicationCommandInput,
1023
- options?: __HttpHandlerOptions
1024
- ): Promise<RemoveRegionsFromReplicationCommandOutput>;
1025
- public removeRegionsFromReplication(
1026
- args: RemoveRegionsFromReplicationCommandInput,
1027
- cb: (err: any, data?: RemoveRegionsFromReplicationCommandOutput) => void
1028
- ): void;
1029
- public removeRegionsFromReplication(
1030
- args: RemoveRegionsFromReplicationCommandInput,
1031
- options: __HttpHandlerOptions,
1032
- cb: (err: any, data?: RemoveRegionsFromReplicationCommandOutput) => void
1033
- ): void;
1034
- public removeRegionsFromReplication(
1035
- args: RemoveRegionsFromReplicationCommandInput,
1036
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: RemoveRegionsFromReplicationCommandOutput) => void),
1037
- cb?: (err: any, data?: RemoveRegionsFromReplicationCommandOutput) => void
1038
- ): Promise<RemoveRegionsFromReplicationCommandOutput> | void {
1039
- const command = new RemoveRegionsFromReplicationCommand(args);
1040
- if (typeof optionsOrCb === "function") {
1041
- this.send(command, optionsOrCb);
1042
- } else if (typeof cb === "function") {
1043
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1044
- this.send(command, optionsOrCb || {}, cb);
1045
- } else {
1046
- return this.send(command, optionsOrCb);
1047
- }
1048
- }
1049
-
1050
- /**
1051
- * <p>Converts an existing secret to a multi-Region secret and begins replication the secret to a
1052
- * list of new regions. </p>
1053
- */
1054
- public replicateSecretToRegions(
1055
- args: ReplicateSecretToRegionsCommandInput,
1056
- options?: __HttpHandlerOptions
1057
- ): Promise<ReplicateSecretToRegionsCommandOutput>;
1058
- public replicateSecretToRegions(
1059
- args: ReplicateSecretToRegionsCommandInput,
1060
- cb: (err: any, data?: ReplicateSecretToRegionsCommandOutput) => void
1061
- ): void;
1062
- public replicateSecretToRegions(
1063
- args: ReplicateSecretToRegionsCommandInput,
1064
- options: __HttpHandlerOptions,
1065
- cb: (err: any, data?: ReplicateSecretToRegionsCommandOutput) => void
1066
- ): void;
1067
- public replicateSecretToRegions(
1068
- args: ReplicateSecretToRegionsCommandInput,
1069
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ReplicateSecretToRegionsCommandOutput) => void),
1070
- cb?: (err: any, data?: ReplicateSecretToRegionsCommandOutput) => void
1071
- ): Promise<ReplicateSecretToRegionsCommandOutput> | void {
1072
- const command = new ReplicateSecretToRegionsCommand(args);
1073
- if (typeof optionsOrCb === "function") {
1074
- this.send(command, optionsOrCb);
1075
- } else if (typeof cb === "function") {
1076
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1077
- this.send(command, optionsOrCb || {}, cb);
1078
- } else {
1079
- return this.send(command, optionsOrCb);
1080
- }
1081
- }
1082
-
1083
- /**
1084
- * <p>Cancels the scheduled deletion of a secret by removing the <code>DeletedDate</code> time
1085
- * stamp. This makes the secret accessible to query once again.</p>
1086
- * <p>
1087
- * <b>Minimum permissions</b>
1088
- * </p>
1089
- * <p>To run this command, you must have the following permissions:</p>
1090
- * <ul>
1091
- * <li>
1092
- * <p>secretsmanager:RestoreSecret</p>
1093
- * </li>
1094
- * </ul>
1095
- * <p>
1096
- * <b>Related operations</b>
1097
- * </p>
1098
- * <ul>
1099
- * <li>
1100
- * <p>To delete a secret, use <a>DeleteSecret</a>.</p>
1101
- * </li>
1102
- * </ul>
1103
- */
1104
- public restoreSecret(
1105
- args: RestoreSecretCommandInput,
1106
- options?: __HttpHandlerOptions
1107
- ): Promise<RestoreSecretCommandOutput>;
1108
- public restoreSecret(
1109
- args: RestoreSecretCommandInput,
1110
- cb: (err: any, data?: RestoreSecretCommandOutput) => void
1111
- ): void;
1112
- public restoreSecret(
1113
- args: RestoreSecretCommandInput,
1114
- options: __HttpHandlerOptions,
1115
- cb: (err: any, data?: RestoreSecretCommandOutput) => void
1116
- ): void;
1117
- public restoreSecret(
1118
- args: RestoreSecretCommandInput,
1119
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: RestoreSecretCommandOutput) => void),
1120
- cb?: (err: any, data?: RestoreSecretCommandOutput) => void
1121
- ): Promise<RestoreSecretCommandOutput> | void {
1122
- const command = new RestoreSecretCommand(args);
1123
- if (typeof optionsOrCb === "function") {
1124
- this.send(command, optionsOrCb);
1125
- } else if (typeof cb === "function") {
1126
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1127
- this.send(command, optionsOrCb || {}, cb);
1128
- } else {
1129
- return this.send(command, optionsOrCb);
1130
- }
1131
- }
1132
-
1133
- /**
1134
- * <p>Configures and starts the asynchronous process of rotating this secret. If you include the
1135
- * configuration parameters, the operation sets those values for the secret and then immediately
1136
- * starts a rotation. If you do not include the configuration parameters, the operation starts a
1137
- * rotation with the values already stored in the secret. After the rotation completes, the
1138
- * protected service and its clients all use the new version of the secret. </p>
1139
- * <p>This required configuration information includes the ARN of an Amazon Web Services Lambda function and
1140
- * optionally, the time between scheduled rotations. The Lambda rotation function creates a new
1141
- * version of the secret and creates or updates the credentials on the protected service to
1142
- * match. After testing the new credentials, the function marks the new secret with the staging
1143
- * label <code>AWSCURRENT</code> so that your clients all immediately begin to use the new version. For more
1144
- * information about rotating secrets and how to configure a Lambda function to rotate the
1145
- * secrets for your protected service, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets.html">Rotating Secrets in Amazon Web Services Secrets Manager</a> in the
1146
- * <i>Amazon Web Services Secrets Manager User Guide</i>.</p>
1147
- * <p>Secrets Manager schedules the next rotation when the previous
1148
- * one completes. Secrets Manager schedules the date by adding the rotation interval (number of days) to the
1149
- * actual date of the last rotation. The service chooses the hour within that 24-hour date window
1150
- * randomly. The minute is also chosen somewhat randomly, but weighted towards the top of the hour
1151
- * and influenced by a variety of factors that help distribute load.</p>
1152
- * <p>The
1153
- * rotation function must end with the versions of the secret in one of two states:</p>
1154
- * <ul>
1155
- * <li>
1156
- * <p>The <code>AWSPENDING</code> and <code>AWSCURRENT</code> staging labels are attached to the same version of
1157
- * the secret, or</p>
1158
- * </li>
1159
- * <li>
1160
- * <p>The <code>AWSPENDING</code> staging label is not attached to any version of the secret.</p>
1161
- * </li>
1162
- * </ul>
1163
- * <p>If the <code>AWSPENDING</code> staging label is present but not attached to the same version as
1164
- * <code>AWSCURRENT</code> then any later invocation of <code>RotateSecret</code> assumes that a previous
1165
- * rotation request is still in progress and returns an error.</p>
1166
- * <p>
1167
- * <b>Minimum permissions</b>
1168
- * </p>
1169
- * <p>To run this command, you must have the following permissions:</p>
1170
- * <ul>
1171
- * <li>
1172
- * <p>secretsmanager:RotateSecret</p>
1173
- * </li>
1174
- * <li>
1175
- * <p>lambda:InvokeFunction (on the function specified in the secret's metadata)</p>
1176
- * </li>
1177
- * </ul>
1178
- * <p>
1179
- * <b>Related operations</b>
1180
- * </p>
1181
- * <ul>
1182
- * <li>
1183
- * <p>To list the secrets in your account, use <a>ListSecrets</a>.</p>
1184
- * </li>
1185
- * <li>
1186
- * <p>To get the details for a version of a secret, use <a>DescribeSecret</a>.</p>
1187
- * </li>
1188
- * <li>
1189
- * <p>To create a new version of a secret, use <a>CreateSecret</a>.</p>
1190
- * </li>
1191
- * <li>
1192
- * <p>To attach staging labels to or remove staging labels from a version of a secret, use
1193
- * <a>UpdateSecretVersionStage</a>.</p>
1194
- * </li>
1195
- * </ul>
1196
- */
1197
- public rotateSecret(
1198
- args: RotateSecretCommandInput,
1199
- options?: __HttpHandlerOptions
1200
- ): Promise<RotateSecretCommandOutput>;
1201
- public rotateSecret(args: RotateSecretCommandInput, cb: (err: any, data?: RotateSecretCommandOutput) => void): void;
1202
- public rotateSecret(
1203
- args: RotateSecretCommandInput,
1204
- options: __HttpHandlerOptions,
1205
- cb: (err: any, data?: RotateSecretCommandOutput) => void
1206
- ): void;
1207
- public rotateSecret(
1208
- args: RotateSecretCommandInput,
1209
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: RotateSecretCommandOutput) => void),
1210
- cb?: (err: any, data?: RotateSecretCommandOutput) => void
1211
- ): Promise<RotateSecretCommandOutput> | void {
1212
- const command = new RotateSecretCommand(args);
1213
- if (typeof optionsOrCb === "function") {
1214
- this.send(command, optionsOrCb);
1215
- } else if (typeof cb === "function") {
1216
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1217
- this.send(command, optionsOrCb || {}, cb);
1218
- } else {
1219
- return this.send(command, optionsOrCb);
1220
- }
1221
- }
1222
-
1223
- /**
1224
- * <p>Removes the secret from replication and promotes the secret to a regional secret in the replica Region.</p>
1225
- */
1226
- public stopReplicationToReplica(
1227
- args: StopReplicationToReplicaCommandInput,
1228
- options?: __HttpHandlerOptions
1229
- ): Promise<StopReplicationToReplicaCommandOutput>;
1230
- public stopReplicationToReplica(
1231
- args: StopReplicationToReplicaCommandInput,
1232
- cb: (err: any, data?: StopReplicationToReplicaCommandOutput) => void
1233
- ): void;
1234
- public stopReplicationToReplica(
1235
- args: StopReplicationToReplicaCommandInput,
1236
- options: __HttpHandlerOptions,
1237
- cb: (err: any, data?: StopReplicationToReplicaCommandOutput) => void
1238
- ): void;
1239
- public stopReplicationToReplica(
1240
- args: StopReplicationToReplicaCommandInput,
1241
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StopReplicationToReplicaCommandOutput) => void),
1242
- cb?: (err: any, data?: StopReplicationToReplicaCommandOutput) => void
1243
- ): Promise<StopReplicationToReplicaCommandOutput> | void {
1244
- const command = new StopReplicationToReplicaCommand(args);
1245
- if (typeof optionsOrCb === "function") {
1246
- this.send(command, optionsOrCb);
1247
- } else if (typeof cb === "function") {
1248
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1249
- this.send(command, optionsOrCb || {}, cb);
1250
- } else {
1251
- return this.send(command, optionsOrCb);
1252
- }
1253
- }
1254
-
1255
- /**
1256
- * <p>Attaches one or more tags, each consisting of a key name and a value, to the specified
1257
- * secret. Tags are part of the secret's overall metadata, and are not associated with any
1258
- * specific version of the secret. This operation only appends tags to the existing list of tags.
1259
- * To remove tags, you must use <a>UntagResource</a>.</p>
1260
- * <p>The following basic restrictions apply to tags:</p>
1261
- * <ul>
1262
- * <li>
1263
- * <p>Maximum number of tags per secret—50</p>
1264
- * </li>
1265
- * <li>
1266
- * <p>Maximum key length—127 Unicode characters in UTF-8</p>
1267
- * </li>
1268
- * <li>
1269
- * <p>Maximum value length—255 Unicode characters in UTF-8</p>
1270
- * </li>
1271
- * <li>
1272
- * <p>Tag keys and values are case sensitive.</p>
1273
- * </li>
1274
- * <li>
1275
- * <p>Do not use the <code>aws:</code> prefix in your tag names or values because Amazon Web Services reserves it
1276
- * for Amazon Web Services use. You can't edit or delete tag names or values with this
1277
- * prefix. Tags with this prefix do not count against your tags per secret limit.</p>
1278
- * </li>
1279
- * <li>
1280
- * <p>If you use your tagging schema across multiple services and resources,
1281
- * remember other services might have restrictions on allowed characters. Generally
1282
- * allowed characters: letters, spaces, and numbers representable in UTF-8, plus the
1283
- * following special characters: + - = . _ : / @.</p>
1284
- * </li>
1285
- * </ul>
1286
- * <important>
1287
- * <p>If you use tags as part of your security strategy, then adding or removing a tag can
1288
- * change permissions. If successfully completing this operation would result in you losing
1289
- * your permissions for this secret, then the operation is blocked and returns an Access Denied
1290
- * error.</p>
1291
- * </important>
1292
- * <p>
1293
- * <b>Minimum permissions</b>
1294
- * </p>
1295
- * <p>To run this command, you must have the following permissions:</p>
1296
- * <ul>
1297
- * <li>
1298
- * <p>secretsmanager:TagResource</p>
1299
- * </li>
1300
- * </ul>
1301
- * <p>
1302
- * <b>Related operations</b>
1303
- * </p>
1304
- * <ul>
1305
- * <li>
1306
- * <p>To remove one or more tags from the collection attached to a secret, use <a>UntagResource</a>.</p>
1307
- * </li>
1308
- * <li>
1309
- * <p>To view the list of tags attached to a secret, use <a>DescribeSecret</a>.</p>
1310
- * </li>
1311
- * </ul>
1312
- */
1313
- public tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise<TagResourceCommandOutput>;
1314
- public tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
1315
- public tagResource(
1316
- args: TagResourceCommandInput,
1317
- options: __HttpHandlerOptions,
1318
- cb: (err: any, data?: TagResourceCommandOutput) => void
1319
- ): void;
1320
- public tagResource(
1321
- args: TagResourceCommandInput,
1322
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: TagResourceCommandOutput) => void),
1323
- cb?: (err: any, data?: TagResourceCommandOutput) => void
1324
- ): Promise<TagResourceCommandOutput> | void {
1325
- const command = new TagResourceCommand(args);
1326
- if (typeof optionsOrCb === "function") {
1327
- this.send(command, optionsOrCb);
1328
- } else if (typeof cb === "function") {
1329
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1330
- this.send(command, optionsOrCb || {}, cb);
1331
- } else {
1332
- return this.send(command, optionsOrCb);
1333
- }
1334
- }
1335
-
1336
- /**
1337
- * <p>Removes one or more tags from the specified secret.</p>
1338
- * <p>This operation is idempotent. If a requested tag is not attached to the secret, no error
1339
- * is returned and the secret metadata is unchanged.</p>
1340
- * <important>
1341
- * <p>If you use tags as part of your security strategy, then removing a tag can change
1342
- * permissions. If successfully completing this operation would result in you losing your
1343
- * permissions for this secret, then the operation is blocked and returns an Access Denied
1344
- * error.</p>
1345
- * </important>
1346
- * <p>
1347
- * <b>Minimum permissions</b>
1348
- * </p>
1349
- * <p>To run this command, you must have the following permissions:</p>
1350
- * <ul>
1351
- * <li>
1352
- * <p>secretsmanager:UntagResource</p>
1353
- * </li>
1354
- * </ul>
1355
- * <p>
1356
- * <b>Related operations</b>
1357
- * </p>
1358
- * <ul>
1359
- * <li>
1360
- * <p>To add one or more tags to the collection attached to a secret, use <a>TagResource</a>.</p>
1361
- * </li>
1362
- * <li>
1363
- * <p>To view the list of tags attached to a secret, use <a>DescribeSecret</a>.</p>
1364
- * </li>
1365
- * </ul>
1366
- */
1367
- public untagResource(
1368
- args: UntagResourceCommandInput,
1369
- options?: __HttpHandlerOptions
1370
- ): Promise<UntagResourceCommandOutput>;
1371
- public untagResource(
1372
- args: UntagResourceCommandInput,
1373
- cb: (err: any, data?: UntagResourceCommandOutput) => void
1374
- ): void;
1375
- public untagResource(
1376
- args: UntagResourceCommandInput,
1377
- options: __HttpHandlerOptions,
1378
- cb: (err: any, data?: UntagResourceCommandOutput) => void
1379
- ): void;
1380
- public untagResource(
1381
- args: UntagResourceCommandInput,
1382
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UntagResourceCommandOutput) => void),
1383
- cb?: (err: any, data?: UntagResourceCommandOutput) => void
1384
- ): Promise<UntagResourceCommandOutput> | void {
1385
- const command = new UntagResourceCommand(args);
1386
- if (typeof optionsOrCb === "function") {
1387
- this.send(command, optionsOrCb);
1388
- } else if (typeof cb === "function") {
1389
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1390
- this.send(command, optionsOrCb || {}, cb);
1391
- } else {
1392
- return this.send(command, optionsOrCb);
1393
- }
1394
- }
1395
-
1396
- /**
1397
- * <p>Modifies many of the details of the specified secret. If you include a
1398
- * <code>ClientRequestToken</code> and <i>either</i>
1399
- * <code>SecretString</code> or <code>SecretBinary</code> then it also creates a new version
1400
- * attached to the secret.</p>
1401
- * <p>To modify the rotation configuration of a secret, use <a>RotateSecret</a>
1402
- * instead.</p>
1403
- * <note>
1404
- * <p>The Secrets Manager console uses only the <code>SecretString</code> parameter and therefore limits
1405
- * you to encrypting and storing only a text string. To encrypt and store binary data as part
1406
- * of the version of a secret, you must use either the Amazon Web Services CLI or one of the Amazon Web Services
1407
- * SDKs.</p>
1408
- * </note>
1409
- * <ul>
1410
- * <li>
1411
- * <p>If a version with a <code>VersionId</code> with the same value as the
1412
- * <code>ClientRequestToken</code> parameter already exists, the operation results in an
1413
- * error. You cannot modify an existing version, you can only create a new version.</p>
1414
- * </li>
1415
- * <li>
1416
- * <p>If you include <code>SecretString</code> or <code>SecretBinary</code> to create a new
1417
- * secret version, Secrets Manager automatically attaches the staging label <code>AWSCURRENT</code> to the new
1418
- * version. </p>
1419
- * </li>
1420
- * </ul>
1421
- * <note>
1422
- * <ul>
1423
- * <li>
1424
- * <p>If you call an operation to encrypt or decrypt the <code>SecretString</code>
1425
- * or <code>SecretBinary</code> for a secret in the same account as the calling user and that
1426
- * secret doesn't specify a Amazon Web Services KMS encryption key, Secrets Manager uses the account's default
1427
- * Amazon Web Services managed customer master key (CMK) with the alias <code>aws/secretsmanager</code>. If this key
1428
- * doesn't already exist in your account then Secrets Manager creates it for you automatically. All
1429
- * users and roles in the same Amazon Web Services account automatically have access to use the default CMK.
1430
- * Note that if an Secrets Manager API call results in Amazon Web Services creating the account's
1431
- * Amazon Web Services-managed CMK, it can result in a one-time significant delay in returning the
1432
- * result.</p>
1433
- * </li>
1434
- * <li>
1435
- * <p>If the secret resides in a different Amazon Web Services account from the credentials calling an API that
1436
- * requires encryption or decryption of the secret value then you must create and use a custom
1437
- * Amazon Web Services KMS CMK because you can't access the default CMK for the account using credentials
1438
- * from a different Amazon Web Services account. Store the ARN of the CMK in the secret when you create the
1439
- * secret or when you update it by including it in the <code>KMSKeyId</code>. If you call an
1440
- * API that must encrypt or decrypt <code>SecretString</code> or <code>SecretBinary</code>
1441
- * using credentials from a different account then the Amazon Web Services KMS key policy must grant cross-account
1442
- * access to that other account's user or role for both the kms:GenerateDataKey and
1443
- * kms:Decrypt operations.</p>
1444
- * </li>
1445
- * </ul>
1446
- * </note>
1447
- * <p>
1448
- * <b>Minimum permissions</b>
1449
- * </p>
1450
- * <p>To run this command, you must have the following permissions:</p>
1451
- * <ul>
1452
- * <li>
1453
- * <p>secretsmanager:UpdateSecret</p>
1454
- * </li>
1455
- * <li>
1456
- * <p>kms:GenerateDataKey - needed only if you use a custom Amazon Web Services KMS key to encrypt the secret.
1457
- * You do not need this permission to use the account's Amazon Web Services managed CMK for
1458
- * Secrets Manager.</p>
1459
- * </li>
1460
- * <li>
1461
- * <p>kms:Decrypt - needed only if you use a custom Amazon Web Services KMS key to encrypt the secret. You do
1462
- * not need this permission to use the account's Amazon Web Services managed CMK for Secrets Manager.</p>
1463
- * </li>
1464
- * </ul>
1465
- * <p>
1466
- * <b>Related operations</b>
1467
- * </p>
1468
- * <ul>
1469
- * <li>
1470
- * <p>To create a new secret, use <a>CreateSecret</a>.</p>
1471
- * </li>
1472
- * <li>
1473
- * <p>To add only a new version to an existing secret, use <a>PutSecretValue</a>.</p>
1474
- * </li>
1475
- * <li>
1476
- * <p>To get the details for a secret, use <a>DescribeSecret</a>.</p>
1477
- * </li>
1478
- * <li>
1479
- * <p>To list the versions contained in a secret, use <a>ListSecretVersionIds</a>.</p>
1480
- * </li>
1481
- * </ul>
1482
- */
1483
- public updateSecret(
1484
- args: UpdateSecretCommandInput,
1485
- options?: __HttpHandlerOptions
1486
- ): Promise<UpdateSecretCommandOutput>;
1487
- public updateSecret(args: UpdateSecretCommandInput, cb: (err: any, data?: UpdateSecretCommandOutput) => void): void;
1488
- public updateSecret(
1489
- args: UpdateSecretCommandInput,
1490
- options: __HttpHandlerOptions,
1491
- cb: (err: any, data?: UpdateSecretCommandOutput) => void
1492
- ): void;
1493
- public updateSecret(
1494
- args: UpdateSecretCommandInput,
1495
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateSecretCommandOutput) => void),
1496
- cb?: (err: any, data?: UpdateSecretCommandOutput) => void
1497
- ): Promise<UpdateSecretCommandOutput> | void {
1498
- const command = new UpdateSecretCommand(args);
1499
- if (typeof optionsOrCb === "function") {
1500
- this.send(command, optionsOrCb);
1501
- } else if (typeof cb === "function") {
1502
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1503
- this.send(command, optionsOrCb || {}, cb);
1504
- } else {
1505
- return this.send(command, optionsOrCb);
1506
- }
1507
- }
1508
-
1509
- /**
1510
- * <p>Modifies the staging labels attached to a version of a secret. Staging labels are used to
1511
- * track a version as it progresses through the secret rotation process. You can attach a staging
1512
- * label to only one version of a secret at a time. If a staging label to be added is already
1513
- * attached to another version, then it is moved--removed from the other version first and
1514
- * then attached to this one. For more information about staging labels, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/terms-concepts.html#term_staging-label">Staging
1515
- * Labels</a> in the <i>Amazon Web Services Secrets Manager User Guide</i>. </p>
1516
- * <p>The staging labels that you specify in the <code>VersionStage</code> parameter are added
1517
- * to the existing list of staging labels--they don't replace it.</p>
1518
- * <p>You can move the <code>AWSCURRENT</code> staging label to this version by including it in this
1519
- * call.</p>
1520
- * <note>
1521
- * <p>Whenever you move <code>AWSCURRENT</code>, Secrets Manager automatically moves the label <code>AWSPREVIOUS</code>
1522
- * to the version that <code>AWSCURRENT</code> was removed from.</p>
1523
- * </note>
1524
- * <p>If this action results in the last label being removed from a version, then the version is
1525
- * considered to be 'deprecated' and can be deleted by Secrets Manager.</p>
1526
- * <p>
1527
- * <b>Minimum permissions</b>
1528
- * </p>
1529
- * <p>To run this command, you must have the following permissions:</p>
1530
- * <ul>
1531
- * <li>
1532
- * <p>secretsmanager:UpdateSecretVersionStage</p>
1533
- * </li>
1534
- * </ul>
1535
- * <p>
1536
- * <b>Related operations</b>
1537
- * </p>
1538
- * <ul>
1539
- * <li>
1540
- * <p>To get the list of staging labels that are currently associated with a version of a
1541
- * secret, use <code>
1542
- * <a>DescribeSecret</a>
1543
- * </code> and examine the
1544
- * <code>SecretVersionsToStages</code> response value. </p>
1545
- * </li>
1546
- * </ul>
1547
- */
1548
- public updateSecretVersionStage(
1549
- args: UpdateSecretVersionStageCommandInput,
1550
- options?: __HttpHandlerOptions
1551
- ): Promise<UpdateSecretVersionStageCommandOutput>;
1552
- public updateSecretVersionStage(
1553
- args: UpdateSecretVersionStageCommandInput,
1554
- cb: (err: any, data?: UpdateSecretVersionStageCommandOutput) => void
1555
- ): void;
1556
- public updateSecretVersionStage(
1557
- args: UpdateSecretVersionStageCommandInput,
1558
- options: __HttpHandlerOptions,
1559
- cb: (err: any, data?: UpdateSecretVersionStageCommandOutput) => void
1560
- ): void;
1561
- public updateSecretVersionStage(
1562
- args: UpdateSecretVersionStageCommandInput,
1563
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateSecretVersionStageCommandOutput) => void),
1564
- cb?: (err: any, data?: UpdateSecretVersionStageCommandOutput) => void
1565
- ): Promise<UpdateSecretVersionStageCommandOutput> | void {
1566
- const command = new UpdateSecretVersionStageCommand(args);
1567
- if (typeof optionsOrCb === "function") {
1568
- this.send(command, optionsOrCb);
1569
- } else if (typeof cb === "function") {
1570
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1571
- this.send(command, optionsOrCb || {}, cb);
1572
- } else {
1573
- return this.send(command, optionsOrCb);
1574
- }
1575
- }
1576
-
1577
- /**
1578
- * <p>Validates that the resource policy does not grant a wide range of IAM principals access to
1579
- * your secret. The JSON request string input and response output displays formatted code
1580
- * with white space and line breaks for better readability. Submit your input as a single line
1581
- * JSON string. A resource-based policy is optional for secrets.</p>
1582
- * <p>The API performs three checks when validating the secret:</p>
1583
- * <ul>
1584
- * <li>
1585
- * <p>Sends a call to <a href="https://aws.amazon.com/blogs/security/protect-sensitive-data-in-the-cloud-with-automated-reasoning-zelkova/">Zelkova</a>, an automated reasoning engine, to ensure your Resource Policy does not
1586
- * allow broad access to your secret.</p>
1587
- * </li>
1588
- * <li>
1589
- * <p>Checks for correct syntax in a policy.</p>
1590
- * </li>
1591
- * <li>
1592
- * <p>Verifies the policy does not lock out a caller.</p>
1593
- * </li>
1594
- * </ul>
1595
- *
1596
- *
1597
- * <p>
1598
- * <b>Minimum Permissions</b>
1599
- * </p>
1600
- * <p>You must have the permissions required to access the following APIs:</p>
1601
- * <ul>
1602
- * <li>
1603
- * <p>
1604
- * <code>secretsmanager:PutResourcePolicy</code>
1605
- * </p>
1606
- * </li>
1607
- * <li>
1608
- * <p>
1609
- * <code>secretsmanager:ValidateResourcePolicy</code>
1610
- * </p>
1611
- * </li>
1612
- * </ul>
1613
- */
1614
- public validateResourcePolicy(
1615
- args: ValidateResourcePolicyCommandInput,
1616
- options?: __HttpHandlerOptions
1617
- ): Promise<ValidateResourcePolicyCommandOutput>;
1618
- public validateResourcePolicy(
1619
- args: ValidateResourcePolicyCommandInput,
1620
- cb: (err: any, data?: ValidateResourcePolicyCommandOutput) => void
1621
- ): void;
1622
- public validateResourcePolicy(
1623
- args: ValidateResourcePolicyCommandInput,
1624
- options: __HttpHandlerOptions,
1625
- cb: (err: any, data?: ValidateResourcePolicyCommandOutput) => void
1626
- ): void;
1627
- public validateResourcePolicy(
1628
- args: ValidateResourcePolicyCommandInput,
1629
- optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ValidateResourcePolicyCommandOutput) => void),
1630
- cb?: (err: any, data?: ValidateResourcePolicyCommandOutput) => void
1631
- ): Promise<ValidateResourcePolicyCommandOutput> | void {
1632
- const command = new ValidateResourcePolicyCommand(args);
1633
- if (typeof optionsOrCb === "function") {
1634
- this.send(command, optionsOrCb);
1635
- } else if (typeof cb === "function") {
1636
- if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
1637
- this.send(command, optionsOrCb || {}, cb);
1638
- } else {
1639
- return this.send(command, optionsOrCb);
1640
- }
1641
- }
1642
- }