doc-exports/docs/csbs/api-ref/en-us_topic_0059304243.html
Wei, Hongmin 8ce662c4dc CSBS API initial version
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Wei, Hongmin <weihongmin1@huawei.com>
Co-committed-by: Wei, Hongmin <weihongmin1@huawei.com>
2022-10-24 21:06:50 +00:00

200 lines
14 KiB
HTML

<a name="EN-US_TOPIC_0059304243"></a><a name="EN-US_TOPIC_0059304243"></a>
<h1 class="topictitle1">Querying Quotas</h1>
<div id="body28865448"><div class="section" id="EN-US_TOPIC_0059304243__section20206275"><h4 class="sectiontitle">Function</h4><p class="msonormal" id="EN-US_TOPIC_0059304243__p56399971">This API is used to query tenant quotas.</p>
</div>
<div class="section" id="EN-US_TOPIC_0059304243__section47638747"><h4 class="sectiontitle">URI</h4><ul id="EN-US_TOPIC_0059304243__ul4994951"><li id="EN-US_TOPIC_0059304243__li44954559">URI format<p id="EN-US_TOPIC_0059304243__p1937850"><a name="EN-US_TOPIC_0059304243__li44954559"></a><a name="li44954559"></a>GET https://{endpoint}/v1/{project_id}/quotas</p>
</li><li id="EN-US_TOPIC_0059304243__li17440658">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0059304243__table22748199" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0059304243__row62712396"><th align="left" class="cellrowborder" valign="top" width="25.507449255074494%" id="mcps1.3.2.2.2.1.2.5.1.1"><p id="EN-US_TOPIC_0059304243__p209623317216">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.288571142885711%" id="mcps1.3.2.2.2.1.2.5.1.2"><p id="EN-US_TOPIC_0059304243__p15962193221">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.288571142885711%" id="mcps1.3.2.2.2.1.2.5.1.3"><p id="EN-US_TOPIC_0059304243__p99783315213">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="45.91540845915409%" id="mcps1.3.2.2.2.1.2.5.1.4"><p id="EN-US_TOPIC_0059304243__p6978835213">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0059304243__row59050273"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="EN-US_TOPIC_0059304243__p18342809">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="EN-US_TOPIC_0059304243__p9372574">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="EN-US_TOPIC_0059304243__p20981015">String</p>
</td>
<td class="cellrowborder" valign="top" width="45.91540845915409%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="EN-US_TOPIC_0059304243__p65779720">Project ID</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0059304243__section26095539"><h4 class="sectiontitle">Request</h4><ul id="EN-US_TOPIC_0059304243__ul16162439"><li id="EN-US_TOPIC_0059304243__li11244225">Parameter description<p class="msonormal" id="EN-US_TOPIC_0059304243__p1613792612217"><a name="EN-US_TOPIC_0059304243__li11244225"></a><a name="li11244225"></a>None</p>
</li></ul>
<ul id="EN-US_TOPIC_0059304243__ul38367037"><li id="EN-US_TOPIC_0059304243__li9759017">Example request<pre class="screen" id="EN-US_TOPIC_0059304243__screen17900539192712">GET https://{endpoint}/v1/{project_id}/quotas</pre>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0059304243__section33533260"><h4 class="sectiontitle">Response</h4><ul id="EN-US_TOPIC_0059304243__ul783878"><li id="EN-US_TOPIC_0059304243__li7054908">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0059304243__table63494180" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0059304243__row402618"><th align="left" class="cellrowborder" valign="top" width="29.76%" id="mcps1.3.4.2.1.1.2.4.1.1"><p id="EN-US_TOPIC_0059304243__p1621230201117">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.67%" id="mcps1.3.4.2.1.1.2.4.1.2"><p id="EN-US_TOPIC_0059304243__p42163010113">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53.57000000000001%" id="mcps1.3.4.2.1.1.2.4.1.3"><p id="EN-US_TOPIC_0059304243__p72123051117">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0059304243__row3343372"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.2.1.1.2.4.1.1 "><p id="EN-US_TOPIC_0059304243__p2377741">quotas</p>
</td>
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.2.1.1.2.4.1.2 "><p id="EN-US_TOPIC_0059304243__p31108621">quota</p>
</td>
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.2.1.1.2.4.1.3 "><p id="EN-US_TOPIC_0059304243__p36770396">See the <strong id="EN-US_TOPIC_0059304243__b56981346142320">quota</strong> field description.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="EN-US_TOPIC_0059304243__li62498111">Parameter description of field <strong id="EN-US_TOPIC_0059304243__b44069810">quota</strong>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0059304243__table25612095" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameter description of field <strong id="EN-US_TOPIC_0059304243__b15654360">quota</strong></caption><thead align="left"><tr id="EN-US_TOPIC_0059304243__row63845268"><th align="left" class="cellrowborder" valign="top" width="29.76%" id="mcps1.3.4.2.2.2.2.4.1.1"><p id="EN-US_TOPIC_0059304243__p998713511112">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.67%" id="mcps1.3.4.2.2.2.2.4.1.2"><p id="EN-US_TOPIC_0059304243__p1898719359117">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53.57000000000001%" id="mcps1.3.4.2.2.2.2.4.1.3"><p id="EN-US_TOPIC_0059304243__p32143631115">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0059304243__row39476433"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.2.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0059304243__p43474514">resources</p>
</td>
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.2.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0059304243__p23617749">List&lt;resource_resp&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.2.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0059304243__p33989544">Quota resources</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="EN-US_TOPIC_0059304243__li37470442">Parameter description of field <strong id="EN-US_TOPIC_0059304243__b20257171">resource_resp</strong>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0059304243__table1689659" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Parameter description of field <strong id="EN-US_TOPIC_0059304243__b16941207">resource_resp</strong></caption><thead align="left"><tr id="EN-US_TOPIC_0059304243__row2352317"><th align="left" class="cellrowborder" valign="top" width="29.76%" id="mcps1.3.4.2.3.2.2.4.1.1"><p id="EN-US_TOPIC_0059304243__p489318421119">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.67%" id="mcps1.3.4.2.3.2.2.4.1.2"><p id="EN-US_TOPIC_0059304243__p10909342111111">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53.57000000000001%" id="mcps1.3.4.2.3.2.2.4.1.3"><p id="EN-US_TOPIC_0059304243__p990904210119">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0059304243__row20937927"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.2.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0059304243__p18250530">unit</p>
</td>
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.2.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0059304243__p19515197">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.2.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0059304243__p37227085">Unit</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0059304243__row66608310"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.2.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0059304243__p26564024">used</p>
</td>
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.2.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0059304243__p4843821">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.2.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0059304243__p56805233">Used quota</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0059304243__row41485049"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.2.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0059304243__p4845804">quota</p>
</td>
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.2.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0059304243__p50831280">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.2.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0059304243__p23693009">Quota size</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0059304243__row11910489"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.2.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0059304243__p25225559">type</p>
</td>
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.2.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0059304243__p14440446">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.2.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0059304243__p28825462">Type</p>
<p id="EN-US_TOPIC_0059304243__p9493432134818"><strong id="EN-US_TOPIC_0059304243__b12189165934816">backup_capacity</strong> specifies the backup storage capacity quota. Value <strong id="EN-US_TOPIC_0059304243__b842352706161346">-1</strong> indicates no restriction on the quota size.</p>
<p id="EN-US_TOPIC_0059304243__p58102567"><strong id="EN-US_TOPIC_0059304243__b1972617237494">backups</strong> specifies the number of retained backups.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="EN-US_TOPIC_0059304243__li53161062">Example response<pre class="screen" id="EN-US_TOPIC_0059304243__screen1170764714270">{
"quotas" : {
"resources" : [{
"type" : "backup_capacity",
"unit" : "GB",
"quota" : -1,
"used" : 0
},
{
"used": 0,
"type": "backups",
"quota": 600
}]
}
}</pre>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0059304243__section33363887"><h4 class="sectiontitle">Status Codes</h4><ul id="EN-US_TOPIC_0059304243__ul53339307"><li id="EN-US_TOPIC_0059304243__li10291719">Normal
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0059304243__table25516615" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0059304243__row2411478"><th align="left" class="cellrowborder" valign="top" width="42.42%" id="mcps1.3.5.2.1.1.1.3.1.1"><p id="EN-US_TOPIC_0059304243__p61112063">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.58%" id="mcps1.3.5.2.1.1.1.3.1.2"><p id="EN-US_TOPIC_0059304243__p51130076">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0059304243__row47895510"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.5.2.1.1.1.3.1.1 "><p id="EN-US_TOPIC_0059304243__p54331092">200</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.5.2.1.1.1.3.1.2 "><p id="EN-US_TOPIC_0059304243__p38742335">OK</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="EN-US_TOPIC_0059304243__li13136696">Abnormal
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0059304243__table51121406" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0059304243__row44111723"><th align="left" class="cellrowborder" valign="top" width="42.42%" id="mcps1.3.5.2.2.1.1.3.1.1"><p id="EN-US_TOPIC_0059304243__p16279805">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.58%" id="mcps1.3.5.2.2.1.1.3.1.2"><p id="EN-US_TOPIC_0059304243__p43595815">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0059304243__row41600146"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0059304243__p14168678">400</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0059304243__p6812233">Invalid request parameters.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0059304243__row61310105"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0059304243__p62617">401</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0059304243__p5071997">Authentication failed.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0059304243__row45647976"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0059304243__p6498590">403</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0059304243__p56623788">No operation permission.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0059304243__row39852052"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0059304243__p6790811">404</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0059304243__p13184781">Requested object not found.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0059304243__row51554171"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0059304243__p15138299">500</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0059304243__p18242716">Service internal error.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0059304243__row29966720"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0059304243__p11385269">503</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0059304243__p49791582">Service unavailable.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0059304243__section61541938486"><h4 class="sectiontitle">Error Codes</h4><p id="EN-US_TOPIC_0059304243__p999593594811">For details, see <a href="en-us_topic_0071888297.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0059304238.html">Quota Management</a></div>
</div>
</div>