@aws-sdk/client-secrets-manager 3.775.0 → 3.782.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-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 +5 -5
|
@@ -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. */
|
|
@@ -138,34 +138,34 @@ declare const ListSecretsCommand_base: {
|
|
|
138
138
|
* @throws {@link SecretsManagerServiceException}
|
|
139
139
|
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
140
140
|
*
|
|
141
|
-
*
|
|
141
|
+
*
|
|
142
142
|
* @example To list the secrets in your account
|
|
143
143
|
* ```javascript
|
|
144
144
|
* // The following example shows how to list all of the secrets in your account.
|
|
145
|
-
* const input = {};
|
|
145
|
+
* const input = { /* empty *\/ };
|
|
146
146
|
* const command = new ListSecretsCommand(input);
|
|
147
147
|
* const response = await client.send(command);
|
|
148
|
-
* /* response
|
|
148
|
+
* /* response is
|
|
149
149
|
* {
|
|
150
|
-
*
|
|
150
|
+
* SecretList: [
|
|
151
151
|
* {
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
152
|
+
* ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
153
|
+
* Description: "My test database secret",
|
|
154
|
+
* LastChangedDate: 1.523477145729E9,
|
|
155
|
+
* Name: "MyTestDatabaseSecret",
|
|
156
|
+
* SecretVersionsToStages: {
|
|
157
|
+
* EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE: [
|
|
158
158
|
* "AWSCURRENT"
|
|
159
159
|
* ]
|
|
160
160
|
* }
|
|
161
161
|
* },
|
|
162
162
|
* {
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
163
|
+
* ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret1-d4e5f6",
|
|
164
|
+
* Description: "Another secret created for a different database",
|
|
165
|
+
* LastChangedDate: 1.523482025685E9,
|
|
166
|
+
* Name: "MyTestDatabaseSecret1",
|
|
167
|
+
* SecretVersionsToStages: {
|
|
168
|
+
* EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE: [
|
|
169
169
|
* "AWSCURRENT"
|
|
170
170
|
* ]
|
|
171
171
|
* }
|
|
@@ -173,9 +173,9 @@ declare const ListSecretsCommand_base: {
|
|
|
173
173
|
* ]
|
|
174
174
|
* }
|
|
175
175
|
* *\/
|
|
176
|
-
* // example id: to-list-the-secrets-in-your-account-1524001246087
|
|
177
176
|
* ```
|
|
178
177
|
*
|
|
178
|
+
* @public
|
|
179
179
|
*/
|
|
180
180
|
export declare class ListSecretsCommand extends ListSecretsCommand_base {
|
|
181
181
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -101,25 +101,35 @@ declare const PutResourcePolicyCommand_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 add a resource-based policy to a secret
|
|
106
106
|
* ```javascript
|
|
107
107
|
* // The following example shows how to add a resource-based policy to a secret.
|
|
108
108
|
* const input = {
|
|
109
|
-
*
|
|
110
|
-
*
|
|
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
|
+
* }`,
|
|
120
|
+
* SecretId: "MyTestDatabaseSecret"
|
|
111
121
|
* };
|
|
112
122
|
* const command = new PutResourcePolicyCommand(input);
|
|
113
123
|
* const response = await client.send(command);
|
|
114
|
-
* /* response
|
|
124
|
+
* /* response is
|
|
115
125
|
* {
|
|
116
|
-
*
|
|
117
|
-
*
|
|
126
|
+
* ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
127
|
+
* Name: "MyTestDatabaseSecret"
|
|
118
128
|
* }
|
|
119
129
|
* *\/
|
|
120
|
-
* // example id: to-add-a-resource-based-policy-to-a-secret-1530209881839
|
|
121
130
|
* ```
|
|
122
131
|
*
|
|
132
|
+
* @public
|
|
123
133
|
*/
|
|
124
134
|
export declare class PutResourcePolicyCommand extends PutResourcePolicyCommand_base {
|
|
125
135
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -137,30 +137,30 @@ declare const PutSecretValueCommand_base: {
|
|
|
137
137
|
* @throws {@link SecretsManagerServiceException}
|
|
138
138
|
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
139
139
|
*
|
|
140
|
-
*
|
|
140
|
+
*
|
|
141
141
|
* @example To store a secret value in a new version of a secret
|
|
142
142
|
* ```javascript
|
|
143
143
|
* // The following example shows how to create a new version of the secret. Alternatively, you can use the update-secret command.
|
|
144
144
|
* const input = {
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
145
|
+
* ClientRequestToken: "EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE",
|
|
146
|
+
* SecretId: "MyTestDatabaseSecret",
|
|
147
|
+
* SecretString: `{"username":"david","password":"EXAMPLE-PASSWORD"}`
|
|
148
148
|
* };
|
|
149
149
|
* const command = new PutSecretValueCommand(input);
|
|
150
150
|
* const response = await client.send(command);
|
|
151
|
-
* /* response
|
|
151
|
+
* /* response is
|
|
152
152
|
* {
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
153
|
+
* ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
154
|
+
* Name: "MyTestDatabaseSecret",
|
|
155
|
+
* VersionId: "EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE",
|
|
156
|
+
* VersionStages: [
|
|
157
157
|
* "AWSCURRENT"
|
|
158
158
|
* ]
|
|
159
159
|
* }
|
|
160
160
|
* *\/
|
|
161
|
-
* // example id: to-store-a-secret-value-in-a-new-version-of-a-secret-1524001393971
|
|
162
161
|
* ```
|
|
163
162
|
*
|
|
163
|
+
* @public
|
|
164
164
|
*/
|
|
165
165
|
export declare class PutSecretValueCommand extends PutSecretValueCommand_base {
|
|
166
166
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -100,6 +100,7 @@ declare const RemoveRegionsFromReplicationCommand_base: {
|
|
|
100
100
|
* @throws {@link SecretsManagerServiceException}
|
|
101
101
|
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
102
102
|
*
|
|
103
|
+
*
|
|
103
104
|
* @public
|
|
104
105
|
*/
|
|
105
106
|
export declare class RemoveRegionsFromReplicationCommand extends RemoveRegionsFromReplicationCommand_base {
|
|
@@ -104,36 +104,36 @@ declare const ReplicateSecretToRegionsCommand_base: {
|
|
|
104
104
|
* @throws {@link SecretsManagerServiceException}
|
|
105
105
|
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
106
106
|
*
|
|
107
|
-
*
|
|
107
|
+
*
|
|
108
108
|
* @example Example
|
|
109
109
|
* ```javascript
|
|
110
110
|
* // The following example replicates a secret to eu-west-3. The replica is encrypted with the AWS managed key aws/secretsmanager.
|
|
111
111
|
* const input = {
|
|
112
|
-
*
|
|
112
|
+
* AddReplicaRegions: [
|
|
113
113
|
* {
|
|
114
|
-
*
|
|
114
|
+
* Region: "eu-west-3"
|
|
115
115
|
* }
|
|
116
116
|
* ],
|
|
117
|
-
*
|
|
118
|
-
*
|
|
117
|
+
* ForceOverwriteReplicaSecret: true,
|
|
118
|
+
* SecretId: "MyTestSecret"
|
|
119
119
|
* };
|
|
120
120
|
* const command = new ReplicateSecretToRegionsCommand(input);
|
|
121
121
|
* const response = await client.send(command);
|
|
122
|
-
* /* response
|
|
122
|
+
* /* response is
|
|
123
123
|
* {
|
|
124
|
-
*
|
|
125
|
-
*
|
|
124
|
+
* ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestSecret-1a2b3c",
|
|
125
|
+
* ReplicationStatus: [
|
|
126
126
|
* {
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
127
|
+
* KmsKeyId: "alias/aws/secretsmanager",
|
|
128
|
+
* Region: "eu-west-3",
|
|
129
|
+
* Status: "InProgress"
|
|
130
130
|
* }
|
|
131
131
|
* ]
|
|
132
132
|
* }
|
|
133
133
|
* *\/
|
|
134
|
-
* // example id: example-1679591984774
|
|
135
134
|
* ```
|
|
136
135
|
*
|
|
136
|
+
* @public
|
|
137
137
|
*/
|
|
138
138
|
export declare class ReplicateSecretToRegionsCommand extends ReplicateSecretToRegionsCommand_base {
|
|
139
139
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -90,24 +90,24 @@ declare const RestoreSecretCommand_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 restore a previously deleted secret
|
|
95
95
|
* ```javascript
|
|
96
96
|
* // The following example shows how to restore a secret that you previously scheduled for deletion.
|
|
97
97
|
* const input = {
|
|
98
|
-
*
|
|
98
|
+
* SecretId: "MyTestDatabaseSecret"
|
|
99
99
|
* };
|
|
100
100
|
* const command = new RestoreSecretCommand(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-restore-a-previously-deleted-secret-1524001513930
|
|
109
108
|
* ```
|
|
110
109
|
*
|
|
110
|
+
* @public
|
|
111
111
|
*/
|
|
112
112
|
export declare class RestoreSecretCommand extends RestoreSecretCommand_base {
|
|
113
113
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -106,48 +106,47 @@ declare const RotateSecretCommand_base: {
|
|
|
106
106
|
* @throws {@link SecretsManagerServiceException}
|
|
107
107
|
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
108
108
|
*
|
|
109
|
-
*
|
|
109
|
+
*
|
|
110
110
|
* @example To configure rotation for a secret
|
|
111
111
|
* ```javascript
|
|
112
112
|
* // 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.
|
|
113
113
|
* const input = {
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
114
|
+
* RotationLambdaARN: "arn:aws:lambda:us-west-2:123456789012:function:MyTestDatabaseRotationLambda",
|
|
115
|
+
* RotationRules: {
|
|
116
|
+
* Duration: "2h",
|
|
117
|
+
* ScheduleExpression: "cron(0 16 1,15 * ? *)"
|
|
118
118
|
* },
|
|
119
|
-
*
|
|
119
|
+
* SecretId: "MyTestDatabaseSecret"
|
|
120
120
|
* };
|
|
121
121
|
* const command = new RotateSecretCommand(input);
|
|
122
122
|
* const response = await client.send(command);
|
|
123
|
-
* /* response
|
|
123
|
+
* /* response is
|
|
124
124
|
* {
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
125
|
+
* ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
126
|
+
* Name: "MyTestDatabaseSecret",
|
|
127
|
+
* VersionId: "EXAMPLE2-90ab-cdef-fedc-ba987SECRET2"
|
|
128
128
|
* }
|
|
129
129
|
* *\/
|
|
130
|
-
* // example id: to-configure-rotation-for-a-secret-1524001629475
|
|
131
130
|
* ```
|
|
132
131
|
*
|
|
133
132
|
* @example To request an immediate rotation for a secret
|
|
134
133
|
* ```javascript
|
|
135
134
|
* // 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.
|
|
136
135
|
* const input = {
|
|
137
|
-
*
|
|
136
|
+
* SecretId: "MyTestDatabaseSecret"
|
|
138
137
|
* };
|
|
139
138
|
* const command = new RotateSecretCommand(input);
|
|
140
139
|
* const response = await client.send(command);
|
|
141
|
-
* /* response
|
|
140
|
+
* /* response is
|
|
142
141
|
* {
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
142
|
+
* ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
143
|
+
* Name: "MyTestDatabaseSecret",
|
|
144
|
+
* VersionId: "EXAMPLE2-90ab-cdef-fedc-ba987SECRET2"
|
|
146
145
|
* }
|
|
147
146
|
* *\/
|
|
148
|
-
* // example id: to-request-an-immediate-rotation-for-a-secret-1524001949004
|
|
149
147
|
* ```
|
|
150
148
|
*
|
|
149
|
+
* @public
|
|
151
150
|
*/
|
|
152
151
|
export declare class RotateSecretCommand extends RotateSecretCommand_base {
|
|
153
152
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -89,6 +89,7 @@ declare const StopReplicationToReplicaCommand_base: {
|
|
|
89
89
|
* @throws {@link SecretsManagerServiceException}
|
|
90
90
|
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
91
91
|
*
|
|
92
|
+
*
|
|
92
93
|
* @public
|
|
93
94
|
*/
|
|
94
95
|
export declare class StopReplicationToReplicaCommand extends StopReplicationToReplicaCommand_base {
|
|
@@ -101,28 +101,31 @@ declare const TagResourceCommand_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 add tags to a secret
|
|
106
106
|
* ```javascript
|
|
107
107
|
* // 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.
|
|
108
108
|
* const input = {
|
|
109
|
-
*
|
|
110
|
-
*
|
|
109
|
+
* SecretId: "MyExampleSecret",
|
|
110
|
+
* Tags: [
|
|
111
111
|
* {
|
|
112
|
-
*
|
|
113
|
-
*
|
|
112
|
+
* Key: "FirstTag",
|
|
113
|
+
* Value: "SomeValue"
|
|
114
114
|
* },
|
|
115
115
|
* {
|
|
116
|
-
*
|
|
117
|
-
*
|
|
116
|
+
* Key: "SecondTag",
|
|
117
|
+
* Value: "AnotherValue"
|
|
118
118
|
* }
|
|
119
119
|
* ]
|
|
120
120
|
* };
|
|
121
121
|
* const command = new TagResourceCommand(input);
|
|
122
|
-
* await client.send(command);
|
|
123
|
-
*
|
|
122
|
+
* const response = await client.send(command);
|
|
123
|
+
* /* response is
|
|
124
|
+
* { /* metadata only *\/ }
|
|
125
|
+
* *\/
|
|
124
126
|
* ```
|
|
125
127
|
*
|
|
128
|
+
* @public
|
|
126
129
|
*/
|
|
127
130
|
export declare class TagResourceCommand extends TagResourceCommand_base {
|
|
128
131
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -97,22 +97,25 @@ declare const UntagResourceCommand_base: {
|
|
|
97
97
|
* @throws {@link SecretsManagerServiceException}
|
|
98
98
|
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
99
99
|
*
|
|
100
|
-
*
|
|
100
|
+
*
|
|
101
101
|
* @example To remove tags from a secret
|
|
102
102
|
* ```javascript
|
|
103
103
|
* // 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.
|
|
104
104
|
* const input = {
|
|
105
|
-
*
|
|
106
|
-
*
|
|
105
|
+
* SecretId: "MyTestDatabaseSecret",
|
|
106
|
+
* TagKeys: [
|
|
107
107
|
* "FirstTag",
|
|
108
108
|
* "SecondTag"
|
|
109
109
|
* ]
|
|
110
110
|
* };
|
|
111
111
|
* const command = new UntagResourceCommand(input);
|
|
112
|
-
* await client.send(command);
|
|
113
|
-
*
|
|
112
|
+
* const response = await client.send(command);
|
|
113
|
+
* /* response is
|
|
114
|
+
* { /* metadata only *\/ }
|
|
115
|
+
* *\/
|
|
114
116
|
* ```
|
|
115
117
|
*
|
|
118
|
+
* @public
|
|
116
119
|
*/
|
|
117
120
|
export declare class UntagResourceCommand extends UntagResourceCommand_base {
|
|
118
121
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -137,63 +137,61 @@ declare const UpdateSecretCommand_base: {
|
|
|
137
137
|
* @throws {@link SecretsManagerServiceException}
|
|
138
138
|
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
139
139
|
*
|
|
140
|
-
*
|
|
141
|
-
* @example To
|
|
140
|
+
*
|
|
141
|
+
* @example To create a new version of the encrypted secret value
|
|
142
142
|
* ```javascript
|
|
143
|
-
* // The following example shows how to
|
|
143
|
+
* // 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.
|
|
144
144
|
* const input = {
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
* "SecretId": "MyTestDatabaseSecret"
|
|
145
|
+
* SecretId: "MyTestDatabaseSecret",
|
|
146
|
+
* SecretString: "{JSON STRING WITH CREDENTIALS}"
|
|
148
147
|
* };
|
|
149
148
|
* const command = new UpdateSecretCommand(input);
|
|
150
149
|
* const response = await client.send(command);
|
|
151
|
-
* /* response
|
|
150
|
+
* /* response is
|
|
152
151
|
* {
|
|
153
|
-
*
|
|
154
|
-
*
|
|
152
|
+
* ARN: "aws:arn:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
153
|
+
* Name: "MyTestDatabaseSecret",
|
|
154
|
+
* VersionId: "EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE"
|
|
155
155
|
* }
|
|
156
156
|
* *\/
|
|
157
|
-
* // example id: to-update-the-description-of-a-secret-1524002349094
|
|
158
157
|
* ```
|
|
159
158
|
*
|
|
160
|
-
* @example To update the
|
|
159
|
+
* @example To update the description of a secret
|
|
161
160
|
* ```javascript
|
|
162
|
-
* //
|
|
161
|
+
* // The following example shows how to modify the description of a secret.
|
|
163
162
|
* const input = {
|
|
164
|
-
*
|
|
165
|
-
*
|
|
163
|
+
* ClientRequestToken: "EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE",
|
|
164
|
+
* Description: "This is a new description for the secret.",
|
|
165
|
+
* SecretId: "MyTestDatabaseSecret"
|
|
166
166
|
* };
|
|
167
167
|
* const command = new UpdateSecretCommand(input);
|
|
168
168
|
* const response = await client.send(command);
|
|
169
|
-
* /* response
|
|
169
|
+
* /* response is
|
|
170
170
|
* {
|
|
171
|
-
*
|
|
172
|
-
*
|
|
171
|
+
* ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
172
|
+
* Name: "MyTestDatabaseSecret"
|
|
173
173
|
* }
|
|
174
174
|
* *\/
|
|
175
|
-
* // example id: to-update-the-kms-key-associated-with-a-secret-1524002421563
|
|
176
175
|
* ```
|
|
177
176
|
*
|
|
178
|
-
* @example To
|
|
177
|
+
* @example To update the KMS key associated with a secret
|
|
179
178
|
* ```javascript
|
|
180
|
-
* //
|
|
179
|
+
* // 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.
|
|
181
180
|
* const input = {
|
|
182
|
-
*
|
|
183
|
-
*
|
|
181
|
+
* KmsKeyId: "arn:aws:kms:us-west-2:123456789012:key/EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE",
|
|
182
|
+
* SecretId: "MyTestDatabaseSecret"
|
|
184
183
|
* };
|
|
185
184
|
* const command = new UpdateSecretCommand(input);
|
|
186
185
|
* const response = await client.send(command);
|
|
187
|
-
* /* response
|
|
186
|
+
* /* response is
|
|
188
187
|
* {
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
* "VersionId": "EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE"
|
|
188
|
+
* ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
189
|
+
* Name: "MyTestDatabaseSecret"
|
|
192
190
|
* }
|
|
193
191
|
* *\/
|
|
194
|
-
* // example id: to-create-a-new-version-of-the-encrypted-secret-value-1524004651836
|
|
195
192
|
* ```
|
|
196
193
|
*
|
|
194
|
+
* @public
|
|
197
195
|
*/
|
|
198
196
|
export declare class UpdateSecretCommand extends UpdateSecretCommand_base {
|
|
199
197
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -109,65 +109,63 @@ declare const UpdateSecretVersionStageCommand_base: {
|
|
|
109
109
|
* @throws {@link SecretsManagerServiceException}
|
|
110
110
|
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
111
111
|
*
|
|
112
|
-
*
|
|
112
|
+
*
|
|
113
113
|
* @example To add a staging label attached to a version of a secret
|
|
114
114
|
* ```javascript
|
|
115
115
|
* // The following example shows you how to add a staging label to a version of a secret. You can review the results by running the operation ListSecretVersionIds and viewing the VersionStages response field for the affected version.
|
|
116
116
|
* const input = {
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
117
|
+
* MoveToVersionId: "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1",
|
|
118
|
+
* SecretId: "MyTestDatabaseSecret",
|
|
119
|
+
* VersionStage: "STAGINGLABEL1"
|
|
120
120
|
* };
|
|
121
121
|
* const command = new UpdateSecretVersionStageCommand(input);
|
|
122
122
|
* const response = await client.send(command);
|
|
123
|
-
* /* response
|
|
123
|
+
* /* response is
|
|
124
124
|
* {
|
|
125
|
-
*
|
|
126
|
-
*
|
|
125
|
+
* ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
126
|
+
* Name: "MyTestDatabaseSecret"
|
|
127
127
|
* }
|
|
128
128
|
* *\/
|
|
129
|
-
* // example id: to-add-a-staging-label-attached-to-a-version-of-a-secret-1524004783841
|
|
130
129
|
* ```
|
|
131
130
|
*
|
|
132
131
|
* @example To delete a staging label attached to a version of a secret
|
|
133
132
|
* ```javascript
|
|
134
133
|
* // The following example shows you how to delete a staging label that is attached to a version of a secret. You can review the results by running the operation ListSecretVersionIds and viewing the VersionStages response field for the affected version.
|
|
135
134
|
* const input = {
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
135
|
+
* RemoveFromVersionId: "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1",
|
|
136
|
+
* SecretId: "MyTestDatabaseSecret",
|
|
137
|
+
* VersionStage: "STAGINGLABEL1"
|
|
139
138
|
* };
|
|
140
139
|
* const command = new UpdateSecretVersionStageCommand(input);
|
|
141
140
|
* const response = await client.send(command);
|
|
142
|
-
* /* response
|
|
141
|
+
* /* response is
|
|
143
142
|
* {
|
|
144
|
-
*
|
|
145
|
-
*
|
|
143
|
+
* ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
144
|
+
* Name: "MyTestDatabaseSecret"
|
|
146
145
|
* }
|
|
147
146
|
* *\/
|
|
148
|
-
* // example id: to-delete-a-staging-label-attached-to-a-version-of-a-secret-1524004862181
|
|
149
147
|
* ```
|
|
150
148
|
*
|
|
151
149
|
* @example To move a staging label from one version of a secret to another
|
|
152
150
|
* ```javascript
|
|
153
151
|
* // The following example shows you how to move a staging label that is attached to one version of a secret to a different version. You can review the results by running the operation ListSecretVersionIds and viewing the VersionStages response field for the affected version.
|
|
154
152
|
* const input = {
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
153
|
+
* MoveToVersionId: "EXAMPLE2-90ab-cdef-fedc-ba987SECRET2",
|
|
154
|
+
* RemoveFromVersionId: "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1",
|
|
155
|
+
* SecretId: "MyTestDatabaseSecret",
|
|
156
|
+
* VersionStage: "AWSCURRENT"
|
|
159
157
|
* };
|
|
160
158
|
* const command = new UpdateSecretVersionStageCommand(input);
|
|
161
159
|
* const response = await client.send(command);
|
|
162
|
-
* /* response
|
|
160
|
+
* /* response is
|
|
163
161
|
* {
|
|
164
|
-
*
|
|
165
|
-
*
|
|
162
|
+
* ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
|
|
163
|
+
* Name: "MyTestDatabaseSecret"
|
|
166
164
|
* }
|
|
167
165
|
* *\/
|
|
168
|
-
* // example id: to-move-a-staging-label-from-one-version-of-a-secret-to-another-1524004963841
|
|
169
166
|
* ```
|
|
170
167
|
*
|
|
168
|
+
* @public
|
|
171
169
|
*/
|
|
172
170
|
export declare class UpdateSecretVersionStageCommand extends UpdateSecretVersionStageCommand_base {
|
|
173
171
|
/** @internal type navigation helper, not in runtime. */
|
|
@@ -112,25 +112,35 @@ declare const ValidateResourcePolicyCommand_base: {
|
|
|
112
112
|
* @throws {@link SecretsManagerServiceException}
|
|
113
113
|
* <p>Base exception class for all service exceptions from SecretsManager service.</p>
|
|
114
114
|
*
|
|
115
|
-
*
|
|
115
|
+
*
|
|
116
116
|
* @example To validate a resource-based policy to a secret
|
|
117
117
|
* ```javascript
|
|
118
118
|
* // The following example shows how to validate a resource-based policy to a secret.
|
|
119
119
|
* const input = {
|
|
120
|
-
*
|
|
121
|
-
*
|
|
120
|
+
* ResourcePolicy: `{
|
|
121
|
+
* "Version":"2012-10-17",
|
|
122
|
+
* "Statement":[{
|
|
123
|
+
* "Effect":"Allow",
|
|
124
|
+
* "Principal":{
|
|
125
|
+
* "AWS":"arn:aws:iam::123456789012:root"
|
|
126
|
+
* },
|
|
127
|
+
* "Action":"secretsmanager:GetSecretValue",
|
|
128
|
+
* "Resource":"*"
|
|
129
|
+
* }]
|
|
130
|
+
* }`,
|
|
131
|
+
* SecretId: "MyTestDatabaseSecret"
|
|
122
132
|
* };
|
|
123
133
|
* const command = new ValidateResourcePolicyCommand(input);
|
|
124
134
|
* const response = await client.send(command);
|
|
125
|
-
* /* response
|
|
135
|
+
* /* response is
|
|
126
136
|
* {
|
|
127
|
-
*
|
|
128
|
-
*
|
|
137
|
+
* PolicyValidationPassed: true,
|
|
138
|
+
* ValidationErrors: []
|
|
129
139
|
* }
|
|
130
140
|
* *\/
|
|
131
|
-
* // example id: to-validate-the-resource-policy-of-a-secret-1524000138629
|
|
132
141
|
* ```
|
|
133
142
|
*
|
|
143
|
+
* @public
|
|
134
144
|
*/
|
|
135
145
|
export declare class ValidateResourcePolicyCommand extends ValidateResourcePolicyCommand_base {
|
|
136
146
|
/** @internal type navigation helper, not in runtime. */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-secrets-manager",
|
|
3
3
|
"description": "AWS SDK for JavaScript Secrets Manager Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.782.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-secrets-manager",
|
|
@@ -21,16 +21,16 @@
|
|
|
21
21
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
23
23
|
"@aws-sdk/core": "3.775.0",
|
|
24
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
24
|
+
"@aws-sdk/credential-provider-node": "3.782.0",
|
|
25
25
|
"@aws-sdk/middleware-host-header": "3.775.0",
|
|
26
26
|
"@aws-sdk/middleware-logger": "3.775.0",
|
|
27
27
|
"@aws-sdk/middleware-recursion-detection": "3.775.0",
|
|
28
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
28
|
+
"@aws-sdk/middleware-user-agent": "3.782.0",
|
|
29
29
|
"@aws-sdk/region-config-resolver": "3.775.0",
|
|
30
30
|
"@aws-sdk/types": "3.775.0",
|
|
31
|
-
"@aws-sdk/util-endpoints": "3.
|
|
31
|
+
"@aws-sdk/util-endpoints": "3.782.0",
|
|
32
32
|
"@aws-sdk/util-user-agent-browser": "3.775.0",
|
|
33
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
33
|
+
"@aws-sdk/util-user-agent-node": "3.782.0",
|
|
34
34
|
"@smithy/config-resolver": "^4.1.0",
|
|
35
35
|
"@smithy/core": "^3.2.0",
|
|
36
36
|
"@smithy/fetch-http-handler": "^5.0.2",
|