tencent cloud

Key Management Service

Product Introduction
Product Overview
Product Strengths
Use Cases
Concepts
Purchase Guide
Billing Overview
Purchase Method
Renewal Instructions
Payment Overdue
Console Guide
Getting Started
Key Management
Access Control
Audit
TCCLI Management Guide
Operation Overview
Creating Key
Viewing Key
Editing Key
Enabling/Disabling Key
Key Rotation
Encryption and Decryption
Asymmetric key decryption
Deleting Key
Practical Tutorial
Symmetrical Encryption and Decryption
Asymmetric Encryption and Decryption
Post-Quantum Cryptography Practice In KMS
Importing External Key
Implementing Exponential Backoff to Deal with Service Frequency
Cloud Product Integration with KMS for Transparent Encryption
API documentation
History
Introduction
API Category
Key APIs
Making API Requests
Asymmetric Key APIs
Data Types
Error Codes
Service Level Agreement
FAQS
FAQs
General
KMS Policy
Privacy Policy
Data Processing And Security Agreement
Contact Us
Glossary

Enabling/Disabling Key

PDF
Focus Mode
Font Size
Last updated: 2024-01-11 16:28:54

Overview

The operations of enabling and disabling a key involve the following two APIs:
API Name
Description
Note
EnableKey
Enables a CMK
The KeyId parameter is required for this API. For more information, please see the EnableKey API document.
DisableKey
Disables a CMK
The KeyId parameter is required for this API. For more information, please see the DisableKey API document.
The examples below are called with TCCLI, which can also be called with any supported programming languages.

Examples

Enabling a CMK

Input

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

Output

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

Disabling a CMK

Input

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

Output

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


Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback