tencent cloud

문서Key Management Service

Creating Key

Download
포커스 모드
폰트 크기
마지막 업데이트 시간: 2026-07-30 16:45:12
AI 번역

Overview

Call the CreateKey API to create a CMK (Custom Master Key) for managing data keys. You can then use this CMK to call other APIs, such as those for creating data keys, encryption, and decryption.
The Alias parameter is required for this API operation. You can refer to the CreateKey API documentation to add other descriptions for the CMK.
The examples in this document use the Tencent Cloud command-line tool TCCLI. Subsequently, you can make calls using any supported programming language.

Examples

Create a CMK in the Guangzhou region with the key name "test-gz01" and the description "this is test for gz key".

Inputs

tccli kms CreateKey --region ap-guangzhou --Alias test-gz01 --Description 'this is test for gz key'

Output

The key is enabled by default after creation, and key rotation is disabled by default.
{
"KeyId": "6xxxxxxx-xxxx-xxxx-xxxx-5xxxxxxxxc09",
"Description": "this is test for gz key",
"Alias": "test-gz01",
"KeyUsage": "ENCRYPT_DECRYPT",
"RequestId": "994bbd90-7c8e-4522-85f2-c712da23f863",
"KeyState": "Enabled",
"CreateTime": 1571903621
}

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백