doc-exports/docs/iam/api-ref/iam_02_0114.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

225 lines
15 KiB
HTML

<a name="iam_02_0114"></a><a name="iam_02_0114"></a>
<h1 class="topictitle1">Querying a Resource Quota</h1>
<div id="body1566442851035"><div class="section" id="iam_02_0114__s5888597838b0425a92e3419fb766c7f5"><h4 class="sectiontitle">Function</h4><p id="iam_02_0114__p1887819285319">This API is used to query a resource quota. You can query the quota of users, user groups, identity providers, agencies, and policies.</p>
</div>
<div class="section" id="iam_02_0114__s46d3616bd4c54e55ba97a528518a5890"><h4 class="sectiontitle">URI</h4><ul id="iam_02_0114__en-us_topic_0026585112_ul20917673"><li id="iam_02_0114__l0762c927197248c39057087e143d6575">URI format<p id="iam_02_0114__p25521358194519"><a name="iam_02_0114__l0762c927197248c39057087e143d6575"></a><a name="l0762c927197248c39057087e143d6575"></a>GET /v3.0/OS-QUOTA/domains/{domain_id}</p>
</li><li id="iam_02_0114__li2733311911542">URI parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0114__table2671410511552" frame="border" border="1" rules="all"><thead align="left"><tr id="iam_02_0114__row2181345411552"><th align="left" class="cellrowborder" valign="top" width="22.14%" id="mcps1.3.2.2.2.1.1.5.1.1"><p id="iam_02_0114__p4197580011552">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20.09%" id="mcps1.3.2.2.2.1.1.5.1.2"><p id="iam_02_0114__p5555552611552">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20.11%" id="mcps1.3.2.2.2.1.1.5.1.3"><p id="iam_02_0114__p3157154611552">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="37.66%" id="mcps1.3.2.2.2.1.1.5.1.4"><p id="iam_02_0114__p4296341111552">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0114__row2571374511552"><td class="cellrowborder" valign="top" width="22.14%" headers="mcps1.3.2.2.2.1.1.5.1.1 "><p id="iam_02_0114__p6330725211552">domain_id</p>
</td>
<td class="cellrowborder" valign="top" width="20.09%" headers="mcps1.3.2.2.2.1.1.5.1.2 "><p id="iam_02_0114__p2212117911552">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20.11%" headers="mcps1.3.2.2.2.1.1.5.1.3 "><p id="iam_02_0114__p4769668011552">String</p>
</td>
<td class="cellrowborder" valign="top" width="37.66%" headers="mcps1.3.2.2.2.1.1.5.1.4 "><p id="iam_02_0114__p928844211552">ID of the domain whose quota is to be queried.</p>
</td>
</tr>
<tr id="iam_02_0114__row1416632711552"><td class="cellrowborder" valign="top" width="22.14%" headers="mcps1.3.2.2.2.1.1.5.1.1 "><p id="iam_02_0114__p6660449211552">type</p>
</td>
<td class="cellrowborder" valign="top" width="20.09%" headers="mcps1.3.2.2.2.1.1.5.1.2 "><p id="iam_02_0114__p4626117411552">No</p>
</td>
<td class="cellrowborder" valign="top" width="20.11%" headers="mcps1.3.2.2.2.1.1.5.1.3 "><p id="iam_02_0114__p5328411711552">String</p>
</td>
<td class="cellrowborder" valign="top" width="37.66%" headers="mcps1.3.2.2.2.1.1.5.1.4 "><p id="iam_02_0114__p2702541811552">Type of the quota to be queried. The value can be user, group, idp, agency, and policy.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="iam_02_0114__se7fe5cac0d544e119c49322cc1707eb6"><h4 class="sectiontitle">Request Parameters</h4><ul id="iam_02_0114__en-us_topic_0026585112_ul3226198"><li id="iam_02_0114__l7c4919f55ea849a9bb59e1454113085c">Parameters in the request header
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0114__t68c7bd10e66a4380a1e6cdc78ca95669" frame="border" border="1" rules="all"><thead align="left"><tr id="iam_02_0114__r584496594a404ce18918a40e6e57c2ec"><th align="left" class="cellrowborder" valign="top" width="21.81218121812181%" id="mcps1.3.3.2.1.1.1.5.1.1"><p id="iam_02_0114__ac3a989cc5d3a405889eabb47dee84b04">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20.352035203520348%" id="mcps1.3.3.2.1.1.1.5.1.2"><p id="iam_02_0114__a69a20ac00b86496aa8418517c542b0da">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20.092009200920092%" id="mcps1.3.3.2.1.1.1.5.1.3"><p id="iam_02_0114__a92c23d4441054df0972e025aeb3a8d7f">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="37.743774377437745%" id="mcps1.3.3.2.1.1.1.5.1.4"><p id="iam_02_0114__abe6882c44cf4402d8ed7706b9278f33b">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0114__r5d63069d6a8a426e8b25b94d1b4d302a"><td class="cellrowborder" valign="top" width="21.81218121812181%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="iam_02_0114__ad4fb6253385c46ab8720a0e13f573694">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="20.352035203520348%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="iam_02_0114__a6b33800bcb2a446695b1d33a2d751554">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20.092009200920092%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="iam_02_0114__ab34a5e95b76b4b79a72da0734025f211">String</p>
</td>
<td class="cellrowborder" valign="top" width="37.743774377437745%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="iam_02_0114__a716277ae541d4553bb10490f9c02593d">Fill <span class="parmvalue" id="iam_02_0114__parmvalue1585514172466"><b>application/json;charset=utf8</b></span> in this field.</p>
</td>
</tr>
<tr id="iam_02_0114__row29501427115257"><td class="cellrowborder" valign="top" width="21.81218121812181%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="iam_02_0114__p6637478211538">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20.352035203520348%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="iam_02_0114__p764826811538">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20.092009200920092%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="iam_02_0114__p1553001111538">String</p>
</td>
<td class="cellrowborder" valign="top" width="37.743774377437745%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="iam_02_0114__p12269134020286">User token (no special permission requirements).</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="iam_02_0114__en-us_topic_0026585112_li17042198">Example request<pre class="screen" id="iam_02_0114__s6b85ed1428f745fabd2d60e4481ee1db">GET https://sample.domain.com/v3.0/OS-QUOTA/domains/{domain_id}?type=group</pre>
</li></ul>
</div>
<div class="section" id="iam_02_0114__s3a08e13bb5b34dc2ba4dcd84a0d51cf5"><h4 class="sectiontitle">Response Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0114__table1917564019282" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters in the response body</caption><thead align="left"><tr id="iam_02_0114__row12269740142816"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.4.1.1"><p id="iam_02_0114__p92692409287">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.4.1.2"><p id="iam_02_0114__p1626915401288">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.2.2.4.1.3"><p id="iam_02_0114__p62696402281">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0114__row13269144082811"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.4.1.1 "><p id="iam_02_0114__p11269440112812"><a href="#iam_02_0114__response_QuotaResult">quotas</a></p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.4.1.2 "><p id="iam_02_0114__p8441135303514">Object</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.2.2.4.1.3 "><p id="iam_02_0114__p192698401286">Quota information of the domain.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="iam_02_0114__response_QuotaResult"></a><a name="response_QuotaResult"></a><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0114__response_QuotaResult" frame="border" border="1" rules="all"><caption><b>Table 2 </b>quotas</caption><thead align="left"><tr id="iam_02_0114__row7747104819217"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="iam_02_0114__p147486484219">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="iam_02_0114__p474819488214">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="iam_02_0114__p197481848329">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0114__row1674718480212"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_02_0114__p874815488214"><a href="#iam_02_0114__table017984019288">resources</a></p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_02_0114__p1774818481222">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="iam_02_0114__p197488488210">Resource information.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="iam_02_0114__table017984019288"></a><a name="table017984019288"></a><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0114__table017984019288" frame="border" border="1" rules="all"><caption><b>Table 3 </b>resources</caption><thead align="left"><tr id="iam_02_0114__row10270440122816"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.1"><p id="iam_02_0114__p1527044082812">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.2"><p id="iam_02_0114__p3270154015289">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.4.2.4.1.3"><p id="iam_02_0114__p1027074010288">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0114__row927074022818"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="iam_02_0114__p827010403288">max</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="iam_02_0114__p22706408283">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="iam_02_0114__p142706407285">Maximum quota.</p>
</td>
</tr>
<tr id="iam_02_0114__row5270134015284"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="iam_02_0114__p427012409288">min</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="iam_02_0114__p18270174072812">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="iam_02_0114__p9270140142812">Minimum quota.</p>
</td>
</tr>
<tr id="iam_02_0114__row7270174015287"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="iam_02_0114__p152701040122810">quota</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="iam_02_0114__p18270114022814">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="iam_02_0114__p1427054072810">Current quota.</p>
</td>
</tr>
<tr id="iam_02_0114__row18270104011289"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="iam_02_0114__p2270640172810">type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="iam_02_0114__p1627074012816">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="iam_02_0114__p6270164016282">Quota type.</p>
</td>
</tr>
<tr id="iam_02_0114__row1027011401282"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="iam_02_0114__p82701640102811">used</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="iam_02_0114__p1927010401285">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="iam_02_0114__p22701340152820">Used quota.</p>
</td>
</tr>
</tbody>
</table>
</div>
<ul id="iam_02_0114__en-us_topic_0026585112_ul10497152"><li id="iam_02_0114__lf3c28402a2ee4844bc99946ea67bf82d">Example response<pre class="screen" id="iam_02_0114__sf943dd4d83494c55a12db23ebfa9eb99">Group quota:
{
"quotas": {
"resources": [
{
"max": 200,
"min": 10,
"quota": 20,
"type": "group",
"used": 6
}
]
}
}</pre>
</li></ul>
</div>
<div class="section" id="iam_02_0114__sbfe93ca4c2b9427dbb2218a4e72da6a8"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0114__en-us_topic_0035544336_table25927028" frame="border" border="1" rules="all"><thead align="left"><tr id="iam_02_0114__en-us_topic_0035544336_row10578662"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.2.1.3.1.1"><p id="iam_02_0114__en-us_topic_0035544336_p51565323">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.2.1.3.1.2"><p id="iam_02_0114__en-us_topic_0035544336_p16041657">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="iam_02_0114__en-us_topic_0035544336_row24305815"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="iam_02_0114__en-us_topic_0035544336_p22613965">200</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="iam_02_0114__en-us_topic_0035544336_p19791876">The request is successful.</p>
</td>
</tr>
<tr id="iam_02_0114__en-us_topic_0035544336_row43909159"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="iam_02_0114__en-us_topic_0035544336_p66980994">400</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="iam_02_0114__en-us_topic_0035544336_p56751409">The server failed to process the request.</p>
</td>
</tr>
<tr id="iam_02_0114__rb99fbab78bc54ae4953661763b573830"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="iam_02_0114__aef55745ff0834933af36d690e2e339b8">401</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="iam_02_0114__a480215738ced4bf5a8feafa2681db93b">Authentication failed.</p>
</td>
</tr>
<tr id="iam_02_0114__en-us_topic_0035544336_row41000636"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="iam_02_0114__en-us_topic_0035544336_p32717189">403</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="iam_02_0114__ae678037f26d640f5a985c943e2ffb92e">Access denied.</p>
</td>
</tr>
<tr id="iam_02_0114__rd71e0e00759f4179a2dccaf345ba9f2f"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="iam_02_0114__a1657c5ca5ebd4a2cbacbdb35fc9b7601">500</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="iam_02_0114__a88b4b14048564e12942b8151dc791b99">Internal server error.</p>
</td>
</tr>
<tr id="iam_02_0114__r5647e5fd26974514ac66cc3925f30601"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.1 "><p id="iam_02_0114__a16dfaa16ceac4a33a468c0ae158292fb">503</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.3.1.2 "><p id="iam_02_0114__a5635c1924d9648a8be89b1e5dcf0a87b">Service unavailable.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0057845621.html">Tenant Management</a></div>
</div>
</div>