Creating a CMK
Function
This API is used to create customer master keys (CMKs) used to encrypt data encryption keys (DEKs).
Default Master Keys are created by services integrated with KMS. Names of Default Master Keys end with /default. Therefore, in naming your CMKs, do not choose those ending with /default.
Enterprise project users' Default Master Keys belong to their default enterprise projects. The keys and cannot be moved to other enterprise projects, but can be used for cloud-based encryption in non-default enterprise projects to meet compliance requirements.
URI
Requests
Responses
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
key_info |
Yes |
Array of objects |
Information about keys. For details, see Table 4. |
Examples
The following example describes how to create a CMK with an alias of test.
- Example request
{ "key_alias": "test" }
- Example response
{ "key_info": { "key_id": "bb6a3d22-dc93-47ac-b5bd-88df7ad35f1e", "domain_id": "b168fe00ff56492495a7d22974df2d0b" } }
or
{ "error": { "error_code": "KMS.XXXX", "error_msg": "XXX" } }
Status Codes
Exception status code. For details, see Status Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot