All Products
Search
Document Center

Key Management Service:DisableKey

Last Updated:Jul 29, 2025

Disables a key.

Operation description

If a customer master key (CMK) is disabled, the ciphertext encrypted by using this CMK cannot be decrypted until you re-enable it. You can call the EnableKey operation to enable the CMK.

In this example, the CMK whose ID is 1234abcd-12ab-34cd-56ef-12345678**** is disabled.

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****

For more information about common request parameters, see Common parameters.

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

2fe70ce2-3303-4fd6-b3ac-472fb2705c62

Examples

Sample success responses

JSONformat

{
  "RequestId": "2fe70ce2-3303-4fd6-b3ac-472fb2705c62"
}

Error codes

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