Overview
The operations of enabling and disabling key archiving involve the following two functions:
API name | API Description | Note |
ArchiveKey | Enable Key Archiving | The KeyId is a required parameter for this API operation. For more details, please refer to the ArchiveKey interface documentation. |
CancelKeyArchive | Unarchives keys | The KeyId is a required parameter for this API operation. For more details, please refer to the CancelKeyArchive interface documentation. |
This example uses Tencent Cloud's Command Line Tool TCCLI. You can use any supported programming language for subsequent calls.
Sample
Enable Key Archiving
Input
tccli kms ArchiveKey --region ap-guangzhou --KeyId 5*-**---52*4
Output
If the key archiving is successfully enabled, the following request will be returned:
{"Response": {"RequestId": "1b580852-1e38-11e9-b129-5**19b4b00"}}
Unarchives keys
Input
tccli kms CancelKeyArchive --region ap-guangzhou --KeyId 5*-**---52*4
Output
If the key archiving is successfully canceled, the following request will be returned:
{"RequestId": "e5674638-1466-4607-a3ea-b**0f4e5e3"}