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

Deleting Key

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

Overview

The schedule key deletion feature involves the following two APIs:
API Name
Description
Note
ScheduleKeyDeletion
Creates a schedule deletion task
The KeyId and PendingWindowInDays parameters are required for this API.
CancelKeyDeletion
Cancels a schedule deletion task
The KeyId parameter is required for this API.
Note:
If a CMK schedule deletion waiting period is set through the ScheduleKeyDeletion API when the CMK is in disabled status, the CMK will be deleted automatically at the specified time.
The examples below are called with TCCLI, which can also be called with any supported programming languages.

Examples

Creating a schedule deletion task

This example shows you how to delete a disabled CMK in 7 days.

Input

tccli kms ScheduleKeyDeletion --region ap-guangzhou --KeyId 5xxxxx-xxxx-xxxx-xxxx-52xxxxx4 --PendingWindowInDays 7

Output

If the setting is successful, the ID of the CMK to be deleted and the schedule deletion timestamp will be returned.
{
"KeyId": "6xxxxxxx-xxxx-xxxx-xxxx-5xxxxxxxxc09",
"RequestId": "2bd72d85-f9dd-4465-ae51-beebff54f540",
"DeletionDate": 1572512542
}

Canceling a schedule deletion task

This example shows you how to cancel a schedule deletion task, where the CMK is the one used in the above example.

Input

tccli kms CancelKeyDeletion --region ap-guangzhou --KeyId 5xxxxx-xxxx-xxxx-xxxx-52xxxxx

Output

If the execution is successful, the returned request will contain the ID of the CMK for which the schedule deletion task is successfully canceled.
{
"KeyId": "6xxxxxxx-xxxx-xxxx-xxxx-5xxxxxxxxc09",
"RequestId": "c85473c6-e18d-4a09-9eac-03958dd4714d"
}


Help and Support

Was this page helpful?

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

Feedback