forked from docs/doc-exports
Reviewed-by: gtema <artem.goncharov@gmail.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
139 lines
12 KiB
HTML
139 lines
12 KiB
HTML
<a name="en-us_topic_0079578163"></a><a name="en-us_topic_0079578163"></a>
|
|
|
|
<h1 class="topictitle1">Checking Whether an Agency Has the Specified Permissions on a Project</h1>
|
|
<div id="body1507780947594"><div class="section" id="en-us_topic_0079578163__s48f1857f7f6d48a3985f62aa814b421d"><h4 class="sectiontitle">Function</h4><p id="en-us_topic_0079578163__p4583127131319">This API is used to check whether an agency has the specified permissions on a project.</p>
|
|
</div>
|
|
<div class="section" id="en-us_topic_0079578163__sfe5ded2143184f9d9e1ae057fbeec16c"><h4 class="sectiontitle">URI</h4><ul id="en-us_topic_0079578163__ub9755da27c0448489e4ffb8944197a69"><li id="en-us_topic_0079578163__l5e6404da92c04449977690ae57686637">URI format<p id="en-us_topic_0079578163__a02b057fc0e2843d0b1d8b5760ca656ee"><a name="en-us_topic_0079578163__l5e6404da92c04449977690ae57686637"></a><a name="l5e6404da92c04449977690ae57686637"></a>HEAD /v3.0/OS-AGENCY/projects/{project_id}/agencies/{agency_id}/roles/{role_id}</p>
|
|
</li></ul>
|
|
<ul id="en-us_topic_0079578163__uf3167b80977443d4bd7061f5b7e71866"><li id="en-us_topic_0079578163__l1f77b80bb906414fac5b078e844dec39">URI parameters
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0079578163__t2aa5c624f4c74e67979449d61a0ceee3" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0079578163__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_0079578163__af081f9f416d84fd193f19a8e514c3e52"><strong id="en-us_topic_0079578163__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_0079578163__a8c4799aa5ce1465695d91d6d4d55e27d"><strong id="en-us_topic_0079578163__b842352706182433_1">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_0079578163__a57a24f48f77e4ae9955876b9a8f4ee7c"><strong id="en-us_topic_0079578163__b842352706143526_1">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_0079578163__ad6aa3bad53c04c0b82b35e497f43bfec"><strong id="en-us_topic_0079578163__b20601766145329_1">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="en-us_topic_0079578163__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_0079578163__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_0079578163__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_0079578163__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_0079578163__a7667ef562ece4a14b23cf0e3f9d24f32">ID of a project under the current domain.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0079578163__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_0079578163__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_0079578163__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_0079578163__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_0079578163__a6ab8ddc960e64012b8e1e90823d4bee1">ID of an agency.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0079578163__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_0079578163__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_0079578163__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_0079578163__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_0079578163__acd8bd3f1706b487597c4892ed03e68e2">ID of a role.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="en-us_topic_0079578163__s55f94d8e06e84a6586f85cdad674bc28"><h4 class="sectiontitle">Request Parameters</h4><ul id="en-us_topic_0079578163__u7e2ff1321f7846b1a5a5b013df72e6a7"><li id="en-us_topic_0079578163__lb2e0eeb2414141fda6e50655cd7a11c2">Parameters in the request header
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0079578163__tdbe70f15bc7d49b6a23afd3d4b2200b0" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0079578163__r0183ddc5d1e44f7bbb33b611f4a7eba1"><th align="left" class="cellrowborder" valign="top" width="19.36%" id="mcps1.3.3.2.1.1.1.5.1.1"><p id="en-us_topic_0079578163__a686a86141a60438ca8daa521fc171b65"><strong id="en-us_topic_0079578163__b50043331144259">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.39%" id="mcps1.3.3.2.1.1.1.5.1.2"><p id="en-us_topic_0079578163__a987b6ec3275142678866ad2a4d2cb6bc"><strong id="en-us_topic_0079578163__b842352706182433_3">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.8%" id="mcps1.3.3.2.1.1.1.5.1.3"><p id="en-us_topic_0079578163__ab73c433bc94940f193659eda3fc3bffb"><strong id="en-us_topic_0079578163__b842352706143526_3">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="44.45%" id="mcps1.3.3.2.1.1.1.5.1.4"><p id="en-us_topic_0079578163__a2a0caa56617840adb1a30f86e39c759c"><strong id="en-us_topic_0079578163__b20601766145329_3">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="en-us_topic_0079578163__r27a84c3d7e7246a8b705ec299daa27c5"><td class="cellrowborder" valign="top" width="19.36%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="en-us_topic_0079578163__ab88e0563a1bd49a586f3361c9c66c85c">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.39%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="en-us_topic_0079578163__a255d4e6cd16e4622af9250aa8ac21078">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.8%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="en-us_topic_0079578163__a184d2ad93eb1453da466311b8f2ecfa2">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.45%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="en-us_topic_0079578163__ae1b8420f4bf14f849b98f906d5efe919">Fill <strong id="en-us_topic_0079578163__b842352706161331">application/json;charset=utf8</strong> in this field.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0079578163__r3c0e62e0463c4e388d7f1bd5e92d820f"><td class="cellrowborder" valign="top" width="19.36%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="en-us_topic_0079578163__aaec0543ccbda4911a062562fb2db2330">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.39%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="en-us_topic_0079578163__accdd3e8baa7f47fc807bbc16ce141f99">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.8%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="en-us_topic_0079578163__ace027e4985744723948acbf16a7f2fa0">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.45%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="en-us_topic_0079578163__p46104114114239">Authenticated token with the <strong id="en-us_topic_0079578163__b750798910387">Security Administrator</strong> permission.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
<ul id="en-us_topic_0079578163__u31e36ac32bcd4eccae191ca719205035"><li id="en-us_topic_0079578163__l847925f8497e4392a8b56e5f2137d4eb">Example request<pre class="screen" id="en-us_topic_0079578163__s0e342c1432084506b308560d292c848c"><em id="en-us_topic_0079578163__i41957123112645">curl -i -k -H "X-Auth-Token:$token" -H 'Content-Type:application/json;charset=utf8' -X HEAD https://</em><em id="en-us_topic_0079578163__i5217387112645">sample.domain.com</em><em id="en-us_topic_0079578163__i42069788112645">/v3<em id="en-us_topic_0079578163__a47c0634c87ee498abb686f7a63363d71">.0/OS-AGENCY</em>/projects/0945241c5ebc4660bac540d48f2a2c14/agencies/37f90258b820472bbc8a0f4f0bfd720d/roles/0f3a2d418ed747fa8be46e92757be9ff</em></pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="en-us_topic_0079578163__s06000b8879ab4e03a6a9bb9819efc6cf"><h4 class="sectiontitle">Response Parameters</h4><ul id="en-us_topic_0079578163__u3e2429f75e704c999d3a81ceccdac822"><li id="en-us_topic_0079578163__lf2e9a7f7d6c943d2a0f636e6dd2c0724">Example response (request failed)<pre class="screen" id="en-us_topic_0079578163__s88604a69d3314d1cbdf15b94e8dc6531">{
|
|
"error" : {
|
|
"message" : "Could not find role: 0f3a2d418ed747fa8be46e92757be9ddff",
|
|
"code" : 404,
|
|
"title" : "Not Found"
|
|
}
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="en-us_topic_0079578163__scf548a47ab574da29926f89ef11f04ae"><h4 class="sectiontitle"><strong id="en-us_topic_0079578163__b842352706183230">Status Codes</strong></h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0079578163__tb53a27db12514b78ad298186ef40e680" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0079578163__r279e3eb7e49b4038972afa957729a748"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.2.1.3.1.1"><p id="en-us_topic_0079578163__a9bedbb306c1c4c5a92b6662fb91c79e9"><strong id="en-us_topic_0079578163__b32990791144259">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_0079578163__a52ffdf443ea24d128f4e34c0107d0926"><strong id="en-us_topic_0079578163__b20601766145329_5">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="en-us_topic_0079578163__red8d37eb6722412b88f3eb1e4f5bab7f"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0079578163__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_0079578163__ad8bc42b733a44c5c9404c6bcc526e731">The request is successful. The agency has the specified permissions on the project.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0079578163__rda51c028632943a9a6fa1eb0365f3664"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0079578163__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_0079578163__a1de7e41af81e4726b60783ac3ec12540">Authentication failed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0079578163__r026dcca6127245af881a1a315754e829"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0079578163__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_0079578163__af05f4624b2714dc5b4a303761edd70cb">Access denied.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0079578163__r69ed72922d0d4fc2a55306dfeb35088a"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0079578163__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_0079578163__aedf5ad7f6ce548df8c144eb22d4169e3">The requested resource cannot be found.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0079578163__rd2bf1b5d8b2045cc81056adcd99a218e"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0079578163__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_0079578163__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>
|
|
|