tencent cloud

All product documents
Key Management Service
Creating Key
Last updated: 2024-01-11 16:28:54
Creating Key
Last updated: 2024-01-11 16:28:54

Overview

The CreateKey API can be called to create a customer master key (CMK) used for DEK management. The CMK can be used in other APIs to create DEKs, perform encryption and decryption, and do more.
The Alias parameter is required for this API. You can add other descriptions for the CMK as instructed in the CreateKey API document.
The examples below are called with TCCLI, which can also be called with any supported programming languages.

Examples

This example shows you how to create a key named test-gz01 in Guangzhou region with the description this is test for gz key.

Input

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

Output

After creation, the key will be enabled by default, with the key rotation feature disabled.
{
"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
}
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 available.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon