Files
doc-exports/docs/kms/api-ref/kms_02_0016.html
qiaoli 18397ded73 kms_api_2025042703
Reviewed-by: Belejkanic, Lukas <lukas.belejkanic@t-systems.com>
Co-authored-by: qiaoli <qiaoli@huawei.com>
Co-committed-by: qiaoli <qiaoli@huawei.com>
2025-12-09 09:29:44 +00:00

183 lines
17 KiB
HTML

<a name="kms_02_0016"></a><a name="kms_02_0016"></a>
<h1 class="topictitle1">Canceling the Scheduled Deletion of a CMK</h1>
<div id="body1474684560506"><div class="section" id="kms_02_0016__en-us_topic_0112992288_s1731a14fb0144c79bf0fa90c694f34f7"><h4 class="sectiontitle">Function</h4><p id="kms_02_0016__en-us_topic_0112992288_en-us_topic_0020091565_p23115188">This API enables you to cancel the scheduled deletion of a CMK.</p>
<div class="note" id="kms_02_0016__en-us_topic_0112992288_note106281813191016"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="kms_02_0016__en-us_topic_0112992288_p116287138106">You can cancel the scheduled deletion for a CMK only when the CMK's status is <span class="parmname" id="kms_02_0016__en-us_topic_0112992288_parmname3524273015334"><b>Scheduled deletion</b></span>.</p>
</div></div>
</div>
<div class="section" id="kms_02_0016__en-us_topic_0112992288_se70c3e5518a04f60b06032524dddfef4"><h4 class="sectiontitle">URI</h4><ul id="kms_02_0016__en-us_topic_0112992288_en-us_topic_0020091565_ul60390938"><li id="kms_02_0016__en-us_topic_0112992288_en-us_topic_0020091565_li6647531">URI format<p id="kms_02_0016__en-us_topic_0112992288_p138073181080"><a name="kms_02_0016__en-us_topic_0112992288_en-us_topic_0020091565_li6647531"></a><a name="en-us_topic_0112992288_en-us_topic_0020091565_li6647531"></a>POST /v1.0/{project_id}/kms/cancel-key-deletion</p>
</li><li id="kms_02_0016__en-us_topic_0112992288_en-us_topic_0020091565_li14211994">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="kms_02_0016__en-us_topic_0112992288_t982da1e0196d4ec1a28d1fbff2cc8191" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameter</caption><thead align="left"><tr id="kms_02_0016__en-us_topic_0112992288_r6e963322c1e740d181726d2f0e91df5a"><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_0016__en-us_topic_0112992288_a3b5bbe5a7f644fd3a74cecbfb3f7ed60">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="22.18%" id="mcps1.3.2.2.2.1.2.5.1.2"><p id="kms_02_0016__en-us_topic_0112992288_ad98d2f62bd064b4e96ea922645197c24">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.86%" id="mcps1.3.2.2.2.1.2.5.1.3"><p id="kms_02_0016__en-us_topic_0112992288_a3becf0b3aec9468984c2efc8d5abbea5">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="37.22%" id="mcps1.3.2.2.2.1.2.5.1.4"><p id="kms_02_0016__en-us_topic_0112992288_a6bb6f1fe56a2454982832e8d56d354d8">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="kms_02_0016__en-us_topic_0112992288_r69bf37b65d3f446eab7b3f4d1b2fcec0"><td class="cellrowborder" valign="top" width="22.74%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="kms_02_0016__en-us_topic_0112992288_ae42d73592f58424ea93a11e52d2478dd">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="22.18%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="kms_02_0016__en-us_topic_0112992288_a56440c0f0ae34ba3b8033d1247673984">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.86%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="kms_02_0016__en-us_topic_0112992288_a1a4a71c11a4a45a58d0de2fbe009e9d9">String</p>
</td>
<td class="cellrowborder" valign="top" width="37.22%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="kms_02_0016__en-us_topic_0112992288_a1314869d2dc147b38461e037d622f7b4">Project ID</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="kms_02_0016__en-us_topic_0112992288_seb7b7901701247fab30a59b76f1c7f93"><h4 class="sectiontitle">Request Message</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="kms_02_0016__en-us_topic_0112992288_en-us_topic_0000002087645966_HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="kms_02_0016__en-us_topic_0112992288_en-us_topic_0000002087645966_row172191841497"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="kms_02_0016__en-us_topic_0112992288_en-us_topic_0000002087645966_p1921919414918">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="kms_02_0016__en-us_topic_0112992288_en-us_topic_0000002087645966_p52207411494">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="kms_02_0016__en-us_topic_0112992288_en-us_topic_0000002087645966_p122094164919">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="kms_02_0016__en-us_topic_0112992288_en-us_topic_0000002087645966_p1922014420499">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="kms_02_0016__en-us_topic_0112992288_en-us_topic_0000002087645966_row9219174154916"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="kms_02_0016__en-us_topic_0112992288_en-us_topic_0000002087645966_p02204417496">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="kms_02_0016__en-us_topic_0112992288_en-us_topic_0000002087645966_p13220446494">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="kms_02_0016__en-us_topic_0112992288_en-us_topic_0000002087645966_p22209404918">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="kms_02_0016__en-us_topic_0112992288_en-us_topic_0000002087645966_p9220140494">User token.</p>
<p id="kms_02_0016__en-us_topic_0112992288_en-us_topic_0000002087645966_p112203414490">It can be obtained by calling the IAM API (value of <strong id="kms_02_0016__en-us_topic_0112992288_b1049228465104751">X-Subject-Token</strong> in the response header).</p>
</td>
</tr>
<tr id="kms_02_0016__en-us_topic_0112992288_row10498145111318"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="kms_02_0016__en-us_topic_0112992288_p1279425073711">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="kms_02_0016__en-us_topic_0112992288_p2794195010376">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="kms_02_0016__en-us_topic_0112992288_p9794195015373">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="kms_02_0016__en-us_topic_0112992288_p5617163694719">application/json</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="kms_02_0016__en-us_topic_0112992288_table46221022101230" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request parameters</caption><thead align="left"><tr id="kms_02_0016__en-us_topic_0112992288_row9315574101230"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.3.3.2.5.1.1"><p id="kms_02_0016__en-us_topic_0112992288_p16364058101230">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.3.3.2.5.1.2"><p id="kms_02_0016__en-us_topic_0112992288_p57514295101230">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.3.3.2.5.1.3"><p id="kms_02_0016__en-us_topic_0112992288_p50420322101230">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.3.2.5.1.4"><p id="kms_02_0016__en-us_topic_0112992288_p28146304101230">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="kms_02_0016__en-us_topic_0112992288_row2638193101722"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.2.5.1.1 "><p id="kms_02_0016__en-us_topic_0112992288_p5622302014656">key_id</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.2 "><p id="kms_02_0016__en-us_topic_0112992288_p4891779114656">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.2.5.1.3 "><p id="kms_02_0016__en-us_topic_0112992288_p5777073314656">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.5.1.4 "><p id="kms_02_0016__en-us_topic_0112992288_p21929114422">36-byte key ID that matches the regular expression <span class="parmvalue" id="kms_02_0016__en-us_topic_0112992288_parmvalue2452419534319"><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_0016__en-us_topic_0112992288_p11134104114149">For example, <strong id="kms_02_0016__en-us_topic_0112992288_b835730543466">0d0466b0-e727-4d9c-b35d-f84bb474a37f</strong></p>
</td>
</tr>
<tr id="kms_02_0016__en-us_topic_0112992288_row35142504101726"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.2.5.1.1 "><p id="kms_02_0016__en-us_topic_0112992288_p269135101746">sequence</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.2 "><p id="kms_02_0016__en-us_topic_0112992288_p20967256101746">No</p>
</td>
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.2.5.1.3 "><p id="kms_02_0016__en-us_topic_0112992288_p21799971101746">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.5.1.4 "><p id="kms_02_0016__en-us_topic_0112992288_p43216172173433">A 36-byte serial number of a request message.</p>
<p id="kms_02_0016__en-us_topic_0112992288_p20626198101746">For example, <strong id="kms_02_0016__en-us_topic_0112992288_b162527059642455">919c82d4-8046-4722-9094-35c3c6524cff</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="kms_02_0016__en-us_topic_0112992288_sfadd53a5f4714e8f87811818d62d0296"><h4 class="sectiontitle">Response Message</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="kms_02_0016__en-us_topic_0112992288_t98d238e10953421e84a073707024c329" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response parameters</caption><thead align="left"><tr id="kms_02_0016__en-us_topic_0112992288_r144a2c52c5054c6d9243eb2ef3875a21"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.4.2.2.5.1.1"><p id="kms_02_0016__en-us_topic_0112992288_a9156e0b03f054d4e8547e0787f88a51b">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.4.2.2.5.1.2"><p id="kms_02_0016__en-us_topic_0112992288_a1851157c81e14d7f82db752a5737195a">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.4.2.2.5.1.3"><p id="kms_02_0016__en-us_topic_0112992288_a39360acf5daf4c01a1ebddeff5d68a1c">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.2.2.5.1.4"><p id="kms_02_0016__en-us_topic_0112992288_a0097000016b14857972b7929bcaaa038">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="kms_02_0016__en-us_topic_0112992288_r3c4af7b36e9240d197ab56255e37b83c"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.2.5.1.1 "><p id="kms_02_0016__en-us_topic_0112992288_p43705601102713">key_id</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.2.5.1.2 "><p id="kms_02_0016__en-us_topic_0112992288_p63384753102713">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.2.5.1.3 "><p id="kms_02_0016__en-us_topic_0112992288_p50492797102713">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.2.5.1.4 "><p id="kms_02_0016__en-us_topic_0112992288_p33891398102713">CMK ID</p>
</td>
</tr>
<tr id="kms_02_0016__en-us_topic_0112992288_rf212a916c502452a8e151eba2f118272"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.2.5.1.1 "><p id="kms_02_0016__en-us_topic_0112992288_p118892651480">key_state</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.2.5.1.2 "><p id="kms_02_0016__en-us_topic_0112992288_p249677091480">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.2.5.1.3 "><p id="kms_02_0016__en-us_topic_0112992288_p235063691480">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.2.2.5.1.4 "><p id="kms_02_0016__en-us_topic_0112992288_p91185741480">CMK status:</p>
<ul id="kms_02_0016__en-us_topic_0112992288_ul38541215195435"><li id="kms_02_0016__en-us_topic_0112992288_li28636169195440"><span class="parmvalue" id="kms_02_0016__en-us_topic_0112992288_parmvalue555125744163642"><b>2</b></span> indicates that the CMK is enabled.</li><li id="kms_02_0016__en-us_topic_0112992288_li26805340195444"><span class="parmvalue" id="kms_02_0016__en-us_topic_0112992288_parmvalue890467586163649"><b>3</b></span> indicates that the CMK is disabled.</li><li id="kms_02_0016__en-us_topic_0112992288_li12152497195435"><span class="parmvalue" id="kms_02_0016__en-us_topic_0112992288_parmvalue7929059216370"><b>4</b></span> indicates that the CMK is scheduled for deletion.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="kms_02_0016__en-us_topic_0112992288_section916185511014"><h4 class="sectiontitle">Example</h4><p id="kms_02_0016__en-us_topic_0112992288_p9807149131118">The following example describes how to cancel the scheduled deletion of a CMK whose ID is <span class="parmvalue" id="kms_02_0016__en-us_topic_0112992288_parmvalue19739413241729"><b>0d0466b0-e727-4d9c-b35d-f84bb474a37f</b></span>.</p>
<ul id="kms_02_0016__en-us_topic_0112992288_ul10185205519107"><li id="kms_02_0016__en-us_topic_0112992288_li1218315518107">Example request<pre class="screen" id="kms_02_0016__en-us_topic_0112992288_screen718375517103">{
"key_id": "0d0466b0-e727-4d9c-b35d-f84bb474a37f"
}</pre>
</li></ul>
<ul id="kms_02_0016__en-us_topic_0112992288_ul1318513554109"><li id="kms_02_0016__en-us_topic_0112992288_li5185125581014">Example response<pre class="screen" id="kms_02_0016__en-us_topic_0112992288_screen61856550101">{
"key_id": "0d0466b0-e727-4d9c-b35d-f84bb474a37f",
"key_state": "3"
}</pre>
<p id="kms_02_0016__en-us_topic_0112992288_p918535591020">or</p>
<pre class="screen" id="kms_02_0016__en-us_topic_0112992288_screen121851455111011">{
"error": {
"error_code": "KMS.XXXX",
"error_msg": "XXX"
}
}</pre>
</li></ul>
</div>
<div class="section" id="kms_02_0016__en-us_topic_0112992288_section3454223421"><h4 class="sectiontitle">Status Codes</h4><div class="p" id="kms_02_0016__en-us_topic_0112992288_en-us_topic_0112992294_en-us_topic_0079615001_p17772351"><a href="#kms_02_0016__en-us_topic_0112992288_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_0016__en-us_topic_0112992288_en-us_topic_0112992294_en-us_topic_0079615001_table20596071"></a><a name="en-us_topic_0112992288_en-us_topic_0112992294_en-us_topic_0079615001_table20596071"></a><table cellpadding="4" cellspacing="0" summary="" id="kms_02_0016__en-us_topic_0112992288_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_0016__en-us_topic_0112992288_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_0016__en-us_topic_0112992288_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_0016__en-us_topic_0112992288_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_0016__en-us_topic_0112992288_en-us_topic_0112992294_p30689603203043">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="kms_02_0016__en-us_topic_0112992288_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_0016__en-us_topic_0112992288_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_0016__en-us_topic_0112992288_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_0016__en-us_topic_0112992288_en-us_topic_0112992294_p1885682315512">Request processed successfully.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p id="kms_02_0016__en-us_topic_0112992288_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>