doc-exports/docs/cce/api-ref/ShowQuotas.html
Dong, Qiu Jian 3336ba8df7 CCE API for v1.23
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Dong, Qiu Jian <qiujiandong1@huawei.com>
Co-committed-by: Dong, Qiu Jian <qiujiandong1@huawei.com>
2022-11-10 12:48:59 +00:00

181 lines
12 KiB
HTML

<a name="ShowQuotas"></a><a name="ShowQuotas"></a>
<h1 class="topictitle1">Querying Resource Quotas</h1>
<div id="body0000001210093432"><div class="section" id="ShowQuotas__section1870516363292"><h4 class="sectiontitle">Function</h4><p id="ShowQuotas__p570663618299">This API is used to query CCE resource quotas.</p>
</div>
<div class="section" id="ShowQuotas__section1270613632919"><h4 class="sectiontitle">URI</h4><p id="ShowQuotas__p14706163632918">GET /api/v3/projects/{project_id}/quotas</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ShowQuotas__table11706203652912" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="ShowQuotas__row77068368292"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="ShowQuotas__p670614360292">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="ShowQuotas__p2707193610294">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="ShowQuotas__p1470715360296">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="ShowQuotas__p170715362294">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="ShowQuotas__row2070610367298"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="ShowQuotas__p157075367299">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="ShowQuotas__p97071136172911">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="ShowQuotas__p1770719367293">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="ShowQuotas__p970723642915">Project ID. For details about how to obtain the project ID, see <a href="cce_02_0271.html">How to Obtain Parameters in the API URI</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="ShowQuotas__section1570743618290"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ShowQuotas__en-us_topic_0000001242535373_HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="ShowQuotas__row17081936132916"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="ShowQuotas__p070823622918">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="ShowQuotas__p1270873615293">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="ShowQuotas__p5708153642918">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="ShowQuotas__p11708143616290">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="ShowQuotas__row187081536162918"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="ShowQuotas__p1270853616299">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="ShowQuotas__p7709736202911">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="ShowQuotas__p19709123672910">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="ShowQuotas__p670933613294">Message body type (format).</p>
<p id="ShowQuotas__p370983620295">Default: <strong id="ShowQuotas__b14709193612912">application/json</strong></p>
</td>
</tr>
<tr id="ShowQuotas__row3708173616298"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="ShowQuotas__p67093367290">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="ShowQuotas__p177090361295">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="ShowQuotas__p770933610292">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="ShowQuotas__p270983612292">Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this field is mandatory and must be set to a user token.</p>
<p id="ShowQuotas__p1970953642916">Maximum: <strong id="ShowQuotas__b137091736172914">16384</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="ShowQuotas__section2709936202916"><h4 class="sectiontitle">Response Parameters</h4><p id="ShowQuotas__p1471033622916"><strong id="ShowQuotas__b7710123614295">Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ShowQuotas__en-us_topic_0000001242535373_response_DomainQuotaResponse" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response body parameters</caption><thead align="left"><tr id="ShowQuotas__row3710193622912"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="ShowQuotas__p771013362295">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="ShowQuotas__p6710133602919">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="ShowQuotas__p1771013662919">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="ShowQuotas__row371033642914"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ShowQuotas__p1171013632917">quotas</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ShowQuotas__p13711173662918">Array of <a href="#ShowQuotas__en-us_topic_0000001242535373_response_QuotaResource">QuotaResource</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ShowQuotas__p1771123618290">Resources</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="ShowQuotas__en-us_topic_0000001242535373_response_QuotaResource"></a><a name="en-us_topic_0000001242535373_response_QuotaResource"></a><table cellpadding="4" cellspacing="0" summary="" id="ShowQuotas__en-us_topic_0000001242535373_response_QuotaResource" frame="border" border="1" rules="all"><caption><b>Table 4 </b>QuotaResource</caption><thead align="left"><tr id="ShowQuotas__row13711183622910"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.1"><p id="ShowQuotas__p1671133619298">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.2"><p id="ShowQuotas__p14712123610294">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.4.2.4.1.3"><p id="ShowQuotas__p127121336132912">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="ShowQuotas__row971163610294"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ShowQuotas__p127127366296">quotaKey</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ShowQuotas__p27121736192917">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ShowQuotas__p571210367293">Resource type</p>
</td>
</tr>
<tr id="ShowQuotas__row67111936142919"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ShowQuotas__p371253652912">quotaLimit</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ShowQuotas__p11712173642917">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ShowQuotas__p271213672919">Quota</p>
</td>
</tr>
<tr id="ShowQuotas__row971123642919"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ShowQuotas__p4712183682910">used</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ShowQuotas__p4713336172915">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ShowQuotas__p271319365298">Number of created resources</p>
</td>
</tr>
<tr id="ShowQuotas__row13711153615296"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ShowQuotas__p9713103652911">unit</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ShowQuotas__p16713143618290">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ShowQuotas__p7713636122919">Unit</p>
</td>
</tr>
<tr id="ShowQuotas__row11711736172915"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ShowQuotas__p871314364295">regionId</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ShowQuotas__p67139361294">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ShowQuotas__p1871313652918">Region ID. This parameter is not returned if not involved.</p>
</td>
</tr>
<tr id="ShowQuotas__row1471163613299"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ShowQuotas__p14713236192916">availabilityZoneId</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ShowQuotas__p147132368299">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ShowQuotas__p6714183612918">AZ ID. This parameter is not returned if not involved.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="ShowQuotas__section137141236122919"><h4 class="sectiontitle">Example Requests</h4><p id="ShowQuotas__p20714636132915">None</p>
</div>
<div class="section" id="ShowQuotas__section17141136162910"><h4 class="sectiontitle">Example Responses</h4><p id="ShowQuotas__p13714103613298"><strong id="ShowQuotas__b1714103622913">Status code: 200</strong></p>
<p id="ShowQuotas__p371413622911">The resource quotas are obtained successfully.</p>
<pre class="screen" id="ShowQuotas__screen071443618291">{
"quotas" : {
"resources" : [ {
"quotaKey" : "cluster",
"quotaLimit" : 20,
"used" : 13,
"unit" : "count"
} ]
}
}</pre>
</div>
<div class="section" id="ShowQuotas__section77157362292"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ShowQuotas__en-us_topic_0000001242535373_status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="ShowQuotas__row671663612914"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="ShowQuotas__p14716636172912">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="ShowQuotas__p071623602916">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="ShowQuotas__row1371663652913"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="ShowQuotas__p157168369290">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="ShowQuotas__p2716183672914">The resource quotas are obtained successfully.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="ShowQuotas__section16716123632913"><h4 class="sectiontitle">Error Codes</h4><p id="ShowQuotas__p771723682919">See <a href="cce_02_0250.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="quota_lifecycle_management.html">Quota Management</a></div>
</div>
</div>