forked from docs/doc-exports
Reviewed-by: Belejkanic, Lukas <lukas.belejkanic@t-systems.com> Co-authored-by: qiaoli <qiaoli@huawei.com> Co-committed-by: qiaoli <qiaoli@huawei.com>
158 lines
14 KiB
HTML
158 lines
14 KiB
HTML
<a name="kms_02_0029"></a><a name="kms_02_0029"></a>
|
|
|
|
<h1 class="topictitle1">Revoking a Grant</h1>
|
|
<div id="body1497317398920"><div class="section" id="kms_02_0029__en-us_topic_0112992289_section37533920154934"><h4 class="sectiontitle">Function</h4><p id="kms_02_0029__en-us_topic_0112992289_p30759225155040">This API allows you to revoke a grant.</p>
|
|
<div class="note" id="kms_02_0029__en-us_topic_0112992289_note2095517513589"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="kms_02_0029__en-us_topic_0112992289_p095515105814">Only the user who created the CMK can revoke a grant.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="kms_02_0029__en-us_topic_0112992289_section37627629154934"><h4 class="sectiontitle">URI</h4><ul id="kms_02_0029__en-us_topic_0112992289_ul27939100154934"><li id="kms_02_0029__en-us_topic_0112992289_li50125315154934">URI format<p id="kms_02_0029__en-us_topic_0112992289_p48474652154934"><a name="kms_02_0029__en-us_topic_0112992289_li50125315154934"></a><a name="en-us_topic_0112992289_li50125315154934"></a>POST /v1.0/{project_id}/kms/revoke-grant</p>
|
|
</li><li id="kms_02_0029__en-us_topic_0112992289_li34132757154934">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="kms_02_0029__en-us_topic_0112992289_table38759358154934" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameter</caption><thead align="left"><tr id="kms_02_0029__en-us_topic_0112992289_row60644171154934"><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_0029__en-us_topic_0112992289_p13230838154934">Parameter</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_0029__en-us_topic_0112992289_p65064970154934">Mandatory</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_0029__en-us_topic_0112992289_p35771181154934">Type</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_0029__en-us_topic_0112992289_p11784586154934">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="kms_02_0029__en-us_topic_0112992289_row15027399154934"><td class="cellrowborder" valign="top" width="22.74%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="kms_02_0029__en-us_topic_0112992289_p9259788154934">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_0029__en-us_topic_0112992289_p11845378154934">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_0029__en-us_topic_0112992289_p4386100291125">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_0029__en-us_topic_0112992289_p5464351154934">Project ID</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="kms_02_0029__en-us_topic_0112992289_section49179167154934"><h4 class="sectiontitle">Request Message</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="kms_02_0029__en-us_topic_0112992289_en-us_topic_0000001176937539_HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="kms_02_0029__en-us_topic_0112992289_en-us_topic_0000001176937539_row209291944115219"><th align="left" class="cellrowborder" valign="top" width="20.080000000000002%" id="mcps1.3.3.2.2.5.1.1"><p id="kms_02_0029__en-us_topic_0112992289_en-us_topic_0000001176937539_p17930194414521">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="19.919999999999998%" id="mcps1.3.3.2.2.5.1.2"><p id="kms_02_0029__en-us_topic_0112992289_en-us_topic_0000001176937539_p15930244195213">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_0029__en-us_topic_0112992289_en-us_topic_0000001176937539_p39301444155210">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_0029__en-us_topic_0112992289_en-us_topic_0000001176937539_p109301444105220">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="kms_02_0029__en-us_topic_0112992289_en-us_topic_0000001176937539_row1292934416529"><td class="cellrowborder" valign="top" width="20.080000000000002%" headers="mcps1.3.3.2.2.5.1.1 "><p id="kms_02_0029__en-us_topic_0112992289_en-us_topic_0000001176937539_p109311444155211">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.919999999999998%" headers="mcps1.3.3.2.2.5.1.2 "><p id="kms_02_0029__en-us_topic_0112992289_en-us_topic_0000001176937539_p9931104412528">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="kms_02_0029__en-us_topic_0112992289_en-us_topic_0000001176937539_p193104485212">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="kms_02_0029__en-us_topic_0112992289_en-us_topic_0000001176937539_p1093134420527">User token. It can be obtained by calling an IAM API. The value of <strong id="kms_02_0029__en-us_topic_0112992289_b1924425467105143">X-Subject-Token</strong> in the response header is the user token.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="kms_02_0029__en-us_topic_0112992289_row17121816165912"><td class="cellrowborder" valign="top" width="20.080000000000002%" headers="mcps1.3.3.2.2.5.1.1 "><p id="kms_02_0029__en-us_topic_0112992289_p1279425073711">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.919999999999998%" headers="mcps1.3.3.2.2.5.1.2 "><p id="kms_02_0029__en-us_topic_0112992289_p2794195010376">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="kms_02_0029__en-us_topic_0112992289_p9794195015373">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="kms_02_0029__en-us_topic_0112992289_p5617163694719">application/json</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="kms_02_0029__en-us_topic_0112992289_table5096792154934" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request parameters</caption><thead align="left"><tr id="kms_02_0029__en-us_topic_0112992289_row37570371154934"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.3.3.2.5.1.1"><p id="kms_02_0029__en-us_topic_0112992289_p176291224518">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_0029__en-us_topic_0112992289_p1762412104515">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_0029__en-us_topic_0112992289_p4762712184520">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_0029__en-us_topic_0112992289_p197620128455">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="kms_02_0029__en-us_topic_0112992289_row3735252154934"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.2.5.1.1 "><p id="kms_02_0029__en-us_topic_0112992289_p5492758715522">key_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.2 "><p id="kms_02_0029__en-us_topic_0112992289_p530110015522">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.2.5.1.3 "><p id="kms_02_0029__en-us_topic_0112992289_p115241313415">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.5.1.4 "><p id="kms_02_0029__en-us_topic_0112992289_p21929114422">36-byte key ID that matches the regular expression <span class="parmvalue" id="kms_02_0029__en-us_topic_0112992289_parmvalue19734844104323"><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_0029__en-us_topic_0112992289_p11134104114149">For example, <strong id="kms_02_0029__en-us_topic_0112992289_b15571945724610">0d0466b0-e727-4d9c-b35d-f84bb474a37f</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="kms_02_0029__en-us_topic_0112992289_row2233745154934"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.2.5.1.1 "><p id="kms_02_0029__en-us_topic_0112992289_p3969076161826">grant_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.2 "><p id="kms_02_0029__en-us_topic_0112992289_p2870774161826">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.2.5.1.3 "><p id="kms_02_0029__en-us_topic_0112992289_p104533151948">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.5.1.4 "><p id="kms_02_0029__en-us_topic_0112992289_p31206156161826">64-byte ID of a grant that meets the regular expression <strong id="kms_02_0029__en-us_topic_0112992289_b842352706105044">^[A-Fa-f0-9]{64}$</strong></p>
|
|
<p id="kms_02_0029__en-us_topic_0112992289_p7940591162038">Example: 7c9a3286af4fcca5f0a385ad13e1d21a50e27b6dbcab50f37f30f93b8939827d</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="kms_02_0029__en-us_topic_0112992289_row29452288162122"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.2.5.1.1 "><p id="kms_02_0029__en-us_topic_0112992289_p45167875162120">sequence</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.2 "><p id="kms_02_0029__en-us_topic_0112992289_p60798351162120">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.3.2.5.1.3 "><p id="kms_02_0029__en-us_topic_0112992289_p1221520171643">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.5.1.4 "><p id="kms_02_0029__en-us_topic_0112992289_p25719365162120">A 36-byte serial number of a request message.</p>
|
|
<p id="kms_02_0029__en-us_topic_0112992289_p30147697162120">For example, <strong id="kms_02_0029__en-us_topic_0112992289_b3374608424254">919c82d4-8046-4722-9094-35c3c6524cff</strong></p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="kms_02_0029__en-us_topic_0112992289_section35819930154934"><h4 class="sectiontitle">Response Message</h4><p id="kms_02_0029__en-us_topic_0112992289_p50430829201729">None</p>
|
|
</div>
|
|
<div class="section" id="kms_02_0029__en-us_topic_0112992289_section16883113220574"><h4 class="sectiontitle">Example</h4><p id="kms_02_0029__en-us_topic_0112992289_p26581152012">The following example describes how to revoke a grant whose grant ID is <span class="parmvalue" id="kms_02_0029__en-us_topic_0112992289_parmvalue869049923193026"><b>7c9a3286af4fcca5f0a385ad13e1d21a50e27b6dbcab50f37f30f93b8939827d</b></span> and the CMK ID is <span class="parmvalue" id="kms_02_0029__en-us_topic_0112992289_parmvalue151618583193044"><b>bb6a3d22-dc93-47ac-b5bd-88df7ad35f1e</b></span>.</p>
|
|
<ul id="kms_02_0029__en-us_topic_0112992289_ul5794242205711"><li id="kms_02_0029__en-us_topic_0112992289_li16718172155717">Example request<pre class="screen" id="kms_02_0029__en-us_topic_0112992289_screen6411117205719">{
|
|
"key_id": "bb6a3d22-dc93-47ac-b5bd-88df7ad35f1e",
|
|
"grant_id":"7c9a3286af4fcca5f0a385ad13e1d21a50e27b6dbcab50f37f30f93b8939827d"
|
|
}</pre>
|
|
</li><li id="kms_02_0029__en-us_topic_0112992289_li38339984154934">Example response<pre class="screen" id="kms_02_0029__en-us_topic_0112992289_screen9515540154934">{
|
|
}</pre>
|
|
<p id="kms_02_0029__en-us_topic_0112992289_p18530999154934">or</p>
|
|
<pre class="screen" id="kms_02_0029__en-us_topic_0112992289_screen32561266154934">{
|
|
"error": {
|
|
"error_code": "KMS.XXXX",
|
|
"error_msg": "XXX"
|
|
}
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="kms_02_0029__en-us_topic_0112992289_section3454223421"><h4 class="sectiontitle">Status Codes</h4><div class="p" id="kms_02_0029__en-us_topic_0112992289_en-us_topic_0112992294_en-us_topic_0079615001_p17772351"><a href="#kms_02_0029__en-us_topic_0112992289_en-us_topic_0112992294_en-us_topic_0079615001_table20596071">Table 4</a> lists the normal status code returned by the response.
|
|
<div class="tablenoborder"><a name="kms_02_0029__en-us_topic_0112992289_en-us_topic_0112992294_en-us_topic_0079615001_table20596071"></a><a name="en-us_topic_0112992289_en-us_topic_0112992294_en-us_topic_0079615001_table20596071"></a><table cellpadding="4" cellspacing="0" summary="" id="kms_02_0029__en-us_topic_0112992289_en-us_topic_0112992294_en-us_topic_0079615001_table20596071" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Status codes</caption><thead align="left"><tr id="kms_02_0029__en-us_topic_0112992289_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_0029__en-us_topic_0112992289_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_0029__en-us_topic_0112992289_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_0029__en-us_topic_0112992289_en-us_topic_0112992294_p30689603203043">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="kms_02_0029__en-us_topic_0112992289_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_0029__en-us_topic_0112992289_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_0029__en-us_topic_0112992289_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_0029__en-us_topic_0112992289_en-us_topic_0112992294_p1885682315512">Request processed successfully.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<p id="kms_02_0029__en-us_topic_0112992289_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>
|
|
|