All Products
Search
Document Center

Key Management Service:CancelKeyDeletion

Last Updated:Jul 29, 2025

Cancels the deletion task of a CMK.

Operation description

If the deletion task of a CMK is canceled, the CMK returns to the Enabled state.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
KeyIdstringYes

The ID of the CMK. The ID must be globally unique.

1234abcd-12ab-34cd-56ef-12345678****

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request, which is used to locate and troubleshoot issues.

3da5b8cc-8107-40ac-a170-793cd181d7b7

Examples

Sample success responses

JSONformat

{
  "RequestId": "3da5b8cc-8107-40ac-a170-793cd181d7b7"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameterThe specified parameter is not valid.An invalid value is specified for the parameter.
404Forbidden.KeyNotFoundThe specified Key is not found.The error message returned because the specified CMK does not exist.
404InvalidAccessKeyId.NotFoundThe Access Key ID provided does not exist in our records.-

For a list of error codes, visit the Service error codes.