@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.
Files changed (30) hide show
  1. package/dist-cjs/auth/httpAuthSchemeProvider.js +1 -3
  2. package/dist-cjs/index.js +17 -18
  3. package/dist-es/SecretsManagerClient.js +2 -1
  4. package/dist-es/auth/httpAuthSchemeProvider.js +1 -3
  5. package/dist-es/endpoint/EndpointParameters.js +2 -3
  6. package/dist-es/runtimeExtensions.js +2 -14
  7. package/dist-types/commands/BatchGetSecretValueCommand.d.ts +24 -24
  8. package/dist-types/commands/CancelRotateSecretCommand.d.ts +6 -6
  9. package/dist-types/commands/CreateSecretCommand.d.ts +10 -10
  10. package/dist-types/commands/DeleteResourcePolicyCommand.d.ts +6 -6
  11. package/dist-types/commands/DeleteSecretCommand.d.ts +1 -19
  12. package/dist-types/commands/DescribeSecretCommand.d.ts +1 -48
  13. package/dist-types/commands/GetRandomPasswordCommand.d.ts +7 -7
  14. package/dist-types/commands/GetResourcePolicyCommand.d.ts +17 -7
  15. package/dist-types/commands/GetSecretValueCommand.d.ts +14 -10
  16. package/dist-types/commands/ListSecretVersionIdsCommand.d.ts +16 -16
  17. package/dist-types/commands/ListSecretsCommand.d.ts +17 -17
  18. package/dist-types/commands/PutResourcePolicyCommand.d.ts +17 -7
  19. package/dist-types/commands/PutSecretValueCommand.d.ts +10 -10
  20. package/dist-types/commands/RemoveRegionsFromReplicationCommand.d.ts +1 -0
  21. package/dist-types/commands/ReplicateSecretToRegionsCommand.d.ts +12 -12
  22. package/dist-types/commands/RestoreSecretCommand.d.ts +6 -6
  23. package/dist-types/commands/RotateSecretCommand.d.ts +16 -17
  24. package/dist-types/commands/StopReplicationToReplicaCommand.d.ts +1 -0
  25. package/dist-types/commands/TagResourceCommand.d.ts +12 -9
  26. package/dist-types/commands/UntagResourceCommand.d.ts +8 -5
  27. package/dist-types/commands/UpdateSecretCommand.d.ts +25 -27
  28. package/dist-types/commands/UpdateSecretVersionStageCommand.d.ts +21 -23
  29. package/dist-types/commands/ValidateResourcePolicyCommand.d.ts +17 -7
  30. package/package.json +33 -33
