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
}