doc-exports/docs/iam/api-ref/en-us_topic_0079578165.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
13 KiB
HTML

<a name="en-us_topic_0079578165"></a><a name="en-us_topic_0079578165"></a>
<h1 class="topictitle1">Checking Whether an Agency Has the Specified Permissions on a Domain</h1>
<div id="body1507780947596"><div class="section" id="en-us_topic_0079578165__sd32cbb7d5afd415d8a47d1f36476f58e"><h4 class="sectiontitle">Function</h4><p id="en-us_topic_0079578165__p125695177147">This API is used to check whether an agency has the specified permissions on a domain.</p>
</div>
<div class="section" id="en-us_topic_0079578165__s8bfb266fc6fd4b4fbcdb7c5b37fec0c3"><h4 class="sectiontitle">URI</h4><ul id="en-us_topic_0079578165__u3c6d72635d3d4f0eba1c1f37af7bb138"><li id="en-us_topic_0079578165__l38310aa7196a490f817e2dc9feea1a35">URI format<p id="en-us_topic_0079578165__afdd76c97ee124e938878c24f54de6623"><a name="en-us_topic_0079578165__l38310aa7196a490f817e2dc9feea1a35"></a><a name="l38310aa7196a490f817e2dc9feea1a35"></a>HEAD /v3.0/OS-AGENCY/domains/{domain_id}/agencies/{agency_id}/roles/{role_id}</p>
</li></ul>
<ul id="en-us_topic_0079578165__u40eefae65744424689f5c81886918671"><li id="en-us_topic_0079578165__lb205bb0fee53403db652442ca93048db">URI parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0079578165__t7d98a5ad17d24daa8e58656f6da291de" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0079578165__r5e7d0413da724067991bb18271aa331f"><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_0079578165__a3a948e8952044840bfe547d49baa12c7"><strong id="en-us_topic_0079578165__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_0079578165__a2b1a382248774519929c9fe14900ceed"><strong id="en-us_topic_0079578165__b84235270619551">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_0079578165__af253bd8fb6384746a335ac225b05565b"><strong id="en-us_topic_0079578165__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_0079578165__af46f0afead2b4f6aac8fa304ec0bc334"><strong id="en-us_topic_0079578165__b20601766145329">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0079578165__r8313928b14dc4dcd84b6a9f507104888"><td class="cellrowborder" valign="top" width="18.360000000000003%" headers="mcps1.3.2.3.1.1.1.5.1.1 "><p id="en-us_topic_0079578165__ac8d7ad96322f4179af858eb5c419e8d1">domain_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_0079578165__ab6a68ef3a12c48e2ad342c2f352de1f8">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_0079578165__a3f7ce8cf115c4393b7931d8fde530e4c">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_0079578165__a6aa971030c4748a698bb3b4898cd1305">ID of the current domain.</p>
</td>
</tr>
<tr id="en-us_topic_0079578165__r347ae7b1f64e41c98cee1ab0d52732cd"><td class="cellrowborder" valign="top" width="18.360000000000003%" headers="mcps1.3.2.3.1.1.1.5.1.1 "><p id="en-us_topic_0079578165__a7ea4dd5a3c8448e7b705f201030eec17">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_0079578165__afff03be279884bdca910434905df5e21">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_0079578165__a237c5e94daba453680ae069a9fba48df">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_0079578165__a41754287d487497484900718c4a1be30">ID of an agency.</p>
</td>
</tr>
<tr id="en-us_topic_0079578165__r89bba46793dd4b9d9bc5744ca825d840"><td class="cellrowborder" valign="top" width="18.360000000000003%" headers="mcps1.3.2.3.1.1.1.5.1.1 "><p id="en-us_topic_0079578165__a8e16f5a068404d1f970f5c179131e358">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_0079578165__af05e7037b0c94ea38da2c3f75fddb326">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_0079578165__a8fce5747cb1a4317887544fd61d2c988">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_0079578165__a89bb782f1e3e489fbb9d2142ceefdccf">ID of a role.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="en-us_topic_0079578165__sbe09a08b2e5841ff9f6808a1e714405c"><h4 class="sectiontitle">Request Parameters</h4><ul id="en-us_topic_0079578165__u76128a04a27c48908b5c7a79923a5d24"><li id="en-us_topic_0079578165__l80545ada7e8943b3a5a041802bdce280">Parameters in the request header
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0079578165__t2a3bcde88e2d42b9be2030e06757f78c" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0079578165__re9a6010114a74310bb1c8ec8266d6e97"><th align="left" class="cellrowborder" valign="top" width="18.56185618561856%" id="mcps1.3.3.2.1.1.1.5.1.1"><p id="en-us_topic_0079578165__a77a080ef749f42afa95c01469e004592"><strong id="en-us_topic_0079578165__b45627646144417">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.321832183218323%" id="mcps1.3.3.2.1.1.1.5.1.2"><p id="en-us_topic_0079578165__a0caf369b338f4245b688e1aed95bca35"><strong id="en-us_topic_0079578165__b1030862710">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.801880188018803%" id="mcps1.3.3.2.1.1.1.5.1.3"><p id="en-us_topic_0079578165__a685b8f9209e240c2a7efd856ec96033d"><strong id="en-us_topic_0079578165__b1361402588">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="44.314431443144315%" id="mcps1.3.3.2.1.1.1.5.1.4"><p id="en-us_topic_0079578165__a5d506e9a88e24b1a9a0535e44ae17d8d"><strong id="en-us_topic_0079578165__b652072953">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0079578165__r972bd6f6b6ee4d63934e1a1d42750953"><td class="cellrowborder" valign="top" width="18.56185618561856%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="en-us_topic_0079578165__afd051d13fc314e4ea3c17bfab535e24d">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="18.321832183218323%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="en-us_topic_0079578165__a098126e39ffc4f5d9d02b96212f20ce1">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.801880188018803%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="en-us_topic_0079578165__adff70bd574324ce7b97f9dfe8281ed25">String</p>
</td>
<td class="cellrowborder" valign="top" width="44.314431443144315%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="en-us_topic_0079578165__a221113d87e0d47dfa177321872a0e3b0">Fill <strong id="en-us_topic_0079578165__b842352706161331">application/json;charset=utf8</strong> in this field.</p>
</td>
</tr>
<tr id="en-us_topic_0079578165__r0e73be626aee42c8a1a7c3e3fbfad3ed"><td class="cellrowborder" valign="top" width="18.56185618561856%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="en-us_topic_0079578165__a79b10806bfd5435e9d72ebb166c35d75">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="18.321832183218323%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="en-us_topic_0079578165__a587216c2ae9845568e71784bd0a3404a">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.801880188018803%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="en-us_topic_0079578165__a07df5795216b4ffd814764eef3c9890c">String</p>
</td>
<td class="cellrowborder" valign="top" width="44.314431443144315%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="en-us_topic_0079578165__a9db1120685df461f8c36a450120e7575">Authenticated token with the <strong id="en-us_topic_0079578165__b750798910387">Security Administrator</strong> permission.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="en-us_topic_0079578165__u159bb30b38d9473189cf146ce1446eb0"><li id="en-us_topic_0079578165__l970fba04f15247a0916eaa6bbbaa0215">Example request<pre class="screen" id="en-us_topic_0079578165__s4b408cc7803447efafabd0c3e9c99769"><em id="en-us_topic_0079578165__i59107659112559">curl -i -k -H "X-Auth-Token:$token" -H 'Content-Type:application/json;charset=utf8' -X HEAD https://</em><em id="en-us_topic_0079578165__i50531490112559">sample.domain.com</em><em id="en-us_topic_0079578165__i62206890112559">/v3<em id="en-us_topic_0079578165__i95614502545">.0/OS-AGENCY</em>/domains/<em id="en-us_topic_0079578165__i02341536131812">b32d99a7778d4fd9aa5bc616c3dc4e5f</em>/agencies/37f90258b820472bbc8a0f4f0bfd720d/roles/0f3a2d418ed747fa8be46e92757be9ff</em></pre>
</li></ul>
</div>
<div class="section" id="en-us_topic_0079578165__s755c4357c5ca4edba2badcd8d4f40c6e"><h4 class="sectiontitle">Response Parameters</h4><ul id="en-us_topic_0079578165__ud472617eb5d84d06b5db7931227eea30"><li id="en-us_topic_0079578165__l013a3611efa84a10ab64c16502fd05d6">Example response (request failed)<pre class="screen" id="en-us_topic_0079578165__scb109a0c141f4d448d353c3400f70aa7">{
"error" : {
"message" : "Could not find role: 0f3a2d418ed747fa8be46e92757be9ddff",
"code" : 404,
"title" : "Not Found"
}
}</pre>
</li></ul>
</div>
<div class="section" id="en-us_topic_0079578165__s61c00aab956c432ba03074959ed97c58"><h4 class="sectiontitle"><strong id="en-us_topic_0079578165__b842352706183230">Status Codes</strong></h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0079578165__td9cdd0aa9a2048778249267ea06f9361" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0079578165__r3567e198c0744e369984c1f162ec41de"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.2.1.3.1.1"><p id="en-us_topic_0079578165__a30f580137070413ab9f3c2e85a2d3747"><strong id="en-us_topic_0079578165__b19787651144417">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_0079578165__aa7e5f4ef91364bf18b5661a24a54f365"><strong id="en-us_topic_0079578165__b936853982">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0079578165__rf109a271314f4533becfe89639b11125"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0079578165__ae814884cbfa34eb886df4cccf6afab3b">204</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0079578165__a645dfe888dec4eb2a4f0f99a73f774be">The request is successful. The agency has the specified permissions on the domain.</p>
</td>
</tr>
<tr id="en-us_topic_0079578165__r80e2f92d56104c9d921b35a0d7732cca"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0079578165__a0d1fa62314bf4f6bbd1e8178b7729781">401</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0079578165__a2a01fc84be644bbb9809f31ff2b584da">Authentication failed.</p>
</td>
</tr>
<tr id="en-us_topic_0079578165__r59d0b76d477f40039857ceac885bb2b2"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0079578165__ab5b46fe2535c4d969b3033a979ef32b2">403</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0079578165__a39f539005cab4265aea430356e5c82c3">Access denied.</p>
</td>
</tr>
<tr id="en-us_topic_0079578165__r37396180afcc486c9db290bb55d645f8"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0079578165__ae59d58ae92af44eaa9dc1656d13d292d">404</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0079578165__aad60d8a5e4754e139481963b3c283568">The requested resource cannot be found.</p>
</td>
</tr>
<tr id="en-us_topic_0079578165__r7f56ad93b7e34d7e8e6da5a37f433d4b"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0079578165__a7b2f3b7c3e694ef6a598609a1962e87c">500</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0079578165__a6168166f84cf4f4392a4fb6ae92d152c">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>