@aws-sdk/client-secrets-manager 3.774.0 → 3.777.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/auth/httpAuthSchemeProvider.js +1 -3
- package/dist-cjs/index.js +17 -18
- package/dist-es/SecretsManagerClient.js +2 -1
- package/dist-es/auth/httpAuthSchemeProvider.js +1 -3
- package/dist-es/endpoint/EndpointParameters.js +2 -3
- package/dist-es/runtimeExtensions.js +2 -14
- package/dist-types/commands/BatchGetSecretValueCommand.d.ts +24 -24
- package/dist-types/commands/CancelRotateSecretCommand.d.ts +6 -6
- package/dist-types/commands/CreateSecretCommand.d.ts +10 -10
- package/dist-types/commands/DeleteResourcePolicyCommand.d.ts +6 -6
- package/dist-types/commands/DeleteSecretCommand.d.ts +1 -19
- package/dist-types/commands/DescribeSecretCommand.d.ts +1 -48
- package/dist-types/commands/GetRandomPasswordCommand.d.ts +7 -7
- package/dist-types/commands/GetResourcePolicyCommand.d.ts +17 -7
- package/dist-types/commands/GetSecretValueCommand.d.ts +14 -10
- package/dist-types/commands/ListSecretVersionIdsCommand.d.ts +16 -16
- package/dist-types/commands/ListSecretsCommand.d.ts +17 -17
- package/dist-types/commands/PutResourcePolicyCommand.d.ts +17 -7
- package/dist-types/commands/PutSecretValueCommand.d.ts +10 -10
- package/dist-types/commands/RemoveRegionsFromReplicationCommand.d.ts +1 -0
- package/dist-types/commands/ReplicateSecretToRegionsCommand.d.ts +12 -12
- package/dist-types/commands/RestoreSecretCommand.d.ts +6 -6
- package/dist-types/commands/RotateSecretCommand.d.ts +16 -17
- package/dist-types/commands/StopReplicationToReplicaCommand.d.ts +1 -0
- package/dist-types/commands/TagResourceCommand.d.ts +12 -9
- package/dist-types/commands/UntagResourceCommand.d.ts +8 -5
- package/dist-types/commands/UpdateSecretCommand.d.ts +25 -27
- package/dist-types/commands/UpdateSecretVersionStageCommand.d.ts +21 -23
- package/dist-types/commands/ValidateResourcePolicyCommand.d.ts +17 -7
- package/package.json +33 -33
|
@@ -40,8 +40,6 @@ const defaultSecretsManagerHttpAuthSchemeProvider = (authParameters) => {
|
|
|
40
40
|
exports.defaultSecretsManagerHttpAuthSchemeProvider = defaultSecretsManagerHttpAuthSchemeProvider;
|
|
41
41
|
const resolveHttpAuthSchemeConfig = (config) => {
|
|
42
42
|
const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
|
|
43
|
-
return {
|
|
44
|
-
...config_0,
|
|
45
|
-
};
|
|
43
|
+
return Object.assign(config_0, {});
|
|
46
44
|
};
|
|
47
45
|
exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
|
package/dist-cjs/index.js
CHANGED
|
@@ -91,12 +91,11 @@ var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
|
|
|
91
91
|
|
|
92
92
|
// src/endpoint/EndpointParameters.ts
|
|
93
93
|
var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
|
|
94
|
-
return {
|
|
95
|
-
...options,
|
|
94
|
+
return Object.assign(options, {
|
|
96
95
|
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
97
96
|
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
98
97
|
defaultSigningName: "secretsmanager"
|
|
99
|
-
};
|
|
98
|
+
});
|
|
100
99
|
}, "resolveClientEndpointParameters");
|
|
101
100
|
var commonParams = {
|
|
102
101
|
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
@@ -153,22 +152,21 @@ var resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {
|
|
|
153
152
|
}, "resolveHttpAuthRuntimeConfig");
|
|
154
153
|
|
|
155
154
|
// src/runtimeExtensions.ts
|
|
156
|
-
var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
|
|
157
155
|
var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
|
|
158
|
-
const extensionConfiguration =
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
156
|
+
const extensionConfiguration = Object.assign(
|
|
157
|
+
(0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),
|
|
158
|
+
(0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),
|
|
159
|
+
(0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),
|
|
160
|
+
getHttpAuthExtensionConfiguration(runtimeConfig)
|
|
161
|
+
);
|
|
164
162
|
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
165
|
-
return
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
163
|
+
return Object.assign(
|
|
164
|
+
runtimeConfig,
|
|
165
|
+
(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
166
|
+
(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
167
|
+
(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
|
|
168
|
+
resolveHttpAuthRuntimeConfig(extensionConfiguration)
|
|
169
|
+
);
|
|
172
170
|
}, "resolveRuntimeExtensions");
|
|
173
171
|
|
|
174
172
|
// src/SecretsManagerClient.ts
|
|
@@ -182,6 +180,8 @@ var SecretsManagerClient = class extends import_smithy_client.Client {
|
|
|
182
180
|
config;
|
|
183
181
|
constructor(...[configuration]) {
|
|
184
182
|
const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
|
|
183
|
+
super(_config_0);
|
|
184
|
+
this.initConfig = _config_0;
|
|
185
185
|
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
186
186
|
const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);
|
|
187
187
|
const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);
|
|
@@ -190,7 +190,6 @@ var SecretsManagerClient = class extends import_smithy_client.Client {
|
|
|
190
190
|
const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);
|
|
191
191
|
const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);
|
|
192
192
|
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
193
|
-
super(_config_8);
|
|
194
193
|
this.config = _config_8;
|
|
195
194
|
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
|
|
196
195
|
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
|
|
@@ -17,6 +17,8 @@ export class SecretsManagerClient extends __Client {
|
|
|
17
17
|
config;
|
|
18
18
|
constructor(...[configuration]) {
|
|
19
19
|
const _config_0 = __getRuntimeConfig(configuration || {});
|
|
20
|
+
super(_config_0);
|
|
21
|
+
this.initConfig = _config_0;
|
|
20
22
|
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
21
23
|
const _config_2 = resolveUserAgentConfig(_config_1);
|
|
22
24
|
const _config_3 = resolveRetryConfig(_config_2);
|
|
@@ -25,7 +27,6 @@ export class SecretsManagerClient extends __Client {
|
|
|
25
27
|
const _config_6 = resolveEndpointConfig(_config_5);
|
|
26
28
|
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
|
|
27
29
|
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
|
|
28
|
-
super(_config_8);
|
|
29
30
|
this.config = _config_8;
|
|
30
31
|
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
31
32
|
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
@@ -35,7 +35,5 @@ export const defaultSecretsManagerHttpAuthSchemeProvider = (authParameters) => {
|
|
|
35
35
|
};
|
|
36
36
|
export const resolveHttpAuthSchemeConfig = (config) => {
|
|
37
37
|
const config_0 = resolveAwsSdkSigV4Config(config);
|
|
38
|
-
return {
|
|
39
|
-
...config_0,
|
|
40
|
-
};
|
|
38
|
+
return Object.assign(config_0, {});
|
|
41
39
|
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
export const resolveClientEndpointParameters = (options) => {
|
|
2
|
-
return {
|
|
3
|
-
...options,
|
|
2
|
+
return Object.assign(options, {
|
|
4
3
|
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
5
4
|
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
6
5
|
defaultSigningName: "secretsmanager",
|
|
7
|
-
};
|
|
6
|
+
});
|
|
8
7
|
};
|
|
9
8
|
export const commonParams = {
|
|
10
9
|
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
@@ -2,20 +2,8 @@ import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfigurat
|
|
|
2
2
|
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http";
|
|
3
3
|
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client";
|
|
4
4
|
import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration";
|
|
5
|
-
const asPartial = (t) => t;
|
|
6
5
|
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
7
|
-
const extensionConfiguration =
|
|
8
|
-
...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)),
|
|
9
|
-
...asPartial(getDefaultExtensionConfiguration(runtimeConfig)),
|
|
10
|
-
...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)),
|
|
11
|
-
...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)),
|
|
12
|
-
};
|
|
6
|
+
const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
13
7
|
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
14
|
-
return
|
|
15
|
-
...runtimeConfig,
|
|
16
|
-
...resolveAwsRegionExtensionConfiguration(extensionConfiguration),
|
|
17
|
-
...resolveDefaultRuntimeConfig(extensionConfiguration),
|
|
18
|
-
...resolveHttpHandlerRuntimeConfig(extensionConfiguration),
|
|
19
|
-
...resolveHttpAuthRuntimeConfig(extensionConfiguration),
|
|
20
|
-
};
|
|
8
|
+
return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
21
9
|
};
|
|
@@ -128,12 +128,12 @@ declare const BatchGetSecretValueCommand_base: {
|
|
|
128
128
|
* @throws {@link SecretsManagerServiceException}
|
|
129
129
|
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
130
130
|
*
|
|
131
|
-
*
|
|
131
|
+
*
|
|
132
132
|
* @example To retrieve the secret values for a group of secrets listed by name
|
|
133
133
|
* ```javascript
|
|
134
134
|
* // The following example gets the values for three secrets.
|
|
135
135
|
* const input = {
|
|
136
|
-
*
|
|
136
|
+
* SecretIdList: [
|
|
137
137
|
* "MySecret1",
|
|
138
138
|
* "MySecret2",
|
|
139
139
|
* "MySecret3"
|
|
@@ -141,46 +141,46 @@ declare const BatchGetSecretValueCommand_base: {
|
|
|
141
141
|
* };
|
|
142
142
|
* const command = new BatchGetSecretValueCommand(input);
|
|
143
143
|
* const response = await client.send(command);
|
|
144
|
-
* /* response
|
|
144
|
+
* /* response is
|
|
145
145
|
* {
|
|
146
|
-
*
|
|
147
|
-
*
|
|
146
|
+
* Errors: [],
|
|
147
|
+
* SecretValues: [
|
|
148
148
|
* {
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
149
|
+
* ARN: "®ion-arn;&asm-service-name;:us-west-2:&ExampleAccountId;:secret:MySecret1-a1b2c3",
|
|
150
|
+
* CreatedDate: 1.700591229801E9,
|
|
151
|
+
* Name: "MySecret1",
|
|
152
|
+
* SecretString: `{"username":"diego_ramirez","password":"EXAMPLE-PASSWORD","engine":"mysql","host":"secretsmanagertutorial.cluster.us-west-2.rds.amazonaws.com","port":3306,"dbClusterIdentifier":"secretsmanagertutorial"}`,
|
|
153
|
+
* VersionId: "a1b2c3d4-5678-90ab-cdef-EXAMPLEaaaaa",
|
|
154
|
+
* VersionStages: [
|
|
155
155
|
* "AWSCURRENT"
|
|
156
156
|
* ]
|
|
157
157
|
* },
|
|
158
158
|
* {
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
159
|
+
* ARN: "®ion-arn;&asm-service-name;:us-west-2:&ExampleAccountId;:secret:MySecret2-a1b2c3",
|
|
160
|
+
* CreatedDate: 1.699911394105E9,
|
|
161
|
+
* Name: "MySecret2",
|
|
162
|
+
* SecretString: `{"username":"akua_mansa","password":"EXAMPLE-PASSWORD"`,
|
|
163
|
+
* VersionId: "a1b2c3d4-5678-90ab-cdef-EXAMPLEbbbbb",
|
|
164
|
+
* VersionStages: [
|
|
165
165
|
* "AWSCURRENT"
|
|
166
166
|
* ]
|
|
167
167
|
* },
|
|
168
168
|
* {
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
169
|
+
* ARN: "®ion-arn;&asm-service-name;:us-west-2:&ExampleAccountId;:secret:MySecret3-a1b2c3",
|
|
170
|
+
* CreatedDate: 1.699911394105E9,
|
|
171
|
+
* Name: "MySecret3",
|
|
172
|
+
* SecretString: `{"username":"jie_liu","password":"EXAMPLE-PASSWORD"`,
|
|
173
|
+
* VersionId: "a1b2c3d4-5678-90ab-cdef-EXAMPLEccccc",
|
|
174
|
+
* VersionStages: [
|
|
175
175
|
* "AWSCURRENT"
|
|
176
176
|
* ]
|
|
177
177
|
* }
|
|
178
178
|
* ]
|
|
179
179
|
* }
|
|
180
180
|
* *\/
|
|
181
|
-
* // example id: to-retrieve-the-secret-values-for-a-group-of-secrets-listed-by-name-1704846593341
|
|
182
181
|
* ```
|
|
183
182
|
*
|
|
183
|
+
* @public
|
|
184
184
|
*/
|
|
185
185
|
export declare class BatchGetSecretValueCommand extends BatchGetSecretValueCommand_base {
|
|
186
186
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -101,24 +101,24 @@ declare const CancelRotateSecretCommand_base: {
|
|
|
101
101
|
* @throws {@link SecretsManagerServiceException}
|
|
102
102
|
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
103
103
|
*
|
|
104
|
-
*
|
|
104
|
+
*
|
|
105
105
|
* @example To cancel scheduled rotation for a secret
|
|
106
106
|
* ```javascript
|
|
107
107
|
* // 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.
|
|
108
108
|
* const input = {
|
|
109
|
-
*
|
|
109
|
+
* SecretId: "MyTestDatabaseSecret"
|
|
110
110
|
* };
|
|
111
111
|
* const command = new CancelRotateSecretCommand(input);
|
|
112
112
|
* const response = await client.send(command);
|
|
113
|
-
* /* response
|
|
113
|
+
* /* response is
|
|
114
114
|
* {
|
|
115
|
-
*
|
|
116
|
-
*
|
|
115
|
+
* ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
116
|
+
* Name: "Name"
|
|
117
117
|
* }
|
|
118
118
|
* *\/
|
|
119
|
-
* // example id: to-cancel-scheduled-rotation-for-a-secret-1523996016032
|
|
120
119
|
* ```
|
|
121
120
|
*
|
|
121
|
+
* @public
|
|
122
122
|
*/
|
|
123
123
|
export declare class CancelRotateSecretCommand extends CancelRotateSecretCommand_base {
|
|
124
124
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -168,28 +168,28 @@ declare const CreateSecretCommand_base: {
|
|
|
168
168
|
* @throws {@link SecretsManagerServiceException}
|
|
169
169
|
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
170
170
|
*
|
|
171
|
-
*
|
|
171
|
+
*
|
|
172
172
|
* @example To create a basic secret
|
|
173
173
|
* ```javascript
|
|
174
174
|
* // 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.
|
|
175
175
|
* const input = {
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
176
|
+
* ClientRequestToken: "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1",
|
|
177
|
+
* Description: "My test database secret created with the CLI",
|
|
178
|
+
* Name: "MyTestDatabaseSecret",
|
|
179
|
+
* SecretString: `{"username":"david","password":"EXAMPLE-PASSWORD"}`
|
|
180
180
|
* };
|
|
181
181
|
* const command = new CreateSecretCommand(input);
|
|
182
182
|
* const response = await client.send(command);
|
|
183
|
-
* /* response
|
|
183
|
+
* /* response is
|
|
184
184
|
* {
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
185
|
+
* ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
186
|
+
* Name: "MyTestDatabaseSecret",
|
|
187
|
+
* VersionId: "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1"
|
|
188
188
|
* }
|
|
189
189
|
* *\/
|
|
190
|
-
* // example id: to-create-a-basic-secret-1523996473658
|
|
191
190
|
* ```
|
|
192
191
|
*
|
|
192
|
+
* @public
|
|
193
193
|
*/
|
|
194
194
|
export declare class CreateSecretCommand extends CreateSecretCommand_base {
|
|
195
195
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -90,24 +90,24 @@ declare const DeleteResourcePolicyCommand_base: {
|
|
|
90
90
|
* @throws {@link SecretsManagerServiceException}
|
|
91
91
|
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
92
92
|
*
|
|
93
|
-
*
|
|
93
|
+
*
|
|
94
94
|
* @example To delete the resource-based policy attached to a secret
|
|
95
95
|
* ```javascript
|
|
96
96
|
* // The following example shows how to delete the resource-based policy that is attached to a secret.
|
|
97
97
|
* const input = {
|
|
98
|
-
*
|
|
98
|
+
* SecretId: "MyTestDatabaseSecret"
|
|
99
99
|
* };
|
|
100
100
|
* const command = new DeleteResourcePolicyCommand(input);
|
|
101
101
|
* const response = await client.send(command);
|
|
102
|
-
* /* response
|
|
102
|
+
* /* response is
|
|
103
103
|
* {
|
|
104
|
-
*
|
|
105
|
-
*
|
|
104
|
+
* ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
105
|
+
* Name: "MyTestDatabaseSecret"
|
|
106
106
|
* }
|
|
107
107
|
* *\/
|
|
108
|
-
* // example id: to-delete-the-resource-based-policy-attached-to-a-secret-1530209419204
|
|
109
108
|
* ```
|
|
110
109
|
*
|
|
110
|
+
* @public
|
|
111
111
|
*/
|
|
112
112
|
export declare class DeleteResourcePolicyCommand extends DeleteResourcePolicyCommand_base {
|
|
113
113
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -113,26 +113,8 @@ declare const DeleteSecretCommand_base: {
|
|
|
113
113
|
* @throws {@link SecretsManagerServiceException}
|
|
114
114
|
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
115
115
|
*
|
|
116
|
-
* @public
|
|
117
|
-
* @example To delete a secret
|
|
118
|
-
* ```javascript
|
|
119
|
-
* // 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.
|
|
120
|
-
* const input = {
|
|
121
|
-
* "RecoveryWindowInDays": 7,
|
|
122
|
-
* "SecretId": "MyTestDatabaseSecret1"
|
|
123
|
-
* };
|
|
124
|
-
* const command = new DeleteSecretCommand(input);
|
|
125
|
-
* const response = await client.send(command);
|
|
126
|
-
* /* response ==
|
|
127
|
-
* {
|
|
128
|
-
* "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
129
|
-
* "DeletionDate": "1524085349.095",
|
|
130
|
-
* "Name": "MyTestDatabaseSecret"
|
|
131
|
-
* }
|
|
132
|
-
* *\/
|
|
133
|
-
* // example id: to-delete-a-secret-1523996905092
|
|
134
|
-
* ```
|
|
135
116
|
*
|
|
117
|
+
* @public
|
|
136
118
|
*/
|
|
137
119
|
export declare class DeleteSecretCommand extends DeleteSecretCommand_base {
|
|
138
120
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -109,55 +109,8 @@ declare const DescribeSecretCommand_base: {
|
|
|
109
109
|
* @throws {@link SecretsManagerServiceException}
|
|
110
110
|
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
111
111
|
*
|
|
112
|
-
* @public
|
|
113
|
-
* @example To retrieve the details of a secret
|
|
114
|
-
* ```javascript
|
|
115
|
-
* // The following example shows how to get the details about a secret.
|
|
116
|
-
* const input = {
|
|
117
|
-
* "SecretId": "MyTestDatabaseSecret"
|
|
118
|
-
* };
|
|
119
|
-
* const command = new DescribeSecretCommand(input);
|
|
120
|
-
* const response = await client.send(command);
|
|
121
|
-
* /* response ==
|
|
122
|
-
* {
|
|
123
|
-
* "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
124
|
-
* "Description": "My test database secret",
|
|
125
|
-
* "KmsKeyId": "arn:aws:kms:us-west-2:123456789012:key/EXAMPLE1-90ab-cdef-fedc-ba987KMSKEY1",
|
|
126
|
-
* "LastAccessedDate": "1523923200",
|
|
127
|
-
* "LastChangedDate": 1523477145.729,
|
|
128
|
-
* "LastRotatedDate": 1525747253.72,
|
|
129
|
-
* "Name": "MyTestDatabaseSecret",
|
|
130
|
-
* "NextRotationDate": "1665165599",
|
|
131
|
-
* "RotationEnabled": true,
|
|
132
|
-
* "RotationLambdaARN": "arn:aws:lambda:us-west-2:123456789012:function:MyTestRotationLambda",
|
|
133
|
-
* "RotationRules": {
|
|
134
|
-
* "AutomaticallyAfterDays": 14,
|
|
135
|
-
* "Duration": "2h",
|
|
136
|
-
* "ScheduleExpression": "cron(0 16 1,15 * ? *)"
|
|
137
|
-
* },
|
|
138
|
-
* "Tags": [
|
|
139
|
-
* {
|
|
140
|
-
* "Key": "SecondTag",
|
|
141
|
-
* "Value": "AnotherValue"
|
|
142
|
-
* },
|
|
143
|
-
* {
|
|
144
|
-
* "Key": "FirstTag",
|
|
145
|
-
* "Value": "SomeValue"
|
|
146
|
-
* }
|
|
147
|
-
* ],
|
|
148
|
-
* "VersionIdsToStages": {
|
|
149
|
-
* "EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE": [
|
|
150
|
-
* "AWSPREVIOUS"
|
|
151
|
-
* ],
|
|
152
|
-
* "EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE": [
|
|
153
|
-
* "AWSCURRENT"
|
|
154
|
-
* ]
|
|
155
|
-
* }
|
|
156
|
-
* }
|
|
157
|
-
* *\/
|
|
158
|
-
* // example id: to-retrieve-the-details-of-a-secret-1524000138629
|
|
159
|
-
* ```
|
|
160
112
|
*
|
|
113
|
+
* @public
|
|
161
114
|
*/
|
|
162
115
|
export declare class DescribeSecretCommand extends DescribeSecretCommand_base {
|
|
163
116
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -95,25 +95,25 @@ declare const GetRandomPasswordCommand_base: {
|
|
|
95
95
|
* @throws {@link SecretsManagerServiceException}
|
|
96
96
|
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
97
97
|
*
|
|
98
|
-
*
|
|
98
|
+
*
|
|
99
99
|
* @example To generate a random password
|
|
100
100
|
* ```javascript
|
|
101
101
|
* // 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.
|
|
102
102
|
* const input = {
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
103
|
+
* IncludeSpace: true,
|
|
104
|
+
* PasswordLength: 20,
|
|
105
|
+
* RequireEachIncludedType: true
|
|
106
106
|
* };
|
|
107
107
|
* const command = new GetRandomPasswordCommand(input);
|
|
108
108
|
* const response = await client.send(command);
|
|
109
|
-
* /* response
|
|
109
|
+
* /* response is
|
|
110
110
|
* {
|
|
111
|
-
*
|
|
111
|
+
* RandomPassword: "EXAMPLE-PASSWORD"
|
|
112
112
|
* }
|
|
113
113
|
* *\/
|
|
114
|
-
* // example id: to-generate-a-random-password-1524000546092
|
|
115
114
|
* ```
|
|
116
115
|
*
|
|
116
|
+
* @public
|
|
117
117
|
*/
|
|
118
118
|
export declare class GetRandomPasswordCommand extends GetRandomPasswordCommand_base {
|
|
119
119
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -93,25 +93,35 @@ declare const GetResourcePolicyCommand_base: {
|
|
|
93
93
|
* @throws {@link SecretsManagerServiceException}
|
|
94
94
|
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
95
95
|
*
|
|
96
|
-
*
|
|
96
|
+
*
|
|
97
97
|
* @example To retrieve the resource-based policy attached to a secret
|
|
98
98
|
* ```javascript
|
|
99
99
|
* // The following example shows how to retrieve the resource-based policy that is attached to a secret.
|
|
100
100
|
* const input = {
|
|
101
|
-
*
|
|
101
|
+
* SecretId: "MyTestDatabaseSecret"
|
|
102
102
|
* };
|
|
103
103
|
* const command = new GetResourcePolicyCommand(input);
|
|
104
104
|
* const response = await client.send(command);
|
|
105
|
-
* /* response
|
|
105
|
+
* /* response is
|
|
106
106
|
* {
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
107
|
+
* ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
108
|
+
* Name: "MyTestDatabaseSecret",
|
|
109
|
+
* ResourcePolicy: `{
|
|
110
|
+
* "Version":"2012-10-17",
|
|
111
|
+
* "Statement":[{
|
|
112
|
+
* "Effect":"Allow",
|
|
113
|
+
* "Principal":{
|
|
114
|
+
* "AWS":"arn:aws:iam::123456789012:root"
|
|
115
|
+
* },
|
|
116
|
+
* "Action":"secretsmanager:GetSecretValue",
|
|
117
|
+
* "Resource":"*"
|
|
118
|
+
* }]
|
|
119
|
+
* }`
|
|
110
120
|
* }
|
|
111
121
|
* *\/
|
|
112
|
-
* // example id: to-retrieve-the-resource-based-policy-attached-to-a-secret-1530209677536
|
|
113
122
|
* ```
|
|
114
123
|
*
|
|
124
|
+
* @public
|
|
115
125
|
*/
|
|
116
126
|
export declare class GetResourcePolicyCommand extends GetResourcePolicyCommand_base {
|
|
117
127
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -111,30 +111,34 @@ declare const GetSecretValueCommand_base: {
|
|
|
111
111
|
* @throws {@link SecretsManagerServiceException}
|
|
112
112
|
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
113
113
|
*
|
|
114
|
-
*
|
|
114
|
+
*
|
|
115
115
|
* @example To retrieve the encrypted secret value of a secret
|
|
116
116
|
* ```javascript
|
|
117
117
|
* // The following example shows how to retrieve a secret string value.
|
|
118
118
|
* const input = {
|
|
119
|
-
*
|
|
119
|
+
* SecretId: "MyTestDatabaseSecret"
|
|
120
120
|
* };
|
|
121
121
|
* const command = new GetSecretValueCommand(input);
|
|
122
122
|
* const response = await client.send(command);
|
|
123
|
-
* /* response
|
|
123
|
+
* /* response is
|
|
124
124
|
* {
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
* "
|
|
130
|
-
* "
|
|
125
|
+
* ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
126
|
+
* CreatedDate: 1.523477145713E9,
|
|
127
|
+
* Name: "MyTestDatabaseSecret",
|
|
128
|
+
* SecretString: `{
|
|
129
|
+
* "username":"david",
|
|
130
|
+
* "password":"EXAMPLE-PASSWORD"
|
|
131
|
+
* }
|
|
132
|
+
* `,
|
|
133
|
+
* VersionId: "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1",
|
|
134
|
+
* VersionStages: [
|
|
131
135
|
* "AWSPREVIOUS"
|
|
132
136
|
* ]
|
|
133
137
|
* }
|
|
134
138
|
* *\/
|
|
135
|
-
* // example id: to-retrieve-the-encrypted-secret-value-of-a-secret-1524000702484
|
|
136
139
|
* ```
|
|
137
140
|
*
|
|
141
|
+
* @public
|
|
138
142
|
*/
|
|
139
143
|
export declare class GetSecretValueCommand extends GetSecretValueCommand_base {
|
|
140
144
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -94,45 +94,45 @@ declare const ListSecretVersionIdsCommand_base: {
|
|
|
94
94
|
* @throws {@link SecretsManagerServiceException}
|
|
95
95
|
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
96
96
|
*
|
|
97
|
-
*
|
|
97
|
+
*
|
|
98
98
|
* @example To list all of the secret versions associated with a secret
|
|
99
99
|
* ```javascript
|
|
100
100
|
* // The following example shows how to retrieve a list of all of the versions of a secret, including those without any staging labels.
|
|
101
101
|
* const input = {
|
|
102
|
-
*
|
|
103
|
-
*
|
|
102
|
+
* IncludeDeprecated: true,
|
|
103
|
+
* SecretId: "MyTestDatabaseSecret"
|
|
104
104
|
* };
|
|
105
105
|
* const command = new ListSecretVersionIdsCommand(input);
|
|
106
106
|
* const response = await client.send(command);
|
|
107
|
-
* /* response
|
|
107
|
+
* /* response is
|
|
108
108
|
* {
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
109
|
+
* ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
110
|
+
* Name: "MyTestDatabaseSecret",
|
|
111
|
+
* Versions: [
|
|
112
112
|
* {
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
113
|
+
* CreatedDate: 1.523477145713E9,
|
|
114
|
+
* VersionId: "EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE",
|
|
115
|
+
* VersionStages: [
|
|
116
116
|
* "AWSPREVIOUS"
|
|
117
117
|
* ]
|
|
118
118
|
* },
|
|
119
119
|
* {
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
120
|
+
* CreatedDate: 1.523486221391E9,
|
|
121
|
+
* VersionId: "EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE",
|
|
122
|
+
* VersionStages: [
|
|
123
123
|
* "AWSCURRENT"
|
|
124
124
|
* ]
|
|
125
125
|
* },
|
|
126
126
|
* {
|
|
127
|
-
*
|
|
128
|
-
*
|
|
127
|
+
* CreatedDate: 1.51197446236E9,
|
|
128
|
+
* VersionId: "EXAMPLE3-90ab-cdef-fedc-ba987EXAMPLE;"
|
|
129
129
|
* }
|
|
130
130
|
* ]
|
|
131
131
|
* }
|
|
132
132
|
* *\/
|
|
133
|
-
* // example id: to-list-all-of-the-secret-versions-associated-with-a-secret-1524000999164
|
|
134
133
|
* ```
|
|
135
134
|
*
|
|
135
|
+
* @public
|
|
136
136
|
*/
|
|
137
137
|
export declare class ListSecretVersionIdsCommand extends ListSecretVersionIdsCommand_base {
|
|
138
138
|
/** @internal type navigation helper, not in runtime. */
|