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

Viewing Key

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

Overview

API Name
Description
Note
ListKeys
Shows the list of keys (KeyId information) under an account.
There are no required parameters for this API. For more information, please see the ListKeys API document.
DescribeKey
Views the details of the specified CMK, including CMK name, ID, status, and region.
The KeyId parameter is required for this API. For more information, please see the DescribeKey API document.
The examples below are called with TCCLI, which can also be called with any supported programming languages.

Examples

Viewing the list of key IDs

This example describes how to view the information of the first five KeyIds in Guangzhou region.

Input

tccli kms ListKeys --region ap-guangzhou --Limit 5

Output

{
"Keys": [
{
"KeyId": "6xxxxxxx-xxxx-xxxx-xxxx-5xxxxxxxxc09"
},
{
"KeyId": "6xxxxxxx-xxxx-xxxx-xxxx-5xxxxxxxxc09"
},
{
"KeyId": "6xxxxxxx-xxxx-xxxx-xxxx-5xxxxxxxxc09"
},
{
"KeyId":"6xxxxxxx-xxxx-xxxx-xxxx-5xxxxxxxxc09"
},
{
"KeyId": "6xxxxxxx-xxxx-xxxx-xxxx-5xxxxxxxxc09"
}
],
"TotalCount": 114,
"RequestId": "afaaeb5e-c97d-4726-8012-6ae337d62928"
}

Viewing key ID details

This example describes how to view the details of the specified CMK.

Input

tccli kms DescribeKey --region ap-guangzhou --KeyId 521xxxxx-xxxx-xxxx-xxxx-52xxxxd4

Output

If the API is successfully executed, the details of the CMK will be returned.
{
"KeyMetadata": {
"KeyId": "6xxxxxxx-xxxx-xxxx-xxxx-5xxxxxxxxc09",
"Description": "this is test for gz key",
"CreatorUin": 10xxxxxxxxxx,
"KeyRotationEnabled": false,
"NextRotateTime": 1603439621,
"CreateTime": 1571903621,
"Alias": "test-gz01",
"KeyUsage": "ENCRYPT_DECRYPT",
"DeletionDate": 0,
"KeyState": "Enabled",
"Type": 4,
"Owner": "user"
},
"RequestId": "608f514c-3279-44ea-8e4c-c00b69e3521c"
}


Help and Support

Was this page helpful?

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

Feedback