@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.
- package/dist-cjs/endpoint/ruleset.js +3 -3
- package/dist-es/endpoint/ruleset.js +3 -3
- package/dist-types/commands/CancelRotateSecretCommand.d.ts +45 -0
- package/dist-types/commands/CreateSecretCommand.d.ts +69 -0
- package/dist-types/commands/DeleteResourcePolicyCommand.d.ts +45 -0
- package/dist-types/commands/DeleteSecretCommand.d.ts +47 -0
- package/dist-types/commands/DescribeSecretCommand.d.ts +58 -0
- package/dist-types/commands/GetRandomPasswordCommand.d.ts +43 -0
- package/dist-types/commands/GetResourcePolicyCommand.d.ts +46 -0
- package/dist-types/commands/GetSecretValueCommand.d.ts +54 -0
- package/dist-types/commands/ListSecretVersionIdsCommand.d.ts +51 -0
- package/dist-types/commands/ListSecretsCommand.d.ts +47 -0
- package/dist-types/commands/PutResourcePolicyCommand.d.ts +52 -0
- package/dist-types/commands/PutSecretValueCommand.d.ts +65 -0
- package/dist-types/commands/RemoveRegionsFromReplicationCommand.d.ts +28 -0
- package/dist-types/commands/ReplicateSecretToRegionsCommand.d.ts +28 -0
- package/dist-types/commands/RestoreSecretCommand.d.ts +45 -0
- package/dist-types/commands/RotateSecretCommand.d.ts +69 -0
- package/dist-types/commands/StopReplicationToReplicaCommand.d.ts +28 -0
- package/dist-types/commands/TagResourceCommand.d.ts +49 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +43 -0
- package/dist-types/commands/UpdateSecretCommand.d.ts +104 -0
- package/dist-types/commands/UpdateSecretVersionStageCommand.d.ts +89 -0
- package/dist-types/commands/ValidateResourcePolicyCommand.d.ts +49 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +1 -1
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +1 -1
- package/package.json +29 -29
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ruleSet = void 0;
|
|
4
|
-
const q = "
|
|
5
|
-
const a =
|
|
6
|
-
const _data = { version: "1.0", parameters: { Region:
|
|
4
|
+
const q = "required", r = "fn", s = "argv", t = "ref";
|
|
5
|
+
const a = "isSet", b = "tree", c = "error", d = "endpoint", e = "PartitionResult", f = { [q]: false, "type": "String" }, g = { [q]: true, "default": false, "type": "Boolean" }, h = { [t]: "Endpoint" }, i = { [r]: "booleanEquals", [s]: [{ [t]: "UseFIPS" }, true] }, j = { [r]: "booleanEquals", [s]: [{ [t]: "UseDualStack" }, true] }, k = {}, l = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsFIPS"] }] }, m = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsDualStack"] }] }, n = [i], o = [j], p = [{ [t]: "Region" }];
|
|
6
|
+
const _data = { version: "1.0", parameters: { Region: f, UseDualStack: g, UseFIPS: g, Endpoint: f }, rules: [{ conditions: [{ [r]: a, [s]: [h] }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: h, properties: k, headers: k }, type: d }] }] }, { type: b, rules: [{ conditions: [{ [r]: a, [s]: p }], type: b, rules: [{ conditions: [{ [r]: "aws.partition", [s]: p, assign: e }], type: b, rules: [{ conditions: [i, j], type: b, rules: [{ conditions: [l, m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://secretsmanager-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [l], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://secretsmanager-fips.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://secretsmanager.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { type: b, rules: [{ endpoint: { url: "https://secretsmanager.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
|
|
7
7
|
exports.ruleSet = _data;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const q = "
|
|
2
|
-
const a =
|
|
3
|
-
const _data = { version: "1.0", parameters: { Region:
|
|
1
|
+
const q = "required", r = "fn", s = "argv", t = "ref";
|
|
2
|
+
const a = "isSet", b = "tree", c = "error", d = "endpoint", e = "PartitionResult", f = { [q]: false, "type": "String" }, g = { [q]: true, "default": false, "type": "Boolean" }, h = { [t]: "Endpoint" }, i = { [r]: "booleanEquals", [s]: [{ [t]: "UseFIPS" }, true] }, j = { [r]: "booleanEquals", [s]: [{ [t]: "UseDualStack" }, true] }, k = {}, l = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsFIPS"] }] }, m = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsDualStack"] }] }, n = [i], o = [j], p = [{ [t]: "Region" }];
|
|
3
|
+
const _data = { version: "1.0", parameters: { Region: f, UseDualStack: g, UseFIPS: g, Endpoint: f }, rules: [{ conditions: [{ [r]: a, [s]: [h] }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: h, properties: k, headers: k }, type: d }] }] }, { type: b, rules: [{ conditions: [{ [r]: a, [s]: p }], type: b, rules: [{ conditions: [{ [r]: "aws.partition", [s]: p, assign: e }], type: b, rules: [{ conditions: [i, j], type: b, rules: [{ conditions: [l, m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://secretsmanager-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [l], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://secretsmanager-fips.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://secretsmanager.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { type: b, rules: [{ endpoint: { url: "https://secretsmanager.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
|
|
4
4
|
export const ruleSet = _data;
|
|
@@ -47,6 +47,51 @@ export interface CancelRotateSecretCommandOutput extends CancelRotateSecretRespo
|
|
|
47
47
|
* @see {@link CancelRotateSecretCommandOutput} for command's `response` shape.
|
|
48
48
|
* @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
|
|
49
49
|
*
|
|
50
|
+
* @throws {@link InternalServiceError} (server fault)
|
|
51
|
+
* <p>An error occurred on the server side.</p>
|
|
52
|
+
*
|
|
53
|
+
* @throws {@link InvalidParameterException} (client fault)
|
|
54
|
+
* <p>The parameter name or value is invalid.</p>
|
|
55
|
+
*
|
|
56
|
+
* @throws {@link InvalidRequestException} (client fault)
|
|
57
|
+
* <p>A parameter value is not valid for the current state of the
|
|
58
|
+
* resource.</p>
|
|
59
|
+
* <p>Possible causes:</p>
|
|
60
|
+
* <ul>
|
|
61
|
+
* <li>
|
|
62
|
+
* <p>The secret is scheduled for deletion.</p>
|
|
63
|
+
* </li>
|
|
64
|
+
* <li>
|
|
65
|
+
* <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
|
|
66
|
+
* ARN configured and you didn't include such an ARN as a parameter in this call. </p>
|
|
67
|
+
* </li>
|
|
68
|
+
* <li>
|
|
69
|
+
* <p>The secret is managed by another service, and you must use that service to update it.
|
|
70
|
+
* 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>
|
|
71
|
+
* </li>
|
|
72
|
+
* </ul>
|
|
73
|
+
*
|
|
74
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
75
|
+
* <p>Secrets Manager can't find the resource that you asked for.</p>
|
|
76
|
+
*
|
|
77
|
+
*
|
|
78
|
+
* @example To cancel scheduled rotation for a secret
|
|
79
|
+
* ```javascript
|
|
80
|
+
* // The following example shows how to cancel rotation for a secret. The operation sets the RotationEnabled field to false and cancels all scheduled rotations. To resume scheduled rotations, you must re-enable rotation by calling the rotate-secret operation.
|
|
81
|
+
* const input = {
|
|
82
|
+
* "SecretId": "MyTestDatabaseSecret"
|
|
83
|
+
* };
|
|
84
|
+
* const command = new CancelRotateSecretCommand(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": "Name"
|
|
90
|
+
* }
|
|
91
|
+
* *\/
|
|
92
|
+
* // example id: to-cancel-scheduled-rotation-for-a-secret-1523996016032
|
|
93
|
+
* ```
|
|
94
|
+
*
|
|
50
95
|
*/
|
|
51
96
|
export declare class CancelRotateSecretCommand extends $Command<CancelRotateSecretCommandInput, CancelRotateSecretCommandOutput, SecretsManagerClientResolvedConfig> {
|
|
52
97
|
readonly input: CancelRotateSecretCommandInput;
|
|
@@ -64,6 +64,75 @@ export interface CreateSecretCommandOutput extends CreateSecretResponse, __Metad
|
|
|
64
64
|
* @see {@link CreateSecretCommandOutput} for command's `response` shape.
|
|
65
65
|
* @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
|
|
66
66
|
*
|
|
67
|
+
* @throws {@link DecryptionFailure} (client fault)
|
|
68
|
+
* <p>Secrets Manager can't decrypt the protected secret text using the provided KMS key. </p>
|
|
69
|
+
*
|
|
70
|
+
* @throws {@link EncryptionFailure} (client fault)
|
|
71
|
+
* <p>Secrets Manager can't encrypt the protected secret text using the provided KMS key. Check that the
|
|
72
|
+
* KMS key is available, enabled, and not in an invalid state. For more
|
|
73
|
+
* information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key state: Effect on your KMS key</a>.</p>
|
|
74
|
+
*
|
|
75
|
+
* @throws {@link InternalServiceError} (server fault)
|
|
76
|
+
* <p>An error occurred on the server side.</p>
|
|
77
|
+
*
|
|
78
|
+
* @throws {@link InvalidParameterException} (client fault)
|
|
79
|
+
* <p>The parameter name or value is invalid.</p>
|
|
80
|
+
*
|
|
81
|
+
* @throws {@link InvalidRequestException} (client fault)
|
|
82
|
+
* <p>A parameter value is not valid for the current state of the
|
|
83
|
+
* resource.</p>
|
|
84
|
+
* <p>Possible causes:</p>
|
|
85
|
+
* <ul>
|
|
86
|
+
* <li>
|
|
87
|
+
* <p>The secret is scheduled for deletion.</p>
|
|
88
|
+
* </li>
|
|
89
|
+
* <li>
|
|
90
|
+
* <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
|
|
91
|
+
* ARN configured and you didn't include such an ARN as a parameter in this call. </p>
|
|
92
|
+
* </li>
|
|
93
|
+
* <li>
|
|
94
|
+
* <p>The secret is managed by another service, and you must use that service to update it.
|
|
95
|
+
* 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>
|
|
96
|
+
* </li>
|
|
97
|
+
* </ul>
|
|
98
|
+
*
|
|
99
|
+
* @throws {@link LimitExceededException} (client fault)
|
|
100
|
+
* <p>The request failed because it would exceed one of the Secrets Manager quotas.</p>
|
|
101
|
+
*
|
|
102
|
+
* @throws {@link MalformedPolicyDocumentException} (client fault)
|
|
103
|
+
* <p>The resource policy has syntax errors.</p>
|
|
104
|
+
*
|
|
105
|
+
* @throws {@link PreconditionNotMetException} (client fault)
|
|
106
|
+
* <p>The request failed because you did not complete all the prerequisite steps.</p>
|
|
107
|
+
*
|
|
108
|
+
* @throws {@link ResourceExistsException} (client fault)
|
|
109
|
+
* <p>A resource with the ID you requested already exists.</p>
|
|
110
|
+
*
|
|
111
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
112
|
+
* <p>Secrets Manager can't find the resource that you asked for.</p>
|
|
113
|
+
*
|
|
114
|
+
*
|
|
115
|
+
* @example To create a basic secret
|
|
116
|
+
* ```javascript
|
|
117
|
+
* // The following example shows how to create a secret. The credentials stored in the encrypted secret value are retrieved from a file on disk named mycreds.json.
|
|
118
|
+
* const input = {
|
|
119
|
+
* "ClientRequestToken": "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1",
|
|
120
|
+
* "Description": "My test database secret created with the CLI",
|
|
121
|
+
* "Name": "MyTestDatabaseSecret",
|
|
122
|
+
* "SecretString": "{\"username\":\"david\",\"password\":\"EXAMPLE-PASSWORD\"}"
|
|
123
|
+
* };
|
|
124
|
+
* const command = new CreateSecretCommand(input);
|
|
125
|
+
* const response = await client.send(command);
|
|
126
|
+
* /* response ==
|
|
127
|
+
* {
|
|
128
|
+
* "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
129
|
+
* "Name": "MyTestDatabaseSecret",
|
|
130
|
+
* "VersionId": "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1"
|
|
131
|
+
* }
|
|
132
|
+
* *\/
|
|
133
|
+
* // example id: to-create-a-basic-secret-1523996473658
|
|
134
|
+
* ```
|
|
135
|
+
*
|
|
67
136
|
*/
|
|
68
137
|
export declare class CreateSecretCommand extends $Command<CreateSecretCommandInput, CreateSecretCommandOutput, SecretsManagerClientResolvedConfig> {
|
|
69
138
|
readonly input: CreateSecretCommandInput;
|
|
@@ -37,6 +37,51 @@ export interface DeleteResourcePolicyCommandOutput extends DeleteResourcePolicyR
|
|
|
37
37
|
* @see {@link DeleteResourcePolicyCommandOutput} 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 delete the resource-based policy attached to a secret
|
|
69
|
+
* ```javascript
|
|
70
|
+
* // The following example shows how to delete the resource-based policy that is attached to a secret.
|
|
71
|
+
* const input = {
|
|
72
|
+
* "SecretId": "MyTestDatabaseSecret"
|
|
73
|
+
* };
|
|
74
|
+
* const command = new DeleteResourcePolicyCommand(input);
|
|
75
|
+
* const response = await client.send(command);
|
|
76
|
+
* /* response ==
|
|
77
|
+
* {
|
|
78
|
+
* "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseMasterSecret-a1b2c3",
|
|
79
|
+
* "Name": "MyTestDatabaseSecret"
|
|
80
|
+
* }
|
|
81
|
+
* *\/
|
|
82
|
+
* // example id: to-delete-the-resource-based-policy-attached-to-a-secret-1530209419204
|
|
83
|
+
* ```
|
|
84
|
+
*
|
|
40
85
|
*/
|
|
41
86
|
export declare class DeleteResourcePolicyCommand extends $Command<DeleteResourcePolicyCommandInput, DeleteResourcePolicyCommandOutput, SecretsManagerClientResolvedConfig> {
|
|
42
87
|
readonly input: DeleteResourcePolicyCommandInput;
|
|
@@ -57,6 +57,53 @@ export interface DeleteSecretCommandOutput extends DeleteSecretResponse, __Metad
|
|
|
57
57
|
* @see {@link DeleteSecretCommandOutput} for command's `response` shape.
|
|
58
58
|
* @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
|
|
59
59
|
*
|
|
60
|
+
* @throws {@link InternalServiceError} (server fault)
|
|
61
|
+
* <p>An error occurred on the server side.</p>
|
|
62
|
+
*
|
|
63
|
+
* @throws {@link InvalidParameterException} (client fault)
|
|
64
|
+
* <p>The parameter name or value is invalid.</p>
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link InvalidRequestException} (client fault)
|
|
67
|
+
* <p>A parameter value is not valid for the current state of the
|
|
68
|
+
* resource.</p>
|
|
69
|
+
* <p>Possible causes:</p>
|
|
70
|
+
* <ul>
|
|
71
|
+
* <li>
|
|
72
|
+
* <p>The secret is scheduled for deletion.</p>
|
|
73
|
+
* </li>
|
|
74
|
+
* <li>
|
|
75
|
+
* <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
|
|
76
|
+
* ARN configured and you didn't include such an ARN as a parameter in this call. </p>
|
|
77
|
+
* </li>
|
|
78
|
+
* <li>
|
|
79
|
+
* <p>The secret is managed by another service, and you must use that service to update it.
|
|
80
|
+
* 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>
|
|
81
|
+
* </li>
|
|
82
|
+
* </ul>
|
|
83
|
+
*
|
|
84
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
85
|
+
* <p>Secrets Manager can't find the resource that you asked for.</p>
|
|
86
|
+
*
|
|
87
|
+
*
|
|
88
|
+
* @example To delete a secret
|
|
89
|
+
* ```javascript
|
|
90
|
+
* // The following example shows how to delete a secret. The secret stays in your account in a deprecated and inaccessible state until the recovery window ends. After the date and time in the DeletionDate response field has passed, you can no longer recover this secret with restore-secret.
|
|
91
|
+
* const input = {
|
|
92
|
+
* "RecoveryWindowInDays": 7,
|
|
93
|
+
* "SecretId": "MyTestDatabaseSecret1"
|
|
94
|
+
* };
|
|
95
|
+
* const command = new DeleteSecretCommand(input);
|
|
96
|
+
* const response = await client.send(command);
|
|
97
|
+
* /* response ==
|
|
98
|
+
* {
|
|
99
|
+
* "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
100
|
+
* "DeletionDate": "1524085349.095",
|
|
101
|
+
* "Name": "MyTestDatabaseSecret"
|
|
102
|
+
* }
|
|
103
|
+
* *\/
|
|
104
|
+
* // example id: to-delete-a-secret-1523996905092
|
|
105
|
+
* ```
|
|
106
|
+
*
|
|
60
107
|
*/
|
|
61
108
|
export declare class DeleteSecretCommand extends $Command<DeleteSecretCommandInput, DeleteSecretCommandOutput, SecretsManagerClientResolvedConfig> {
|
|
62
109
|
readonly input: DeleteSecretCommandInput;
|
|
@@ -37,6 +37,64 @@ export interface DescribeSecretCommandOutput extends DescribeSecretResponse, __M
|
|
|
37
37
|
* @see {@link DescribeSecretCommandOutput} 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 ResourceNotFoundException} (client fault)
|
|
47
|
+
* <p>Secrets Manager can't find the resource that you asked for.</p>
|
|
48
|
+
*
|
|
49
|
+
*
|
|
50
|
+
* @example To retrieve the details of a secret
|
|
51
|
+
* ```javascript
|
|
52
|
+
* // The following example shows how to get the details about a secret.
|
|
53
|
+
* const input = {
|
|
54
|
+
* "SecretId": "MyTestDatabaseSecret"
|
|
55
|
+
* };
|
|
56
|
+
* const command = new DescribeSecretCommand(input);
|
|
57
|
+
* const response = await client.send(command);
|
|
58
|
+
* /* response ==
|
|
59
|
+
* {
|
|
60
|
+
* "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
61
|
+
* "Description": "My test database secret",
|
|
62
|
+
* "KmsKeyId": "arn:aws:kms:us-west-2:123456789012:key/EXAMPLE1-90ab-cdef-fedc-ba987KMSKEY1",
|
|
63
|
+
* "LastAccessedDate": "1523923200",
|
|
64
|
+
* "LastChangedDate": 1523477145.729,
|
|
65
|
+
* "LastRotatedDate": 1525747253.72,
|
|
66
|
+
* "Name": "MyTestDatabaseSecret",
|
|
67
|
+
* "NextRotationDate": "1665165599",
|
|
68
|
+
* "RotationEnabled": true,
|
|
69
|
+
* "RotationLambdaARN": "arn:aws:lambda:us-west-2:123456789012:function:MyTestRotationLambda",
|
|
70
|
+
* "RotationRules": {
|
|
71
|
+
* "AutomaticallyAfterDays": 14,
|
|
72
|
+
* "Duration": "2h",
|
|
73
|
+
* "ScheduleExpression": "cron(0 16 1,15 * ? *)"
|
|
74
|
+
* },
|
|
75
|
+
* "Tags": [
|
|
76
|
+
* {
|
|
77
|
+
* "Key": "SecondTag",
|
|
78
|
+
* "Value": "AnotherValue"
|
|
79
|
+
* },
|
|
80
|
+
* {
|
|
81
|
+
* "Key": "FirstTag",
|
|
82
|
+
* "Value": "SomeValue"
|
|
83
|
+
* }
|
|
84
|
+
* ],
|
|
85
|
+
* "VersionIdsToStages": {
|
|
86
|
+
* "EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE": [
|
|
87
|
+
* "AWSPREVIOUS"
|
|
88
|
+
* ],
|
|
89
|
+
* "EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE": [
|
|
90
|
+
* "AWSCURRENT"
|
|
91
|
+
* ]
|
|
92
|
+
* }
|
|
93
|
+
* }
|
|
94
|
+
* *\/
|
|
95
|
+
* // example id: to-retrieve-the-details-of-a-secret-1524000138629
|
|
96
|
+
* ```
|
|
97
|
+
*
|
|
40
98
|
*/
|
|
41
99
|
export declare class DescribeSecretCommand extends $Command<DescribeSecretCommandInput, DescribeSecretCommandOutput, SecretsManagerClientResolvedConfig> {
|
|
42
100
|
readonly input: DescribeSecretCommandInput;
|
|
@@ -38,6 +38,49 @@ export interface GetRandomPasswordCommandOutput extends GetRandomPasswordRespons
|
|
|
38
38
|
* @see {@link GetRandomPasswordCommandOutput} for command's `response` shape.
|
|
39
39
|
* @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
|
|
40
40
|
*
|
|
41
|
+
* @throws {@link InternalServiceError} (server fault)
|
|
42
|
+
* <p>An error occurred on the server side.</p>
|
|
43
|
+
*
|
|
44
|
+
* @throws {@link InvalidParameterException} (client fault)
|
|
45
|
+
* <p>The parameter name or value is invalid.</p>
|
|
46
|
+
*
|
|
47
|
+
* @throws {@link InvalidRequestException} (client fault)
|
|
48
|
+
* <p>A parameter value is not valid for the current state of the
|
|
49
|
+
* resource.</p>
|
|
50
|
+
* <p>Possible causes:</p>
|
|
51
|
+
* <ul>
|
|
52
|
+
* <li>
|
|
53
|
+
* <p>The secret is scheduled for deletion.</p>
|
|
54
|
+
* </li>
|
|
55
|
+
* <li>
|
|
56
|
+
* <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
|
|
57
|
+
* ARN configured and you didn't include such an ARN as a parameter in this call. </p>
|
|
58
|
+
* </li>
|
|
59
|
+
* <li>
|
|
60
|
+
* <p>The secret is managed by another service, and you must use that service to update it.
|
|
61
|
+
* 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>
|
|
62
|
+
* </li>
|
|
63
|
+
* </ul>
|
|
64
|
+
*
|
|
65
|
+
*
|
|
66
|
+
* @example To generate a random password
|
|
67
|
+
* ```javascript
|
|
68
|
+
* // The following example shows how to request a randomly generated password. This example includes the optional flags to require spaces and at least one character of each included type. It specifies a length of 20 characters.
|
|
69
|
+
* const input = {
|
|
70
|
+
* "IncludeSpace": true,
|
|
71
|
+
* "PasswordLength": 20,
|
|
72
|
+
* "RequireEachIncludedType": true
|
|
73
|
+
* };
|
|
74
|
+
* const command = new GetRandomPasswordCommand(input);
|
|
75
|
+
* const response = await client.send(command);
|
|
76
|
+
* /* response ==
|
|
77
|
+
* {
|
|
78
|
+
* "RandomPassword": "EXAMPLE-PASSWORD"
|
|
79
|
+
* }
|
|
80
|
+
* *\/
|
|
81
|
+
* // example id: to-generate-a-random-password-1524000546092
|
|
82
|
+
* ```
|
|
83
|
+
*
|
|
41
84
|
*/
|
|
42
85
|
export declare class GetRandomPasswordCommand extends $Command<GetRandomPasswordCommandInput, GetRandomPasswordCommandOutput, SecretsManagerClientResolvedConfig> {
|
|
43
86
|
readonly input: GetRandomPasswordCommandInput;
|
|
@@ -39,6 +39,52 @@ export interface GetResourcePolicyCommandOutput extends GetResourcePolicyRespons
|
|
|
39
39
|
* @see {@link GetResourcePolicyCommandOutput} for command's `response` shape.
|
|
40
40
|
* @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
|
|
41
41
|
*
|
|
42
|
+
* @throws {@link InternalServiceError} (server fault)
|
|
43
|
+
* <p>An error occurred on the server side.</p>
|
|
44
|
+
*
|
|
45
|
+
* @throws {@link InvalidParameterException} (client fault)
|
|
46
|
+
* <p>The parameter name or value is invalid.</p>
|
|
47
|
+
*
|
|
48
|
+
* @throws {@link InvalidRequestException} (client fault)
|
|
49
|
+
* <p>A parameter value is not valid for the current state of the
|
|
50
|
+
* resource.</p>
|
|
51
|
+
* <p>Possible causes:</p>
|
|
52
|
+
* <ul>
|
|
53
|
+
* <li>
|
|
54
|
+
* <p>The secret is scheduled for deletion.</p>
|
|
55
|
+
* </li>
|
|
56
|
+
* <li>
|
|
57
|
+
* <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
|
|
58
|
+
* ARN configured and you didn't include such an ARN as a parameter in this call. </p>
|
|
59
|
+
* </li>
|
|
60
|
+
* <li>
|
|
61
|
+
* <p>The secret is managed by another service, and you must use that service to update it.
|
|
62
|
+
* 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>
|
|
63
|
+
* </li>
|
|
64
|
+
* </ul>
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
67
|
+
* <p>Secrets Manager can't find the resource that you asked for.</p>
|
|
68
|
+
*
|
|
69
|
+
*
|
|
70
|
+
* @example To retrieve the resource-based policy attached to a secret
|
|
71
|
+
* ```javascript
|
|
72
|
+
* // The following example shows how to retrieve the resource-based policy that is attached to a secret.
|
|
73
|
+
* const input = {
|
|
74
|
+
* "SecretId": "MyTestDatabaseSecret"
|
|
75
|
+
* };
|
|
76
|
+
* const command = new GetResourcePolicyCommand(input);
|
|
77
|
+
* const response = await client.send(command);
|
|
78
|
+
* /* response ==
|
|
79
|
+
* {
|
|
80
|
+
* "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
81
|
+
* "Name": "MyTestDatabaseSecret",
|
|
82
|
+
* "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}"
|
|
83
|
+
* }
|
|
84
|
+
* *\/
|
|
85
|
+
* // example id: to-retrieve-the-resource-based-policy-attached-to-a-secret-1530209677536
|
|
86
|
+
* ```
|
|
87
|
+
*
|
|
42
88
|
*/
|
|
43
89
|
export declare class GetResourcePolicyCommand extends $Command<GetResourcePolicyCommandInput, GetResourcePolicyCommandOutput, SecretsManagerClientResolvedConfig> {
|
|
44
90
|
readonly input: GetResourcePolicyCommandInput;
|
|
@@ -45,6 +45,60 @@ export interface GetSecretValueCommandOutput extends GetSecretValueResponse, __M
|
|
|
45
45
|
* @see {@link GetSecretValueCommandOutput} for command's `response` shape.
|
|
46
46
|
* @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
|
|
47
47
|
*
|
|
48
|
+
* @throws {@link DecryptionFailure} (client fault)
|
|
49
|
+
* <p>Secrets Manager can't decrypt the protected secret text using the provided KMS key. </p>
|
|
50
|
+
*
|
|
51
|
+
* @throws {@link InternalServiceError} (server fault)
|
|
52
|
+
* <p>An error occurred on the server side.</p>
|
|
53
|
+
*
|
|
54
|
+
* @throws {@link InvalidParameterException} (client fault)
|
|
55
|
+
* <p>The parameter name or value is invalid.</p>
|
|
56
|
+
*
|
|
57
|
+
* @throws {@link InvalidRequestException} (client fault)
|
|
58
|
+
* <p>A parameter value is not valid for the current state of the
|
|
59
|
+
* resource.</p>
|
|
60
|
+
* <p>Possible causes:</p>
|
|
61
|
+
* <ul>
|
|
62
|
+
* <li>
|
|
63
|
+
* <p>The secret is scheduled for deletion.</p>
|
|
64
|
+
* </li>
|
|
65
|
+
* <li>
|
|
66
|
+
* <p>You tried to enable rotation on a secret that doesn't already have a Lambda function
|
|
67
|
+
* ARN configured and you didn't include such an ARN as a parameter in this call. </p>
|
|
68
|
+
* </li>
|
|
69
|
+
* <li>
|
|
70
|
+
* <p>The secret is managed by another service, and you must use that service to update it.
|
|
71
|
+
* 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>
|
|
72
|
+
* </li>
|
|
73
|
+
* </ul>
|
|
74
|
+
*
|
|
75
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
76
|
+
* <p>Secrets Manager can't find the resource that you asked for.</p>
|
|
77
|
+
*
|
|
78
|
+
*
|
|
79
|
+
* @example To retrieve the encrypted secret value of a secret
|
|
80
|
+
* ```javascript
|
|
81
|
+
* // The following example shows how to retrieve a secret string value.
|
|
82
|
+
* const input = {
|
|
83
|
+
* "SecretId": "MyTestDatabaseSecret"
|
|
84
|
+
* };
|
|
85
|
+
* const command = new GetSecretValueCommand(input);
|
|
86
|
+
* const response = await client.send(command);
|
|
87
|
+
* /* response ==
|
|
88
|
+
* {
|
|
89
|
+
* "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
90
|
+
* "CreatedDate": 1523477145.713,
|
|
91
|
+
* "Name": "MyTestDatabaseSecret",
|
|
92
|
+
* "SecretString": "{\n \"username\":\"david\",\n \"password\":\"EXAMPLE-PASSWORD\"\n}\n",
|
|
93
|
+
* "VersionId": "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1",
|
|
94
|
+
* "VersionStages": [
|
|
95
|
+
* "AWSPREVIOUS"
|
|
96
|
+
* ]
|
|
97
|
+
* }
|
|
98
|
+
* *\/
|
|
99
|
+
* // example id: to-retrieve-the-encrypted-secret-value-of-a-secret-1524000702484
|
|
100
|
+
* ```
|
|
101
|
+
*
|
|
48
102
|
*/
|
|
49
103
|
export declare class GetSecretValueCommand extends $Command<GetSecretValueCommandInput, GetSecretValueCommandOutput, SecretsManagerClientResolvedConfig> {
|
|
50
104
|
readonly input: GetSecretValueCommandInput;
|
|
@@ -39,6 +39,57 @@ export interface ListSecretVersionIdsCommandOutput extends ListSecretVersionIdsR
|
|
|
39
39
|
* @see {@link ListSecretVersionIdsCommandOutput} for command's `response` shape.
|
|
40
40
|
* @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
|
|
41
41
|
*
|
|
42
|
+
* @throws {@link InternalServiceError} (server fault)
|
|
43
|
+
* <p>An error occurred on the server side.</p>
|
|
44
|
+
*
|
|
45
|
+
* @throws {@link InvalidNextTokenException} (client fault)
|
|
46
|
+
* <p>The <code>NextToken</code> value is invalid.</p>
|
|
47
|
+
*
|
|
48
|
+
* @throws {@link InvalidParameterException} (client fault)
|
|
49
|
+
* <p>The parameter name or value is invalid.</p>
|
|
50
|
+
*
|
|
51
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
52
|
+
* <p>Secrets Manager can't find the resource that you asked for.</p>
|
|
53
|
+
*
|
|
54
|
+
*
|
|
55
|
+
* @example To list all of the secret versions associated with a secret
|
|
56
|
+
* ```javascript
|
|
57
|
+
* // The following example shows how to retrieve a list of all of the versions of a secret, including those without any staging labels.
|
|
58
|
+
* const input = {
|
|
59
|
+
* "IncludeDeprecated": true,
|
|
60
|
+
* "SecretId": "MyTestDatabaseSecret"
|
|
61
|
+
* };
|
|
62
|
+
* const command = new ListSecretVersionIdsCommand(input);
|
|
63
|
+
* const response = await client.send(command);
|
|
64
|
+
* /* response ==
|
|
65
|
+
* {
|
|
66
|
+
* "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
67
|
+
* "Name": "MyTestDatabaseSecret",
|
|
68
|
+
* "Versions": [
|
|
69
|
+
* {
|
|
70
|
+
* "CreatedDate": 1523477145.713,
|
|
71
|
+
* "VersionId": "EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE",
|
|
72
|
+
* "VersionStages": [
|
|
73
|
+
* "AWSPREVIOUS"
|
|
74
|
+
* ]
|
|
75
|
+
* },
|
|
76
|
+
* {
|
|
77
|
+
* "CreatedDate": 1523486221.391,
|
|
78
|
+
* "VersionId": "EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE",
|
|
79
|
+
* "VersionStages": [
|
|
80
|
+
* "AWSCURRENT"
|
|
81
|
+
* ]
|
|
82
|
+
* },
|
|
83
|
+
* {
|
|
84
|
+
* "CreatedDate": 1511974462.36,
|
|
85
|
+
* "VersionId": "EXAMPLE3-90ab-cdef-fedc-ba987EXAMPLE;"
|
|
86
|
+
* }
|
|
87
|
+
* ]
|
|
88
|
+
* }
|
|
89
|
+
* *\/
|
|
90
|
+
* // example id: to-list-all-of-the-secret-versions-associated-with-a-secret-1524000999164
|
|
91
|
+
* ```
|
|
92
|
+
*
|
|
42
93
|
*/
|
|
43
94
|
export declare class ListSecretVersionIdsCommand extends $Command<ListSecretVersionIdsCommandInput, ListSecretVersionIdsCommandOutput, SecretsManagerClientResolvedConfig> {
|
|
44
95
|
readonly input: ListSecretVersionIdsCommandInput;
|
|
@@ -43,6 +43,53 @@ export interface ListSecretsCommandOutput extends ListSecretsResponse, __Metadat
|
|
|
43
43
|
* @see {@link ListSecretsCommandOutput} for command's `response` shape.
|
|
44
44
|
* @see {@link SecretsManagerClientResolvedConfig | config} for SecretsManagerClient's `config` shape.
|
|
45
45
|
*
|
|
46
|
+
* @throws {@link InternalServiceError} (server fault)
|
|
47
|
+
* <p>An error occurred on the server side.</p>
|
|
48
|
+
*
|
|
49
|
+
* @throws {@link InvalidNextTokenException} (client fault)
|
|
50
|
+
* <p>The <code>NextToken</code> value is invalid.</p>
|
|
51
|
+
*
|
|
52
|
+
* @throws {@link InvalidParameterException} (client fault)
|
|
53
|
+
* <p>The parameter name or value is invalid.</p>
|
|
54
|
+
*
|
|
55
|
+
*
|
|
56
|
+
* @example To list the secrets in your account
|
|
57
|
+
* ```javascript
|
|
58
|
+
* // The following example shows how to list all of the secrets in your account.
|
|
59
|
+
* const input = {};
|
|
60
|
+
* const command = new ListSecretsCommand(input);
|
|
61
|
+
* const response = await client.send(command);
|
|
62
|
+
* /* response ==
|
|
63
|
+
* {
|
|
64
|
+
* "SecretList": [
|
|
65
|
+
* {
|
|
66
|
+
* "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
67
|
+
* "Description": "My test database secret",
|
|
68
|
+
* "LastChangedDate": 1523477145.729,
|
|
69
|
+
* "Name": "MyTestDatabaseSecret",
|
|
70
|
+
* "SecretVersionsToStages": {
|
|
71
|
+
* "EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE": [
|
|
72
|
+
* "AWSCURRENT"
|
|
73
|
+
* ]
|
|
74
|
+
* }
|
|
75
|
+
* },
|
|
76
|
+
* {
|
|
77
|
+
* "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret1-d4e5f6",
|
|
78
|
+
* "Description": "Another secret created for a different database",
|
|
79
|
+
* "LastChangedDate": 1523482025.685,
|
|
80
|
+
* "Name": "MyTestDatabaseSecret1",
|
|
81
|
+
* "SecretVersionsToStages": {
|
|
82
|
+
* "EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE": [
|
|
83
|
+
* "AWSCURRENT"
|
|
84
|
+
* ]
|
|
85
|
+
* }
|
|
86
|
+
* }
|
|
87
|
+
* ]
|
|
88
|
+
* }
|
|
89
|
+
* *\/
|
|
90
|
+
* // example id: to-list-the-secrets-in-your-account-1524001246087
|
|
91
|
+
* ```
|
|
92
|
+
*
|
|
46
93
|
*/
|
|
47
94
|
export declare class ListSecretsCommand extends $Command<ListSecretsCommandInput, ListSecretsCommandOutput, SecretsManagerClientResolvedConfig> {
|
|
48
95
|
readonly input: ListSecretsCommandInput;
|