doc-exports/docs/iam/api-ref/en-us_topic_0079467627.html
zhangyue 3b5a58b1fe IAM API 2.0.38
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: zhangyue <zhangyue164@huawei.com>
Co-committed-by: zhangyue <zhangyue164@huawei.com>
2022-10-26 04:31:24 +00:00

139 lines
12 KiB
HTML

<a name="en-us_topic_0079467627"></a><a name="en-us_topic_0079467627"></a>
<h1 class="topictitle1">Deleting Permissions of an Agency on a Project</h1>
<div id="body1507708723034"><div class="section" id="en-us_topic_0079467627__s48f1857f7f6d48a3985f62aa814b421d"><h4 class="sectiontitle">Function</h4><p id="en-us_topic_0079467627__p19226174810135">This API is used to delete permissions of an agency on a project.</p>
</div>
<div class="section" id="en-us_topic_0079467627__sfe5ded2143184f9d9e1ae057fbeec16c"><h4 class="sectiontitle">URI</h4><ul id="en-us_topic_0079467627__ub9755da27c0448489e4ffb8944197a69"><li id="en-us_topic_0079467627__l5e6404da92c04449977690ae57686637">URI format<p id="en-us_topic_0079467627__a02b057fc0e2843d0b1d8b5760ca656ee"><a name="en-us_topic_0079467627__l5e6404da92c04449977690ae57686637"></a><a name="l5e6404da92c04449977690ae57686637"></a>DELETE /v3.0/OS-AGENCY/projects/{project_id}/agencies/{agency_id}/roles/{role_id}</p>
</li></ul>
<ul id="en-us_topic_0079467627__uf3167b80977443d4bd7061f5b7e71866"><li id="en-us_topic_0079467627__l1f77b80bb906414fac5b078e844dec39">URI parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0079467627__t2aa5c624f4c74e67979449d61a0ceee3" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0079467627__r18c4c13a248d44b0bf3aea4524953fa7"><th align="left" class="cellrowborder" valign="top" width="18.360000000000003%" id="mcps1.3.2.3.1.1.1.5.1.1"><p id="en-us_topic_0079467627__af081f9f416d84fd193f19a8e514c3e52"><strong id="en-us_topic_0079467627__a173ae121cc9e48328ca613e72f2a1504">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.48%" id="mcps1.3.2.3.1.1.1.5.1.2"><p id="en-us_topic_0079467627__a8c4799aa5ce1465695d91d6d4d55e27d"><strong id="en-us_topic_0079467627__b842352706184228">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.86%" id="mcps1.3.2.3.1.1.1.5.1.3"><p id="en-us_topic_0079467627__a57a24f48f77e4ae9955876b9a8f4ee7c"><strong id="en-us_topic_0079467627__b842352706143526">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="44.3%" id="mcps1.3.2.3.1.1.1.5.1.4"><p id="en-us_topic_0079467627__ad6aa3bad53c04c0b82b35e497f43bfec"><strong id="en-us_topic_0079467627__b20601766145329">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0079467627__rdc4170c186354c2f91b3b12f6386737d"><td class="cellrowborder" valign="top" width="18.360000000000003%" headers="mcps1.3.2.3.1.1.1.5.1.1 "><p id="en-us_topic_0079467627__a40693609e98c4aaea2351499640cc4af">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="18.48%" headers="mcps1.3.2.3.1.1.1.5.1.2 "><p id="en-us_topic_0079467627__ac4382c99bc924ab5b78cf6e509a1b0eb">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.86%" headers="mcps1.3.2.3.1.1.1.5.1.3 "><p id="en-us_topic_0079467627__a8c96ed441f034e50845d1764bdb63b57">String</p>
</td>
<td class="cellrowborder" valign="top" width="44.3%" headers="mcps1.3.2.3.1.1.1.5.1.4 "><p id="en-us_topic_0079467627__a7667ef562ece4a14b23cf0e3f9d24f32">ID of a project under the current domain.</p>
</td>
</tr>
<tr id="en-us_topic_0079467627__r3a9071e9271144ea90ac659d8cb1aa15"><td class="cellrowborder" valign="top" width="18.360000000000003%" headers="mcps1.3.2.3.1.1.1.5.1.1 "><p id="en-us_topic_0079467627__af2acb86b260b4702b19ab9673276497f">agency_id</p>
</td>
<td class="cellrowborder" valign="top" width="18.48%" headers="mcps1.3.2.3.1.1.1.5.1.2 "><p id="en-us_topic_0079467627__ab283131f761148199333bf5f71b82283">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.86%" headers="mcps1.3.2.3.1.1.1.5.1.3 "><p id="en-us_topic_0079467627__abfa70ffe4158411aae2bba76f5d7b7c6">String</p>
</td>
<td class="cellrowborder" valign="top" width="44.3%" headers="mcps1.3.2.3.1.1.1.5.1.4 "><p id="en-us_topic_0079467627__a6ab8ddc960e64012b8e1e90823d4bee1">ID of an agency.</p>
</td>
</tr>
<tr id="en-us_topic_0079467627__r6de749e3ff2340a08335bd7771c8250f"><td class="cellrowborder" valign="top" width="18.360000000000003%" headers="mcps1.3.2.3.1.1.1.5.1.1 "><p id="en-us_topic_0079467627__ad448887c559647dc81a008e213efed92">role_id</p>
</td>
<td class="cellrowborder" valign="top" width="18.48%" headers="mcps1.3.2.3.1.1.1.5.1.2 "><p id="en-us_topic_0079467627__ae0260997bc3f412782fa0d29015b43a7">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.86%" headers="mcps1.3.2.3.1.1.1.5.1.3 "><p id="en-us_topic_0079467627__a8f9ced09b143432b93ee28a25a0b50d2">String</p>
</td>
<td class="cellrowborder" valign="top" width="44.3%" headers="mcps1.3.2.3.1.1.1.5.1.4 "><p id="en-us_topic_0079467627__acd8bd3f1706b487597c4892ed03e68e2">ID of a role.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="en-us_topic_0079467627__s55f94d8e06e84a6586f85cdad674bc28"><h4 class="sectiontitle">Request Parameters</h4><ul id="en-us_topic_0079467627__u7e2ff1321f7846b1a5a5b013df72e6a7"><li id="en-us_topic_0079467627__lb2e0eeb2414141fda6e50655cd7a11c2">Parameters in the request header
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0079467627__tdbe70f15bc7d49b6a23afd3d4b2200b0" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0079467627__r0183ddc5d1e44f7bbb33b611f4a7eba1"><th align="left" class="cellrowborder" valign="top" width="18.6981301869813%" id="mcps1.3.3.2.1.1.1.5.1.1"><p id="en-us_topic_0079467627__a686a86141a60438ca8daa521fc171b65"><strong id="en-us_topic_0079467627__b55898188144340">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.05819418058194%" id="mcps1.3.3.2.1.1.1.5.1.2"><p id="en-us_topic_0079467627__a987b6ec3275142678866ad2a4d2cb6bc"><strong id="en-us_topic_0079467627__b157861804">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.798120187981198%" id="mcps1.3.3.2.1.1.1.5.1.3"><p id="en-us_topic_0079467627__ab73c433bc94940f193659eda3fc3bffb"><strong id="en-us_topic_0079467627__b1701403139">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="44.44555544445555%" id="mcps1.3.3.2.1.1.1.5.1.4"><p id="en-us_topic_0079467627__a2a0caa56617840adb1a30f86e39c759c"><strong id="en-us_topic_0079467627__b673105809">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0079467627__r27a84c3d7e7246a8b705ec299daa27c5"><td class="cellrowborder" valign="top" width="18.6981301869813%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="en-us_topic_0079467627__ab88e0563a1bd49a586f3361c9c66c85c">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="18.05819418058194%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="en-us_topic_0079467627__a255d4e6cd16e4622af9250aa8ac21078">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.798120187981198%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="en-us_topic_0079467627__a184d2ad93eb1453da466311b8f2ecfa2">String</p>
</td>
<td class="cellrowborder" valign="top" width="44.44555544445555%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="en-us_topic_0079467627__ae1b8420f4bf14f849b98f906d5efe919">Fill <strong id="en-us_topic_0079467627__b842352706161331">application/json;charset=utf8</strong> in this field.</p>
</td>
</tr>
<tr id="en-us_topic_0079467627__r3c0e62e0463c4e388d7f1bd5e92d820f"><td class="cellrowborder" valign="top" width="18.6981301869813%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="en-us_topic_0079467627__aaec0543ccbda4911a062562fb2db2330">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="18.05819418058194%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="en-us_topic_0079467627__accdd3e8baa7f47fc807bbc16ce141f99">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.798120187981198%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="en-us_topic_0079467627__ace027e4985744723948acbf16a7f2fa0">String</p>
</td>
<td class="cellrowborder" valign="top" width="44.44555544445555%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="en-us_topic_0079467627__a387d91402b38450db105d292a1c27a3f">Authenticated token with the <strong id="en-us_topic_0079467627__b750798910387">Security Administrator</strong> permission.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="en-us_topic_0079467627__u31e36ac32bcd4eccae191ca719205035"><li id="en-us_topic_0079467627__l847925f8497e4392a8b56e5f2137d4eb">Example request<pre class="screen" id="en-us_topic_0079467627__s0e342c1432084506b308560d292c848c"><em id="en-us_topic_0079467627__i12934356112622">curl -i -k -H "X-Auth-Token:$token" -H 'Content-Type:application/json;charset=utf8' -X DELETE https://</em><em id="en-us_topic_0079467627__i42504546112622">sample.domain.com</em><em id="en-us_topic_0079467627__i49300346112622">/v3<em id="en-us_topic_0079467627__i2114185914539">.0/OS-AGENCY</em>/projects/0945241c5ebc4660bac540d48f2a2c14/agencies/37f90258b820472bbc8a0f4f0bfd720d/roles/0f3a2d418ed747fa8be46e92757be9ff</em></pre>
</li></ul>
</div>
<div class="section" id="en-us_topic_0079467627__s06000b8879ab4e03a6a9bb9819efc6cf"><h4 class="sectiontitle">Response Parameters</h4><ul id="en-us_topic_0079467627__u3e2429f75e704c999d3a81ceccdac822"><li id="en-us_topic_0079467627__lf2e9a7f7d6c943d2a0f636e6dd2c0724">Example response (request failed)<pre class="screen" id="en-us_topic_0079467627__s88604a69d3314d1cbdf15b94e8dc6531">{
"error" : {
"message" : "Could not find role: 0f3a2d418ed747fa8be46e92757be9ddff",
"code" : 404,
"title" : "Not Found"
}
}</pre>
</li></ul>
</div>
<div class="section" id="en-us_topic_0079467627__scf548a47ab574da29926f89ef11f04ae"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0079467627__tb53a27db12514b78ad298186ef40e680" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0079467627__r279e3eb7e49b4038972afa957729a748"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.2.1.3.1.1"><p id="en-us_topic_0079467627__a9bedbb306c1c4c5a92b6662fb91c79e9"><strong id="en-us_topic_0079467627__b20259075144340">Status Code</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.2.1.3.1.2"><p id="en-us_topic_0079467627__a52ffdf443ea24d128f4e34c0107d0926"><strong id="en-us_topic_0079467627__b1996005214">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0079467627__red8d37eb6722412b88f3eb1e4f5bab7f"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0079467627__a87de5f8b9420480f966e3eb889329931">204</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0079467627__ad8bc42b733a44c5c9404c6bcc526e731">The request is successful.</p>
</td>
</tr>
<tr id="en-us_topic_0079467627__rda51c028632943a9a6fa1eb0365f3664"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0079467627__a745635e99e6a45a9be223af7cc9d2ee8">401</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0079467627__a1de7e41af81e4726b60783ac3ec12540">Authentication failed.</p>
</td>
</tr>
<tr id="en-us_topic_0079467627__r026dcca6127245af881a1a315754e829"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0079467627__abbaaccafee2440d392f1a96549b5315e">403</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0079467627__af05f4624b2714dc5b4a303761edd70cb">Access denied.</p>
</td>
</tr>
<tr id="en-us_topic_0079467627__r69ed72922d0d4fc2a55306dfeb35088a"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0079467627__a22e902a300dc4c848ae5cb3a38c9ffdb">404</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0079467627__aedf5ad7f6ce548df8c144eb22d4169e3">The requested resource cannot be found.</p>
</td>
</tr>
<tr id="en-us_topic_0079467627__rd2bf1b5d8b2045cc81056adcd99a218e"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0079467627__afe93fd683f8c4b8b8a04e62378c114cd">500</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0079467627__ad557276af93c4191ad5f64824f932feb">Internal server error.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0079467612.html">Agency Management</a></div>
</div>
</div>