Skip to main content

UpdateKeyDescription

Updates the description of a KMS key.

Description

The UpdateKeyDescription operation changes the description of a KMS key. The description is a free-text string that can help you identify the purpose or usage of the key.

note
  • You cannot change the description of a KMS key that is pending deletion.
  • The description field can contain up to 8,192 characters.
  • Updating the description does not affect the functionality of the KMS key.
  • The new description is not a part of the key material and is not included in cryptographic operations.

Request Syntax

Headers

NameDescriptionRequiredType
Content-TypeMust be "application/x-amz-json-1.1"Yesstring
X-Amz-TargetMust be "TrentService.UpdateKeyDescription"Yesstring

Request Body

NameDescriptionRequiredType
KeyIdThe identifier of the KMS key whose description you want to update. This can be the key ID or key ARN of the KMS key.Yesstring
DescriptionThe new description for the KMS key.Yesstring
POST / HTTP/1.1
Content-Type: application/x-amz-json-1.1
X-Amz-Target: TrentService.UpdateKeyDescription
{ "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab", "Description": "Example description for test key" }
Values in italics indicate user input and should be replaced with actual values.

Response Elements

This operation returns no response data.

Special Errors

Error CodeDescription
DependencyTimeoutExceptionThe system timed out while trying to fulfill the request.
InvalidArnExceptionThe request was rejected because a specified ARN was not valid.
KMSInternalExceptionAn internal error occurred.
KMSInvalidStateExceptionThe request was rejected because the key state is not valid for this operation.
NotFoundExceptionThe request was rejected because the specified entity or resource could not be found.

Permissions

To use the UpdateKeyDescription operation, you must have the following permissions:

  • kms:UpdateKeyDescription on the KMS key (specified in the policy)

Try It Out

Test UpdateKeyDescription

Update the description of a KMS key.

Coming Soon

This feature is currently under development and will be available soon.