forked from docs/doc-exports
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>
128 lines
12 KiB
HTML
128 lines
12 KiB
HTML
<a name="kms_02_0030"></a><a name="kms_02_0030"></a>
|
|
|
|
<h1 class="topictitle1">Retiring a Grant</h1>
|
|
<div id="body1497317398920"><div class="section" id="kms_02_0030__en-us_topic_0112992299_section37533920154934"><h4 class="sectiontitle">Function</h4><p id="kms_02_0030__en-us_topic_0112992299_p30759225155040">This API enables users to retire a grant.</p>
|
|
<p id="kms_02_0030__en-us_topic_0112992299_p6618022311204">For example, user A grants operation permissions on CMK <strong id="kms_02_0030__en-us_topic_0112992299_b84235270613539">A/key</strong> to user B and authorizes user C to retire the grant. By doing this, users A, B, and C all can cancel the permissions. After the canceling, user B does not have permissions on CMK <strong id="kms_02_0030__en-us_topic_0112992299_b84235270614014">A/key</strong> anymore.</p>
|
|
<div class="notice" id="kms_02_0030__en-us_topic_0112992299_note7304115218312"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="kms_02_0030__en-us_topic_0112992299_p3030098154934">The following are allowed to call this API:</p>
|
|
<ul id="kms_02_0030__en-us_topic_0112992299_ul3445105616388"><li id="kms_02_0030__en-us_topic_0112992299_li4162405116388">The user who granted the permissions</li><li id="kms_02_0030__en-us_topic_0112992299_li3907214316388">The user indicated by parameter <strong id="kms_02_0030__en-us_topic_0112992299_b842352706113922">retiring_principal</strong></li><li id="kms_02_0030__en-us_topic_0112992299_li60755064163857">The user indicated by parameter <strong id="kms_02_0030__en-us_topic_0112992299_b842352706113943">grantee_principal</strong> when <strong id="kms_02_0030__en-us_topic_0112992299_b84235270611402">retire-grant</strong> has been selected</li></ul>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="kms_02_0030__en-us_topic_0112992299_section37627629154934"><h4 class="sectiontitle">URI</h4><ul id="kms_02_0030__en-us_topic_0112992299_ul27939100154934"><li id="kms_02_0030__en-us_topic_0112992299_li50125315154934">URI format<p id="kms_02_0030__en-us_topic_0112992299_p34685572163543"><a name="kms_02_0030__en-us_topic_0112992299_li50125315154934"></a><a name="en-us_topic_0112992299_li50125315154934"></a>POST /v1.0/{project_id}/kms/retire-grant</p>
|
|
</li><li id="kms_02_0030__en-us_topic_0112992299_li34132757154934">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="kms_02_0030__en-us_topic_0112992299_table38759358154934" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="kms_02_0030__en-us_topic_0112992299_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_0030__en-us_topic_0112992299_p13230838154934"><strong id="kms_02_0030__en-us_topic_0112992299_b842352706193134">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_0030__en-us_topic_0112992299_p65064970154934"><strong id="kms_02_0030__en-us_topic_0112992299_b842352706193137">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_0030__en-us_topic_0112992299_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_0030__en-us_topic_0112992299_p11784586154934">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="kms_02_0030__en-us_topic_0112992299_row15027399154934"><td class="cellrowborder" valign="top" width="22.74%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="kms_02_0030__en-us_topic_0112992299_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_0030__en-us_topic_0112992299_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_0030__en-us_topic_0112992299_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_0030__en-us_topic_0112992299_p5464351154934">Project ID</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="kms_02_0030__en-us_topic_0112992299_section49179167154934"><h4 class="sectiontitle">Requests</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="kms_02_0030__en-us_topic_0112992299_table5096792154934" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameters</caption><thead align="left"><tr id="kms_02_0030__en-us_topic_0112992299_row37570371154934"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.3.2.2.5.1.1"><p id="kms_02_0030__en-us_topic_0112992299_p139128461453"><strong id="kms_02_0030__en-us_topic_0112992299_b1974050220">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.3.2.2.5.1.2"><p id="kms_02_0030__en-us_topic_0112992299_p159121546174511"><strong id="kms_02_0030__en-us_topic_0112992299_b1755576366">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.3.2.2.5.1.3"><p id="kms_02_0030__en-us_topic_0112992299_p29121446134511">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.2.2.5.1.4"><p id="kms_02_0030__en-us_topic_0112992299_p1291211466454">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="kms_02_0030__en-us_topic_0112992299_row3735252154934"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.2.5.1.1 "><p id="kms_02_0030__en-us_topic_0112992299_p5492758715522">key_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.2.2.5.1.2 "><p id="kms_02_0030__en-us_topic_0112992299_p530110015522">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.2.5.1.3 "><p id="kms_02_0030__en-us_topic_0112992299_p448182811411">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.2.5.1.4 "><p id="kms_02_0030__en-us_topic_0112992299_p2673593115522">36-byte ID of a CMK that matches the regular expression <span class="parmvalue" id="kms_02_0030__en-us_topic_0112992299_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_0030__en-us_topic_0112992299_p5898392715522">Example: 0d0466b0-e727-4d9c-b35d-f84bb474a37f</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="kms_02_0030__en-us_topic_0112992299_row2233745154934"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.2.5.1.1 "><p id="kms_02_0030__en-us_topic_0112992299_p3969076161826">grant_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.2.2.5.1.2 "><p id="kms_02_0030__en-us_topic_0112992299_p2870774161826">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.2.5.1.3 "><p id="kms_02_0030__en-us_topic_0112992299_p737103020418">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.2.5.1.4 "><p id="kms_02_0030__en-us_topic_0112992299_p31206156161826">64-byte ID of a grant that meets the regular expression <strong id="kms_02_0030__en-us_topic_0112992299_b842352706105044">^[A-Fa-f0-9]{64}$</strong></p>
|
|
<p id="kms_02_0030__en-us_topic_0112992299_p7940591162038">Example: 7c9a3286af4fcca5f0a385ad13e1d21a50e27b6dbcab50f37f30f93b8939827d</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="kms_02_0030__en-us_topic_0112992299_row29452288162122"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.2.5.1.1 "><p id="kms_02_0030__en-us_topic_0112992299_p45167875162120">sequence</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.2.2.5.1.2 "><p id="kms_02_0030__en-us_topic_0112992299_p60798351162120">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.2.5.1.3 "><p id="kms_02_0030__en-us_topic_0112992299_p82968323410">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.2.5.1.4 "><p id="kms_02_0030__en-us_topic_0112992299_p25719365162120">36-byte serial number of a request message</p>
|
|
<p id="kms_02_0030__en-us_topic_0112992299_p30147697162120">Example: 919c82d4-8046-4722-9094-35c3c6524cff</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="kms_02_0030__en-us_topic_0112992299_section35819930154934"><h4 class="sectiontitle">Responses</h4><p id="kms_02_0030__en-us_topic_0112992299_p14098816201747">None</p>
|
|
</div>
|
|
<div class="section" id="kms_02_0030__en-us_topic_0112992299_section552734918116"><h4 class="sectiontitle">Examples</h4><p id="kms_02_0030__en-us_topic_0112992299_p12446400510">The following example describes how to retire a grant whose grant ID is <span class="parmvalue" id="kms_02_0030__en-us_topic_0112992299_parmvalue869049923193026"><b>7c9a3286af4fcca5f0a385ad13e1d21a50e27b6dbcab50f37f30f93b8939827d</b></span> and the CMK ID is <span class="parmvalue" id="kms_02_0030__en-us_topic_0112992299_parmvalue151618583193044"><b>bb6a3d22-dc93-47ac-b5bd-88df7ad35f1e</b></span>.</p>
|
|
<ul id="kms_02_0030__en-us_topic_0112992299_ul16550194919116"><li id="kms_02_0030__en-us_topic_0112992299_li20550049713">Example request<pre class="screen" id="kms_02_0030__en-us_topic_0112992299_screen145501749315">{
|
|
"key_id": "bb6a3d22-dc93-47ac-b5bd-88df7ad35f1e",
|
|
"grant_id":"7c9a3286af4fcca5f0a385ad13e1d21a50e27b6dbcab50f37f30f93b8939827d"
|
|
}</pre>
|
|
</li><li id="kms_02_0030__en-us_topic_0112992299_li45508495110">Example response<pre class="screen" id="kms_02_0030__en-us_topic_0112992299_screen4550174919114">{
|
|
}</pre>
|
|
<p id="kms_02_0030__en-us_topic_0112992299_p1855014491310">or</p>
|
|
<pre class="screen" id="kms_02_0030__en-us_topic_0112992299_screen955011498111">{
|
|
"error": {
|
|
"error_code": "KMS.XXXX",
|
|
"error_msg": "XXX"
|
|
}
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="kms_02_0030__en-us_topic_0112992299_section3454223421"><h4 class="sectiontitle">Status Codes</h4><div class="p" id="kms_02_0030__en-us_topic_0112992299_en-us_topic_0112992294_en-us_topic_0079615001_p17772351"><a href="#kms_02_0030__en-us_topic_0112992299_en-us_topic_0112992294_en-us_topic_0079615001_table20596071">Table 3</a> lists the normal status code returned by the response.
|
|
<div class="tablenoborder"><a name="kms_02_0030__en-us_topic_0112992299_en-us_topic_0112992294_en-us_topic_0079615001_table20596071"></a><a name="en-us_topic_0112992299_en-us_topic_0112992294_en-us_topic_0079615001_table20596071"></a><table cellpadding="4" cellspacing="0" summary="" id="kms_02_0030__en-us_topic_0112992299_en-us_topic_0112992294_en-us_topic_0079615001_table20596071" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Status codes</caption><thead align="left"><tr id="kms_02_0030__en-us_topic_0112992299_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_0030__en-us_topic_0112992299_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_0030__en-us_topic_0112992299_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_0030__en-us_topic_0112992299_en-us_topic_0112992294_p30689603203043">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="kms_02_0030__en-us_topic_0112992299_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_0030__en-us_topic_0112992299_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_0030__en-us_topic_0112992299_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_0030__en-us_topic_0112992299_en-us_topic_0112992294_p1885682315512">Request processed successfully.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<p id="kms_02_0030__en-us_topic_0112992299_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>
|
|
|