Disables a specified CMK.

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.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DisableKey

The operation that you want to perform. Set the value to DisableKey.

KeyId String Yes 1234abcd-12ab-34cd-56ef-12345678****

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

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

Response parameters

Parameter Type Example Description
RequestId String 2fe70ce2-3303-4fd6-b3ac-472fb2705c62

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format


JSON format

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

Error codes

For a list of error codes, visit the API Error Center.