@aws-sdk/client-secrets-manager 3.35.0 → 3.38.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 (229) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/dist-cjs/SecretsManager.js +0 -66
  3. package/dist-cjs/SecretsManagerClient.js +0 -71
  4. package/dist-cjs/commands/CancelRotateSecretCommand.js +0 -77
  5. package/dist-cjs/commands/CreateSecretCommand.js +0 -112
  6. package/dist-cjs/commands/DeleteResourcePolicyCommand.js +0 -48
  7. package/dist-cjs/commands/DeleteSecretCommand.js +0 -70
  8. package/dist-cjs/commands/DescribeSecretCommand.js +0 -52
  9. package/dist-cjs/commands/GetRandomPasswordCommand.js +0 -37
  10. package/dist-cjs/commands/GetResourcePolicyCommand.js +0 -51
  11. package/dist-cjs/commands/GetSecretValueCommand.js +0 -52
  12. package/dist-cjs/commands/ListSecretVersionIdsCommand.js +0 -53
  13. package/dist-cjs/commands/ListSecretsCommand.js +0 -54
  14. package/dist-cjs/commands/PutResourcePolicyCommand.js +0 -56
  15. package/dist-cjs/commands/PutSecretValueCommand.js +0 -112
  16. package/dist-cjs/commands/RemoveRegionsFromReplicationCommand.js +0 -25
  17. package/dist-cjs/commands/ReplicateSecretToRegionsCommand.js +0 -26
  18. package/dist-cjs/commands/RestoreSecretCommand.js +0 -43
  19. package/dist-cjs/commands/RotateSecretCommand.js +0 -86
  20. package/dist-cjs/commands/StopReplicationToReplicaCommand.js +0 -25
  21. package/dist-cjs/commands/TagResourceCommand.js +0 -80
  22. package/dist-cjs/commands/UntagResourceCommand.js +0 -53
  23. package/dist-cjs/commands/UpdateSecretCommand.js +0 -109
  24. package/dist-cjs/commands/UpdateSecretVersionStageCommand.js +0 -61
  25. package/dist-cjs/commands/ValidateResourcePolicyCommand.js +0 -59
  26. package/dist-cjs/commands/index.js +25 -0
  27. package/dist-cjs/endpoints.js +1 -2
  28. package/dist-cjs/index.js +4 -28
  29. package/dist-cjs/models/index.js +0 -1
  30. package/dist-cjs/models/models_0.js +0 -187
  31. package/dist-cjs/pagination/Interfaces.js +0 -1
  32. package/dist-cjs/pagination/ListSecretVersionIdsPaginator.js +0 -11
  33. package/dist-cjs/pagination/ListSecretsPaginator.js +0 -11
  34. package/dist-cjs/pagination/index.js +6 -0
  35. package/dist-cjs/protocols/Aws_json1_1.js +0 -6
  36. package/dist-cjs/runtimeConfig.browser.js +1 -6
  37. package/dist-cjs/runtimeConfig.js +2 -7
  38. package/dist-cjs/runtimeConfig.native.js +0 -4
  39. package/dist-cjs/runtimeConfig.shared.js +0 -4
  40. package/dist-es/SecretsManager.js +0 -1
  41. package/dist-es/SecretsManagerClient.js +0 -1
  42. package/dist-es/commands/CancelRotateSecretCommand.js +0 -1
  43. package/dist-es/commands/CreateSecretCommand.js +0 -1
  44. package/dist-es/commands/DeleteResourcePolicyCommand.js +0 -1
  45. package/dist-es/commands/DeleteSecretCommand.js +0 -1
  46. package/dist-es/commands/DescribeSecretCommand.js +0 -1
  47. package/dist-es/commands/GetRandomPasswordCommand.js +0 -1
  48. package/dist-es/commands/GetResourcePolicyCommand.js +0 -1
  49. package/dist-es/commands/GetSecretValueCommand.js +0 -1
  50. package/dist-es/commands/ListSecretVersionIdsCommand.js +0 -1
  51. package/dist-es/commands/ListSecretsCommand.js +0 -1
  52. package/dist-es/commands/PutResourcePolicyCommand.js +0 -1
  53. package/dist-es/commands/PutSecretValueCommand.js +0 -1
  54. package/dist-es/commands/RemoveRegionsFromReplicationCommand.js +0 -1
  55. package/dist-es/commands/ReplicateSecretToRegionsCommand.js +0 -1
  56. package/dist-es/commands/RestoreSecretCommand.js +0 -1
  57. package/dist-es/commands/RotateSecretCommand.js +0 -1
  58. package/dist-es/commands/StopReplicationToReplicaCommand.js +0 -1
  59. package/dist-es/commands/TagResourceCommand.js +0 -1
  60. package/dist-es/commands/UntagResourceCommand.js +0 -1
  61. package/dist-es/commands/UpdateSecretCommand.js +0 -1
  62. package/dist-es/commands/UpdateSecretVersionStageCommand.js +0 -1
  63. package/dist-es/commands/ValidateResourcePolicyCommand.js +0 -1
  64. package/dist-es/commands/index.js +22 -0
  65. package/dist-es/endpoints.js +1 -2
  66. package/dist-es/index.js +4 -28
  67. package/dist-es/models/index.js +0 -1
  68. package/dist-es/models/models_0.js +0 -1
  69. package/dist-es/pagination/Interfaces.js +0 -1
  70. package/dist-es/pagination/ListSecretVersionIdsPaginator.js +0 -1
  71. package/dist-es/pagination/ListSecretsPaginator.js +0 -1
  72. package/dist-es/pagination/index.js +3 -0
  73. package/dist-es/protocols/Aws_json1_1.js +0 -1
  74. package/dist-es/runtimeConfig.browser.js +1 -2
  75. package/dist-es/runtimeConfig.js +2 -3
  76. package/dist-es/runtimeConfig.native.js +0 -1
  77. package/dist-es/runtimeConfig.shared.js +0 -1
  78. package/dist-types/SecretsManager.d.ts +16 -10
  79. package/dist-types/commands/PutSecretValueCommand.d.ts +6 -5
  80. package/dist-types/commands/UpdateSecretCommand.d.ts +10 -5
  81. package/dist-types/commands/index.d.ts +22 -0
  82. package/dist-types/index.d.ts +4 -27
  83. package/dist-types/models/models_0.d.ts +54 -268
  84. package/dist-types/pagination/index.d.ts +3 -0
  85. package/dist-types/ts3.4/SecretsManager.d.ts +23 -922
  86. package/dist-types/ts3.4/SecretsManagerClient.d.ts +24 -151
  87. package/dist-types/ts3.4/commands/CancelRotateSecretCommand.d.ts +2 -72
  88. package/dist-types/ts3.4/commands/CreateSecretCommand.d.ts +2 -107
  89. package/dist-types/ts3.4/commands/DeleteResourcePolicyCommand.d.ts +2 -43
  90. package/dist-types/ts3.4/commands/DeleteSecretCommand.d.ts +2 -65
  91. package/dist-types/ts3.4/commands/DescribeSecretCommand.d.ts +2 -47
  92. package/dist-types/ts3.4/commands/GetRandomPasswordCommand.d.ts +2 -32
  93. package/dist-types/ts3.4/commands/GetResourcePolicyCommand.d.ts +2 -46
  94. package/dist-types/ts3.4/commands/GetSecretValueCommand.d.ts +2 -47
  95. package/dist-types/ts3.4/commands/ListSecretVersionIdsCommand.d.ts +2 -48
  96. package/dist-types/ts3.4/commands/ListSecretsCommand.d.ts +2 -49
  97. package/dist-types/ts3.4/commands/PutResourcePolicyCommand.d.ts +2 -51
  98. package/dist-types/ts3.4/commands/PutSecretValueCommand.d.ts +2 -107
  99. package/dist-types/ts3.4/commands/RemoveRegionsFromReplicationCommand.d.ts +2 -20
  100. package/dist-types/ts3.4/commands/ReplicateSecretToRegionsCommand.d.ts +2 -21
  101. package/dist-types/ts3.4/commands/RestoreSecretCommand.d.ts +2 -38
  102. package/dist-types/ts3.4/commands/RotateSecretCommand.d.ts +2 -81
  103. package/dist-types/ts3.4/commands/StopReplicationToReplicaCommand.d.ts +2 -20
  104. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +2 -75
  105. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +2 -48
  106. package/dist-types/ts3.4/commands/UpdateSecretCommand.d.ts +2 -104
  107. package/dist-types/ts3.4/commands/UpdateSecretVersionStageCommand.d.ts +2 -56
  108. package/dist-types/ts3.4/commands/ValidateResourcePolicyCommand.d.ts +2 -54
  109. package/dist-types/ts3.4/commands/index.d.ts +22 -0
  110. package/dist-types/ts3.4/index.d.ts +4 -27
  111. package/dist-types/ts3.4/models/models_0.d.ts +256 -1506
  112. package/dist-types/ts3.4/pagination/index.d.ts +3 -0
  113. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -3
  114. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -3
  115. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -3
  116. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -3
  117. package/package.json +33 -30
  118. package/dist-cjs/SecretsManager.js.map +0 -1
  119. package/dist-cjs/SecretsManagerClient.js.map +0 -1
  120. package/dist-cjs/commands/CancelRotateSecretCommand.js.map +0 -1
  121. package/dist-cjs/commands/CreateSecretCommand.js.map +0 -1
  122. package/dist-cjs/commands/DeleteResourcePolicyCommand.js.map +0 -1
  123. package/dist-cjs/commands/DeleteSecretCommand.js.map +0 -1
  124. package/dist-cjs/commands/DescribeSecretCommand.js.map +0 -1
  125. package/dist-cjs/commands/GetRandomPasswordCommand.js.map +0 -1
  126. package/dist-cjs/commands/GetResourcePolicyCommand.js.map +0 -1
  127. package/dist-cjs/commands/GetSecretValueCommand.js.map +0 -1
  128. package/dist-cjs/commands/ListSecretVersionIdsCommand.js.map +0 -1
  129. package/dist-cjs/commands/ListSecretsCommand.js.map +0 -1
  130. package/dist-cjs/commands/PutResourcePolicyCommand.js.map +0 -1
  131. package/dist-cjs/commands/PutSecretValueCommand.js.map +0 -1
  132. package/dist-cjs/commands/RemoveRegionsFromReplicationCommand.js.map +0 -1
  133. package/dist-cjs/commands/ReplicateSecretToRegionsCommand.js.map +0 -1
  134. package/dist-cjs/commands/RestoreSecretCommand.js.map +0 -1
  135. package/dist-cjs/commands/RotateSecretCommand.js.map +0 -1
  136. package/dist-cjs/commands/StopReplicationToReplicaCommand.js.map +0 -1
  137. package/dist-cjs/commands/TagResourceCommand.js.map +0 -1
  138. package/dist-cjs/commands/UntagResourceCommand.js.map +0 -1
  139. package/dist-cjs/commands/UpdateSecretCommand.js.map +0 -1
  140. package/dist-cjs/commands/UpdateSecretVersionStageCommand.js.map +0 -1
  141. package/dist-cjs/commands/ValidateResourcePolicyCommand.js.map +0 -1
  142. package/dist-cjs/endpoints.js.map +0 -1
  143. package/dist-cjs/index.js.map +0 -1
  144. package/dist-cjs/models/index.js.map +0 -1
  145. package/dist-cjs/models/models_0.js.map +0 -1
  146. package/dist-cjs/pagination/Interfaces.js.map +0 -1
  147. package/dist-cjs/pagination/ListSecretVersionIdsPaginator.js.map +0 -1
  148. package/dist-cjs/pagination/ListSecretsPaginator.js.map +0 -1
  149. package/dist-cjs/protocols/Aws_json1_1.js.map +0 -1
  150. package/dist-cjs/runtimeConfig.browser.js.map +0 -1
  151. package/dist-cjs/runtimeConfig.js.map +0 -1
  152. package/dist-cjs/runtimeConfig.native.js.map +0 -1
  153. package/dist-cjs/runtimeConfig.shared.js.map +0 -1
  154. package/dist-es/SecretsManager.js.map +0 -1
  155. package/dist-es/SecretsManagerClient.js.map +0 -1
  156. package/dist-es/commands/CancelRotateSecretCommand.js.map +0 -1
  157. package/dist-es/commands/CreateSecretCommand.js.map +0 -1
  158. package/dist-es/commands/DeleteResourcePolicyCommand.js.map +0 -1
  159. package/dist-es/commands/DeleteSecretCommand.js.map +0 -1
  160. package/dist-es/commands/DescribeSecretCommand.js.map +0 -1
  161. package/dist-es/commands/GetRandomPasswordCommand.js.map +0 -1
  162. package/dist-es/commands/GetResourcePolicyCommand.js.map +0 -1
  163. package/dist-es/commands/GetSecretValueCommand.js.map +0 -1
  164. package/dist-es/commands/ListSecretVersionIdsCommand.js.map +0 -1
  165. package/dist-es/commands/ListSecretsCommand.js.map +0 -1
  166. package/dist-es/commands/PutResourcePolicyCommand.js.map +0 -1
  167. package/dist-es/commands/PutSecretValueCommand.js.map +0 -1
  168. package/dist-es/commands/RemoveRegionsFromReplicationCommand.js.map +0 -1
  169. package/dist-es/commands/ReplicateSecretToRegionsCommand.js.map +0 -1
  170. package/dist-es/commands/RestoreSecretCommand.js.map +0 -1
  171. package/dist-es/commands/RotateSecretCommand.js.map +0 -1
  172. package/dist-es/commands/StopReplicationToReplicaCommand.js.map +0 -1
  173. package/dist-es/commands/TagResourceCommand.js.map +0 -1
  174. package/dist-es/commands/UntagResourceCommand.js.map +0 -1
  175. package/dist-es/commands/UpdateSecretCommand.js.map +0 -1
  176. package/dist-es/commands/UpdateSecretVersionStageCommand.js.map +0 -1
  177. package/dist-es/commands/ValidateResourcePolicyCommand.js.map +0 -1
  178. package/dist-es/endpoints.js.map +0 -1
  179. package/dist-es/index.js.map +0 -1
  180. package/dist-es/models/index.js.map +0 -1
  181. package/dist-es/models/models_0.js.map +0 -1
  182. package/dist-es/pagination/Interfaces.js.map +0 -1
  183. package/dist-es/pagination/ListSecretVersionIdsPaginator.js.map +0 -1
  184. package/dist-es/pagination/ListSecretsPaginator.js.map +0 -1
  185. package/dist-es/protocols/Aws_json1_1.js.map +0 -1
  186. package/dist-es/runtimeConfig.browser.js.map +0 -1
  187. package/dist-es/runtimeConfig.js.map +0 -1
  188. package/dist-es/runtimeConfig.native.js.map +0 -1
  189. package/dist-es/runtimeConfig.shared.js.map +0 -1
  190. package/jest.config.js +0 -4
  191. package/src/SecretsManager.ts +0 -1643
  192. package/src/SecretsManagerClient.ts +0 -385
  193. package/src/commands/CancelRotateSecretCommand.ts +0 -147
  194. package/src/commands/CreateSecretCommand.ts +0 -182
  195. package/src/commands/DeleteResourcePolicyCommand.ts +0 -118
  196. package/src/commands/DeleteSecretCommand.ts +0 -140
  197. package/src/commands/DescribeSecretCommand.ts +0 -122
  198. package/src/commands/GetRandomPasswordCommand.ts +0 -107
  199. package/src/commands/GetResourcePolicyCommand.ts +0 -121
  200. package/src/commands/GetSecretValueCommand.ts +0 -122
  201. package/src/commands/ListSecretVersionIdsCommand.ts +0 -123
  202. package/src/commands/ListSecretsCommand.ts +0 -124
  203. package/src/commands/PutResourcePolicyCommand.ts +0 -126
  204. package/src/commands/PutSecretValueCommand.ts +0 -182
  205. package/src/commands/RemoveRegionsFromReplicationCommand.ts +0 -100
  206. package/src/commands/ReplicateSecretToRegionsCommand.ts +0 -96
  207. package/src/commands/RestoreSecretCommand.ts +0 -113
  208. package/src/commands/RotateSecretCommand.ts +0 -156
  209. package/src/commands/StopReplicationToReplicaCommand.ts +0 -95
  210. package/src/commands/TagResourceCommand.ts +0 -150
  211. package/src/commands/UntagResourceCommand.ts +0 -123
  212. package/src/commands/UpdateSecretCommand.ts +0 -179
  213. package/src/commands/UpdateSecretVersionStageCommand.ts +0 -131
  214. package/src/commands/ValidateResourcePolicyCommand.ts +0 -129
  215. package/src/endpoints.ts +0 -86
  216. package/src/index.ts +0 -28
  217. package/src/models/index.ts +0 -1
  218. package/src/models/models_0.ts +0 -2422
  219. package/src/pagination/Interfaces.ts +0 -8
  220. package/src/pagination/ListSecretVersionIdsPaginator.ts +0 -59
  221. package/src/pagination/ListSecretsPaginator.ts +0 -55
  222. package/src/protocols/Aws_json1_1.ts +0 -3422
  223. package/src/runtimeConfig.browser.ts +0 -41
  224. package/src/runtimeConfig.native.ts +0 -17
  225. package/src/runtimeConfig.shared.ts +0 -17
  226. package/src/runtimeConfig.ts +0 -46
  227. package/tsconfig.es.json +0 -10
  228. package/tsconfig.json +0 -33
  229. package/tsconfig.types.json +0 -9
