tencent cloud

DokumentasiKey Management Service

Enabling/Disabling Key

Download
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-07-30 16:45:13
Diterjemahkan oleh AI

Overview

The API operation for enabling/disabling a key consists of two functions, as follows:
API Name
API Description
Description
EnableKey
Enables a CMK.
The KeyId parameter is required for this API operation. For details, see the EnableKey API documentation.
DisableKey
Disables a CMK.
The KeyId parameter is required for this API operation. For details, see the DisableKey API documentation.
The examples in this document use the Tencent Cloud command-line tool TCCLI. Subsequently, you can make calls using any supported programming language.

Examples

Enabling a Key: Example

Inputs

tccli kms EnableKey --region ap-guangzhou --KeyId 5xxxxx-xxxx-xxxx-xxxx-52xxxxx4

Output

If the key is successfully enabled, the following request is returned.
{
"RequestId": "6b2187b0-f40a-46d0-8065-2434afc54619"
}

Disabling a Key: Example

Inputs

tccli kms DisableKey --region ap-guangzhou --KeyId 5xxxxx-xxxx-xxxx-xxxx-52xxxxx4

Output

If the key is successfully disabled, the following request is returned.
{
"RequestId": "e5674638-1466-4607-a3ea-b60d30f4e5e3"
}


Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan