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>
228 lines
14 KiB
HTML
228 lines
14 KiB
HTML
<a name="iam_02_0037"></a><a name="iam_02_0037"></a>
|
|
|
|
<h1 class="topictitle1">Querying the Quotas of a Project</h1>
|
|
<div id="body1597737539339"><div class="section" id="iam_02_0037__section79851832172618"><h4 class="sectiontitle">Function</h4><p id="iam_02_0037__p187703362610">This API is used to query the quotas of a specified project.</p>
|
|
</div>
|
|
<div class="section" id="iam_02_0037__section2987183214261"><h4 class="sectiontitle">URI</h4><ul id="iam_02_0037__ul207122531110"><li id="iam_02_0037__li1516211011112">URI format<p id="iam_02_0037__p142581911131113"><a name="iam_02_0037__li1516211011112"></a><a name="li1516211011112"></a>GET /v3.0/OS-QUOTA/projects/{project_id}</p>
|
|
</li><li id="iam_02_0037__li6455101811115">URI parameters</li></ul>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0037__table1998818322266" frame="border" border="1" rules="all"><thead align="left"><tr id="iam_02_0037__row677183311269"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.1.5.1.1"><p id="iam_02_0037__p9772333264">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="10%" id="mcps1.3.2.3.1.5.1.2"><p id="iam_02_0037__p107733319266">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.1.5.1.3"><p id="iam_02_0037__p1777163316268">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.2.3.1.5.1.4"><p id="iam_02_0037__p9774332260">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_02_0037__row577163382616"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.1.5.1.1 "><p id="iam_02_0037__p107863302619">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.2.3.1.5.1.2 "><p id="iam_02_0037__p6781633122620">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.1.5.1.3 "><p id="iam_02_0037__p178193372619">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.3.1.5.1.4 "><p id="iam_02_0037__p1878633192613">ID of the project to query quotas.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="iam_02_0037__section1299723210266"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0037__table19997103262611" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters in the request header</caption><thead align="left"><tr id="iam_02_0037__row1178113311266"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="iam_02_0037__p1878123319269">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="10%" id="mcps1.3.3.2.2.5.1.2"><p id="iam_02_0037__p978123342616">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="iam_02_0037__p57873311260">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.2.2.5.1.4"><p id="iam_02_0037__p878183342612">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_02_0037__row27893352615"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="iam_02_0037__p57814332263">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.3.2.2.5.1.2 "><p id="iam_02_0037__p078633102617">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="iam_02_0037__p47813339260">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.2.5.1.4 "><p id="iam_02_0037__p19444185111319">Provide either of the following tokens:</p>
|
|
<ul id="iam_02_0037__ul114081210171417"><li id="iam_02_0037__li6990181111142">Token with <strong id="iam_02_0037__b7434191315318">Security Administrator</strong> permissions</li><li id="iam_02_0037__li16408111061418">IAM user token with the <strong id="iam_02_0037__b183021749174316">scope</strong> specified as the project you want to query</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="iam_02_0037__section131433192616"><h4 class="sectiontitle">Response Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0037__responseParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters in the response body</caption><thead align="left"><tr id="iam_02_0037__row20982320121820"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.4.1.1"><p id="iam_02_0037__p13982120181812">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_0037__p10983102031816">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_0037__p139839207185">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_02_0037__row109821220131814"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.4.1.1 "><p id="iam_02_0037__p498352011814"><a href="#iam_02_0037__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_0037__p1598382012183">object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.2.2.4.1.3 "><p id="iam_02_0037__p99835202184">Quota information of the domain.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="iam_02_0037__response_QuotaResult"></a><a name="response_QuotaResult"></a><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0037__response_QuotaResult" frame="border" border="1" rules="all"><caption><b>Table 3 </b>quotas</caption><thead align="left"><tr id="iam_02_0037__row149839202187"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="iam_02_0037__p16984220161818">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_0037__p29841620191820">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_0037__p15984152014180">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_02_0037__row99838209184"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="iam_02_0037__p898442018186"><a href="#iam_02_0037__response_Resources">resources</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="iam_02_0037__p59841320111813">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_0037__p9984420111819">Resource information.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="iam_02_0037__response_Resources"></a><a name="response_Resources"></a><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0037__response_Resources" frame="border" border="1" rules="all"><caption><b>Table 4 </b>resources</caption><thead align="left"><tr id="iam_02_0037__row498502091815"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.1"><p id="iam_02_0037__p19985162021814">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_0037__p198511205187">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_0037__p119859201180">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_02_0037__row4985182011188"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="iam_02_0037__p169851820191820">max</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="iam_02_0037__p8986162081820">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="iam_02_0037__p14986172018187">Maximum quota.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_02_0037__row1298510204189"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="iam_02_0037__p498632016184">min</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="iam_02_0037__p2986122020184">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="iam_02_0037__p14986162015184">Minimum quota.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_02_0037__row16985020111812"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="iam_02_0037__p1798615202184">quota</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="iam_02_0037__p298617205185">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="iam_02_0037__p4986920171817">Current quota.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_02_0037__row1498552012185"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="iam_02_0037__p159877206187">type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="iam_02_0037__p1398702019188">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="iam_02_0037__p1987182012185">Quota type.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_02_0037__row1798511205181"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="iam_02_0037__p198792015184">used</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="iam_02_0037__p098752016186">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="iam_02_0037__p6987192010185">Used quota.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="iam_02_0037__section113173352613"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="iam_02_0037__screen19781333102614">GET https://sample.domain.com/v3.0/OS-QUOTA/projects/{project_id}</pre>
|
|
</div>
|
|
<div class="section" id="iam_02_0037__section5563332611"><h4 class="sectiontitle">Example Response</h4><p id="iam_02_0037__p117873310261"><strong id="iam_02_0037__b61656487564">Status code: 200</strong></p>
|
|
<p id="iam_02_0037__p15781433192610">The request is successful.</p>
|
|
<pre class="screen" id="iam_02_0037__screen97818337266">{
|
|
"quotas" : {
|
|
"resources" : [
|
|
{
|
|
"max" : 50,
|
|
"min" : 0,
|
|
"quota" : 10,
|
|
"type" : "project",
|
|
"used" : 4
|
|
}
|
|
]
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<p id="iam_02_0037__p1826910173517"><strong id="iam_02_0037__b1571073810567">Status code: 403</strong></p>
|
|
<p id="iam_02_0037__p9267105351">Access denied.</p>
|
|
<ul id="iam_02_0037__ul626110173510"><li id="iam_02_0037__li12267108357">Example 1</li></ul>
|
|
<pre class="screen" id="iam_02_0037__screen179291313173518">{
|
|
"error_msg" : "You are not authorized to perform the requested action.",
|
|
"error_code" : "IAM.0002"
|
|
}</pre>
|
|
<ul id="iam_02_0037__ul76301617103515"><li id="iam_02_0037__li563051716359">Example 2</li></ul>
|
|
<pre class="screen" id="iam_02_0037__screen15620162093514">{
|
|
"error_msg" : "Policy doesn't allow %(actions)s to be performed.",
|
|
"error_code" : "IAM.0003"
|
|
}</pre>
|
|
<p id="iam_02_0037__p18265108353"><strong id="iam_02_0037__b169882720575">Status code: 404</strong></p>
|
|
<p id="iam_02_0037__p126111053510">The requested resource cannot be found.</p>
|
|
<pre class="screen" id="iam_02_0037__screen826131073517">{
|
|
"error_msg" : "Could not find %(target)s: %(target_id)s.",
|
|
"error_code" : "IAM.0004"
|
|
}</pre>
|
|
<p id="iam_02_0037__p22617102355"><strong id="iam_02_0037__b16442181425715">Status code: 500</strong></p>
|
|
<p id="iam_02_0037__p10261310113518">Internal server error.</p>
|
|
<pre class="screen" id="iam_02_0037__screen5261410143513">{
|
|
"error_msg" : "An unexpected error prevented the server from fulfilling your request.",
|
|
"error_code" : "IAM.0006"
|
|
}</pre>
|
|
<div class="section" id="iam_02_0037__section1516533112614"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="iam_02_0037__table191720335269" frame="border" border="1" rules="all"><thead align="left"><tr id="iam_02_0037__row27853332611"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.19.2.1.3.1.1"><p id="iam_02_0037__p1478113302616">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.19.2.1.3.1.2"><p id="iam_02_0037__p187833382612">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="iam_02_0037__row87823392612"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.19.2.1.3.1.1 "><p id="iam_02_0037__p107813335267">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.19.2.1.3.1.2 "><p id="iam_02_0037__p15781733172613">The request is successful.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_02_0037__row1078633112619"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.19.2.1.3.1.1 "><p id="iam_02_0037__p278123352610">401</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.19.2.1.3.1.2 "><p id="iam_02_0037__p478143392611">Authentication failed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_02_0037__row1878123311263"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.19.2.1.3.1.1 "><p id="iam_02_0037__p12781633112617">403</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.19.2.1.3.1.2 "><p id="iam_02_0037__p157803362613">Access denied.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_02_0037__row187823302618"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.19.2.1.3.1.1 "><p id="iam_02_0037__p9781733192613">404</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.19.2.1.3.1.2 "><p id="iam_02_0037__p1878143332614">The requested resource cannot be found.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="iam_02_0037__row127833310261"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.19.2.1.3.1.1 "><p id="iam_02_0037__p678153317262">500</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.19.2.1.3.1.2 "><p id="iam_02_0037__p178203310264">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_0057845642.html">Project Management</a></div>
|
|
</div>
|
|
</div>
|
|
|