Skip to content

Commit 5e1ced7

Browse files
author
awstools
committed
docs(client-secrets-manager): Documentation updates for Secrets Manager
1 parent 75fac5e commit 5e1ced7

25 files changed

+154
-120
lines changed

clients/client-secrets-manager/src/SecretsManager.ts

+48-34
Large diffs are not rendered by default.

clients/client-secrets-manager/src/commands/CancelRotateSecretCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export interface CancelRotateSecretCommandOutput extends CancelRotateSecretRespo
3636
* <p>
3737
* <b>Required permissions: </b>
3838
* <code>secretsmanager:CancelRotateSecret</code>.
39-
* For more information, see <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions">
39+
* For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
4040
* IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
4141
* and access control in Secrets Manager</a>. </p>
4242
* @example

clients/client-secrets-manager/src/commands/CreateSecretCommand.ts

+10-4
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ export interface CreateSecretCommandInput extends CreateSecretRequest {}
2222
export interface CreateSecretCommandOutput extends CreateSecretResponse, __MetadataBearer {}
2323

2424
/**
25-
* <p>Creates a new secret. A <i>secret</i> is a set of credentials, such as a
26-
* user name and password, that you store in an encrypted form in Secrets Manager. The secret also
25+
* <p>Creates a new secret. A <i>secret</i> can be a password, a set of
26+
* credentials such as a user name and password, an OAuth token, or other secret information
27+
* that you store in an encrypted form in Secrets Manager. The secret also
2728
* includes the connection information to access a database or other service, which Secrets Manager
2829
* doesn't encrypt. A secret in Secrets Manager consists of both the protected secret data and the
2930
* important information needed to manage the secret.</p>
@@ -33,6 +34,9 @@ export interface CreateSecretCommandOutput extends CreateSecretResponse, __Metad
3334
* If you include <code>SecretString</code> or <code>SecretBinary</code>
3435
* then Secrets Manager creates an initial secret version and automatically attaches the staging
3536
* label <code>AWSCURRENT</code> to it.</p>
37+
* <p>For database credentials you want to rotate, for Secrets Manager to be able to rotate the secret,
38+
* you must make sure the JSON you store in the <code>SecretString</code> matches the <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_secret_json_structure.html">JSON structure of
39+
* a database secret</a>.</p>
3640
* <p>If you don't specify an KMS encryption key, Secrets Manager uses the Amazon Web Services managed key
3741
* <code>aws/secretsmanager</code>. If this key
3842
* doesn't already exist in your account, then Secrets Manager creates it for you automatically. All
@@ -44,10 +48,12 @@ export interface CreateSecretCommandOutput extends CreateSecretResponse, __Metad
4448
* and use a customer managed KMS key. </p>
4549
* <p>
4650
* <b>Required permissions: </b>
47-
* <code>secretsmanager:CreateSecret</code>.
48-
* For more information, see <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions">
51+
* <code>secretsmanager:CreateSecret</code>. If you
52+
* include tags in the secret, you also need <code>secretsmanager:TagResource</code>.
53+
* For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
4954
* IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
5055
* and access control in Secrets Manager</a>. </p>
56+
* <p>To encrypt the secret with a KMS key other than <code>aws/secretsmanager</code>, you need <code>kms:GenerateDataKey</code> and <code>kms:Decrypt</code> permission to the key. </p>
5157
* @example
5258
* Use a bare-bones client and the command you need to make an API call.
5359
* ```javascript

clients/client-secrets-manager/src/commands/DeleteResourcePolicyCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export interface DeleteResourcePolicyCommandOutput extends DeleteResourcePolicyR
2727
* <p>
2828
* <b>Required permissions: </b>
2929
* <code>secretsmanager:DeleteResourcePolicy</code>.
30-
* For more information, see <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions">
30+
* For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
3131
* IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
3232
* and access control in Secrets Manager</a>. </p>
3333
* @example

clients/client-secrets-manager/src/commands/DeleteSecretCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export interface DeleteSecretCommandOutput extends DeleteSecretResponse, __Metad
3838
* <p>
3939
* <b>Required permissions: </b>
4040
* <code>secretsmanager:DeleteSecret</code>.
41-
* For more information, see <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions">
41+
* For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
4242
* IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
4343
* and access control in Secrets Manager</a>. </p>
4444
* @example

clients/client-secrets-manager/src/commands/DescribeSecretCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export interface DescribeSecretCommandOutput extends DescribeSecretResponse, __M
2727
* <p>
2828
* <b>Required permissions: </b>
2929
* <code>secretsmanager:DescribeSecret</code>.
30-
* For more information, see <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions">
30+
* For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
3131
* IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
3232
* and access control in Secrets Manager</a>. </p>
3333
* @example

clients/client-secrets-manager/src/commands/GetRandomPasswordCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export interface GetRandomPasswordCommandOutput extends GetRandomPasswordRespons
2828
* <p>
2929
* <b>Required permissions: </b>
3030
* <code>secretsmanager:GetRandomPassword</code>.
31-
* For more information, see <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions">
31+
* For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
3232
* IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
3333
* and access control in Secrets Manager</a>. </p>
3434
* @example

clients/client-secrets-manager/src/commands/GetResourcePolicyCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export interface GetResourcePolicyCommandOutput extends GetResourcePolicyRespons
2929
* <p>
3030
* <b>Required permissions: </b>
3131
* <code>secretsmanager:GetResourcePolicy</code>.
32-
* For more information, see <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions">
32+
* For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
3333
* IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
3434
* and access control in Secrets Manager</a>. </p>
3535
* @example

clients/client-secrets-manager/src/commands/GetSecretValueCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export interface GetSecretValueCommandOutput extends GetSecretValueResponse, __M
3434
* <code>secretsmanager:GetSecretValue</code>.
3535
* If the secret is encrypted using a customer-managed key instead of the Amazon Web Services managed key
3636
* <code>aws/secretsmanager</code>, then you also need <code>kms:Decrypt</code> permissions for that key.
37-
* For more information, see <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions">
37+
* For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
3838
* IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
3939
* and access control in Secrets Manager</a>. </p>
4040
* @example

clients/client-secrets-manager/src/commands/ListSecretVersionIdsCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export interface ListSecretVersionIdsCommandOutput extends ListSecretVersionIdsR
2929
* <p>
3030
* <b>Required permissions: </b>
3131
* <code>secretsmanager:ListSecretVersionIds</code>.
32-
* For more information, see <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions">
32+
* For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
3333
* IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
3434
* and access control in Secrets Manager</a>. </p>
3535
* @example

clients/client-secrets-manager/src/commands/ListSecretsCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export interface ListSecretsCommandOutput extends ListSecretsResponse, __Metadat
3232
* <p>
3333
* <b>Required permissions: </b>
3434
* <code>secretsmanager:ListSecrets</code>.
35-
* For more information, see <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions">
35+
* For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
3636
* IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
3737
* and access control in Secrets Manager</a>. </p>
3838
* @example

clients/client-secrets-manager/src/commands/PutResourcePolicyCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export interface PutResourcePolicyCommandOutput extends PutResourcePolicyRespons
3030
* <p>
3131
* <b>Required permissions: </b>
3232
* <code>secretsmanager:PutResourcePolicy</code>.
33-
* For more information, see <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions">
33+
* For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
3434
* IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
3535
* and access control in Secrets Manager</a>. </p>
3636
* @example

clients/client-secrets-manager/src/commands/PutSecretValueCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export interface PutSecretValueCommandOutput extends PutSecretValueResponse, __M
4646
* <p>
4747
* <b>Required permissions: </b>
4848
* <code>secretsmanager:PutSecretValue</code>.
49-
* For more information, see <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions">
49+
* For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
5050
* IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
5151
* and access control in Secrets Manager</a>. </p>
5252
* @example

clients/client-secrets-manager/src/commands/RemoveRegionsFromReplicationCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export interface RemoveRegionsFromReplicationCommandOutput
2828
* <p>
2929
* <b>Required permissions: </b>
3030
* <code>secretsmanager:RemoveRegionsFromReplication</code>.
31-
* For more information, see <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions">
31+
* For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
3232
* IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
3333
* and access control in Secrets Manager</a>. </p>
3434
* @example

clients/client-secrets-manager/src/commands/ReplicateSecretToRegionsCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export interface ReplicateSecretToRegionsCommandOutput extends ReplicateSecretTo
2626
* <p>
2727
* <b>Required permissions: </b>
2828
* <code>secretsmanager:ReplicateSecretToRegions</code>.
29-
* For more information, see <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions">
29+
* For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
3030
* IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
3131
* and access control in Secrets Manager</a>. </p>
3232
* @example

clients/client-secrets-manager/src/commands/RestoreSecretCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export interface RestoreSecretCommandOutput extends RestoreSecretResponse, __Met
2727
* <p>
2828
* <b>Required permissions: </b>
2929
* <code>secretsmanager:RestoreSecret</code>.
30-
* For more information, see <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions">
30+
* For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
3131
* IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
3232
* and access control in Secrets Manager</a>. </p>
3333
* @example

clients/client-secrets-manager/src/commands/RotateSecretCommand.ts

+18-10
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,35 @@ export interface RotateSecretCommandInput extends RotateSecretRequest {}
2222
export interface RotateSecretCommandOutput extends RotateSecretResponse, __MetadataBearer {}
2323

2424
/**
25-
* <p>Configures and starts the asynchronous process of rotating the secret.</p>
25+
* <p>Configures and starts the asynchronous process of rotating the secret. For more information about rotation,
26+
* see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets.html">Rotate secrets</a>.</p>
2627
* <p>If you include the
2728
* configuration parameters, the operation sets the values for the secret and then immediately
2829
* starts a rotation. If you don't include the configuration parameters, the operation starts a
29-
* rotation with the values already stored in the secret. For more information about rotation,
30-
* see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets.html">Rotate secrets</a>.</p>
31-
* <p>To configure rotation, you include the ARN of an Amazon Web Services Lambda function and the schedule
30+
* rotation with the values already stored in the secret. </p>
31+
* <p>For database credentials you want to rotate, for Secrets Manager to be able to rotate the secret, you must
32+
* make sure the secret value is in the
33+
* <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_secret_json_structure.html"> JSON structure
34+
* of a database secret</a>. In particular, if you want to use the <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets_strategies.html#rotating-secrets-two-users"> alternating users strategy</a>, your secret must contain the ARN of a superuser
35+
* secret.</p>
36+
*
37+
* <p>To configure rotation, you also need the ARN of an Amazon Web Services Lambda function and the schedule
3238
* for the rotation. The Lambda rotation function creates a new
3339
* version of the secret and creates or updates the credentials on the database or service to
3440
* match. After testing the new credentials, the function marks the new secret version with the staging
3541
* label <code>AWSCURRENT</code>. Then anyone who retrieves the secret gets the new version. For more
3642
* information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html">How rotation works</a>.</p>
37-
* <p>When rotation is successful, the <code>AWSPENDING</code> staging label might be attached to the same
38-
* version as the <code>AWSCURRENT</code> version, or it might not be attached to any version.</p>
39-
* <p>If the <code>AWSPENDING</code> staging label is present but not attached to the same version as
40-
* <code>AWSCURRENT</code>, then any later invocation of <code>RotateSecret</code> assumes that a previous
41-
* rotation request is still in progress and returns an error.</p>
43+
* <p>You can create the Lambda rotation function based on the <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_available-rotation-templates.html">rotation function templates</a> that Secrets Manager provides. Choose
44+
* a template that matches your <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets_strategies.html">Rotation strategy</a>.</p>
45+
* <p>When rotation is successful, the <code>AWSPENDING</code> staging label might be attached
46+
* to the same version as the <code>AWSCURRENT</code> version, or it might not be attached to any
47+
* version. If the <code>AWSPENDING</code> staging label is present but not attached to the same
48+
* version as <code>AWSCURRENT</code>, then any later invocation of <code>RotateSecret</code>
49+
* assumes that a previous rotation request is still in progress and returns an error.</p>
4250
* <p>
4351
* <b>Required permissions: </b>
4452
* <code>secretsmanager:RotateSecret</code>.
45-
* For more information, see <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions">
53+
* For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
4654
* IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
4755
* and access control in Secrets Manager</a>. You also need <code>lambda:InvokeFunction</code> permissions on the rotation function.
4856
* For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets-required-permissions-function.html">

clients/client-secrets-manager/src/commands/StopReplicationToReplicaCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export interface StopReplicationToReplicaCommandOutput extends StopReplicationTo
2727
* <p>
2828
* <b>Required permissions: </b>
2929
* <code>secretsmanager:StopReplicationToReplica</code>.
30-
* For more information, see <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awssecretsmanager.html#awssecretsmanager-actions-as-permissions">
30+
* For more information, see <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions">
3131
* IAM policy actions for Secrets Manager</a> and <a href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
3232
* and access control in Secrets Manager</a>. </p>
3333
* @example

0 commit comments

Comments
 (0)