@depup/aws-sdk__client-secrets-manager 3.1010.0-depup.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 (159) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +39 -0
  3. package/changes.json +42 -0
  4. package/dist-cjs/auth/httpAuthSchemeProvider.js +46 -0
  5. package/dist-cjs/endpoint/endpointResolver.js +18 -0
  6. package/dist-cjs/endpoint/ruleset.js +7 -0
  7. package/dist-cjs/index.js +511 -0
  8. package/dist-cjs/models/SecretsManagerServiceException.js +12 -0
  9. package/dist-cjs/models/errors.js +184 -0
  10. package/dist-cjs/runtimeConfig.browser.js +38 -0
  11. package/dist-cjs/runtimeConfig.js +53 -0
  12. package/dist-cjs/runtimeConfig.native.js +15 -0
  13. package/dist-cjs/runtimeConfig.shared.js +43 -0
  14. package/dist-cjs/schemas/schemas_0.js +665 -0
  15. package/dist-es/SecretsManager.js +61 -0
  16. package/dist-es/SecretsManagerClient.js +50 -0
  17. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  18. package/dist-es/auth/httpAuthSchemeProvider.js +40 -0
  19. package/dist-es/commands/BatchGetSecretValueCommand.js +16 -0
  20. package/dist-es/commands/CancelRotateSecretCommand.js +16 -0
  21. package/dist-es/commands/CreateSecretCommand.js +16 -0
  22. package/dist-es/commands/DeleteResourcePolicyCommand.js +16 -0
  23. package/dist-es/commands/DeleteSecretCommand.js +16 -0
  24. package/dist-es/commands/DescribeSecretCommand.js +16 -0
  25. package/dist-es/commands/GetRandomPasswordCommand.js +16 -0
  26. package/dist-es/commands/GetResourcePolicyCommand.js +16 -0
  27. package/dist-es/commands/GetSecretValueCommand.js +16 -0
  28. package/dist-es/commands/ListSecretVersionIdsCommand.js +16 -0
  29. package/dist-es/commands/ListSecretsCommand.js +16 -0
  30. package/dist-es/commands/PutResourcePolicyCommand.js +16 -0
  31. package/dist-es/commands/PutSecretValueCommand.js +16 -0
  32. package/dist-es/commands/RemoveRegionsFromReplicationCommand.js +16 -0
  33. package/dist-es/commands/ReplicateSecretToRegionsCommand.js +16 -0
  34. package/dist-es/commands/RestoreSecretCommand.js +16 -0
  35. package/dist-es/commands/RotateSecretCommand.js +16 -0
  36. package/dist-es/commands/StopReplicationToReplicaCommand.js +16 -0
  37. package/dist-es/commands/TagResourceCommand.js +16 -0
  38. package/dist-es/commands/UntagResourceCommand.js +16 -0
  39. package/dist-es/commands/UpdateSecretCommand.js +16 -0
  40. package/dist-es/commands/UpdateSecretVersionStageCommand.js +16 -0
  41. package/dist-es/commands/ValidateResourcePolicyCommand.js +16 -0
  42. package/dist-es/commands/index.js +23 -0
  43. package/dist-es/endpoint/EndpointParameters.js +13 -0
  44. package/dist-es/endpoint/endpointResolver.js +14 -0
  45. package/dist-es/endpoint/ruleset.js +4 -0
  46. package/dist-es/extensionConfiguration.js +1 -0
  47. package/dist-es/index.js +9 -0
  48. package/dist-es/models/SecretsManagerServiceException.js +8 -0
  49. package/dist-es/models/enums.js +24 -0
  50. package/dist-es/models/errors.js +169 -0
  51. package/dist-es/models/models_0.js +1 -0
  52. package/dist-es/pagination/BatchGetSecretValuePaginator.js +4 -0
  53. package/dist-es/pagination/Interfaces.js +1 -0
  54. package/dist-es/pagination/ListSecretVersionIdsPaginator.js +4 -0
  55. package/dist-es/pagination/ListSecretsPaginator.js +4 -0
  56. package/dist-es/pagination/index.js +4 -0
  57. package/dist-es/runtimeConfig.browser.js +33 -0
  58. package/dist-es/runtimeConfig.js +48 -0
  59. package/dist-es/runtimeConfig.native.js +11 -0
  60. package/dist-es/runtimeConfig.shared.js +39 -0
  61. package/dist-es/runtimeExtensions.js +9 -0
  62. package/dist-es/schemas/schemas_0.js +661 -0
  63. package/dist-types/SecretsManager.d.ts +220 -0
  64. package/dist-types/SecretsManagerClient.d.ts +235 -0
  65. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  66. package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
  67. package/dist-types/commands/BatchGetSecretValueCommand.d.ts +210 -0
  68. package/dist-types/commands/CancelRotateSecretCommand.d.ts +135 -0
  69. package/dist-types/commands/CreateSecretCommand.d.ts +218 -0
  70. package/dist-types/commands/DeleteResourcePolicyCommand.d.ts +126 -0
  71. package/dist-types/commands/DeleteSecretCommand.d.ts +135 -0
  72. package/dist-types/commands/DescribeSecretCommand.d.ts +137 -0
  73. package/dist-types/commands/GetRandomPasswordCommand.d.ts +135 -0
  74. package/dist-types/commands/GetResourcePolicyCommand.d.ts +138 -0
  75. package/dist-types/commands/GetSecretValueCommand.d.ts +157 -0
  76. package/dist-types/commands/ListSecretVersionIdsCommand.d.ts +151 -0
  77. package/dist-types/commands/ListSecretsCommand.d.ts +208 -0
  78. package/dist-types/commands/PutResourcePolicyCommand.d.ts +147 -0
  79. package/dist-types/commands/PutSecretValueCommand.d.ts +183 -0
  80. package/dist-types/commands/RemoveRegionsFromReplicationCommand.d.ts +122 -0
  81. package/dist-types/commands/ReplicateSecretToRegionsCommand.d.ts +157 -0
  82. package/dist-types/commands/RestoreSecretCommand.d.ts +126 -0
  83. package/dist-types/commands/RotateSecretCommand.d.ts +180 -0
  84. package/dist-types/commands/StopReplicationToReplicaCommand.d.ts +111 -0
  85. package/dist-types/commands/TagResourceCommand.d.ts +145 -0
  86. package/dist-types/commands/UntagResourceCommand.d.ts +134 -0
  87. package/dist-types/commands/UpdateSecretCommand.d.ts +221 -0
  88. package/dist-types/commands/UpdateSecretVersionStageCommand.d.ts +187 -0
  89. package/dist-types/commands/ValidateResourcePolicyCommand.d.ts +161 -0
  90. package/dist-types/commands/index.d.ts +23 -0
  91. package/dist-types/endpoint/EndpointParameters.d.ts +50 -0
  92. package/dist-types/endpoint/endpointResolver.d.ts +8 -0
  93. package/dist-types/endpoint/ruleset.d.ts +2 -0
  94. package/dist-types/extensionConfiguration.d.ts +9 -0
  95. package/dist-types/index.d.ts +42 -0
  96. package/dist-types/models/SecretsManagerServiceException.d.ts +14 -0
  97. package/dist-types/models/enums.d.ts +56 -0
  98. package/dist-types/models/errors.d.ts +175 -0
  99. package/dist-types/models/models_0.d.ts +1957 -0
  100. package/dist-types/pagination/BatchGetSecretValuePaginator.d.ts +7 -0
  101. package/dist-types/pagination/Interfaces.d.ts +8 -0
  102. package/dist-types/pagination/ListSecretVersionIdsPaginator.d.ts +7 -0
  103. package/dist-types/pagination/ListSecretsPaginator.d.ts +7 -0
  104. package/dist-types/pagination/index.d.ts +4 -0
  105. package/dist-types/runtimeConfig.browser.d.ts +55 -0
  106. package/dist-types/runtimeConfig.d.ts +55 -0
  107. package/dist-types/runtimeConfig.native.d.ts +54 -0
  108. package/dist-types/runtimeConfig.shared.d.ts +27 -0
  109. package/dist-types/runtimeExtensions.d.ts +17 -0
  110. package/dist-types/schemas/schemas_0.d.ts +99 -0
  111. package/dist-types/ts3.4/SecretsManager.d.ts +426 -0
  112. package/dist-types/ts3.4/SecretsManagerClient.d.ts +258 -0
  113. package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  114. package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +47 -0
  115. package/dist-types/ts3.4/commands/BatchGetSecretValueCommand.d.ts +51 -0
  116. package/dist-types/ts3.4/commands/CancelRotateSecretCommand.d.ts +51 -0
  117. package/dist-types/ts3.4/commands/CreateSecretCommand.d.ts +47 -0
  118. package/dist-types/ts3.4/commands/DeleteResourcePolicyCommand.d.ts +51 -0
  119. package/dist-types/ts3.4/commands/DeleteSecretCommand.d.ts +47 -0
  120. package/dist-types/ts3.4/commands/DescribeSecretCommand.d.ts +50 -0
  121. package/dist-types/ts3.4/commands/GetRandomPasswordCommand.d.ts +51 -0
  122. package/dist-types/ts3.4/commands/GetResourcePolicyCommand.d.ts +51 -0
  123. package/dist-types/ts3.4/commands/GetSecretValueCommand.d.ts +50 -0
  124. package/dist-types/ts3.4/commands/ListSecretVersionIdsCommand.d.ts +51 -0
  125. package/dist-types/ts3.4/commands/ListSecretsCommand.d.ts +47 -0
  126. package/dist-types/ts3.4/commands/PutResourcePolicyCommand.d.ts +51 -0
  127. package/dist-types/ts3.4/commands/PutSecretValueCommand.d.ts +50 -0
  128. package/dist-types/ts3.4/commands/RemoveRegionsFromReplicationCommand.d.ts +51 -0
  129. package/dist-types/ts3.4/commands/ReplicateSecretToRegionsCommand.d.ts +51 -0
  130. package/dist-types/ts3.4/commands/RestoreSecretCommand.d.ts +50 -0
  131. package/dist-types/ts3.4/commands/RotateSecretCommand.d.ts +47 -0
  132. package/dist-types/ts3.4/commands/StopReplicationToReplicaCommand.d.ts +51 -0
  133. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +45 -0
  134. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +45 -0
  135. package/dist-types/ts3.4/commands/UpdateSecretCommand.d.ts +47 -0
  136. package/dist-types/ts3.4/commands/UpdateSecretVersionStageCommand.d.ts +51 -0
  137. package/dist-types/ts3.4/commands/ValidateResourcePolicyCommand.d.ts +51 -0
  138. package/dist-types/ts3.4/commands/index.d.ts +23 -0
  139. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +51 -0
  140. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  141. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  142. package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
  143. package/dist-types/ts3.4/index.d.ts +12 -0
  144. package/dist-types/ts3.4/models/SecretsManagerServiceException.d.ts +9 -0
  145. package/dist-types/ts3.4/models/enums.d.ts +29 -0
  146. package/dist-types/ts3.4/models/errors.d.ts +97 -0
  147. package/dist-types/ts3.4/models/models_0.d.ts +333 -0
  148. package/dist-types/ts3.4/pagination/BatchGetSecretValuePaginator.d.ts +11 -0
  149. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  150. package/dist-types/ts3.4/pagination/ListSecretVersionIdsPaginator.d.ts +11 -0
  151. package/dist-types/ts3.4/pagination/ListSecretsPaginator.d.ts +11 -0
  152. package/dist-types/ts3.4/pagination/index.d.ts +4 -0
  153. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +100 -0
  154. package/dist-types/ts3.4/runtimeConfig.d.ts +95 -0
  155. package/dist-types/ts3.4/runtimeConfig.native.d.ts +104 -0
  156. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +30 -0
  157. package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
  158. package/dist-types/ts3.4/schemas/schemas_0.d.ts +98 -0
  159. package/package.json +159 -0
