@aws-sdk/client-secrets-manager 3.288.0 → 3.290.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 (27) hide show
  1. package/dist-cjs/endpoint/ruleset.js +3 -3
  2. package/dist-es/endpoint/ruleset.js +3 -3
  3. package/dist-types/commands/CancelRotateSecretCommand.d.ts +45 -0
  4. package/dist-types/commands/CreateSecretCommand.d.ts +69 -0
  5. package/dist-types/commands/DeleteResourcePolicyCommand.d.ts +45 -0
  6. package/dist-types/commands/DeleteSecretCommand.d.ts +47 -0
  7. package/dist-types/commands/DescribeSecretCommand.d.ts +58 -0
  8. package/dist-types/commands/GetRandomPasswordCommand.d.ts +43 -0
  9. package/dist-types/commands/GetResourcePolicyCommand.d.ts +46 -0
  10. package/dist-types/commands/GetSecretValueCommand.d.ts +54 -0
  11. package/dist-types/commands/ListSecretVersionIdsCommand.d.ts +51 -0
  12. package/dist-types/commands/ListSecretsCommand.d.ts +47 -0
  13. package/dist-types/commands/PutResourcePolicyCommand.d.ts +52 -0
  14. package/dist-types/commands/PutSecretValueCommand.d.ts +65 -0
  15. package/dist-types/commands/RemoveRegionsFromReplicationCommand.d.ts +28 -0
  16. package/dist-types/commands/ReplicateSecretToRegionsCommand.d.ts +28 -0
  17. package/dist-types/commands/RestoreSecretCommand.d.ts +45 -0
  18. package/dist-types/commands/RotateSecretCommand.d.ts +69 -0
  19. package/dist-types/commands/StopReplicationToReplicaCommand.d.ts +28 -0
  20. package/dist-types/commands/TagResourceCommand.d.ts +49 -0
  21. package/dist-types/commands/UntagResourceCommand.d.ts +43 -0
  22. package/dist-types/commands/UpdateSecretCommand.d.ts +104 -0
  23. package/dist-types/commands/UpdateSecretVersionStageCommand.d.ts +89 -0
  24. package/dist-types/commands/ValidateResourcePolicyCommand.d.ts +49 -0
  25. package/dist-types/endpoint/EndpointParameters.d.ts +1 -1
  26. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +1 -1
  27. package/package.json +29 -29
@@ -40,6 +40,58 @@ export interface PutResourcePolicyCommandOutput extends PutResourcePolicyRespons
40
40
  * @see {@link PutResourcePolicyCommandOutput} for command's `response` shape.
41
41
  * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
42
42
  *
43
+ * @throws {@link InternalServiceError} (server fault)
44
+ * <p>An error occurred on the server side.</p>
45
+ *
46
+ * @throws {@link InvalidParameterException} (client fault)
47
+ * <p>The parameter name or value is invalid.</p>
48
+ *
49
+ * @throws {@link InvalidRequestException} (client fault)
50
+ * <p>A parameter value is not valid for the current state of the
51
+ * resource.</p>
52
+ * <p>Possible causes:</p>
53
+ * <ul>
54
+ * <li>
55
+ * <p>The secret is scheduled for deletion.</p>
56
+ * </li>
57
+ * <li>
58
+ * <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
59
+ * ARN configured and you didn't include such an ARN as a parameter in this call. </p>
60
+ * </li>
61
+ * <li>
62
+ * <p>The secret is managed by another service, and you must use that service to update it.
63
+ * 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>
64
+ * </li>
65
+ * </ul>
66
+ *
67
+ * @throws {@link MalformedPolicyDocumentException} (client fault)
68
+ * <p>The resource policy has syntax errors.</p>
69
+ *
70
+ * @throws {@link PublicPolicyException} (client fault)
71
+ * <p>The <code>BlockPublicPolicy</code> parameter is set to true, and the resource policy did not prevent broad access to the secret.</p>
72
+ *
73
+ * @throws {@link ResourceNotFoundException} (client fault)
74
+ * <p>Secrets Manager can't find the resource that you asked for.</p>
75
+ *
76
+ *
77
+ * @example To add a resource-based policy to a secret
78
+ * ```javascript
79
+ * // The following example shows how to add a resource-based policy to a secret.
80
+ * const input = {
81
+ * "ResourcePolicy": "{\n\"Version\":\"2012-10-17\",\n\"Statement\":[{\n\"Effect\":\"Allow\",\n\"Principal\":{\n\"AWS\":\"arn:aws:iam::123456789012:root\"\n},\n\"Action\":\"secretsmanager:GetSecretValue\",\n\"Resource\":\"*\"\n}]\n}",
82
+ * "SecretId": "MyTestDatabaseSecret"
83
+ * };
84
+ * const command = new PutResourcePolicyCommand(input);
85
+ * const response = await client.send(command);
86
+ * /* response ==
87
+ * {
88
+ * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
89
+ * "Name": "MyTestDatabaseSecret"
90
+ * }
91
+ * *\/
92
+ * // example id: to-add-a-resource-based-policy-to-a-secret-1530209881839
93
+ * ```
94
+ *
43
95
  */
