diff --git a/clients/client-secrets-manager/README.md b/clients/client-secrets-manager/README.md index 506ab80c042e..31046c9727a3 100644 --- a/clients/client-secrets-manager/README.md +++ b/clients/client-secrets-manager/README.md @@ -18,8 +18,6 @@ service, see the Amazon Web Services Secrets Manager -endpoints.

Support and Feedback for Amazon Web Services Secrets Manager

diff --git a/clients/client-secrets-manager/src/SecretsManager.ts b/clients/client-secrets-manager/src/SecretsManager.ts index f2c404126c4f..989e06cdd145 100644 --- a/clients/client-secrets-manager/src/SecretsManager.ts +++ b/clients/client-secrets-manager/src/SecretsManager.ts @@ -114,8 +114,6 @@ import { SecretsManagerClient } from "./SecretsManagerClient"; * API Version *

*

This version of the Secrets Manager API Reference documents the Secrets Manager API version 2017-10-17.

- *

For a list of endpoints, see Amazon Web Services Secrets Manager - * endpoints.

*

* Support and Feedback for Amazon Web Services Secrets Manager *

@@ -191,9 +189,6 @@ export class SecretsManager extends SecretsManagerClient { * includes the connection information to access a database or other service, which Secrets Manager * doesn't encrypt. A secret in Secrets Manager consists of both the protected secret data and the * important information needed to manage the secret.

- *

For secrets that use managed rotation, you need to create the secret through the managing service. For more information, see Secrets Manager secrets managed by other Amazon Web Services services. - * - *

*

For information about creating a secret in the console, see Create a secret.

*

To create a secret, you can provide the secret value to be encrypted in either the * SecretString parameter or the SecretBinary parameter, but not both. @@ -819,13 +814,31 @@ export class SecretsManager extends SecretsManagerClient { } /** - *

Configures and starts the asynchronous process of rotating the secret. For information about rotation, - * see Rotate secrets in the Secrets Manager User Guide. If you include the configuration parameters, the operation sets the values for the secret and then immediately starts a rotation. If you don't include the configuration parameters, the operation starts a rotation with the values already stored in the secret.

+ *

Configures and starts the asynchronous process of rotating the secret. For more information about rotation, + * see Rotate secrets.

+ *

If you include the + * configuration parameters, the operation sets the values for the secret and then immediately + * starts a rotation. If you don't include the configuration parameters, the operation starts a + * rotation with the values already stored in the secret.

+ *

For database credentials you want to rotate, for Secrets Manager to be able to rotate the secret, you must + * make sure the secret value is in the + * JSON structure + * of a database secret. In particular, if you want to use the alternating users strategy, your secret must contain the ARN of a superuser + * secret.

+ *

To configure rotation, you also need the ARN of an Amazon Web Services Lambda function and the schedule + * for the rotation. The Lambda rotation function creates a new + * version of the secret and creates or updates the credentials on the database or service to + * match. After testing the new credentials, the function marks the new secret version with the staging + * label AWSCURRENT. Then anyone who retrieves the secret gets the new version. For more + * information, see How rotation works.

+ *

You can create the Lambda rotation function based on the rotation function templates that Secrets Manager provides. Choose + * a template that matches your Rotation strategy.

*

When rotation is successful, the AWSPENDING staging label might be attached * to the same version as the AWSCURRENT version, or it might not be attached to any * version. If the AWSPENDING staging label is present but not attached to the same * version as AWSCURRENT, then any later invocation of RotateSecret - * assumes that a previous rotation request is still in progress and returns an error. When rotation is unsuccessful, the AWSPENDING staging label might be attached to an empty secret version. For more information, see Troubleshoot rotation in the Secrets Manager User Guide.

+ * assumes that a previous rotation request is still in progress and returns an error.

+ *

When rotation is unsuccessful, the AWSPENDING staging label might be attached to an empty secret version. For more information, see Troubleshoot rotation in the Secrets Manager User Guide.

*

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

*

* Required permissions: @@ -1018,7 +1031,6 @@ export class SecretsManager extends SecretsManagerClient { /** *

Modifies the details of a secret, including metadata and the secret value. To change the secret value, you can also use PutSecretValue.

*

To change the rotation configuration of a secret, use RotateSecret instead.

- *

To change a secret so that it is managed by another service, you need to recreate the secret in that service. See Secrets Manager secrets managed by other Amazon Web Services services.

*

We recommend you avoid calling UpdateSecret at a sustained rate of more than * once every 10 minutes. When you call UpdateSecret to update the secret value, Secrets Manager creates a new version * of the secret. Secrets Manager removes outdated versions when there are more than 100, but it does not diff --git a/clients/client-secrets-manager/src/SecretsManagerClient.ts b/clients/client-secrets-manager/src/SecretsManagerClient.ts index aedc3dba0fbf..6e3ac8bcf31b 100644 --- a/clients/client-secrets-manager/src/SecretsManagerClient.ts +++ b/clients/client-secrets-manager/src/SecretsManagerClient.ts @@ -304,8 +304,6 @@ export interface SecretsManagerClientResolvedConfig extends SecretsManagerClient * API Version *

*

This version of the Secrets Manager API Reference documents the Secrets Manager API version 2017-10-17.

- *

For a list of endpoints, see Amazon Web Services Secrets Manager - * endpoints.

*

* Support and Feedback for Amazon Web Services Secrets Manager *

diff --git a/clients/client-secrets-manager/src/commands/CreateSecretCommand.ts b/clients/client-secrets-manager/src/commands/CreateSecretCommand.ts index 90873eab84c4..adb8b66ddecc 100644 --- a/clients/client-secrets-manager/src/commands/CreateSecretCommand.ts +++ b/clients/client-secrets-manager/src/commands/CreateSecretCommand.ts @@ -35,9 +35,6 @@ export interface CreateSecretCommandOutput extends CreateSecretResponse, __Metad * includes the connection information to access a database or other service, which Secrets Manager * doesn't encrypt. A secret in Secrets Manager consists of both the protected secret data and the * important information needed to manage the secret.

- *

For secrets that use managed rotation, you need to create the secret through the managing service. For more information, see Secrets Manager secrets managed by other Amazon Web Services services. - * - *

*

For information about creating a secret in the console, see Create a secret.

*

To create a secret, you can provide the secret value to be encrypted in either the * SecretString parameter or the SecretBinary parameter, but not both. diff --git a/clients/client-secrets-manager/src/commands/RotateSecretCommand.ts b/clients/client-secrets-manager/src/commands/RotateSecretCommand.ts index de23775cd67b..149c54a3579b 100644 --- a/clients/client-secrets-manager/src/commands/RotateSecretCommand.ts +++ b/clients/client-secrets-manager/src/commands/RotateSecretCommand.ts @@ -29,13 +29,31 @@ export interface RotateSecretCommandInput extends RotateSecretRequest {} export interface RotateSecretCommandOutput extends RotateSecretResponse, __MetadataBearer {} /** - *

Configures and starts the asynchronous process of rotating the secret. For information about rotation, - * see Rotate secrets in the Secrets Manager User Guide. If you include the configuration parameters, the operation sets the values for the secret and then immediately starts a rotation. If you don't include the configuration parameters, the operation starts a rotation with the values already stored in the secret.

+ *

Configures and starts the asynchronous process of rotating the secret. For more information about rotation, + * see Rotate secrets.

+ *

If you include the + * configuration parameters, the operation sets the values for the secret and then immediately + * starts a rotation. If you don't include the configuration parameters, the operation starts a + * rotation with the values already stored in the secret.

+ *

For database credentials you want to rotate, for Secrets Manager to be able to rotate the secret, you must + * make sure the secret value is in the + * JSON structure + * of a database secret. In particular, if you want to use the alternating users strategy, your secret must contain the ARN of a superuser + * secret.

+ *

To configure rotation, you also need the ARN of an Amazon Web Services Lambda function and the schedule + * for the rotation. The Lambda rotation function creates a new + * version of the secret and creates or updates the credentials on the database or service to + * match. After testing the new credentials, the function marks the new secret version with the staging + * label AWSCURRENT. Then anyone who retrieves the secret gets the new version. For more + * information, see How rotation works.

+ *

You can create the Lambda rotation function based on the rotation function templates that Secrets Manager provides. Choose + * a template that matches your Rotation strategy.

*

When rotation is successful, the AWSPENDING staging label might be attached * to the same version as the AWSCURRENT version, or it might not be attached to any * version. If the AWSPENDING staging label is present but not attached to the same * version as AWSCURRENT, then any later invocation of RotateSecret - * assumes that a previous rotation request is still in progress and returns an error. When rotation is unsuccessful, the AWSPENDING staging label might be attached to an empty secret version. For more information, see Troubleshoot rotation in the Secrets Manager User Guide.

+ * assumes that a previous rotation request is still in progress and returns an error.

+ *

When rotation is unsuccessful, the AWSPENDING staging label might be attached to an empty secret version. For more information, see Troubleshoot rotation in the Secrets Manager User Guide.

*

Secrets Manager generates a CloudTrail log entry when you call this action. Do not include sensitive information in request parameters because it might be logged. For more information, see Logging Secrets Manager events with CloudTrail.

*

* Required permissions: diff --git a/clients/client-secrets-manager/src/commands/UpdateSecretCommand.ts b/clients/client-secrets-manager/src/commands/UpdateSecretCommand.ts index 3ce84657039e..1c3fbf7a3907 100644 --- a/clients/client-secrets-manager/src/commands/UpdateSecretCommand.ts +++ b/clients/client-secrets-manager/src/commands/UpdateSecretCommand.ts @@ -31,7 +31,6 @@ export interface UpdateSecretCommandOutput extends UpdateSecretResponse, __Metad /** *

Modifies the details of a secret, including metadata and the secret value. To change the secret value, you can also use PutSecretValue.

*

To change the rotation configuration of a secret, use RotateSecret instead.

- *

To change a secret so that it is managed by another service, you need to recreate the secret in that service. See Secrets Manager secrets managed by other Amazon Web Services services.

*

We recommend you avoid calling UpdateSecret at a sustained rate of more than * once every 10 minutes. When you call UpdateSecret to update the secret value, Secrets Manager creates a new version * of the secret. Secrets Manager removes outdated versions when there are more than 100, but it does not diff --git a/clients/client-secrets-manager/src/models/models_0.ts b/clients/client-secrets-manager/src/models/models_0.ts index 67187caceac6..06ee0571d67e 100644 --- a/clients/client-secrets-manager/src/models/models_0.ts +++ b/clients/client-secrets-manager/src/models/models_0.ts @@ -715,6 +715,7 @@ export interface DescribeSecretResponse { */ DeletedDate?: Date; + NextRotationDate?: Date; /** *

The list of tags attached to the secret. To add tags to a * secret, use TagResource. To remove tags, use UntagResource.

@@ -789,6 +790,7 @@ export enum FilterNameStringType { all = "all", description = "description", name = "name", + owning_service = "owning-service", primary_region = "primary-region", tag_key = "tag-key", tag_value = "tag-value", @@ -1025,6 +1027,7 @@ export enum SortOrderType { } export interface ListSecretsRequest { + IncludePlannedDeletion?: boolean; /** *

The number of results to include in the response.

*

If there are more results available, in the response, Secrets Manager includes NextToken. @@ -1124,6 +1127,7 @@ export interface SecretListEntry { */ DeletedDate?: Date; + NextRotationDate?: Date; /** *

The list of user-defined tags associated with the secret. To add tags to a * secret, use @@ -1518,8 +1522,7 @@ export interface RotateSecretRequest { ClientRequestToken?: string; /** - *

For secrets that use a Lambda rotation function to rotate, the ARN of the Lambda rotation function.

- *

For secrets that use managed rotation, omit this field. For more information, see Managed rotation in the Secrets Manager User Guide.

+ *

The ARN of the Lambda rotation function that can rotate the secret.

*/ RotationLambdaARN?: string; @@ -1531,7 +1534,7 @@ export interface RotateSecretRequest { /** *

Specifies whether to rotate the secret immediately or wait until the next scheduled rotation window. * The rotation schedule is defined in RotateSecretRequest$RotationRules.

- *

For secrets that use a Lambda rotation function to rotate, if you don't immediately rotate the secret, Secrets Manager tests the rotation configuration by running the + *

If you don't immediately rotate the secret, Secrets Manager tests the rotation configuration by running the * * testSecret * step of the Lambda rotation function. The test creates an AWSPENDING version of the secret and then removes it.

diff --git a/clients/client-secrets-manager/src/protocols/Aws_json1_1.ts b/clients/client-secrets-manager/src/protocols/Aws_json1_1.ts index eed50ed13bb3..e8fd2ccac504 100644 --- a/clients/client-secrets-manager/src/protocols/Aws_json1_1.ts +++ b/clients/client-secrets-manager/src/protocols/Aws_json1_1.ts @@ -1834,6 +1834,7 @@ const serializeAws_json1_1GetSecretValueRequest = (input: GetSecretValueRequest, const serializeAws_json1_1ListSecretsRequest = (input: ListSecretsRequest, context: __SerdeContext): any => { return { ...(input.Filters != null && { Filters: serializeAws_json1_1FiltersListType(input.Filters, context) }), + ...(input.IncludePlannedDeletion != null && { IncludePlannedDeletion: input.IncludePlannedDeletion }), ...(input.MaxResults != null && { MaxResults: input.MaxResults }), ...(input.NextToken != null && { NextToken: input.NextToken }), ...(input.SortOrder != null && { SortOrder: input.SortOrder }), @@ -2106,6 +2107,10 @@ const deserializeAws_json1_1DescribeSecretResponse = (output: any, context: __Se ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastRotatedDate))) : undefined, Name: __expectString(output.Name), + NextRotationDate: + output.NextRotationDate != null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NextRotationDate))) + : undefined, OwningService: __expectString(output.OwningService), PrimaryRegion: __expectString(output.PrimaryRegion), ReplicationStatus: @@ -2407,6 +2412,10 @@ const deserializeAws_json1_1SecretListEntry = (output: any, context: __SerdeCont ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.LastRotatedDate))) : undefined, Name: __expectString(output.Name), + NextRotationDate: + output.NextRotationDate != null + ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.NextRotationDate))) + : undefined, OwningService: __expectString(output.OwningService), PrimaryRegion: __expectString(output.PrimaryRegion), RotationEnabled: __expectBoolean(output.RotationEnabled),