@@ -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
- * @public
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
- * "SecretList": [
150
+ * SecretList: [
151
151
  * {
152
- * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
153
- * "Description": "My test database secret",
154
- * "LastChangedDate": 1523477145.729,
155
- * "Name": "MyTestDatabaseSecret",
156
- * "SecretVersionsToStages": {
157
- * "EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE": [
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
- * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret1-d4e5f6",
164
- * "Description": "Another secret created for a different database",
165
- * "LastChangedDate": 1523482025.685,
166
- * "Name": "MyTestDatabaseSecret1",
167
- * "SecretVersionsToStages": {
168
- * "EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE": [
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
- * @public
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
- * "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}",
110
- * "SecretId": "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
+ * }`,
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
- * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
117
- * "Name": "MyTestDatabaseSecret"
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
- * @public
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
- * "ClientRequestToken": "EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE",
146
- * "SecretId": "MyTestDatabaseSecret",
147
- * "SecretString": "{\"username\":\"david\",\"password\":\"EXAMPLE-PASSWORD\"}"
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
- * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
154
- * "Name": "MyTestDatabaseSecret",
155
- * "VersionId": "EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE",
156
- * "VersionStages": [
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
- * @public
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
- * "AddReplicaRegions": [
112
+ * AddReplicaRegions: [
113
113
  * {
114
- * "Region": "eu-west-3"
114
+ * Region: "eu-west-3"
115
115
  * }
116
116
  * ],
117
- * "ForceOverwriteReplicaSecret": true,
118
- * "SecretId": "MyTestSecret"
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
- * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestSecret-1a2b3c",
125
- * "ReplicationStatus": [
124
+ * ARN: "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestSecret-1a2b3c",
125
+ * ReplicationStatus: [
126
126
  * {
127
- * "KmsKeyId": "alias/aws/secretsmanager",
128
- * "Region": "eu-west-3",
129
- * "Status": "InProgress"
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
- * @public
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
- * "SecretId": "MyTestDatabaseSecret"
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
- * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
105
- * "Name": "MyTestDatabaseSecret"
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
- * @public
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
- * "RotationLambdaARN": "arn:aws:lambda:us-west-2:123456789012:function:MyTestDatabaseRotationLambda",
115
- * "RotationRules": {
116
- * "Duration": "2h",
117
- * "ScheduleExpression": "cron(0 16 1,15 * ? *)"
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
- * "SecretId": "MyTestDatabaseSecret"
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
- * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
126
- * "Name": "MyTestDatabaseSecret",
127
- * "VersionId": "EXAMPLE2-90ab-cdef-fedc-ba987SECRET2"
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
- * "SecretId": "MyTestDatabaseSecret"
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
- * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
144
- * "Name": "MyTestDatabaseSecret",
145
- * "VersionId": "EXAMPLE2-90ab-cdef-fedc-ba987SECRET2"
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
- * @public
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
- * "SecretId": "MyExampleSecret",
110
- * "Tags": [
109
+ * SecretId: "MyExampleSecret",
110
+ * Tags: [
111
111
  * {
112
- * "Key": "FirstTag",
113
- * "Value": "SomeValue"
112
+ * Key: "FirstTag",
113
+ * Value: "SomeValue"
114
114
  * },
115
115
  * {
116
- * "Key": "SecondTag",
117
- * "Value": "AnotherValue"
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
- * // example id: to-add-tags-to-a-secret-1524002106718
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
- * @public
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
- * "SecretId": "MyTestDatabaseSecret",
106
- * "TagKeys": [
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
- * // example id: to-remove-tags-from-a-secret-1524002239065
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
- * @public
141
- * @example To update the description of a secret
140
+ *
141
+ * @example To create a new version of the encrypted secret value
142
142
  * ```javascript
143
- * // The following example shows how to modify the description of a secret.
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
- * "ClientRequestToken": "EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE",
146
- * "Description": "This is a new description for the secret.",
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
- * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
154
- * "Name": "MyTestDatabaseSecret"
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 KMS key associated with a secret
159
+ * @example To update the description of a secret
161
160
  * ```javascript
162
- * // 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.
161
+ * // The following example shows how to modify the description of a secret.
163
162
  * const input = {
164
- * "KmsKeyId": "arn:aws:kms:us-west-2:123456789012:key/EXAMPLE2-90ab-cdef-fedc-ba987EXAMPLE",
165
- * "SecretId": "MyTestDatabaseSecret"
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
- * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
172
- * "Name": "MyTestDatabaseSecret"
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 create a new version of the encrypted secret value
177
+ * @example To update the KMS key associated with a secret
179
178
  * ```javascript
180
- * // 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.
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
- * "SecretId": "MyTestDatabaseSecret",
183
- * "SecretString": "{JSON STRING WITH CREDENTIALS}"
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
- * "ARN": "aws:arn:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
190
- * "Name": "MyTestDatabaseSecret",
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
- * @public
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
- * "MoveToVersionId": "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1",
118
- * "SecretId": "MyTestDatabaseSecret",
119
- * "VersionStage": "STAGINGLABEL1"
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
- * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
126
- * "Name": "MyTestDatabaseSecret"
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
- * "RemoveFromVersionId": "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1",
137
- * "SecretId": "MyTestDatabaseSecret",
138
- * "VersionStage": "STAGINGLABEL1"
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
- * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
145
- * "Name": "MyTestDatabaseSecret"
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
- * "MoveToVersionId": "EXAMPLE2-90ab-cdef-fedc-ba987SECRET2",
156
- * "RemoveFromVersionId": "EXAMPLE1-90ab-cdef-fedc-ba987SECRET1",
157
- * "SecretId": "MyTestDatabaseSecret",
158
- * "VersionStage": "AWSCURRENT"
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
- * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3",
165
- * "Name": "MyTestDatabaseSecret"
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
- * @public
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
- * "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}",
121
- * "SecretId": "MyTestDatabaseSecret"
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
- * "PolicyValidationPassed": true,
128
- * "ValidationErrors": []
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. */