doc-exports/docs/ces/api-ref/ces_03_0037.html
Dong, Qiu Jian 95f84e7c3b Update CES API -20240104 version
Reviewed-by: Ziuzko, Alevtina <alevtina.ziuzko@t-systems.com>
Co-authored-by: Dong, Qiu Jian <qiujiandong1@huawei.com>
Co-committed-by: Dong, Qiu Jian <qiujiandong1@huawei.com>
2024-05-07 11:19:42 +00:00

185 lines
13 KiB
HTML

<a name="ces_03_0037"></a><a name="ces_03_0037"></a>
<h1 class="topictitle1">Querying Quotas</h1>
<div id="body1442972132827"><div class="section" id="ces_03_0037__section66578044"><h4 class="sectiontitle">Function</h4><p id="ces_03_0037__p879813295841">This API is used to query the alarm rule quota and the number of alarm rules that have been created.</p>
</div>
<div class="section" id="ces_03_0037__section62331491"><h4 class="sectiontitle">URI</h4><p id="ces_03_0037__p48490504">GET /V1.0/{project_id}/quotas</p>
<ul id="ces_03_0037__ul8883693"><li id="ces_03_0037__li33761356">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ces_03_0037__table35846240171810" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="ces_03_0037__row35634314171810"><th align="left" class="cellrowborder" valign="top" width="19.99%" id="mcps1.3.2.3.1.1.2.4.1.1"><p id="ces_03_0037__p698337171810">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="30.520000000000003%" id="mcps1.3.2.3.1.1.2.4.1.2"><p id="ces_03_0037__p56565365171810">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="49.49%" id="mcps1.3.2.3.1.1.2.4.1.3"><p id="ces_03_0037__p18391853171810">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="ces_03_0037__row13345138171810"><td class="cellrowborder" valign="top" width="19.99%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="ces_03_0037__p7214379171810">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="30.520000000000003%" headers="mcps1.3.2.3.1.1.2.4.1.2 "><p id="ces_03_0037__p47493825171810">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="49.49%" headers="mcps1.3.2.3.1.1.2.4.1.3 "><p id="ces_03_0037__p21794587171810">Specifies the project ID.</p>
<p id="ces_03_0037__p18591141575">For details about how to obtain the project ID, see <a href="ces_03_0057.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="ces_03_0037__li41462866">Example: Query the alarm rule quota.<pre class="screen" id="ces_03_0037__screen6375720319520">GET https://{Cloud Eye endpoint}/V1.0/{project_id}/quotas</pre>
</li></ul>
</div>
<div class="section" id="ces_03_0037__section24112512"><h4 class="sectiontitle">Request</h4><p id="ces_03_0037__p45638969">None</p>
</div>
<div class="section" id="ces_03_0037__section15686020"><h4 class="sectiontitle">Response</h4><ul id="ces_03_0037__ul5769005"><li id="ces_03_0037__li52846553152840">Response parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ces_03_0037__table42705518481" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameters</caption><thead align="left"><tr id="ces_03_0037__row132701852487"><th align="left" class="cellrowborder" valign="top" width="13.919999999999998%" id="mcps1.3.4.2.1.1.2.4.1.1"><p id="ces_03_0037__p5270957481">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12.33%" id="mcps1.3.4.2.1.1.2.4.1.2"><p id="ces_03_0037__p172701651483">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="73.75%" id="mcps1.3.4.2.1.1.2.4.1.3"><p id="ces_03_0037__p82701152484">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="ces_03_0037__row1127018534818"><td class="cellrowborder" valign="top" width="13.919999999999998%" headers="mcps1.3.4.2.1.1.2.4.1.1 "><p id="ces_03_0037__p1027016514810">quotas</p>
</td>
<td class="cellrowborder" valign="top" width="12.33%" headers="mcps1.3.4.2.1.1.2.4.1.2 "><p id="ces_03_0037__p18450111523616">Object</p>
</td>
<td class="cellrowborder" valign="top" width="73.75%" headers="mcps1.3.4.2.1.1.2.4.1.3 "><p id="ces_03_0037__p192711858485">Specifies the quota list.</p>
<p id="ces_03_0037__p1382116613411">For details, see <a href="#ces_03_0037__table5856932152840">Table 3</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="ces_03_0037__table5856932152840"></a><a name="table5856932152840"></a><table cellpadding="4" cellspacing="0" summary="" id="ces_03_0037__table5856932152840" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Data structure description of <strong id="ces_03_0037__b52456916541">quotas</strong> </caption><thead align="left"><tr id="ces_03_0037__row5206426152840"><th align="left" class="cellrowborder" valign="top" width="13.919999999999998%" id="mcps1.3.4.2.1.2.2.4.1.1"><p id="ces_03_0037__p19067323152840">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12.33%" id="mcps1.3.4.2.1.2.2.4.1.2"><p id="ces_03_0037__p9786487152840">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="73.75%" id="mcps1.3.4.2.1.2.2.4.1.3"><p id="ces_03_0037__p54508002152840">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="ces_03_0037__row41015029105352"><td class="cellrowborder" valign="top" width="13.919999999999998%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="ces_03_0037__p33883078105352">resources</p>
</td>
<td class="cellrowborder" valign="top" width="12.33%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="ces_03_0037__p42323558105352">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="73.75%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="ces_03_0037__p5656197105352">Specifies the resource quota list.</p>
<p id="ces_03_0037__p12249131915424">For details, see <a href="#ces_03_0037__table3902130144815">Table 4</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="ces_03_0037__table3902130144815"></a><a name="table3902130144815"></a><table cellpadding="4" cellspacing="0" summary="" id="ces_03_0037__table3902130144815" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Data structure description of <strong id="ces_03_0037__b1215445175510">resources</strong> </caption><thead align="left"><tr id="ces_03_0037__row109007015486"><th align="left" class="cellrowborder" valign="top" width="15.108489151084893%" id="mcps1.3.4.2.1.3.2.4.1.1"><p id="ces_03_0037__p15900109481">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.057894210578944%" id="mcps1.3.4.2.1.3.2.4.1.2"><p id="ces_03_0037__p5900200114811">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="63.83361663833617%" id="mcps1.3.4.2.1.3.2.4.1.3"><p id="ces_03_0037__p119009018486">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="ces_03_0037__row119019044811"><td class="cellrowborder" valign="top" width="15.108489151084893%" headers="mcps1.3.4.2.1.3.2.4.1.1 "><p id="ces_03_0037__p169014024810">type</p>
</td>
<td class="cellrowborder" valign="top" width="21.057894210578944%" headers="mcps1.3.4.2.1.3.2.4.1.2 "><p id="ces_03_0037__p091411437363">String</p>
</td>
<td class="cellrowborder" valign="top" width="63.83361663833617%" headers="mcps1.3.4.2.1.3.2.4.1.3 "><p id="ces_03_0037__p79010019488">Specifies the quota type.</p>
<p id="ces_03_0037__p109017084815"><strong id="ces_03_0037__b310912710247">alarm</strong> indicates the alarm rule.</p>
</td>
</tr>
<tr id="ces_03_0037__row9901110114818"><td class="cellrowborder" valign="top" width="15.108489151084893%" headers="mcps1.3.4.2.1.3.2.4.1.1 "><p id="ces_03_0037__p159013019489">used</p>
</td>
<td class="cellrowborder" valign="top" width="21.057894210578944%" headers="mcps1.3.4.2.1.3.2.4.1.2 "><p id="ces_03_0037__p138071851103619">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="63.83361663833617%" headers="mcps1.3.4.2.1.3.2.4.1.3 "><p id="ces_03_0037__p109014019483">Specifies the used amount of the quota.</p>
</td>
</tr>
<tr id="ces_03_0037__row209021101484"><td class="cellrowborder" valign="top" width="15.108489151084893%" headers="mcps1.3.4.2.1.3.2.4.1.1 "><p id="ces_03_0037__p390212054810">unit</p>
</td>
<td class="cellrowborder" valign="top" width="21.057894210578944%" headers="mcps1.3.4.2.1.3.2.4.1.2 "><p id="ces_03_0037__p49029044813">String</p>
</td>
<td class="cellrowborder" valign="top" width="63.83361663833617%" headers="mcps1.3.4.2.1.3.2.4.1.3 "><p id="ces_03_0037__p179021806488">Specifies the quota unit.</p>
</td>
</tr>
<tr id="ces_03_0037__row1490215013484"><td class="cellrowborder" valign="top" width="15.108489151084893%" headers="mcps1.3.4.2.1.3.2.4.1.1 "><p id="ces_03_0037__p16902170104814">quota</p>
</td>
<td class="cellrowborder" valign="top" width="21.057894210578944%" headers="mcps1.3.4.2.1.3.2.4.1.2 "><p id="ces_03_0037__p119026084815">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="63.83361663833617%" headers="mcps1.3.4.2.1.3.2.4.1.3 "><p id="ces_03_0037__p390213012486">Specifies the total amount of the quota.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="ces_03_0037__li51921052">Example response<pre class="screen" id="ces_03_0037__screen60840689195211">{
"quotas":
{
"resources": [
{
"unit":"",
"type":"alarm",
"quota":1000,
"used":10
}
]
}
}</pre>
</li></ul>
</div>
<div class="section" id="ces_03_0037__section6956456"><h4 class="sectiontitle">Returned Values</h4><ul id="ces_03_0037__ul20226985"><li id="ces_03_0037__li47825138">Normal<p id="ces_03_0037__p27773061"><a name="ces_03_0037__li47825138"></a><a name="li47825138"></a>200</p>
</li><li id="ces_03_0037__li48630964">Abnormal
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ces_03_0037__table189171224318" frame="border" border="1" rules="all"><thead align="left"><tr id="ces_03_0037__row891711233119"><th align="left" class="cellrowborder" valign="top" width="32.1%" id="mcps1.3.5.2.2.1.1.3.1.1"><p id="ces_03_0037__p1849030182924">Returned Value</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="67.9%" id="mcps1.3.5.2.2.1.1.3.1.2"><p id="ces_03_0037__p15553712182924">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="ces_03_0037__row1591832183119"><td class="cellrowborder" valign="top" width="32.1%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="ces_03_0037__p581987519168">400 Bad Request</p>
</td>
<td class="cellrowborder" valign="top" width="67.9%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="ces_03_0037__p164784039168">Request error.</p>
</td>
</tr>
<tr id="ces_03_0037__row691811263116"><td class="cellrowborder" valign="top" width="32.1%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="ces_03_0037__p2691669168">401 Unauthorized</p>
</td>
<td class="cellrowborder" valign="top" width="67.9%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="ces_03_0037__p218024949168">The authentication information is not provided or is incorrect.</p>
</td>
</tr>
<tr id="ces_03_0037__row19181426316"><td class="cellrowborder" valign="top" width="32.1%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="ces_03_0037__p563264059168">403 Forbidden</p>
</td>
<td class="cellrowborder" valign="top" width="67.9%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="ces_03_0037__p661449719168">Access to the requested page is forbidden.</p>
</td>
</tr>
<tr id="ces_03_0037__row591862183116"><td class="cellrowborder" valign="top" width="32.1%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="ces_03_0037__p355199299168">408 Request Timeout</p>
</td>
<td class="cellrowborder" valign="top" width="67.9%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="ces_03_0037__p585420329168">The request timed out.</p>
</td>
</tr>
<tr id="ces_03_0037__row139181428319"><td class="cellrowborder" valign="top" width="32.1%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="ces_03_0037__p630127129168">429 Too Many Requests</p>
</td>
<td class="cellrowborder" valign="top" width="67.9%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="ces_03_0037__p37560249168">Concurrent requests are excessive.</p>
</td>
</tr>
<tr id="ces_03_0037__row119181124319"><td class="cellrowborder" valign="top" width="32.1%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="ces_03_0037__p537873819168">500 Internal Server Error</p>
</td>
<td class="cellrowborder" valign="top" width="67.9%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="ces_03_0037__p618106189168">Failed to complete the request because of an internal service error.</p>
</td>
</tr>
<tr id="ces_03_0037__row1191832203111"><td class="cellrowborder" valign="top" width="32.1%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="ces_03_0037__p298930079168">503 Service Unavailable</p>
</td>
<td class="cellrowborder" valign="top" width="67.9%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="ces_03_0037__p54144829168">The service is currently unavailable.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="ces_03_0037__section915823415474"><h4 class="sectiontitle">Error Codes</h4><p id="ces_03_0037__ces_03_0020_p91851023153416">See <a href="ErrorCode.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="ces_03_0036.html">Quotas</a></div>
</div>
</div>