@@ -1,182 +0,0 @@
1
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3
- import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import {
5
- FinalizeHandlerArguments,
6
- Handler,
7
- HandlerExecutionContext,
8
- HttpHandlerOptions as __HttpHandlerOptions,
9
- MetadataBearer as __MetadataBearer,
10
- MiddlewareStack,
11
- SerdeContext as __SerdeContext,
12
- } from "@aws-sdk/types";
13
-
14
- import { PutSecretValueRequest, PutSecretValueResponse } from "../models/models_0";
15
- import {
16
- deserializeAws_json1_1PutSecretValueCommand,
17
- serializeAws_json1_1PutSecretValueCommand,
18
- } from "../protocols/Aws_json1_1";
19
- import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";
20
-
21
- export interface PutSecretValueCommandInput extends PutSecretValueRequest {}
22
- export interface PutSecretValueCommandOutput extends PutSecretValueResponse, __MetadataBearer {}
23
-
24
- /**
25
- * <p>Stores a new encrypted secret value in the specified secret. To do this, the operation
26
- * creates a new version and attaches it to the secret. The version can contain a new
27
- * <code>SecretString</code> value or a new <code>SecretBinary</code> value. You can also
28
- * specify the staging labels that are initially attached to the new version.</p>
29
- * <note>
30
- * <p>The Secrets Manager console uses only the <code>SecretString</code> field. To add binary data to a
31
- * secret with the <code>SecretBinary</code> field you must use the Amazon Web Services CLI or one of the
32
- * Amazon Web Services SDKs.</p>
33
- * </note>
34
- * <ul>
35
- * <li>
36
- * <p>If this operation creates the first version for the secret then Secrets Manager
37
- * automatically attaches the staging label <code>AWSCURRENT</code> to the new version.</p>
38
- * </li>
39
- * <li>
40
- * <p>If you do not specify a value for VersionStages then Secrets Manager automatically
41
- * moves the staging label <code>AWSCURRENT</code> to this new version.</p>
42
- * </li>
43
- * <li>
44
- * <p>If this operation moves the staging label <code>AWSCURRENT</code> from another version to this
45
- * version, then Secrets Manager also automatically moves the staging label <code>AWSPREVIOUS</code> to
46
- * the version that <code>AWSCURRENT</code> was removed from.</p>
47
- * </li>
48
- * <li>
49
- * <p>This operation is idempotent. If a version with a <code>VersionId</code> with the same
50
- * value as the <code>ClientRequestToken</code> parameter already exists and you specify the
51
- * same secret data, the operation succeeds but does nothing. However, if the secret data is
52
- * different, then the operation fails because you cannot modify an existing version; you can
53
- * only create new ones.</p>
54
- * </li>
55
- * </ul>
56
- * <note>
57
- * <ul>
58
- * <li>
59
- * <p>If you call an operation to encrypt or decrypt the <code>SecretString</code>
60
- * or <code>SecretBinary</code> for a secret in the same account as the calling user and that
61
- * secret doesn't specify a Amazon Web Services KMS encryption key, Secrets Manager uses the account's default
62
- * Amazon Web Services managed customer master key (CMK) with the alias <code>aws/secretsmanager</code>. If this key
63
- * doesn't already exist in your account then Secrets Manager creates it for you automatically. All
64
- * users and roles in the same Amazon Web Services account automatically have access to use the default CMK.
65
- * Note that if an Secrets Manager API call results in Amazon Web Services creating the account's
66
- * Amazon Web Services-managed CMK, it can result in a one-time significant delay in returning the
67
- * result.</p>
68
- * </li>
69
- * <li>
70
- * <p>If the secret resides in a different Amazon Web Services account from the credentials calling an API that
71
- * requires encryption or decryption of the secret value then you must create and use a custom
72
- * Amazon Web Services KMS CMK because you can't access the default CMK for the account using credentials
73
- * from a different Amazon Web Services account. Store the ARN of the CMK in the secret when you create the
74
- * secret or when you update it by including it in the <code>KMSKeyId</code>. If you call an
75
- * API that must encrypt or decrypt <code>SecretString</code> or <code>SecretBinary</code>
76
- * using credentials from a different account then the Amazon Web Services KMS key policy must grant cross-account
77
- * access to that other account's user or role for both the kms:GenerateDataKey and
78
- * kms:Decrypt operations.</p>
79
- * </li>
80
- * </ul>
81
- * </note>
82
- * <p>
83
- * <b>Minimum permissions</b>
84
- * </p>
85
- * <p>To run this command, you must have the following permissions:</p>
86
- * <ul>
87
- * <li>
88
- * <p>secretsmanager:PutSecretValue</p>
89
- * </li>
90
- * <li>
91
- * <p>kms:GenerateDataKey - needed only if you use a customer-managed Amazon Web Services KMS key to encrypt
92
- * the secret. You do not need this permission to use the account's default Amazon Web Services managed CMK
93
- * for Secrets Manager.</p>
94
- * </li>
95
- * </ul>
96
- * <p>
97
- * <b>Related operations</b>
98
- * </p>
99
- * <ul>
100
- * <li>
101
- * <p>To retrieve the encrypted value you store in the version of a secret, use <a>GetSecretValue</a>.</p>
102
- * </li>
103
- * <li>
104
- * <p>To create a secret, use <a>CreateSecret</a>.</p>
105
- * </li>
106
- * <li>
107
- * <p>To get the details for a secret, use <a>DescribeSecret</a>.</p>
108
- * </li>
109
- * <li>
110
- * <p>To list the versions attached to a secret, use <a>ListSecretVersionIds</a>.</p>
111
- * </li>
112
- * </ul>
113
- * @example
114
- * Use a bare-bones client and the command you need to make an API call.
115
- * ```javascript
116
- * import { SecretsManagerClient, PutSecretValueCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import
117
- * // const { SecretsManagerClient, PutSecretValueCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import
118
- * const client = new SecretsManagerClient(config);
119
- * const command = new PutSecretValueCommand(input);
120
- * const response = await client.send(command);
121
- * ```
122
- *
123
- * @see {@link PutSecretValueCommandInput} for command's `input` shape.
124
- * @see {@link PutSecretValueCommandOutput} for command's `response` shape.
125
- * @see {@link SecretsManagerClientResolvedConfig | config} for command's `input` shape.
126
- *
127
- */
128
- export class PutSecretValueCommand extends $Command<
129
- PutSecretValueCommandInput,
130
- PutSecretValueCommandOutput,
131
- SecretsManagerClientResolvedConfig
132
- > {
133
- // Start section: command_properties
134
- // End section: command_properties
135
-
136
- constructor(readonly input: PutSecretValueCommandInput) {
137
- // Start section: command_constructor
138
- super();
139
- // End section: command_constructor
140
- }
141
-
142
- /**
143
- * @internal
144
- */
145
- resolveMiddleware(
146
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
147
- configuration: SecretsManagerClientResolvedConfig,
148
- options?: __HttpHandlerOptions
149
- ): Handler<PutSecretValueCommandInput, PutSecretValueCommandOutput> {
150
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
151
-
152
- const stack = clientStack.concat(this.middlewareStack);
153
-
154
- const { logger } = configuration;
155
- const clientName = "SecretsManagerClient";
156
- const commandName = "PutSecretValueCommand";
157
- const handlerExecutionContext: HandlerExecutionContext = {
158
- logger,
159
- clientName,
160
- commandName,
161
- inputFilterSensitiveLog: PutSecretValueRequest.filterSensitiveLog,
162
- outputFilterSensitiveLog: PutSecretValueResponse.filterSensitiveLog,
163
- };
164
- const { requestHandler } = configuration;
165
- return stack.resolve(
166
- (request: FinalizeHandlerArguments<any>) =>
167
- requestHandler.handle(request.request as __HttpRequest, options || {}),
168
- handlerExecutionContext
169
- );
170
- }
171
-
172
- private serialize(input: PutSecretValueCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
173
- return serializeAws_json1_1PutSecretValueCommand(input, context);
174
- }
175
-
176
- private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<PutSecretValueCommandOutput> {
177
- return deserializeAws_json1_1PutSecretValueCommand(output, context);
178
- }
179
-
180
- // Start section: command_body_extra
181
- // End section: command_body_extra
182
- }
@@ -1,100 +0,0 @@
1
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3
- import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import {
5
- FinalizeHandlerArguments,
6
- Handler,
7
- HandlerExecutionContext,
8
- HttpHandlerOptions as __HttpHandlerOptions,
9
- MetadataBearer as __MetadataBearer,
10
- MiddlewareStack,
11
- SerdeContext as __SerdeContext,
12
- } from "@aws-sdk/types";
13
-
14
- import { RemoveRegionsFromReplicationRequest, RemoveRegionsFromReplicationResponse } from "../models/models_0";
15
- import {
16
- deserializeAws_json1_1RemoveRegionsFromReplicationCommand,
17
- serializeAws_json1_1RemoveRegionsFromReplicationCommand,
18
- } from "../protocols/Aws_json1_1";
19
- import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";
20
-
21
- export interface RemoveRegionsFromReplicationCommandInput extends RemoveRegionsFromReplicationRequest {}
22
- export interface RemoveRegionsFromReplicationCommandOutput
23
- extends RemoveRegionsFromReplicationResponse,
24
- __MetadataBearer {}
25
-
26
- /**
27
- * <p>Remove regions from replication.</p>
28
- * @example
29
- * Use a bare-bones client and the command you need to make an API call.
30
- * ```javascript
31
- * import { SecretsManagerClient, RemoveRegionsFromReplicationCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import
32
- * // const { SecretsManagerClient, RemoveRegionsFromReplicationCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import
33
- * const client = new SecretsManagerClient(config);
34
- * const command = new RemoveRegionsFromReplicationCommand(input);
35
- * const response = await client.send(command);
36
- * ```
37
- *
38
- * @see {@link RemoveRegionsFromReplicationCommandInput} for command's `input` shape.
39
- * @see {@link RemoveRegionsFromReplicationCommandOutput} for command's `response` shape.
40
- * @see {@link SecretsManagerClientResolvedConfig | config} for command's `input` shape.
41
- *
42
- */
43
- export class RemoveRegionsFromReplicationCommand extends $Command<
44
- RemoveRegionsFromReplicationCommandInput,
45
- RemoveRegionsFromReplicationCommandOutput,
46
- SecretsManagerClientResolvedConfig
47
- > {
48
- // Start section: command_properties
49
- // End section: command_properties
50
-
51
- constructor(readonly input: RemoveRegionsFromReplicationCommandInput) {
52
- // Start section: command_constructor
53
- super();
54
- // End section: command_constructor
55
- }
56
-
57
- /**
58
- * @internal
59
- */
60
- resolveMiddleware(
61
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
62
- configuration: SecretsManagerClientResolvedConfig,
63
- options?: __HttpHandlerOptions
64
- ): Handler<RemoveRegionsFromReplicationCommandInput, RemoveRegionsFromReplicationCommandOutput> {
65
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
66
-
67
- const stack = clientStack.concat(this.middlewareStack);
68
-
69
- const { logger } = configuration;
70
- const clientName = "SecretsManagerClient";
71
- const commandName = "RemoveRegionsFromReplicationCommand";
72
- const handlerExecutionContext: HandlerExecutionContext = {
73
- logger,
74
- clientName,
75
- commandName,
76
- inputFilterSensitiveLog: RemoveRegionsFromReplicationRequest.filterSensitiveLog,
77
- outputFilterSensitiveLog: RemoveRegionsFromReplicationResponse.filterSensitiveLog,
78
- };
79
- const { requestHandler } = configuration;
80
- return stack.resolve(
81
- (request: FinalizeHandlerArguments<any>) =>
82
- requestHandler.handle(request.request as __HttpRequest, options || {}),
83
- handlerExecutionContext
84
- );
85
- }
86
-
87
- private serialize(input: RemoveRegionsFromReplicationCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
88
- return serializeAws_json1_1RemoveRegionsFromReplicationCommand(input, context);
89
- }
90
-
91
- private deserialize(
92
- output: __HttpResponse,
93
- context: __SerdeContext
94
- ): Promise<RemoveRegionsFromReplicationCommandOutput> {
95
- return deserializeAws_json1_1RemoveRegionsFromReplicationCommand(output, context);
96
- }
97
-
98
- // Start section: command_body_extra
99
- // End section: command_body_extra
100
- }
@@ -1,96 +0,0 @@
1
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3
- import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import {
5
- FinalizeHandlerArguments,
6
- Handler,
7
- HandlerExecutionContext,
8
- HttpHandlerOptions as __HttpHandlerOptions,
9
- MetadataBearer as __MetadataBearer,
10
- MiddlewareStack,
11
- SerdeContext as __SerdeContext,
12
- } from "@aws-sdk/types";
13
-
14
- import { ReplicateSecretToRegionsRequest, ReplicateSecretToRegionsResponse } from "../models/models_0";
15
- import {
16
- deserializeAws_json1_1ReplicateSecretToRegionsCommand,
17
- serializeAws_json1_1ReplicateSecretToRegionsCommand,
18
- } from "../protocols/Aws_json1_1";
19
- import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";
20
-
21
- export interface ReplicateSecretToRegionsCommandInput extends ReplicateSecretToRegionsRequest {}
22
- export interface ReplicateSecretToRegionsCommandOutput extends ReplicateSecretToRegionsResponse, __MetadataBearer {}
23
-
24
- /**
25
- * <p>Converts an existing secret to a multi-Region secret and begins replication the secret to a
26
- * list of new regions. </p>
27
- * @example
28
- * Use a bare-bones client and the command you need to make an API call.
29
- * ```javascript
30
- * import { SecretsManagerClient, ReplicateSecretToRegionsCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import
31
- * // const { SecretsManagerClient, ReplicateSecretToRegionsCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import
32
- * const client = new SecretsManagerClient(config);
33
- * const command = new ReplicateSecretToRegionsCommand(input);
34
- * const response = await client.send(command);
35
- * ```
36
- *
37
- * @see {@link ReplicateSecretToRegionsCommandInput} for command's `input` shape.
38
- * @see {@link ReplicateSecretToRegionsCommandOutput} for command's `response` shape.
39
- * @see {@link SecretsManagerClientResolvedConfig | config} for command's `input` shape.
40
- *
41
- */
42
- export class ReplicateSecretToRegionsCommand extends $Command<
43
- ReplicateSecretToRegionsCommandInput,
44
- ReplicateSecretToRegionsCommandOutput,
45
- SecretsManagerClientResolvedConfig
46
- > {
47
- // Start section: command_properties
48
- // End section: command_properties
49
-
50
- constructor(readonly input: ReplicateSecretToRegionsCommandInput) {
51
- // Start section: command_constructor
52
- super();
53
- // End section: command_constructor
54
- }
55
-
56
- /**
57
- * @internal
58
- */
59
- resolveMiddleware(
60
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
61
- configuration: SecretsManagerClientResolvedConfig,
62
- options?: __HttpHandlerOptions
63
- ): Handler<ReplicateSecretToRegionsCommandInput, ReplicateSecretToRegionsCommandOutput> {
64
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
65
-
66
- const stack = clientStack.concat(this.middlewareStack);
67
-
68
- const { logger } = configuration;
69
- const clientName = "SecretsManagerClient";
70
- const commandName = "ReplicateSecretToRegionsCommand";
71
- const handlerExecutionContext: HandlerExecutionContext = {
72
- logger,
73
- clientName,
74
- commandName,
75
- inputFilterSensitiveLog: ReplicateSecretToRegionsRequest.filterSensitiveLog,
76
- outputFilterSensitiveLog: ReplicateSecretToRegionsResponse.filterSensitiveLog,
77
- };
78
- const { requestHandler } = configuration;
79
- return stack.resolve(
80
- (request: FinalizeHandlerArguments<any>) =>
81
- requestHandler.handle(request.request as __HttpRequest, options || {}),
82
- handlerExecutionContext
83
- );
84
- }
85
-
86
- private serialize(input: ReplicateSecretToRegionsCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
87
- return serializeAws_json1_1ReplicateSecretToRegionsCommand(input, context);
88
- }
89
-
90
- private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ReplicateSecretToRegionsCommandOutput> {
91
- return deserializeAws_json1_1ReplicateSecretToRegionsCommand(output, context);
92
- }
93
-
94
- // Start section: command_body_extra
95
- // End section: command_body_extra
96
- }
@@ -1,113 +0,0 @@
1
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3
- import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import {
5
- FinalizeHandlerArguments,
6
- Handler,
7
- HandlerExecutionContext,
8
- HttpHandlerOptions as __HttpHandlerOptions,
9
- MetadataBearer as __MetadataBearer,
10
- MiddlewareStack,
11
- SerdeContext as __SerdeContext,
12
- } from "@aws-sdk/types";
13
-
14
- import { RestoreSecretRequest, RestoreSecretResponse } from "../models/models_0";
15
- import {
16
- deserializeAws_json1_1RestoreSecretCommand,
17
- serializeAws_json1_1RestoreSecretCommand,
18
- } from "../protocols/Aws_json1_1";
19
- import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";
20
-
21
- export interface RestoreSecretCommandInput extends RestoreSecretRequest {}
22
- export interface RestoreSecretCommandOutput extends RestoreSecretResponse, __MetadataBearer {}
23
-
24
- /**
25
- * <p>Cancels the scheduled deletion of a secret by removing the <code>DeletedDate</code> time
26
- * stamp. This makes the secret accessible to query once again.</p>
27
- * <p>
28
- * <b>Minimum permissions</b>
29
- * </p>
30
- * <p>To run this command, you must have the following permissions:</p>
31
- * <ul>
32
- * <li>
33
- * <p>secretsmanager:RestoreSecret</p>
34
- * </li>
35
- * </ul>
36
- * <p>
37
- * <b>Related operations</b>
38
- * </p>
39
- * <ul>
40
- * <li>
41
- * <p>To delete a secret, use <a>DeleteSecret</a>.</p>
42
- * </li>
43
- * </ul>
44
- * @example
45
- * Use a bare-bones client and the command you need to make an API call.
46
- * ```javascript
47
- * import { SecretsManagerClient, RestoreSecretCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import
48
- * // const { SecretsManagerClient, RestoreSecretCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import
49
- * const client = new SecretsManagerClient(config);
50
- * const command = new RestoreSecretCommand(input);
51
- * const response = await client.send(command);
52
- * ```
53
- *
54
- * @see {@link RestoreSecretCommandInput} for command's `input` shape.
55
- * @see {@link RestoreSecretCommandOutput} for command's `response` shape.
56
- * @see {@link SecretsManagerClientResolvedConfig | config} for command's `input` shape.
57
- *
58
- */
59
- export class RestoreSecretCommand extends $Command<
60
- RestoreSecretCommandInput,
61
- RestoreSecretCommandOutput,
62
- SecretsManagerClientResolvedConfig
63
- > {
64
- // Start section: command_properties
65
- // End section: command_properties
66
-
67
- constructor(readonly input: RestoreSecretCommandInput) {
68
- // Start section: command_constructor
69
- super();
70
- // End section: command_constructor
71
- }
72
-
73
- /**
74
- * @internal
75
- */
76
- resolveMiddleware(
77
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
78
- configuration: SecretsManagerClientResolvedConfig,
79
- options?: __HttpHandlerOptions
80
- ): Handler<RestoreSecretCommandInput, RestoreSecretCommandOutput> {
81
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
82
-
83
- const stack = clientStack.concat(this.middlewareStack);
84
-
85
- const { logger } = configuration;
86
- const clientName = "SecretsManagerClient";
87
- const commandName = "RestoreSecretCommand";
88
- const handlerExecutionContext: HandlerExecutionContext = {
89
- logger,
90
- clientName,
91
- commandName,
92
- inputFilterSensitiveLog: RestoreSecretRequest.filterSensitiveLog,
93
- outputFilterSensitiveLog: RestoreSecretResponse.filterSensitiveLog,
94
- };
95
- const { requestHandler } = configuration;
96
- return stack.resolve(
97
- (request: FinalizeHandlerArguments<any>) =>
98
- requestHandler.handle(request.request as __HttpRequest, options || {}),
99
- handlerExecutionContext
100
- );
101
- }
102
-
103
- private serialize(input: RestoreSecretCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
104
- return serializeAws_json1_1RestoreSecretCommand(input, context);
105
- }
106
-
107
- private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<RestoreSecretCommandOutput> {
108
- return deserializeAws_json1_1RestoreSecretCommand(output, context);
109
- }
110
-
111
- // Start section: command_body_extra
112
- // End section: command_body_extra
113
- }
@@ -1,156 +0,0 @@
1
- import { getSerdePlugin } from "@aws-sdk/middleware-serde";
2
- import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
3
- import { Command as $Command } from "@aws-sdk/smithy-client";
4
- import {
5
- FinalizeHandlerArguments,
6
- Handler,
7
- HandlerExecutionContext,
8
- HttpHandlerOptions as __HttpHandlerOptions,
9
- MetadataBearer as __MetadataBearer,
10
- MiddlewareStack,
11
- SerdeContext as __SerdeContext,
12
- } from "@aws-sdk/types";
13
-
14
- import { RotateSecretRequest, RotateSecretResponse } from "../models/models_0";
15
- import {
16
- deserializeAws_json1_1RotateSecretCommand,
17
- serializeAws_json1_1RotateSecretCommand,
18
- } from "../protocols/Aws_json1_1";
19
- import { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";
20
-
21
- export interface RotateSecretCommandInput extends RotateSecretRequest {}
22
- export interface RotateSecretCommandOutput extends RotateSecretResponse, __MetadataBearer {}
23
-
24
- /**
25
- * <p>Configures and starts the asynchronous process of rotating this secret. If you include the
26
- * configuration parameters, the operation sets those values for the secret and then immediately
27
- * starts a rotation. If you do not include the configuration parameters, the operation starts a
28
- * rotation with the values already stored in the secret. After the rotation completes, the
29
- * protected service and its clients all use the new version of the secret. </p>
30
- * <p>This required configuration information includes the ARN of an Amazon Web Services Lambda function and
31
- * optionally, the time between scheduled rotations. The Lambda rotation function creates a new
32
- * version of the secret and creates or updates the credentials on the protected service to
33
- * match. After testing the new credentials, the function marks the new secret with the staging
34
- * label <code>AWSCURRENT</code> so that your clients all immediately begin to use the new version. For more
35
- * information about rotating secrets and how to configure a Lambda function to rotate the
36
- * 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
37
- * <i>Amazon Web Services Secrets Manager User Guide</i>.</p>
38
- * <p>Secrets Manager schedules the next rotation when the previous
39
- * one completes. Secrets Manager schedules the date by adding the rotation interval (number of days) to the
40
- * actual date of the last rotation. The service chooses the hour within that 24-hour date window
41
- * randomly. The minute is also chosen somewhat randomly, but weighted towards the top of the hour
42
- * and influenced by a variety of factors that help distribute load.</p>
43
- * <p>The
44
- * rotation function must end with the versions of the secret in one of two states:</p>
45
- * <ul>
46
- * <li>
47
- * <p>The <code>AWSPENDING</code> and <code>AWSCURRENT</code> staging labels are attached to the same version of
48
- * the secret, or</p>
49
- * </li>
50
- * <li>
51
- * <p>The <code>AWSPENDING</code> staging label is not attached to any version of the secret.</p>
52
- * </li>
53
- * </ul>
54
- * <p>If the <code>AWSPENDING</code> staging label is present but not attached to the same version as
55
- * <code>AWSCURRENT</code> then any later invocation of <code>RotateSecret</code> assumes that a previous
56
- * rotation request is still in progress and returns an error.</p>
57
- * <p>
58
- * <b>Minimum permissions</b>
59
- * </p>
60
- * <p>To run this command, you must have the following permissions:</p>
61
- * <ul>
62
- * <li>
63
- * <p>secretsmanager:RotateSecret</p>
64
- * </li>
65
- * <li>
66
- * <p>lambda:InvokeFunction (on the function specified in the secret's metadata)</p>
67
- * </li>
68
- * </ul>
69
- * <p>
70
- * <b>Related operations</b>
71
- * </p>
72
- * <ul>
73
- * <li>
74
- * <p>To list the secrets in your account, use <a>ListSecrets</a>.</p>
75
- * </li>
76
- * <li>
77
- * <p>To get the details for a version of a secret, use <a>DescribeSecret</a>.</p>
78
- * </li>
79
- * <li>
80
- * <p>To create a new version of a secret, use <a>CreateSecret</a>.</p>
81
- * </li>
82
- * <li>
83
- * <p>To attach staging labels to or remove staging labels from a version of a secret, use
84
- * <a>UpdateSecretVersionStage</a>.</p>
85
- * </li>
86
- * </ul>
87
- * @example
88
- * Use a bare-bones client and the command you need to make an API call.
89
- * ```javascript
90
- * import { SecretsManagerClient, RotateSecretCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import
91
- * // const { SecretsManagerClient, RotateSecretCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import
92
- * const client = new SecretsManagerClient(config);
93
- * const command = new RotateSecretCommand(input);
94
- * const response = await client.send(command);
95
- * ```
96
- *
97
- * @see {@link RotateSecretCommandInput} for command's `input` shape.
98
- * @see {@link RotateSecretCommandOutput} for command's `response` shape.
99
- * @see {@link SecretsManagerClientResolvedConfig | config} for command's `input` shape.
100
- *
101
- */
102
- export class RotateSecretCommand extends $Command<
103
- RotateSecretCommandInput,
104
- RotateSecretCommandOutput,
105
- SecretsManagerClientResolvedConfig
106
- > {
107
- // Start section: command_properties
108
- // End section: command_properties
109
-
110
- constructor(readonly input: RotateSecretCommandInput) {
111
- // Start section: command_constructor
112
- super();
113
- // End section: command_constructor
114
- }
115
-
116
- /**
117
- * @internal
118
- */
119
- resolveMiddleware(
120
- clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
121
- configuration: SecretsManagerClientResolvedConfig,
122
- options?: __HttpHandlerOptions
123
- ): Handler<RotateSecretCommandInput, RotateSecretCommandOutput> {
124
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
125
-
126
- const stack = clientStack.concat(this.middlewareStack);
127
-
128
- const { logger } = configuration;
129
- const clientName = "SecretsManagerClient";
130
- const commandName = "RotateSecretCommand";
131
- const handlerExecutionContext: HandlerExecutionContext = {
132
- logger,
133
- clientName,
134
- commandName,
135
- inputFilterSensitiveLog: RotateSecretRequest.filterSensitiveLog,
136
- outputFilterSensitiveLog: RotateSecretResponse.filterSensitiveLog,
137
- };
138
- const { requestHandler } = configuration;
139
- return stack.resolve(
140
- (request: FinalizeHandlerArguments<any>) =>
141
- requestHandler.handle(request.request as __HttpRequest, options || {}),
142
- handlerExecutionContext
143
- );
144
- }
145
-
146
- private serialize(input: RotateSecretCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
147
- return serializeAws_json1_1RotateSecretCommand(input, context);
148
- }
149
-
150
- private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<RotateSecretCommandOutput> {
151
- return deserializeAws_json1_1RotateSecretCommand(output, context);
152
- }
153
-
154
- // Start section: command_body_extra
155
- // End section: command_body_extra
156
- }