@@ -0,0 +1,134 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import type { UntagResourceRequest } from "../models/models_0";
4
+ import type { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link UntagResourceCommand}.
14
+ */
15
+ export interface UntagResourceCommandInput extends UntagResourceRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link UntagResourceCommand}.
21
+ */
22
+ export interface UntagResourceCommandOutput extends __MetadataBearer {
23
+ }
24
+ declare const UntagResourceCommand_base: {
25
+ new (input: UntagResourceCommandInput): import("@smithy/smithy-client").CommandImpl<UntagResourceCommandInput, UntagResourceCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (input: UntagResourceCommandInput): import("@smithy/smithy-client").CommandImpl<UntagResourceCommandInput, UntagResourceCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Removes specific tags from a secret.</p>
31
+ * <p>This operation is idempotent. If a requested tag is not attached to the secret, no
32
+ * error is returned and the secret metadata is unchanged.</p>
33
+ * <important>
34
+ * <p>If you use tags as part of your security strategy, then removing a tag can change
35
+ * permissions. If successfully completing this operation would result in you losing
36
+ * your permissions for this secret, then the operation is blocked and returns an
37
+ * Access Denied error.</p>
38
+ * </important>
39
+ * <p>Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html">Logging Secrets Manager events with CloudTrail</a>.</p>
40
+ * <p>
41
+ * <b>Required permissions:
42
+ * </b>
43
+ * <code>secretsmanager:UntagResource</code>. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
44
+ * IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
45
+ * and access control in Secrets Manager</a>. </p>
46
+ * @example
47
+ * Use a bare-bones client and the command you need to make an API call.
48
+ * ```javascript
49
+ * import { SecretsManagerClient, UntagResourceCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import
50
+ * // const { SecretsManagerClient, UntagResourceCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import
51
+ * // import type { SecretsManagerClientConfig } from "@aws-sdk/client-secrets-manager";
52
+ * const config = {}; // type is SecretsManagerClientConfig
53
+ * const client = new SecretsManagerClient(config);
54
+ * const input = { // UntagResourceRequest
55
+ * SecretId: "STRING_VALUE", // required
56
+ * TagKeys: [ // TagKeyListType // required
57
+ * "STRING_VALUE",
58
+ * ],
59
+ * };
60
+ * const command = new UntagResourceCommand(input);
61
+ * const response = await client.send(command);
62
+ * // {};
63
+ *
64
+ * ```
65
+ *
66
+ * @param UntagResourceCommandInput - {@link UntagResourceCommandInput}
67
+ * @returns {@link UntagResourceCommandOutput}
68
+ * @see {@link UntagResourceCommandInput} for command's `input` shape.
69
+ * @see {@link UntagResourceCommandOutput} for command's `response` shape.
70
+ * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
71
+ *
72
+ * @throws {@link InternalServiceError} (server fault)
73
+ * <p>An error occurred on the server side.</p>
74
+ *
75
+ * @throws {@link InvalidParameterException} (client fault)
76
+ * <p>The parameter name or value is invalid.</p>
77
+ *
78
+ * @throws {@link InvalidRequestException} (client fault)
79
+ * <p>A parameter value is not valid for the current state of the
80
+ * resource.</p>
81
+ * <p>Possible causes:</p>
82
+ * <ul>
83
+ * <li>
84
+ * <p>The secret is scheduled for deletion.</p>
85
+ * </li>
86
+ * <li>
87
+ * <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
88
+ * ARN configured and you didn't include such an ARN as a parameter in this call. </p>
89
+ * </li>
90
+ * <li>
91
+ * <p>The secret is managed by another service, and you must use that service to update it.
92
+ * For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/service-linked-secrets.html">Secrets managed by other Amazon Web Services services</a>.</p>
93
+ * </li>
94
+ * </ul>
95
+ *
96
+ * @throws {@link ResourceNotFoundException} (client fault)
97
+ * <p>Secrets Manager can't find the resource that you asked for.</p>
98
+ *
99
+ * @throws {@link SecretsManagerServiceException}
100
+ * <p>Base exception class for all service exceptions from SecretsManager service.</p>
101
+ *
102
+ *
103
+ * @example To remove tags from a secret
104
+ * ```javascript
105
+ * // The following example shows how to remove two tags from a secret's metadata. For each, both the tag and the associated value are removed. There is no output from this API. To see the result, use the DescribeSecret operation.
106
+ * const input = {
107
+ * SecretId: "MyTestDatabaseSecret",
108
+ * TagKeys: [
109
+ * "FirstTag",
110
+ * "SecondTag"
111
+ * ]
112
+ * };
113
+ * const command = new UntagResourceCommand(input);
114
+ * const response = await client.send(command);
115
+ * /* response is
116
+ * { /* metadata only *\/ }
117
+ * *\/
118
+ * ```
119
+ *
120
+ * @public
121
+ */
122
+ export declare class UntagResourceCommand extends UntagResourceCommand_base {
123
+ /** @internal type navigation helper, not in runtime. */
124
+ protected static __types: {
125
+ api: {
126
+ input: UntagResourceRequest;
127
+ output: {};
128
+ };
129
+ sdk: {
130
+ input: UntagResourceCommandInput;
131
+ output: UntagResourceCommandOutput;
132
+ };
133
+ };
134
+ }
@@ -0,0 +1,221 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import type { UpdateSecretRequest, UpdateSecretResponse } from "../models/models_0";
4
+ import type { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link UpdateSecretCommand}.
14
+ */
15
+ export interface UpdateSecretCommandInput extends UpdateSecretRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link UpdateSecretCommand}.
21
+ */
22
+ export interface UpdateSecretCommandOutput extends UpdateSecretResponse, __MetadataBearer {
23
+ }
24
+ declare const UpdateSecretCommand_base: {
25
+ new (input: UpdateSecretCommandInput): import("@smithy/smithy-client").CommandImpl<UpdateSecretCommandInput, UpdateSecretCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (input: UpdateSecretCommandInput): import("@smithy/smithy-client").CommandImpl<UpdateSecretCommandInput, UpdateSecretCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Modifies the details of a secret, including metadata and the secret value. To change
31
+ * the secret value, you can also use <a>PutSecretValue</a>.</p>
32
+ * <p>To change the rotation configuration of a secret, use <a>RotateSecret</a>
33
+ * instead.</p>
34
+ * <p>To change a secret so that it is managed by another service, you need to recreate the
35
+ * secret in that service. See <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/service-linked-secrets.html">Secrets Manager secrets
36
+ * managed by other Amazon Web Services services</a>.</p>
37
+ * <p>We recommend you avoid calling <code>UpdateSecret</code> at a sustained rate of more
38
+ * than once every 10 minutes. When you call <code>UpdateSecret</code> to update the secret
39
+ * value, Secrets Manager creates a new version of the secret. Secrets Manager removes outdated versions when
40
+ * there are more than 100, but it does not remove versions created less than 24 hours ago.
41
+ * If you update the secret value more than once every 10 minutes, you create more versions
42
+ * than Secrets Manager removes, and you will reach the quota for secret versions.</p>
43
+ * <p>If you include <code>SecretString</code> or <code>SecretBinary</code> to create a new
44
+ * secret version, Secrets Manager automatically moves the staging label <code>AWSCURRENT</code> to
45
+ * the new version. Then it attaches the label <code>AWSPREVIOUS</code> to the version that
46
+ * <code>AWSCURRENT</code> was removed from.</p>
47
+ * <p>If you call this operation with a <code>ClientRequestToken</code> that matches an
48
+ * existing version's <code>VersionId</code>, the operation results in an error. You can't
49
+ * modify an existing version, you can only create a new version. To remove a version,
50
+ * remove all staging labels from it. See <a>UpdateSecretVersionStage</a>.</p>
51
+ * <p>Secrets Manager generates a CloudTrail log entry when you call this action.
52
+ * Do not include sensitive information in request parameters except
53
+ * <code>SecretBinary</code> or <code>SecretString</code> because it might be logged.
54
+ * For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html">Logging Secrets Manager events with CloudTrail</a>.</p>
55
+ * <p>
56
+ * <b>Required permissions:
57
+ * </b>
58
+ * <code>secretsmanager:UpdateSecret</code>. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
59
+ * IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
60
+ * and access control in Secrets Manager</a>. If you use a
61
+ * customer managed key, you must also have <code>kms:GenerateDataKey</code>,
62
+ * <code>kms:Encrypt</code>, and <code>kms:Decrypt</code> permissions on the key. If
63
+ * you change the KMS key and you don't have <code>kms:Encrypt</code> permission to the new
64
+ * key, Secrets Manager does not re-encrypt existing secret versions with the new key. For more
65
+ * information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/security-encryption.html"> Secret encryption
66
+ * and decryption</a>.</p>
67
+ * <important>
68
+ * <p>When you enter commands in a command shell, there is a risk of the command history being accessed or utilities having access to your command parameters. This is a concern if the command includes the value of a secret. Learn how to <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/security_cli-exposure-risks.html">Mitigate the risks of using command-line tools to store Secrets Manager secrets</a>.</p>
69
+ * </important>
70
+ * @example
71
+ * Use a bare-bones client and the command you need to make an API call.
72
+ * ```javascript
73
+ * import { SecretsManagerClient, UpdateSecretCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import
74
+ * // const { SecretsManagerClient, UpdateSecretCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import
75
+ * // import type { SecretsManagerClientConfig } from "@aws-sdk/client-secrets-manager";
76
+ * const config = {}; // type is SecretsManagerClientConfig
77
+ * const client = new SecretsManagerClient(config);
78
+ * const input = { // UpdateSecretRequest
79
+ * SecretId: "STRING_VALUE", // required
80
+ * ClientRequestToken: "STRING_VALUE",
81
+ * Description: "STRING_VALUE",
82
+ * KmsKeyId: "STRING_VALUE",
83
+ * SecretBinary: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
84
+ * SecretString: "STRING_VALUE",
85
+ * Type: "STRING_VALUE",
86
+ * };
87
+ * const command = new UpdateSecretCommand(input);
88
+ * const response = await client.send(command);
89
+ * // { // UpdateSecretResponse
90
+ * // ARN: "STRING_VALUE",
91
+ * // Name: "STRING_VALUE",
92
+ * // VersionId: "STRING_VALUE",
93
+ * // };
94
+ *
95
+ * ```
96
+ *
97
+ * @param UpdateSecretCommandInput - {@link UpdateSecretCommandInput}
98
+ * @returns {@link UpdateSecretCommandOutput}
99
+ * @see {@link UpdateSecretCommandInput} for command's `input` shape.
100
+ * @see {@link UpdateSecretCommandOutput} for command's `response` shape.
101
+ * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
102
+ *
103
+ * @throws {@link DecryptionFailure} (client fault)
104
+ * <p>Secrets Manager can't decrypt the protected secret text using the provided KMS key. </p>
105
+ *
106
+ * @throws {@link EncryptionFailure} (client fault)
107
+ * <p>Secrets Manager can't encrypt the protected secret text using the provided KMS key. Check that the
108
+ * KMS key is available, enabled, and not in an invalid state. For more
109
+ * information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key state: Effect on your KMS key</a>.</p>
110
+ *
111
+ * @throws {@link InternalServiceError} (server fault)
112
+ * <p>An error occurred on the server side.</p>
113
+ *
114
+ * @throws {@link InvalidParameterException} (client fault)
115
+ * <p>The parameter name or value is invalid.</p>
116
+ *
117
+ * @throws {@link InvalidRequestException} (client fault)
118
+ * <p>A parameter value is not valid for the current state of the
119
+ * resource.</p>
120
+ * <p>Possible causes:</p>
121
+ * <ul>
122
+ * <li>
123
+ * <p>The secret is scheduled for deletion.</p>
124
+ * </li>
125
+ * <li>
126
+ * <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
127
+ * ARN configured and you didn't include such an ARN as a parameter in this call. </p>
128
+ * </li>
129
+ * <li>
130
+ * <p>The secret is managed by another service, and you must use that service to update it.
131
+ * For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/service-linked-secrets.html">Secrets managed by other Amazon Web Services services</a>.</p>
132
+ * </li>
133
+ * </ul>
134
+ *
135
+ * @throws {@link LimitExceededException} (client fault)
136
+ * <p>The request failed because it would exceed one of the Secrets Manager quotas.</p>
137
+ *
138
+ * @throws {@link MalformedPolicyDocumentException} (client fault)
139
+ * <p>The resource policy has syntax errors.</p>
140
+ *
141
+ * @throws {@link PreconditionNotMetException} (client fault)
142
+ * <p>The request failed because you did not complete all the prerequisite steps.</p>
143
+ *
144
+ * @throws {@link ResourceExistsException} (client fault)
145
+ * <p>A resource with the ID you requested already exists.</p>
146
+ *
147
+ * @throws {@link ResourceNotFoundException} (client fault)
148
+ * <p>Secrets Manager can't find the resource that you asked for.</p>
149
+ *
150
+ * @throws {@link SecretsManagerServiceException}
151
+ * <p>Base exception class for all service exceptions from SecretsManager service.</p>
152
+ *
153
+ *
154
+ * @example To create a new version of the encrypted secret value
155
+ * ```javascript
156
+ * // The following example shows how to create a new version of the secret by updating the SecretString field. Alternatively, you can use the put-secret-value operation.
157
+ * const input = {
158
+ * SecretId: "MyTestDatabaseSecret",
159
+ * SecretString: "{JSON STRING WITH CREDENTIALS}"
160
+ * };
161
+ * const command = new UpdateSecretCommand(input);
162
+ * const response = await client.send(command);
163
+ * /* response is
164
+ * {
165
+ * ARN: "aws:arn:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
166
+ * Name: "MyTestDatabaseSecret",
167
+ * VersionId: "EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE"
168
+ * }
169
+ * *\/
170
+ * ```
171
+ *
172
+ * @example To update the description of a secret
173
+ * ```javascript
174
+ * // The following example shows how to modify the description of a secret.
175
+ * const input = {
176
+ * ClientRequestToken: "EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE",
177
+ * Description: "This is a new description for the secret.",
178
+ * SecretId: "MyTestDatabaseSecret"
179
+ * };
180
+ * const command = new UpdateSecretCommand(input);
181
+ * const response = await client.send(command);
182
+ * /* response is
183
+ * {
184
+ * ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
185
+ * Name: "MyTestDatabaseSecret"
186
+ * }
187
+ * *\/
188
+ * ```
189
+ *
190
+ * @example To update the KMS key associated with a secret
191
+ * ```javascript
192
+ * // This example shows how to update the KMS customer managed key (CMK) used to encrypt the secret value. The KMS CMK must be in the same region as the secret.
193
+ * const input = {
194
+ * KmsKeyId: "arn:aws:kms:us-west-2:123456789012:key/EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE",
195
+ * SecretId: "MyTestDatabaseSecret"
196
+ * };
197
+ * const command = new UpdateSecretCommand(input);
198
+ * const response = await client.send(command);
199
+ * /* response is
200
+ * {
201
+ * ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
202
+ * Name: "MyTestDatabaseSecret"
203
+ * }
204
+ * *\/
205
+ * ```
206
+ *
207
+ * @public
208
+ */
209
+ export declare class UpdateSecretCommand extends UpdateSecretCommand_base {
210
+ /** @internal type navigation helper, not in runtime. */
211
+ protected static __types: {
212
+ api: {
213
+ input: UpdateSecretRequest;
214
+ output: UpdateSecretResponse;
215
+ };
216
+ sdk: {
217
+ input: UpdateSecretCommandInput;
218
+ output: UpdateSecretCommandOutput;
219
+ };
220
+ };
221
+ }
@@ -0,0 +1,187 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import type { UpdateSecretVersionStageRequest, UpdateSecretVersionStageResponse } from "../models/models_0";
4
+ import type { SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SecretsManagerClient";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link UpdateSecretVersionStageCommand}.
14
+ */
15
+ export interface UpdateSecretVersionStageCommandInput extends UpdateSecretVersionStageRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link UpdateSecretVersionStageCommand}.
21
+ */
22
+ export interface UpdateSecretVersionStageCommandOutput extends UpdateSecretVersionStageResponse, __MetadataBearer {
23
+ }
24
+ declare const UpdateSecretVersionStageCommand_base: {
25
+ new (input: UpdateSecretVersionStageCommandInput): import("@smithy/smithy-client").CommandImpl<UpdateSecretVersionStageCommandInput, UpdateSecretVersionStageCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (input: UpdateSecretVersionStageCommandInput): import("@smithy/smithy-client").CommandImpl<UpdateSecretVersionStageCommandInput, UpdateSecretVersionStageCommandOutput, SecretsManagerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Modifies the staging labels attached to a version of a secret. Secrets Manager uses staging
31
+ * labels to track a version as it progresses through the secret rotation process. Each
32
+ * staging label can be attached to only one version at a time. To add a staging label to a
33
+ * version when it is already attached to another version, Secrets Manager first removes it from the
34
+ * other version first and then attaches it to this one. For more information about
35
+ * versions and staging labels, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/getting-started.html#term_version">Concepts:
36
+ * Version</a>. </p>
37
+ * <p>The staging labels that you specify in the <code>VersionStage</code> parameter are
38
+ * added to the existing list of staging labels for the version. </p>
39
+ * <p>You can move the <code>AWSCURRENT</code> staging label to this version by including it
40
+ * in this call.</p>
41
+ * <note>
42
+ * <p>Whenever you move <code>AWSCURRENT</code>, Secrets Manager automatically moves the label
43
+ * <code>AWSPREVIOUS</code> to the version that <code>AWSCURRENT</code> was removed
44
+ * from.</p>
45
+ * </note>
46
+ * <p>If this action results in the last label being removed from a version, then the
47
+ * version is considered to be 'deprecated' and can be deleted by Secrets Manager.</p>
48
+ * <p>Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html">Logging Secrets Manager events with CloudTrail</a>.</p>
49
+ * <p>
50
+ * <b>Required permissions:
51
+ * </b>
52
+ * <code>secretsmanager:UpdateSecretVersionStage</code>. For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
53
+ * IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
54
+ * and access control in Secrets Manager</a>. </p>
55
+ * @example
56
+ * Use a bare-bones client and the command you need to make an API call.
57
+ * ```javascript
58
+ * import { SecretsManagerClient, UpdateSecretVersionStageCommand } from "@aws-sdk/client-secrets-manager"; // ES Modules import
59
+ * // const { SecretsManagerClient, UpdateSecretVersionStageCommand } = require("@aws-sdk/client-secrets-manager"); // CommonJS import
60
+ * // import type { SecretsManagerClientConfig } from "@aws-sdk/client-secrets-manager";
61
+ * const config = {}; // type is SecretsManagerClientConfig
62
+ * const client = new SecretsManagerClient(config);
63
+ * const input = { // UpdateSecretVersionStageRequest
64
+ * SecretId: "STRING_VALUE", // required
65
+ * VersionStage: "STRING_VALUE", // required
66
+ * RemoveFromVersionId: "STRING_VALUE",
67
+ * MoveToVersionId: "STRING_VALUE",
68
+ * };
69
+ * const command = new UpdateSecretVersionStageCommand(input);
70
+ * const response = await client.send(command);
71
+ * // { // UpdateSecretVersionStageResponse
72
+ * // ARN: "STRING_VALUE",
73
+ * // Name: "STRING_VALUE",
74
+ * // };
75
+ *
76
+ * ```
77
+ *
78
+ * @param UpdateSecretVersionStageCommandInput - {@link UpdateSecretVersionStageCommandInput}
79
+ * @returns {@link UpdateSecretVersionStageCommandOutput}
80
+ * @see {@link UpdateSecretVersionStageCommandInput} for command's `input` shape.
81
+ * @see {@link UpdateSecretVersionStageCommandOutput} for command's `response` shape.
82
+ * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
83
+ *
84
+ * @throws {@link InternalServiceError} (server fault)
85
+ * <p>An error occurred on the server side.</p>
86
+ *
87
+ * @throws {@link InvalidParameterException} (client fault)
88
+ * <p>The parameter name or value is invalid.</p>
89
+ *
90
+ * @throws {@link InvalidRequestException} (client fault)
91
+ * <p>A parameter value is not valid for the current state of the
92
+ * resource.</p>
93
+ * <p>Possible causes:</p>
94
+ * <ul>
95
+ * <li>
96
+ * <p>The secret is scheduled for deletion.</p>
97
+ * </li>
98
+ * <li>
99
+ * <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
100
+ * ARN configured and you didn't include such an ARN as a parameter in this call. </p>
101
+ * </li>
102
+ * <li>
103
+ * <p>The secret is managed by another service, and you must use that service to update it.
104
+ * For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/service-linked-secrets.html">Secrets managed by other Amazon Web Services services</a>.</p>
105
+ * </li>
106
+ * </ul>
107
+ *
108
+ * @throws {@link LimitExceededException} (client fault)
109
+ * <p>The request failed because it would exceed one of the Secrets Manager quotas.</p>
110
+ *
111
+ * @throws {@link ResourceNotFoundException} (client fault)
112
+ * <p>Secrets Manager can't find the resource that you asked for.</p>
113
+ *
114
+ * @throws {@link SecretsManagerServiceException}
115
+ * <p>Base exception class for all service exceptions from SecretsManager service.</p>
116
+ *
117
+ *
118
+ * @example To add a staging label attached to a version of a secret
119
+ * ```javascript
120
+ * // The following example shows you how to add a staging label to a version of a secret. You can review the results by running the operation ListSecretVersionIds and viewing the VersionStages response field for the affected version.
121
+ * const input = {
122
+ * MoveToVersionId: "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1",
123
+ * SecretId: "MyTestDatabaseSecret",
124
+ * VersionStage: "STAGINGLABEL1"
125
+ * };
126
+ * const command = new UpdateSecretVersionStageCommand(input);
127
+ * const response = await client.send(command);
128
+ * /* response is
129
+ * {
130
+ * ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
131
+ * Name: "MyTestDatabaseSecret"
132
+ * }
133
+ * *\/
134
+ * ```
135
+ *
136
+ * @example To delete a staging label attached to a version of a secret
137
+ * ```javascript
138
+ * // The following example shows you how to delete a staging label that is attached to a version of a secret. You can review the results by running the operation ListSecretVersionIds and viewing the VersionStages response field for the affected version.
139
+ * const input = {
140
+ * RemoveFromVersionId: "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1",
141
+ * SecretId: "MyTestDatabaseSecret",
142
+ * VersionStage: "STAGINGLABEL1"
143
+ * };
144
+ * const command = new UpdateSecretVersionStageCommand(input);
145
+ * const response = await client.send(command);
146
+ * /* response is
147
+ * {
148
+ * ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
149
+ * Name: "MyTestDatabaseSecret"
150
+ * }
151
+ * *\/
152
+ * ```
153
+ *
154
+ * @example To move a staging label from one version of a secret to another
155
+ * ```javascript
156
+ * // The following example shows you how to move a staging label that is attached to one version of a secret to a different version. You can review the results by running the operation ListSecretVersionIds and viewing the VersionStages response field for the affected version.
157
+ * const input = {
158
+ * MoveToVersionId: "EXAMPLE2-90ab-cdef-fedc-ba987SECRET2",
159
+ * RemoveFromVersionId: "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1",
160
+ * SecretId: "MyTestDatabaseSecret",
161
+ * VersionStage: "AWSCURRENT"
162
+ * };
163
+ * const command = new UpdateSecretVersionStageCommand(input);
164
+ * const response = await client.send(command);
165
+ * /* response is
166
+ * {
167
+ * ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
168
+ * Name: "MyTestDatabaseSecret"
169
+ * }
170
+ * *\/
171
+ * ```
172
+ *
173
+ * @public
174
+ */
175
+ export declare class UpdateSecretVersionStageCommand extends UpdateSecretVersionStageCommand_base {
176
+ /** @internal type navigation helper, not in runtime. */
177
+ protected static __types: {
178
+ api: {
179
+ input: UpdateSecretVersionStageRequest;
180
+ output: UpdateSecretVersionStageResponse;
181
+ };
182
+ sdk: {
183
+ input: UpdateSecretVersionStageCommandInput;
184
+ output: UpdateSecretVersionStageCommandOutput;
185
+ };
186
+ };
187
+ }