doc-exports/docs/kms/api-ref/kms_02_0027.html
Li, Qiao dfe65b9551 KMS API 20230817 version.
Reviewed-by: Belejkanic, Lukas <lukas.belejkanic@t-systems.com>
Co-authored-by: Li, Qiao <qiaoli@huawei.com>
Co-committed-by: Li, Qiao <qiaoli@huawei.com>
2024-04-02 13:42:22 +00:00

183 lines
17 KiB
HTML

<a name="kms_02_0027"></a><a name="kms_02_0027"></a>
<h1 class="topictitle1">Changing the Description of a CMK</h1>
<div id="body1497317398920"><div class="section" id="kms_02_0027__en-us_topic_0112992285_section6685482991125"><h4 class="sectiontitle">Function</h4><p id="kms_02_0027__en-us_topic_0112992285_p5367360791240">This API enables you to change the description of a CMK.</p>
<div class="note" id="kms_02_0027__en-us_topic_0112992285_note1613564791125"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="kms_02_0027__en-us_topic_0112992285_ul19640944143232"><li id="kms_02_0027__en-us_topic_0112992285_li34722774143232">A Default Master Key (the alias suffix of which is <strong id="kms_02_0027__en-us_topic_0112992285_b842352706101914">/default</strong>) does not allow alias changes.</li><li id="kms_02_0027__en-us_topic_0112992285_li48642064143232">A CMK in <strong id="kms_02_0027__en-us_topic_0112992285_b842352706145032">Scheduled deletion</strong> status does not allow description changes.</li></ul>
</div></div>
</div>
<div class="section" id="kms_02_0027__en-us_topic_0112992285_section3191906891125"><h4 class="sectiontitle">URI</h4><ul id="kms_02_0027__en-us_topic_0112992285_ul3530770591125"><li id="kms_02_0027__en-us_topic_0112992285_li4933389191125">URI format<p id="kms_02_0027__en-us_topic_0112992285_p2792598191327"><a name="kms_02_0027__en-us_topic_0112992285_li4933389191125"></a><a name="en-us_topic_0112992285_li4933389191125"></a>POST /v1.0/{project_id}/kms/update-key-description</p>
</li><li id="kms_02_0027__en-us_topic_0112992285_li3662222891125">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="kms_02_0027__en-us_topic_0112992285_table6116459691125" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="kms_02_0027__en-us_topic_0112992285_row2741617991125"><th align="left" class="cellrowborder" valign="top" width="22.74%" id="mcps1.3.2.2.2.1.2.5.1.1"><p id="kms_02_0027__en-us_topic_0112992285_p611804291125"><strong id="kms_02_0027__en-us_topic_0112992285_b84235270619104">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.919999999999998%" id="mcps1.3.2.2.2.1.2.5.1.2"><p id="kms_02_0027__en-us_topic_0112992285_p2579942291125"><strong id="kms_02_0027__en-us_topic_0112992285_b84235270619106">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.55%" id="mcps1.3.2.2.2.1.2.5.1.3"><p id="kms_02_0027__en-us_topic_0112992285_p937843891125"><strong id="kms_02_0027__en-us_topic_0112992285_b84235270619109">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40.79%" id="mcps1.3.2.2.2.1.2.5.1.4"><p id="kms_02_0027__en-us_topic_0112992285_p2145602791125"><strong id="kms_02_0027__en-us_topic_0112992285_b842352706191013">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="kms_02_0027__en-us_topic_0112992285_row6021661291125"><td class="cellrowborder" valign="top" width="22.74%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="kms_02_0027__en-us_topic_0112992285_p4570740291125">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="16.919999999999998%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="kms_02_0027__en-us_topic_0112992285_p1131205291125">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="19.55%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="kms_02_0027__en-us_topic_0112992285_p17684501212">String</p>
</td>
<td class="cellrowborder" valign="top" width="40.79%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="kms_02_0027__en-us_topic_0112992285_p6308031091125">Project ID</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="kms_02_0027__en-us_topic_0112992285_section3085187891125"><h4 class="sectiontitle">Requests</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="kms_02_0027__en-us_topic_0112992285_table6419419691821" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameters</caption><thead align="left"><tr id="kms_02_0027__en-us_topic_0112992285_row3033405791821"><th align="left" class="cellrowborder" valign="top" width="22.447755224477554%" id="mcps1.3.3.2.2.5.1.1"><p id="kms_02_0027__en-us_topic_0112992285_p4113955391821"><strong id="kms_02_0027__en-us_topic_0112992285_b842352706191032">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.308469153084694%" id="mcps1.3.3.2.2.5.1.2"><p id="kms_02_0027__en-us_topic_0112992285_p4396951091821"><strong id="kms_02_0027__en-us_topic_0112992285_b842352706191035">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.36816318368163%" id="mcps1.3.3.2.2.5.1.3"><p id="kms_02_0027__en-us_topic_0112992285_p476054391821"><strong id="kms_02_0027__en-us_topic_0112992285_b842352706191038">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="43.87561243875613%" id="mcps1.3.3.2.2.5.1.4"><p id="kms_02_0027__en-us_topic_0112992285_p5005970191821"><strong id="kms_02_0027__en-us_topic_0112992285_b842352706191041">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="kms_02_0027__en-us_topic_0112992285_row2830395191821"><td class="cellrowborder" valign="top" width="22.447755224477554%" headers="mcps1.3.3.2.2.5.1.1 "><p id="kms_02_0027__en-us_topic_0112992285_p41161123143326">key_id</p>
</td>
<td class="cellrowborder" valign="top" width="15.308469153084694%" headers="mcps1.3.3.2.2.5.1.2 "><p id="kms_02_0027__en-us_topic_0112992285_p4386100291125">String</p>
</td>
<td class="cellrowborder" valign="top" width="18.36816318368163%" headers="mcps1.3.3.2.2.5.1.3 "><p id="kms_02_0027__en-us_topic_0112992285_p12063482143326">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="43.87561243875613%" headers="mcps1.3.3.2.2.5.1.4 "><p id="kms_02_0027__en-us_topic_0112992285_p37618023143326">36-byte ID of a CMK that matches the regular expression <span class="parmvalue" id="kms_02_0027__en-us_topic_0112992285_parmvalue80435593163333"><b>^[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}$</b></span></p>
<p id="kms_02_0027__en-us_topic_0112992285_p52558345143326">Example: 0d0466b0-e727-4d9c-b35d-f84bb474a37f</p>
</td>
</tr>
<tr id="kms_02_0027__en-us_topic_0112992285_row601748291821"><td class="cellrowborder" valign="top" width="22.447755224477554%" headers="mcps1.3.3.2.2.5.1.1 "><p id="kms_02_0027__en-us_topic_0112992285_p1123746293430">key_description</p>
</td>
<td class="cellrowborder" valign="top" width="15.308469153084694%" headers="mcps1.3.3.2.2.5.1.2 "><p id="kms_02_0027__en-us_topic_0112992285_p952418211233">String</p>
</td>
<td class="cellrowborder" valign="top" width="18.36816318368163%" headers="mcps1.3.3.2.2.5.1.3 "><p id="kms_02_0027__en-us_topic_0112992285_p4346013693430">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="43.87561243875613%" headers="mcps1.3.3.2.2.5.1.4 "><p id="kms_02_0027__en-us_topic_0112992285_p3061008993430">CMK description (The value ranges from 0 to 255 characters.)</p>
</td>
</tr>
<tr id="kms_02_0027__en-us_topic_0112992285_row315093291821"><td class="cellrowborder" valign="top" width="22.447755224477554%" headers="mcps1.3.3.2.2.5.1.1 "><p id="kms_02_0027__en-us_topic_0112992285_p5389896591821">sequence</p>
</td>
<td class="cellrowborder" valign="top" width="15.308469153084694%" headers="mcps1.3.3.2.2.5.1.2 "><p id="kms_02_0027__en-us_topic_0112992285_p384402210314">String</p>
</td>
<td class="cellrowborder" valign="top" width="18.36816318368163%" headers="mcps1.3.3.2.2.5.1.3 "><p id="kms_02_0027__en-us_topic_0112992285_p3451131791821">No</p>
</td>
<td class="cellrowborder" valign="top" width="43.87561243875613%" headers="mcps1.3.3.2.2.5.1.4 "><p id="kms_02_0027__en-us_topic_0112992285_p1353627112719">36-byte serial number of a request message</p>
<p id="kms_02_0027__en-us_topic_0112992285_p4395331691821">Example: 919c82d4-8046-4722-9094-35c3c6524cff</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="kms_02_0027__en-us_topic_0112992285_section955024991125"><h4 class="sectiontitle">Responses</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="kms_02_0027__en-us_topic_0112992285_table7517184618545" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response parameters</caption><thead align="left"><tr id="kms_02_0027__en-us_topic_0112992285_row55181746125413"><th align="left" class="cellrowborder" valign="top" width="18.04%" id="mcps1.3.4.2.2.5.1.1"><p id="kms_02_0027__en-us_topic_0112992285_p1151811468544">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.67%" id="mcps1.3.4.2.2.5.1.2"><p id="kms_02_0027__en-us_topic_0112992285_p145186465549">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.35%" id="mcps1.3.4.2.2.5.1.3"><p id="kms_02_0027__en-us_topic_0112992285_p13518194615547">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="49.94%" id="mcps1.3.4.2.2.5.1.4"><p id="kms_02_0027__en-us_topic_0112992285_p18518194625416">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="kms_02_0027__en-us_topic_0112992285_row951818462548"><td class="cellrowborder" valign="top" width="18.04%" headers="mcps1.3.4.2.2.5.1.1 "><p id="kms_02_0027__en-us_topic_0112992285_p1651844612541">key_info</p>
</td>
<td class="cellrowborder" valign="top" width="15.67%" headers="mcps1.3.4.2.2.5.1.2 "><p id="kms_02_0027__en-us_topic_0112992285_p7518184665412">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="16.35%" headers="mcps1.3.4.2.2.5.1.3 "><p id="kms_02_0027__en-us_topic_0112992285_p165181046115411">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="49.94%" headers="mcps1.3.4.2.2.5.1.4 "><p id="kms_02_0027__en-us_topic_0112992285_p85181246135416">Information about keys. For details, see <a href="#kms_02_0027__en-us_topic_0112992285_table4661953591125">Table 4</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="kms_02_0027__en-us_topic_0112992285_table4661953591125"></a><a name="en-us_topic_0112992285_table4661953591125"></a><table cellpadding="4" cellspacing="0" summary="" id="kms_02_0027__en-us_topic_0112992285_table4661953591125" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="kms_02_0027__en-us_topic_0112992285_b14791541903">key_info</strong> field description</caption><thead align="left"><tr id="kms_02_0027__en-us_topic_0112992285_row5741486791125"><th align="left" class="cellrowborder" valign="top" width="21.997800219978004%" id="mcps1.3.4.3.2.5.1.1"><p id="kms_02_0027__en-us_topic_0112992285_p2009266891125"><strong id="kms_02_0027__en-us_topic_0112992285_b842352706191126">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.978402159784022%" id="mcps1.3.4.3.2.5.1.2"><p id="kms_02_0027__en-us_topic_0112992285_p1689338191125"><strong id="kms_02_0027__en-us_topic_0112992285_b842352706191129">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.858214178582145%" id="mcps1.3.4.3.2.5.1.3"><p id="kms_02_0027__en-us_topic_0112992285_p2618658291125"><strong id="kms_02_0027__en-us_topic_0112992285_b842352706191132">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="44.16558344165583%" id="mcps1.3.4.3.2.5.1.4"><p id="kms_02_0027__en-us_topic_0112992285_p4073839291125"><strong id="kms_02_0027__en-us_topic_0112992285_b842352706191134">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="kms_02_0027__en-us_topic_0112992285_row1147544291125"><td class="cellrowborder" valign="top" width="21.997800219978004%" headers="mcps1.3.4.3.2.5.1.1 "><p id="kms_02_0027__en-us_topic_0112992285_p708028792054">key_id</p>
</td>
<td class="cellrowborder" valign="top" width="15.978402159784022%" headers="mcps1.3.4.3.2.5.1.2 "><p id="kms_02_0027__en-us_topic_0112992285_p1574126631">String</p>
</td>
<td class="cellrowborder" valign="top" width="17.858214178582145%" headers="mcps1.3.4.3.2.5.1.3 "><p id="kms_02_0027__en-us_topic_0112992285_p1443169492054">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="44.16558344165583%" headers="mcps1.3.4.3.2.5.1.4 "><p id="kms_02_0027__en-us_topic_0112992285_p2811658392054">CMK ID</p>
</td>
</tr>
<tr id="kms_02_0027__en-us_topic_0112992285_row5657868491125"><td class="cellrowborder" valign="top" width="21.997800219978004%" headers="mcps1.3.4.3.2.5.1.1 "><p id="kms_02_0027__en-us_topic_0112992285_p1402298193456">key_description</p>
</td>
<td class="cellrowborder" valign="top" width="15.978402159784022%" headers="mcps1.3.4.3.2.5.1.2 "><p id="kms_02_0027__en-us_topic_0112992285_p1390982717312">String</p>
</td>
<td class="cellrowborder" valign="top" width="17.858214178582145%" headers="mcps1.3.4.3.2.5.1.3 "><p id="kms_02_0027__en-us_topic_0112992285_p1776938992054">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="44.16558344165583%" headers="mcps1.3.4.3.2.5.1.4 "><p id="kms_02_0027__en-us_topic_0112992285_p3003444392054">Description of a CMK</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="kms_02_0027__en-us_topic_0112992285_section2139731104419"><h4 class="sectiontitle">Examples</h4><p id="kms_02_0027__en-us_topic_0112992285_p6738435114610">The following is an example about how to modify a CMK whose alias ID is <span class="parmvalue" id="kms_02_0027__en-us_topic_0112992285_parmvalue19739413241729"><b>bb6a3d22-dc93-47ac-b5bd-88df7ad35f1e</b></span> and description is <span class="parmvalue" id="kms_02_0027__en-us_topic_0112992285_parmvalue44103755219859"><b>test</b></span>.</p>
<ul id="kms_02_0027__en-us_topic_0112992285_ul7174203144411"><li id="kms_02_0027__en-us_topic_0112992285_li19173103111444">Example request<pre class="screen" id="kms_02_0027__en-us_topic_0112992285_screen1317318318441">{
"key_id": "bb6a3d22-dc93-47ac-b5bd-88df7ad35f1e",
"key_description": "test"
}</pre>
</li><li id="kms_02_0027__en-us_topic_0112992285_li1617416311444">Example response<pre class="screen" id="kms_02_0027__en-us_topic_0112992285_screen10174131154419">{
"key_info": {
"key_id": "bb6a3d22-dc93-47ac-b5bd-88df7ad35f1e",
"key_description": "test"
}
}</pre>
<p id="kms_02_0027__en-us_topic_0112992285_p61746311443">or</p>
<pre class="screen" id="kms_02_0027__en-us_topic_0112992285_screen51741331134415">{
"error": {
"error_code": "KMS.XXXX",
"error_msg": "XXX"
}
}</pre>
</li></ul>
</div>
<div class="section" id="kms_02_0027__en-us_topic_0112992285_section3454223421"><h4 class="sectiontitle">Status Codes</h4><div class="p" id="kms_02_0027__en-us_topic_0112992285_en-us_topic_0112992294_en-us_topic_0079615001_p17772351"><a href="#kms_02_0027__en-us_topic_0112992285_en-us_topic_0112992294_en-us_topic_0079615001_table20596071">Table 5</a> lists the normal status code returned by the response.
<div class="tablenoborder"><a name="kms_02_0027__en-us_topic_0112992285_en-us_topic_0112992294_en-us_topic_0079615001_table20596071"></a><a name="en-us_topic_0112992285_en-us_topic_0112992294_en-us_topic_0079615001_table20596071"></a><table cellpadding="4" cellspacing="0" summary="" id="kms_02_0027__en-us_topic_0112992285_en-us_topic_0112992294_en-us_topic_0079615001_table20596071" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Status codes</caption><thead align="left"><tr id="kms_02_0027__en-us_topic_0112992285_en-us_topic_0112992294_en-us_topic_0079615001_row9746163"><th align="left" class="cellrowborder" valign="top" width="16.16%" id="mcps1.3.6.2.2.2.4.1.1"><p id="kms_02_0027__en-us_topic_0112992285_en-us_topic_0112992294_p57545694203043">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="28.28%" id="mcps1.3.6.2.2.2.4.1.2"><p id="kms_02_0027__en-us_topic_0112992285_en-us_topic_0112992294_p4531342288">Status</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.559999999999995%" id="mcps1.3.6.2.2.2.4.1.3"><p id="kms_02_0027__en-us_topic_0112992285_en-us_topic_0112992294_p30689603203043">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="kms_02_0027__en-us_topic_0112992285_en-us_topic_0112992294_en-us_topic_0079615001_row48621261"><td class="cellrowborder" valign="top" width="16.16%" headers="mcps1.3.6.2.2.2.4.1.1 "><p id="kms_02_0027__en-us_topic_0112992285_en-us_topic_0112992294_en-us_topic_0079615001_p46008046">200</p>
</td>
<td class="cellrowborder" valign="top" width="28.28%" headers="mcps1.3.6.2.2.2.4.1.2 "><p id="kms_02_0027__en-us_topic_0112992285_en-us_topic_0112992294_p7538425819">OK</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.6.2.2.2.4.1.3 "><p id="kms_02_0027__en-us_topic_0112992285_en-us_topic_0112992294_p1885682315512">Request processed successfully.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p id="kms_02_0027__en-us_topic_0112992285_en-us_topic_0112992294_p5626181018551">Exception status code. For details, see <a href="kms_02_0301.html#kms_02_0301">Status Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="kms_02_0011.html">CMK Management</a></div>
</div>
</div>