Updates the description of a key.
Operation description
This operation replaces the description of a customer master key (CMK) with the description that you specify. The original description of the CMK is specified by the Description parameter when you call the DescribeKey operation. You can call this operation to add, modify, or delete the description of a CMK.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| KeyId | string | Yes | The ID of the CMK. The ID must be globally unique. | 1234abcd-12ab-34cd-56ef-12345678**** |
| Description | string | Yes | The description of the CMK. This description includes the purpose of the CMK, such as the types of data that you want to protect and applications that can use the CMK. | key description example |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "3455b9b4-95c1-419d-b310-db6a53b09a39"
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | InvalidParameter | The specified parameter is not valid. | An invalid value is specified for the parameter. |
| 404 | InvalidAccessKeyId.NotFound | The Access Key ID provided does not exist in our records. | - |
| 404 | Forbidden.KeyNotFound | The specified Key is not found. | The error message returned because the specified CMK does not exist. |
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2023-10-23 | API Description Update. The Error code has changed | View Change Details |
