diff --git a/clients/client-secrets-manager/src/commands/DeleteResourcePolicyCommand.ts b/clients/client-secrets-manager/src/commands/DeleteResourcePolicyCommand.ts index b4e8a283d965..c09dd7208f6b 100644 --- a/clients/client-secrets-manager/src/commands/DeleteResourcePolicyCommand.ts +++ b/clients/client-secrets-manager/src/commands/DeleteResourcePolicyCommand.ts @@ -109,7 +109,7 @@ export interface DeleteResourcePolicyCommandOutput extends DeleteResourcePolicyR * const response = await client.send(command); * /* response == * { - * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseMasterSecret-a1b2c3", + * "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestDatabaseSecret-a1b2c3", * "Name": "MyTestDatabaseSecret" * } * *\/ diff --git a/clients/client-secrets-manager/src/commands/UpdateSecretCommand.ts b/clients/client-secrets-manager/src/commands/UpdateSecretCommand.ts index f426a033aaab..cb529d218955 100644 --- a/clients/client-secrets-manager/src/commands/UpdateSecretCommand.ts +++ b/clients/client-secrets-manager/src/commands/UpdateSecretCommand.ts @@ -60,8 +60,8 @@ export interface UpdateSecretCommandOutput extends UpdateSecretResponse, __Metad * For more information, see * IAM policy actions for Secrets Manager and Authentication * and access control in Secrets Manager. - * If you use a customer managed key, you must also have kms:GenerateDataKey and - * kms:Decrypt permissions on the key. For more information, see + * If you use a customer managed key, you must also have kms:GenerateDataKey, kms:Encrypt, and + * kms:Decrypt permissions on the key. If you change the KMS key and you don't have kms:Encrypt permission to the new key, Secrets Manager does not re-ecrypt existing secret versions with the new key. For more information, see * Secret encryption and decryption.

* @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-secrets-manager/src/models/models_0.ts b/clients/client-secrets-manager/src/models/models_0.ts index 3fe4b5921296..9cebf6e52e96 100644 --- a/clients/client-secrets-manager/src/models/models_0.ts +++ b/clients/client-secrets-manager/src/models/models_0.ts @@ -1821,8 +1821,7 @@ export interface UpdateSecretRequest { /** *

The ARN, key ID, or alias of the KMS key that Secrets Manager * uses to encrypt new secret versions as well as any existing versions with the staging labels - * AWSCURRENT, AWSPENDING, or AWSPREVIOUS. - * For more information about versions and staging labels, see Concepts: Version.

+ * AWSCURRENT, AWSPENDING, or AWSPREVIOUS. If you don't have kms:Encrypt permission to the new key, Secrets Manager does not re-ecrypt existing secret versions with the new key. For more information about versions and staging labels, see Concepts: Version.

*

A key alias is always prefixed by alias/, for example alias/aws/secretsmanager. * For more information, see About aliases.

*

If you set this to an empty string, Secrets Manager uses the Amazon Web Services managed key diff --git a/codegen/sdk-codegen/aws-models/secrets-manager.json b/codegen/sdk-codegen/aws-models/secrets-manager.json index 097cbd63f2b8..5036d5af55d6 100644 --- a/codegen/sdk-codegen/aws-models/secrets-manager.json +++ b/codegen/sdk-codegen/aws-models/secrets-manager.json @@ -2615,7 +2615,7 @@ } ], "traits": { - "smithy.api#documentation": "

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

\n

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

\n

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.

\n

We recommend you avoid calling UpdateSecret at a sustained rate of more than \n once every 10 minutes. When you call UpdateSecret to update the secret value, Secrets Manager creates a new version \n of the secret. Secrets Manager removes outdated versions when there are more than 100, but it does not \n remove versions created less than 24 hours ago. If you update the secret value more \n than once every 10 minutes, you create more versions than Secrets Manager removes, and you will reach \n the quota for secret versions.

\n

If you include SecretString or SecretBinary to create a new\n secret version, Secrets Manager automatically moves the staging label AWSCURRENT to the new\n version. Then it attaches the label AWSPREVIOUS\n to the version that AWSCURRENT was removed from.

\n

If you call this operation with a ClientRequestToken that matches an existing version's \n VersionId, the operation results in an error. You can't modify an existing \n version, you can only create a new version. To remove a version, remove all staging labels from it. See \n UpdateSecretVersionStage.

\n

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

\n

\n Required permissions: \n secretsmanager:UpdateSecret. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager. \n If you use a customer managed key, you must also have kms:GenerateDataKey and \n kms:Decrypt permissions on the key. For more information, see \n Secret encryption and decryption.

" + "smithy.api#documentation": "

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

\n

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

\n

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.

\n

We recommend you avoid calling UpdateSecret at a sustained rate of more than \n once every 10 minutes. When you call UpdateSecret to update the secret value, Secrets Manager creates a new version \n of the secret. Secrets Manager removes outdated versions when there are more than 100, but it does not \n remove versions created less than 24 hours ago. If you update the secret value more \n than once every 10 minutes, you create more versions than Secrets Manager removes, and you will reach \n the quota for secret versions.

\n

If you include SecretString or SecretBinary to create a new\n secret version, Secrets Manager automatically moves the staging label AWSCURRENT to the new\n version. Then it attaches the label AWSPREVIOUS\n to the version that AWSCURRENT was removed from.

\n

If you call this operation with a ClientRequestToken that matches an existing version's \n VersionId, the operation results in an error. You can't modify an existing \n version, you can only create a new version. To remove a version, remove all staging labels from it. See \n UpdateSecretVersionStage.

\n

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

\n

\n Required permissions: \n secretsmanager:UpdateSecret. \n For more information, see \n IAM policy actions for Secrets Manager and Authentication \n and access control in Secrets Manager. \n If you use a customer managed key, you must also have kms:GenerateDataKey, kms:Encrypt, and \n kms:Decrypt permissions on the key. If you change the KMS key and you don't have kms:Encrypt permission to the new key, Secrets Manager does not re-ecrypt existing secret versions with the new key. For more information, see \n Secret encryption and decryption.

" } }, "com.amazonaws.secretsmanager#UpdateSecretRequest": { @@ -2644,7 +2644,7 @@ "KmsKeyId": { "target": "com.amazonaws.secretsmanager#KmsKeyIdType", "traits": { - "smithy.api#documentation": "

The ARN, key ID, or alias of the KMS key that Secrets Manager \n uses to encrypt new secret versions as well as any existing versions with the staging labels \n AWSCURRENT, AWSPENDING, or AWSPREVIOUS. \n For more information about versions and staging labels, see Concepts: Version.

\n

A key alias is always prefixed by alias/, for example alias/aws/secretsmanager.\n For more information, see About aliases.

\n

If you set this to an empty string, Secrets Manager uses the Amazon Web Services managed key \n aws/secretsmanager. If this key doesn't already exist in your account, then Secrets Manager \n creates it for you automatically. All users and roles in the Amazon Web Services account automatically have access \n to use aws/secretsmanager. Creating aws/secretsmanager can result in a one-time \n significant delay in returning the result.

\n \n

You can only use the Amazon Web Services managed key aws/secretsmanager if you call this\n operation using credentials from the same Amazon Web Services account that owns the secret. If the secret is in\n a different account, then you must use a customer managed key and provide the ARN of that KMS key in\n this field. The user making the call must have permissions to both the secret and the KMS key in\n their respective accounts.

\n
" + "smithy.api#documentation": "

The ARN, key ID, or alias of the KMS key that Secrets Manager \n uses to encrypt new secret versions as well as any existing versions with the staging labels \n AWSCURRENT, AWSPENDING, or AWSPREVIOUS. If you don't have kms:Encrypt permission to the new key, Secrets Manager does not re-ecrypt existing secret versions with the new key. For more information about versions and staging labels, see Concepts: Version.

\n

A key alias is always prefixed by alias/, for example alias/aws/secretsmanager.\n For more information, see About aliases.

\n

If you set this to an empty string, Secrets Manager uses the Amazon Web Services managed key \n aws/secretsmanager. If this key doesn't already exist in your account, then Secrets Manager \n creates it for you automatically. All users and roles in the Amazon Web Services account automatically have access \n to use aws/secretsmanager. Creating aws/secretsmanager can result in a one-time \n significant delay in returning the result.

\n \n

You can only use the Amazon Web Services managed key aws/secretsmanager if you call this\n operation using credentials from the same Amazon Web Services account that owns the secret. If the secret is in\n a different account, then you must use a customer managed key and provide the ARN of that KMS key in\n this field. The user making the call must have permissions to both the secret and the KMS key in\n their respective accounts.

\n
" } }, "SecretBinary": {