CreateCmk

<p class="shortdesc"></p> <section class="section" id="CreateCMK__section_y35_dx3_mlb"><h2 class="doc-tairway">CreateCmk </h2> <p class="p"><strong class="ph b">Description</strong></p> <p class="p">Creating a customer master key (CMK). You can use a CMK to encrypt small amounts of data (less than 4 KB), and generate data keys (DKs). You can use DKs to encrypt and decrypt large amounts of local disk data. </p> <p class="p"><strong class="ph b">Request Parameters</strong></p> <table class="table" id="CreateCMK__table_yp3_fx3_mlb"><caption></caption><colgroup><col><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="CreateCMK__table_yp3_fx3_mlb__entry__1"> <p class="p">Name </p> </th> <th class="entry" id="CreateCMK__table_yp3_fx3_mlb__entry__2"> <p class="p">Type </p> </th> <th class="entry" id="CreateCMK__table_yp3_fx3_mlb__entry__3"> <p class="p">Necessary or Not </p> </th> <th class="entry" id="CreateCMK__table_yp3_fx3_mlb__entry__4"> <p class="p">Description </p> </th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="CreateCMK__table_yp3_fx3_mlb__entry__1 "> <p class="p">description </p> </td> <td class="entry" headers="CreateCMK__table_yp3_fx3_mlb__entry__2 "> <p class="p">String </p> </td> <td class="entry" headers="CreateCMK__table_yp3_fx3_mlb__entry__3 "> <p class="p">No </p> </td> <td class="entry" headers="CreateCMK__table_yp3_fx3_mlb__entry__4 "> <p class="p">Description about the CMK. </p> </td> </tr> <tr class="row"> <td class="entry" headers="CreateCMK__table_yp3_fx3_mlb__entry__1 "> <p class="p">keyUsage </p> </td> <td class="entry" headers="CreateCMK__table_yp3_fx3_mlb__entry__2 "> <p class="p">Integer </p> </td> <td class="entry" headers="CreateCMK__table_yp3_fx3_mlb__entry__3 "> <p class="p">Yes </p> </td> <td class="entry" headers="CreateCMK__table_yp3_fx3_mlb__entry__4 "> <p class="p">Usage of the CMK. The current version supports only the value 0. The value is 0 by default. Note: (0: “ENCRYPT/DECRYPT”). </p> </td> </tr> <tr class="row"> <td class="entry" headers="CreateCMK__table_yp3_fx3_mlb__entry__1 "> <p class="p">alias </p> </td> <td class="entry" headers="CreateCMK__table_yp3_fx3_mlb__entry__2 "> <p class="p">String </p> </td> <td class="entry" headers="CreateCMK__table_yp3_fx3_mlb__entry__3 "> <p class="p">Yes </p> </td> <td class="entry" headers="CreateCMK__table_yp3_fx3_mlb__entry__4 "> <p class="p">Alias of the CMK. Note: The alias is unique, and cannot be duplicated. </p> </td> </tr> <tr class="row"> <td class="entry" headers="CreateCMK__table_yp3_fx3_mlb__entry__1 "> <p class="p">algorithm </p> </td> <td class="entry" headers="CreateCMK__table_yp3_fx3_mlb__entry__2 "> <p class="p">String </p> </td> <td class="entry" headers="CreateCMK__table_yp3_fx3_mlb__entry__3 "> <p class="p">Yes </p> </td> <td class="entry" headers="CreateCMK__table_yp3_fx3_mlb__entry__4 "> <p class="p">Encryption algorithm. RSA by default. Supporting standards: RSA (international standard) and SM2 (national standard). </p> </td> </tr> <tr class="row"> <td class="entry" headers="CreateCMK__table_yp3_fx3_mlb__entry__1 "> <p class="p">origin </p> </td> <td class="entry" headers="CreateCMK__table_yp3_fx3_mlb__entry__2 "> <p class="p">Integer </p> </td> <td class="entry" headers="CreateCMK__table_yp3_fx3_mlb__entry__3 "> <p class="p">Yes </p> </td> <td class="entry" headers="CreateCMK__table_yp3_fx3_mlb__entry__4 "> <p class="p">Origin of the key material. KMS supports Ping An Cloud KMS generated key material and external key material. Note: (0: “PingAn_KMS”), (1: “External_Import”). </p> </td> </tr> </tbody></table> <p class="p"><strong class="ph b">Return Parameters</strong></p> <table class="table" id="CreateCMK__table_zp3_fx3_mlb"><caption></caption><colgroup><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="CreateCMK__table_zp3_fx3_mlb__entry__1"> <p class="p">Name </p> </th> <th class="entry" id="CreateCMK__table_zp3_fx3_mlb__entry__2"> <p class="p">Type </p> </th> <th class="entry" id="CreateCMK__table_zp3_fx3_mlb__entry__3"> <p class="p">Description </p> </th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="CreateCMK__table_zp3_fx3_mlb__entry__1 "> <p class="p">code </p> </td> <td class="entry" headers="CreateCMK__table_zp3_fx3_mlb__entry__2 "> <p class="p">String </p> </td> <td class="entry" headers="CreateCMK__table_zp3_fx3_mlb__entry__3 "> <p class="p">Return code. “SUCCESS” will be returned if the request is succeeded. </p> </td> </tr> <tr class="row"> <td class="entry" headers="CreateCMK__table_zp3_fx3_mlb__entry__1 "> <p class="p">keyMetadata </p> </td> <td class="entry" headers="CreateCMK__table_zp3_fx3_mlb__entry__2 "> <p class="p">KeyMetadata </p> </td> <td class="entry" headers="CreateCMK__table_zp3_fx3_mlb__entry__3 "> <p class="p">Information of the returned CMK. </p> </td> </tr> <tr class="row"> <td class="entry" headers="CreateCMK__table_zp3_fx3_mlb__entry__1 "> <p class="p">requestId </p> </td> <td class="entry" headers="CreateCMK__table_zp3_fx3_mlb__entry__2 "> <p class="p">String </p> </td> <td class="entry" headers="CreateCMK__table_zp3_fx3_mlb__entry__3 "> <p class="p">ID of the current request. </p> </td> </tr> </tbody></table> <p class="p"><strong class="ph b">KeyMetadata</strong></p> <table class="table" id="CreateCMK__table_aq3_fx3_mlb"><caption></caption><colgroup><col><col><col></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="CreateCMK__table_aq3_fx3_mlb__entry__1"> <p class="p">Name </p> </th> <th class="entry" id="CreateCMK__table_aq3_fx3_mlb__entry__2"> <p class="p">Type </p> </th> <th class="entry" id="CreateCMK__table_aq3_fx3_mlb__entry__3"> <p class="p">Description </p> </th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__1 "> <p class="p">keyId </p> </td> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__2 "> <p class="p">String </p> </td> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__3 "> <p class="p">Globally unique identifier of the CMK. </p> </td> </tr> <tr class="row"> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__1 "> <p class="p">alias </p> </td> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__2 "> <p class="p">String </p> </td> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__3 "> <p class="p">Alias of the CMK. </p> </td> </tr> <tr class="row"> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__1 "> <p class="p">keyUsage </p> </td> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__2 "> <p class="p">String </p> </td> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__3 "> <p class="p">Usage of the CMK: encryption or decryption. </p> </td> </tr> <tr class="row"> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__1 "> <p class="p">description </p> </td> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__2 "> <p class="p">String </p> </td> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__3 "> <p class="p">Description of the CMK. </p> </td> </tr> <tr class="row"> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__1 "> <p class="p">creationDate </p> </td> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__2 "> <p class="p">String </p> </td> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__3 "> <p class="p">Creation date and time of the CMK (yyyy-MM-dd HH:mm:ss). </p> </td> </tr> <tr class="row"> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__1 "> <p class="p">deleteDate </p> </td> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__2 "> <p class="p">String </p> </td> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__3 "> <p class="p">Time and date when the key is scheduled to be deleted (yyyy-MM-dd HH: mm: ss). When this value is empty, it means that the CMK will not be deleted. This parameter is returned only when the key status of the CMK is pending deletion. </p> </td> </tr> <tr class="row"> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__1 "> <p class="p">ownerId </p> </td> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__2 "> <p class="p">String </p> </td> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__3 "> <p class="p">Owner of the CMK. </p> </td> </tr> <tr class="row"> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__1 "> <p class="p">keyState </p> </td> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__2 "> <p class="p">String </p> </td> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__3 "> <p class="p">Status of the CMK. 0: enabled; 1: disabled; 2: pending deletion. </p> </td> </tr> <tr class="row"> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__1 "> <p class="p">origin </p> </td> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__2 "> <p class="p">String </p> </td> <td class="entry" headers="CreateCMK__table_aq3_fx3_mlb__entry__3 "> <p class="p">The origin of the key material. </p> </td> </tr> </tbody></table> <p class="p"><strong class="ph b">Request Example</strong></p> <pre class="pre codeblock"><code>https:// kms-cn-shanghai.yun.pingan.com/?action=CreateCmk &keyUsage=0 &origin=<origin> &alias=<your key alias> &algorithm=<algorithm> &description=<your key description> &<公共请求参数> </code></pre> <p class="p"><strong class="ph b">Return Example</strong></p> <pre class="pre codeblock"><code>{       "code":"SUCCESS",       "keyMetadata":{               "keyUsage":"ENCRYPT_DECRYPT",               "origin":"平安云产生",               "keyState":"ENABLE|已启用",               "keyId":"your key id",               "description":"key description example",               "alias":"your key alias",               "ownerId":"123456",               "creationDate":"2018-12-04 15:07:54"       }       "requestId":"53912b71-3435-409e-ad05-1882ced04f1f" } </code></pre> </section>
Did the above content solve your problem? Yes No
Please complete information!

Call us

400-151-8800

Email us

cloud@pingan.com

Online customer service

Instant reply

Technical Support

cloud products