44
96
  export declare class PutResourcePolicyCommand extends $Command<PutResourcePolicyCommandInput, PutResourcePolicyCommandOutput, SecretsManagerClientResolvedConfig> {
45
97
  readonly input: PutResourcePolicyCommandInput;
@@ -56,6 +56,71 @@ export interface PutSecretValueCommandOutput extends PutSecretValueResponse, __M
56
56
  * @see {@link PutSecretValueCommandOutput} for command's `response` shape.
57
57
  * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
58
58
  *
59
+ * @throws {@link DecryptionFailure} (client fault)
60
+ * <p>Secrets Manager can't decrypt the protected secret text using the provided KMS key. </p>
61
+ *
62
+ * @throws {@link EncryptionFailure} (client fault)
63
+ * <p>Secrets Manager can't encrypt the protected secret text using the provided KMS key. Check that the
64
+ * KMS key is available, enabled, and not in an invalid state. For more
65
+ * information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key state: Effect on your KMS key</a>.</p>
66
+ *
67
+ * @throws {@link InternalServiceError} (server fault)
68
+ * <p>An error occurred on the server side.</p>
69
+ *
70
+ * @throws {@link InvalidParameterException} (client fault)
71
+ * <p>The parameter name or value is invalid.</p>
72
+ *
73
+ * @throws {@link InvalidRequestException} (client fault)
74
+ * <p>A parameter value is not valid for the current state of the
75
+ * resource.</p>
76
+ * <p>Possible causes:</p>
77
+ * <ul>
78
+ * <li>
79
+ * <p>The secret is scheduled for deletion.</p>
80
+ * </li>
81
+ * <li>
82
+ * <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
83
+ * ARN configured and you didn't include such an ARN as a parameter in this call. </p>
84
+ * </li>
85
+ * <li>
86
+ * <p>The secret is managed by another service, and you must use that service to update it.
87
+ * 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>
88
+ * </li>
89
+ * </ul>
90
+ *
91
+ * @throws {@link LimitExceededException} (client fault)
92
+ * <p>The request failed because it would exceed one of the Secrets Manager quotas.</p>
93
+ *
94
+ * @throws {@link ResourceExistsException} (client fault)
95
+ * <p>A resource with the ID you requested already exists.</p>
96
+ *
97
+ * @throws {@link ResourceNotFoundException} (client fault)
98
+ * <p>Secrets Manager can't find the resource that you asked for.</p>
99
+ *
100
+ *
101
+ * @example To store a secret value in a new version of a secret
102
+ * ```javascript
103
+ * // The following example shows how to create a new version of the secret. Alternatively, you can use the update-secret command.
104
+ * const input = {
105
+ * "ClientRequestToken": "EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE",
106
+ * "SecretId": "MyTestDatabaseSecret",
107
+ * "SecretString": "{\"username\":\"david\",\"password\":\"EXAMPLE-PASSWORD\"}"
108
+ * };
109
+ * const command = new PutSecretValueCommand(input);
110
+ * const response = await client.send(command);
111
+ * /* response ==
112
+ * {
113
+ * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
114
+ * "Name": "MyTestDatabaseSecret",
115
+ * "VersionId": "EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE",
116
+ * "VersionStages": [
117
+ * "AWSCURRENT"
118
+ * ]
119
+ * }
120
+ * *\/
121
+ * // example id: to-store-a-secret-value-in-a-new-version-of-a-secret-1524001393971
122
+ * ```
123
+ *
59
124
  */
60
125
  export declare class PutSecretValueCommand extends $Command<PutSecretValueCommandInput, PutSecretValueCommandOutput, SecretsManagerClientResolvedConfig> {
61
126
  readonly input: PutSecretValueCommandInput;
@@ -36,6 +36,34 @@ export interface RemoveRegionsFromReplicationCommandOutput extends RemoveRegions
36
36
  * @see {@link RemoveRegionsFromReplicationCommandOutput} for command's `response` shape.
37
37
  * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
38
38
  *
39
+ * @throws {@link InternalServiceError} (server fault)
40
+ * <p>An error occurred on the server side.</p>
41
+ *
42
+ * @throws {@link InvalidParameterException} (client fault)
43
+ * <p>The parameter name or value is invalid.</p>
44
+ *
45
+ * @throws {@link InvalidRequestException} (client fault)
46
+ * <p>A parameter value is not valid for the current state of the
47
+ * resource.</p>
48
+ * <p>Possible causes:</p>
49
+ * <ul>
50
+ * <li>
51
+ * <p>The secret is scheduled for deletion.</p>
52
+ * </li>
53
+ * <li>
54
+ * <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
55
+ * ARN configured and you didn't include such an ARN as a parameter in this call. </p>
56
+ * </li>
57
+ * <li>
58
+ * <p>The secret is managed by another service, and you must use that service to update it.
59
+ * 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>
60
+ * </li>
61
+ * </ul>
62
+ *
63
+ * @throws {@link ResourceNotFoundException} (client fault)
64
+ * <p>Secrets Manager can't find the resource that you asked for.</p>
65
+ *
66
+ *
39
67
  */
40
68
  export declare class RemoveRegionsFromReplicationCommand extends $Command<RemoveRegionsFromReplicationCommandInput, RemoveRegionsFromReplicationCommandOutput, SecretsManagerClientResolvedConfig> {
41
69
  readonly input: RemoveRegionsFromReplicationCommandInput;
@@ -36,6 +36,34 @@ export interface ReplicateSecretToRegionsCommandOutput extends ReplicateSecretTo
36
36
  * @see {@link ReplicateSecretToRegionsCommandOutput} for command's `response` shape.
37
37
  * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
38
38
  *
39
+ * @throws {@link InternalServiceError} (server fault)
40
+ * <p>An error occurred on the server side.</p>
41
+ *
42
+ * @throws {@link InvalidParameterException} (client fault)
43
+ * <p>The parameter name or value is invalid.</p>
44
+ *
45
+ * @throws {@link InvalidRequestException} (client fault)
46
+ * <p>A parameter value is not valid for the current state of the
47
+ * resource.</p>
48
+ * <p>Possible causes:</p>
49
+ * <ul>
50
+ * <li>
51
+ * <p>The secret is scheduled for deletion.</p>
52
+ * </li>
53
+ * <li>
54
+ * <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
55
+ * ARN configured and you didn't include such an ARN as a parameter in this call. </p>
56
+ * </li>
57
+ * <li>
58
+ * <p>The secret is managed by another service, and you must use that service to update it.
59
+ * 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>
60
+ * </li>
61
+ * </ul>
62
+ *
63
+ * @throws {@link ResourceNotFoundException} (client fault)
64
+ * <p>Secrets Manager can't find the resource that you asked for.</p>
65
+ *
66
+ *
39
67
  */
40
68
  export declare class ReplicateSecretToRegionsCommand extends $Command<ReplicateSecretToRegionsCommandInput, ReplicateSecretToRegionsCommandOutput, SecretsManagerClientResolvedConfig> {
41
69
  readonly input: ReplicateSecretToRegionsCommandInput;
@@ -37,6 +37,51 @@ export interface RestoreSecretCommandOutput extends RestoreSecretResponse, __Met
37
37
  * @see {@link RestoreSecretCommandOutput} for command's `response` shape.
38
38
  * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
39
39
  *
40
+ * @throws {@link InternalServiceError} (server fault)
41
+ * <p>An error occurred on the server side.</p>
42
+ *
43
+ * @throws {@link InvalidParameterException} (client fault)
44
+ * <p>The parameter name or value is invalid.</p>
45
+ *
46
+ * @throws {@link InvalidRequestException} (client fault)
47
+ * <p>A parameter value is not valid for the current state of the
48
+ * resource.</p>
49
+ * <p>Possible causes:</p>
50
+ * <ul>
51
+ * <li>
52
+ * <p>The secret is scheduled for deletion.</p>
53
+ * </li>
54
+ * <li>
55
+ * <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
56
+ * ARN configured and you didn't include such an ARN as a parameter in this call. </p>
57
+ * </li>
58
+ * <li>
59
+ * <p>The secret is managed by another service, and you must use that service to update it.
60
+ * 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>
61
+ * </li>
62
+ * </ul>
63
+ *
64
+ * @throws {@link ResourceNotFoundException} (client fault)
65
+ * <p>Secrets Manager can't find the resource that you asked for.</p>
66
+ *
67
+ *
68
+ * @example To restore a previously deleted secret
69
+ * ```javascript
70
+ * // The following example shows how to restore a secret that you previously scheduled for deletion.
71
+ * const input = {
72
+ * "SecretId": "MyTestDatabaseSecret"
73
+ * };
74
+ * const command = new RestoreSecretCommand(input);
75
+ * const response = await client.send(command);
76
+ * /* response ==
77
+ * {
78
+ * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
79
+ * "Name": "MyTestDatabaseSecret"
80
+ * }
81
+ * *\/
82
+ * // example id: to-restore-a-previously-deleted-secret-1524001513930
83
+ * ```
84
+ *
40
85
  */
41
86
  export declare class RestoreSecretCommand extends $Command<RestoreSecretCommandInput, RestoreSecretCommandOutput, SecretsManagerClientResolvedConfig> {
42
87
  readonly input: RestoreSecretCommandInput;
@@ -44,6 +44,75 @@ export interface RotateSecretCommandOutput extends RotateSecretResponse, __Metad
44
44
  * @see {@link RotateSecretCommandOutput} for command's `response` shape.
45
45
  * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
46
46
  *
47
+ * @throws {@link InternalServiceError} (server fault)
48
+ * <p>An error occurred on the server side.</p>
49
+ *
50
+ * @throws {@link InvalidParameterException} (client fault)
51
+ * <p>The parameter name or value is invalid.</p>
52
+ *
53
+ * @throws {@link InvalidRequestException} (client fault)
54
+ * <p>A parameter value is not valid for the current state of the
55
+ * resource.</p>
56
+ * <p>Possible causes:</p>
57
+ * <ul>
58
+ * <li>
59
+ * <p>The secret is scheduled for deletion.</p>
60
+ * </li>
61
+ * <li>
62
+ * <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
63
+ * ARN configured and you didn't include such an ARN as a parameter in this call. </p>
64
+ * </li>
65
+ * <li>
66
+ * <p>The secret is managed by another service, and you must use that service to update it.
67
+ * 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>
68
+ * </li>
69
+ * </ul>
70
+ *
71
+ * @throws {@link ResourceNotFoundException} (client fault)
72
+ * <p>Secrets Manager can't find the resource that you asked for.</p>
73
+ *
74
+ *
75
+ * @example To configure rotation for a secret
76
+ * ```javascript
77
+ * // The following example configures rotation for a secret using a cron expression. The first rotation happens immediately after the changes are stored in the secret. The rotation schedule is the first and 15th day of every month. The rotation window begins at 4:00 PM UTC and ends at 6:00 PM.
78
+ * const input = {
79
+ * "RotationLambdaARN": "arn:aws:lambda:us-west-2:123456789012:function:MyTestDatabaseRotationLambda",
80
+ * "RotationRules": {
81
+ * "Duration": "2h",
82
+ * "ScheduleExpression": "cron(0 16 1,15 * ? *)"
83
+ * },
84
+ * "SecretId": "MyTestDatabaseSecret"
85
+ * };
86
+ * const command = new RotateSecretCommand(input);
87
+ * const response = await client.send(command);
88
+ * /* response ==
89
+ * {
90
+ * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
91
+ * "Name": "MyTestDatabaseSecret",
92
+ * "VersionId": "EXAMPLE2-90ab-cdef-fedc-ba987SECRET2"
93
+ * }
94
+ * *\/
95
+ * // example id: to-configure-rotation-for-a-secret-1524001629475
96
+ * ```
97
+ *
98
+ * @example To request an immediate rotation for a secret
99
+ * ```javascript
100
+ * // The following example requests an immediate invocation of the secret's Lambda rotation function. It assumes that the specified secret already has rotation configured. The rotation function runs asynchronously in the background.
101
+ * const input = {
102
+ * "SecretId": "MyTestDatabaseSecret"
103
+ * };
104
+ * const command = new RotateSecretCommand(input);
105
+ * const response = await client.send(command);
106
+ * /* response ==
107
+ * {
108
+ * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
109
+ * "Name": "MyTestDatabaseSecret",
110
+ * "VersionId": "EXAMPLE2-90ab-cdef-fedc-ba987SECRET2"
111
+ * }
112
+ * *\/
113
+ * // example id: to-request-an-immediate-rotation-for-a-secret-1524001949004
114
+ * ```
115
+ *
47
116
  */
48
117
  export declare class RotateSecretCommand extends $Command<RotateSecretCommandInput, RotateSecretCommandOutput, SecretsManagerClientResolvedConfig> {
49
118
  readonly input: RotateSecretCommandInput;
@@ -37,6 +37,34 @@ export interface StopReplicationToReplicaCommandOutput extends StopReplicationTo
37
37
  * @see {@link StopReplicationToReplicaCommandOutput} for command's `response` shape.
38
38
  * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
39
39
  *
40
+ * @throws {@link InternalServiceError} (server fault)
41
+ * <p>An error occurred on the server side.</p>
42
+ *
43
+ * @throws {@link InvalidParameterException} (client fault)
44
+ * <p>The parameter name or value is invalid.</p>
45
+ *
46
+ * @throws {@link InvalidRequestException} (client fault)
47
+ * <p>A parameter value is not valid for the current state of the
48
+ * resource.</p>
49
+ * <p>Possible causes:</p>
50
+ * <ul>
51
+ * <li>
52
+ * <p>The secret is scheduled for deletion.</p>
53
+ * </li>
54
+ * <li>
55
+ * <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
56
+ * ARN configured and you didn't include such an ARN as a parameter in this call. </p>
57
+ * </li>
58
+ * <li>
59
+ * <p>The secret is managed by another service, and you must use that service to update it.
60
+ * 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>
61
+ * </li>
62
+ * </ul>
63
+ *
64
+ * @throws {@link ResourceNotFoundException} (client fault)
65
+ * <p>Secrets Manager can't find the resource that you asked for.</p>
66
+ *
67
+ *
40
68
  */
41
69
  export declare class StopReplicationToReplicaCommand extends $Command<StopReplicationToReplicaCommandInput, StopReplicationToReplicaCommandOutput, SecretsManagerClientResolvedConfig> {
42
70
  readonly input: StopReplicationToReplicaCommandInput;
@@ -69,6 +69,55 @@ export interface TagResourceCommandOutput extends __MetadataBearer {
69
69
  * @see {@link TagResourceCommandOutput} for command's `response` shape.
70
70
  * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
71
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
+ *
100
+ * @example To add tags to a secret
101
+ * ```javascript
102
+ * // The following example shows how to attach two tags each with a Key and Value to a secret. There is no output from this API. To see the result, use the DescribeSecret operation.
103
+ * const input = {
104
+ * "SecretId": "MyExampleSecret",
105
+ * "Tags": [
106
+ * {
107
+ * "Key": "FirstTag",
108
+ * "Value": "SomeValue"
109
+ * },
110
+ * {
111
+ * "Key": "SecondTag",
112
+ * "Value": "AnotherValue"
113
+ * }
114
+ * ]
115
+ * };
116
+ * const command = new TagResourceCommand(input);
117
+ * await client.send(command);
118
+ * // example id: to-add-tags-to-a-secret-1524002106718
119
+ * ```
120
+ *
72
121
  */
73
122
  export declare class TagResourceCommand extends $Command<TagResourceCommandInput, TagResourceCommandOutput, SecretsManagerClientResolvedConfig> {
74
123
  readonly input: TagResourceCommandInput;
@@ -44,6 +44,49 @@ export interface UntagResourceCommandOutput extends __MetadataBearer {
44
44
  * @see {@link UntagResourceCommandOutput} for command's `response` shape.
45
45
  * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
46
46
  *
47
+ * @throws {@link InternalServiceError} (server fault)
48
+ * <p>An error occurred on the server side.</p>
49
+ *
50
+ * @throws {@link InvalidParameterException} (client fault)
51
+ * <p>The parameter name or value is invalid.</p>
52
+ *
53
+ * @throws {@link InvalidRequestException} (client fault)
54
+ * <p>A parameter value is not valid for the current state of the
55
+ * resource.</p>
56
+ * <p>Possible causes:</p>
57
+ * <ul>
58
+ * <li>
59
+ * <p>The secret is scheduled for deletion.</p>
60
+ * </li>
61
+ * <li>
62
+ * <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
63
+ * ARN configured and you didn't include such an ARN as a parameter in this call. </p>
64
+ * </li>
65
+ * <li>
66
+ * <p>The secret is managed by another service, and you must use that service to update it.
67
+ * 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>
68
+ * </li>
69
+ * </ul>
70
+ *
71
+ * @throws {@link ResourceNotFoundException} (client fault)
72
+ * <p>Secrets Manager can't find the resource that you asked for.</p>
73
+ *
74
+ *
75
+ * @example To remove tags from a secret
76
+ * ```javascript
77
+ * // 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.
78
+ * const input = {
79
+ * "SecretId": "MyTestDatabaseSecret",
80
+ * "TagKeys": [
81
+ * "FirstTag",
82
+ * "SecondTag"
83
+ * ]
84
+ * };
85
+ * const command = new UntagResourceCommand(input);
86
+ * await client.send(command);
87
+ * // example id: to-remove-tags-from-a-secret-1524002239065
88
+ * ```
89
+ *
47
90
  */
48
91
  export declare class UntagResourceCommand extends $Command<UntagResourceCommandInput, UntagResourceCommandOutput, SecretsManagerClientResolvedConfig> {
49
92
  readonly input: UntagResourceCommandInput;
@@ -55,6 +55,110 @@ export interface UpdateSecretCommandOutput extends UpdateSecretResponse, __Metad
55
55
  * @see {@link UpdateSecretCommandOutput} for command's `response` shape.
56
56
  * @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
57
57
  *
58
+ * @throws {@link DecryptionFailure} (client fault)
59
+ * <p>Secrets Manager can't decrypt the protected secret text using the provided KMS key. </p>
60
+ *
61
+ * @throws {@link EncryptionFailure} (client fault)
62
+ * <p>Secrets Manager can't encrypt the protected secret text using the provided KMS key. Check that the
63
+ * KMS key is available, enabled, and not in an invalid state. For more
64
+ * information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key state: Effect on your KMS key</a>.</p>
65
+ *
66
+ * @throws {@link InternalServiceError} (server fault)
67
+ * <p>An error occurred on the server side.</p>
68
+ *
69
+ * @throws {@link InvalidParameterException} (client fault)
70
+ * <p>The parameter name or value is invalid.</p>
71
+ *
72
+ * @throws {@link InvalidRequestException} (client fault)
73
+ * <p>A parameter value is not valid for the current state of the
74
+ * resource.</p>
75
+ * <p>Possible causes:</p>
76
+ * <ul>
77
+ * <li>
78
+ * <p>The secret is scheduled for deletion.</p>
79
+ * </li>
80
+ * <li>
81
+ * <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
82
+ * ARN configured and you didn't include such an ARN as a parameter in this call. </p>
83
+ * </li>
84
+ * <li>
85
+ * <p>The secret is managed by another service, and you must use that service to update it.
86
+ * 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>
87
+ * </li>
88
+ * </ul>
89
+ *
90
+ * @throws {@link LimitExceededException} (client fault)
91
+ * <p>The request failed because it would exceed one of the Secrets Manager quotas.</p>
92
+ *
93
+ * @throws {@link MalformedPolicyDocumentException} (client fault)
94
+ * <p>The resource policy has syntax errors.</p>
95
+ *
96
+ * @throws {@link PreconditionNotMetException} (client fault)
97
+ * <p>The request failed because you did not complete all the prerequisite steps.</p>
98
+ *
99
+ * @throws {@link ResourceExistsException} (client fault)
100
+ * <p>A resource with the ID you requested already exists.</p>
101
+ *
102
+ * @throws {@link ResourceNotFoundException} (client fault)
103
+ * <p>Secrets Manager can't find the resource that you asked for.</p>
104
+ *
105
+ *
106
+ * @example To update the description of a secret
107
+ * ```javascript
108
+ * // The following example shows how to modify the description of a secret.
109
+ * const input = {
110
+ * "ClientRequestToken": "EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE",
111
+ * "Description": "This is a new description for the secret.",
112
+ * "SecretId": "MyTestDatabaseSecret"
113
+ * };
114
+ * const command = new UpdateSecretCommand(input);
115
+ * const response = await client.send(command);
116
+ * /* response ==
117
+ * {
118
+ * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
119
+ * "Name": "MyTestDatabaseSecret"
120
+ * }
121
+ * *\/
122
+ * // example id: to-update-the-description-of-a-secret-1524002349094
123
+ * ```
124
+ *
125
+ * @example To update the KMS key associated with a secret
126
+ * ```javascript
127
+ * // 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.
128
+ * const input = {
129
+ * "KmsKeyId": "arn:aws:kms:us-west-2:123456789012:key/EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE",
130
+ * "SecretId": "MyTestDatabaseSecret"
131
+ * };
132
+ * const command = new UpdateSecretCommand(input);
133
+ * const response = await client.send(command);
134
+ * /* response ==
135
+ * {
136
+ * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
137
+ * "Name": "MyTestDatabaseSecret"
138
+ * }
139
+ * *\/
140
+ * // example id: to-update-the-kms-key-associated-with-a-secret-1524002421563
141
+ * ```
142
+ *
143
+ * @example To create a new version of the encrypted secret value
144
+ * ```javascript
145
+ * // 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.
146
+ * const input = {
147
+ * "SecretId": "MyTestDatabaseSecret",
148
+ * "SecretString": "{JSON STRING WITH CREDENTIALS}"
149
+ * };
150
+ * const command = new UpdateSecretCommand(input);
151
+ * const response = await client.send(command);
152
+ * /* response ==
153
+ * {
154
+ * "ARN": "aws:arn:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
155
+ * "Name": "MyTestDatabaseSecret",
156
+ * "VersionId": "EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE"
157
+ * }
158
+ * *\/
159
+ * // example id: to-create-a-new-version-of-the-encrypted-secret-value-1524004651836
160
+ * ```
161
+ *
58
162
  */
59
163
  export declare class UpdateSecretCommand extends $Command<UpdateSecretCommandInput, UpdateSecretCommandOutput, SecretsManagerClientResolvedConfig> {
60
164
  readonly input: UpdateSecretCommandInput;