doc-exports/docs/as/api-ref/as_06_0702.html
guoyanyan 31704f0318 as_api_0325
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com>
Co-authored-by: guoyanyan <guoyanyan3@huawei.com>
Co-committed-by: guoyanyan <guoyanyan3@huawei.com>
2023-04-13 08:59:32 +00:00

246 lines
18 KiB
HTML

<a name="as_06_0702"></a><a name="as_06_0702"></a>
<h1 class="topictitle1">Querying AS Policy and Instance Quotas</h1>
<div id="body1451530017882"><div class="section" id="as_06_0702__section59572368"><h4 class="sectiontitle">Function</h4><p id="as_06_0702__p13157104">This interface is used to query the total quotas and used quotas of AS policies and instances of a specified AS group by group ID. </p>
</div>
<div class="section" id="as_06_0702__section66389266"><h4 class="sectiontitle">URI</h4><p id="as_06_0702__p13792505111642">GET /autoscaling-api/v1/{project_id}/quotas/{scaling_group_id}</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="as_06_0702__table43451153111642" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="as_06_0702__row37743918111642"><th align="left" class="cellrowborder" valign="top" width="22%" id="mcps1.3.2.3.2.5.1.1"><p id="as_06_0702__p37358531111642"><strong id="as_06_0702__b797713116415">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="as_06_0702__p6142156111642">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13%" id="mcps1.3.2.3.2.5.1.3"><p id="as_06_0702__p27752626111642">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="45%" id="mcps1.3.2.3.2.5.1.4"><p id="as_06_0702__p33370204111642"><strong id="as_06_0702__b492210331943">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="as_06_0702__row18631986111642"><td class="cellrowborder" valign="top" width="22%" headers="mcps1.3.2.3.2.5.1.1 "><p id="as_06_0702__p32795934111642">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="as_06_0702__p39224965111642">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.2.3.2.5.1.3 "><p id="as_06_0702__p23105617111642">String</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.2.3.2.5.1.4 "><p id="as_06_0702__p36520930">Specifies the project ID.</p>
</td>
</tr>
<tr id="as_06_0702__row40360840111714"><td class="cellrowborder" valign="top" width="22%" headers="mcps1.3.2.3.2.5.1.1 "><p id="as_06_0702__p48002636111714">scaling_group_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="as_06_0702__p63008308111714">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.2.3.2.5.1.3 "><p id="as_06_0702__p3399337111714">String</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.2.3.2.5.1.4 "><p id="as_06_0702__p6910866111714">Specifies the AS group ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="as_06_0702__section60632485"><h4 class="sectiontitle">Request Message</h4><ul id="as_06_0702__ul9007507"><li id="as_06_0702__li56913160">Request parameters<p id="as_06_0702__p60400126203515"><a name="as_06_0702__li56913160"></a><a name="li56913160"></a>None</p>
</li><li id="as_06_0702__li3640858994017">Example request<p id="as_06_0702__p15614505203519"><a name="as_06_0702__li3640858994017"></a><a name="li3640858994017"></a>This example shows how to query the total quotas and used quotas of the AS policies and instances in the AS group with ID <strong id="as_06_0702__b1898422015256">e5d27f5c-dd76-4a61-b4bc-a67c5686719a</strong>.</p>
<pre class="screen" id="as_06_0702__screen103352578343">GET https://{Endpoint}/autoscaling-api/v1/{project_id}/quotas/e5d27f5c-dd76-4a61-b4bc-a67c5686719a</pre>
</li></ul>
</div>
<div class="section" id="as_06_0702__section8821459"><h4 class="sectiontitle">Response Message</h4><ul id="as_06_0702__ul42869931111831"><li id="as_06_0702__li50285064111831">Response parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="as_06_0702__table51227795" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameters</caption><thead align="left"><tr id="as_06_0702__row28165387"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.1.1.2.4.1.1"><p id="as_06_0702__p66803900"><strong id="as_06_0702__b138543161513">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19%" id="mcps1.3.4.2.1.1.2.4.1.2"><p id="as_06_0702__p42406858">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="61%" id="mcps1.3.4.2.1.1.2.4.1.3"><p id="as_06_0702__p12403484"><strong id="as_06_0702__b652513231052">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="as_06_0702__row65158171"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.1.1.2.4.1.1 "><p id="as_06_0702__p43320494">quotas</p>
</td>
<td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.4.2.1.1.2.4.1.2 "><p id="as_06_0702__p9449153141819"><a href="#as_06_0702__table38082817101238">quotas</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="61%" headers="mcps1.3.4.2.1.1.2.4.1.3 "><p id="as_06_0702__p19726002">Specifies quota details. For details, see <a href="#as_06_0702__table38082817101238">Table 3</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="as_06_0702__table38082817101238"></a><a name="table38082817101238"></a><table cellpadding="4" cellspacing="0" summary="" id="as_06_0702__table38082817101238" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="as_06_0702__b181391527203618">quotas</strong> field description</caption><thead align="left"><tr id="as_06_0702__row15394684101238"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.1.2.2.4.1.1"><p id="as_06_0702__p14228182101238">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.4.2.1.2.2.4.1.2"><p id="as_06_0702__p11632094101238">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="63%" id="mcps1.3.4.2.1.2.2.4.1.3"><p id="as_06_0702__p2675571101238">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="as_06_0702__row52155966101238"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="as_06_0702__p39009890101238">resources</p>
</td>
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="as_06_0702__p51160430101238">Array of <a href="#as_06_0702__table49912400111831">resources</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="63%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="as_06_0702__p50354170101238">Specifies resources. For details, see <a href="#as_06_0702__table49912400111831">Table 4</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="as_06_0702__table49912400111831"></a><a name="table49912400111831"></a><table cellpadding="4" cellspacing="0" summary="" id="as_06_0702__table49912400111831" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="as_06_0702__b866332919367">resources</strong> field description</caption><thead align="left"><tr id="as_06_0702__en-us_topic_0023629325_row47328638"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.1.3.2.4.1.1"><p id="as_06_0702__en-us_topic_0023629325_p8414476">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.4.2.1.3.2.4.1.2"><p id="as_06_0702__en-us_topic_0023629325_p10483995">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="63%" id="mcps1.3.4.2.1.3.2.4.1.3"><p id="as_06_0702__p166745230596">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="as_06_0702__en-us_topic_0023629325_row66020315"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.1.3.2.4.1.1 "><p id="as_06_0702__en-us_topic_0023629325_p46045275">type</p>
</td>
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.1.3.2.4.1.2 "><p id="as_06_0702__en-us_topic_0023629325_p38679804">String</p>
</td>
<td class="cellrowborder" valign="top" width="63%" headers="mcps1.3.4.2.1.3.2.4.1.3 "><p id="as_06_0702__p5293191015598">Specifies the quota type.</p>
<ul id="as_06_0702__ul9271512125912"><li id="as_06_0702__li204762018145918"><strong id="as_06_0702__b10332125919254">scaling_Policy</strong>: indicates AS policies.</li><li id="as_06_0702__li20271612165916"><strong id="as_06_0702__b172741330102610">scaling_Instance</strong>: indicates instances.</li></ul>
</td>
</tr>
<tr id="as_06_0702__en-us_topic_0023629325_row11854613"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.1.3.2.4.1.1 "><p id="as_06_0702__en-us_topic_0023629325_p20699582">used</p>
</td>
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.1.3.2.4.1.2 "><p id="as_06_0702__en-us_topic_0023629325_p66053444">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="63%" headers="mcps1.3.4.2.1.3.2.4.1.3 "><p id="as_06_0702__en-us_topic_0023629325_p48728718">Specifies the used quota.</p>
</td>
</tr>
<tr id="as_06_0702__en-us_topic_0023629325_row35905280"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.1.3.2.4.1.1 "><p id="as_06_0702__en-us_topic_0023629325_p22646572">quota</p>
</td>
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.1.3.2.4.1.2 "><p id="as_06_0702__en-us_topic_0023629325_p22433040">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="63%" headers="mcps1.3.4.2.1.3.2.4.1.3 "><p id="as_06_0702__en-us_topic_0023629325_p5136981">Specifies the total quota.</p>
</td>
</tr>
<tr id="as_06_0702__rc59af1fd68aa4416b9beae4ef5bea63b"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.1.3.2.4.1.1 "><p id="as_06_0702__a4b11e2ed89834661854fd6e10eac1f73">max</p>
</td>
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.1.3.2.4.1.2 "><p id="as_06_0702__a985ead989bff412eb0ef2b671f52ad6c">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="63%" headers="mcps1.3.4.2.1.3.2.4.1.3 "><p id="as_06_0702__a2c7c700dec33419dae168096457fb307">Specifies the quota upper limit.</p>
</td>
</tr>
<tr id="as_06_0702__row890119378"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.1.3.2.4.1.1 "><p id="as_06_0702__p1775171184518">min</p>
</td>
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.1.3.2.4.1.2 "><p id="as_06_0702__p174551858104615">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="63%" headers="mcps1.3.4.2.1.3.2.4.1.3 "><p id="as_06_0702__p1595716216452">Specifies the quota lower limit.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="as_06_0702__ul55608159111831"><li id="as_06_0702__li30711389111831">Example response<pre class="screen" id="as_06_0702__screen258952981014">{
"quotas": {
"resources": [
{
"type": "scaling_Policy",
"used": 2,
"quota": 50,
"max": 50,
"min": 0
},
{
"type": "scaling_Instance",
"used": 0,
"quota": 200,
"max": 1000,
"min": 0
}
]
}
}</pre>
</li></ul>
</div>
<div class="section" id="as_06_0702__section12284267"><h4 class="sectiontitle">Returned Values</h4><ul id="as_06_0702__ul33464950"><li id="as_06_0702__li32749101">Normal<p id="as_06_0702__p26306458"><a name="as_06_0702__li32749101"></a><a name="li32749101"></a>200</p>
</li><li id="as_06_0702__li35431534">Abnormal
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="as_06_0702__table50448354" frame="border" border="1" rules="all"><thead align="left"><tr id="as_06_0702__row29530116"><th align="left" class="cellrowborder" valign="top" width="43.61%" id="mcps1.3.5.2.2.1.1.3.1.1"><p id="as_06_0702__p43129175">Returned Value</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="56.38999999999999%" id="mcps1.3.5.2.2.1.1.3.1.2"><p id="as_06_0702__p3802258">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="as_06_0702__row39547486"><td class="cellrowborder" valign="top" width="43.61%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0702__p49229794">400 Bad Request</p>
</td>
<td class="cellrowborder" valign="top" width="56.38999999999999%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0702__p28190407">The server failed to process the request.</p>
</td>
</tr>
<tr id="as_06_0702__row52387077"><td class="cellrowborder" valign="top" width="43.61%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0702__p15494878">401 Unauthorized</p>
</td>
<td class="cellrowborder" valign="top" width="56.38999999999999%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0702__p47125611">You must enter the username and password to access the requested page.</p>
</td>
</tr>
<tr id="as_06_0702__row21477321"><td class="cellrowborder" valign="top" width="43.61%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0702__p61941440">403 Forbidden</p>
</td>
<td class="cellrowborder" valign="top" width="56.38999999999999%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0702__p51200735">You are forbidden to access the requested page.</p>
</td>
</tr>
<tr id="as_06_0702__row58153438"><td class="cellrowborder" valign="top" width="43.61%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0702__p12808013">404 Not Found</p>
</td>
<td class="cellrowborder" valign="top" width="56.38999999999999%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0702__p30816121">The server could not find the requested page.</p>
</td>
</tr>
<tr id="as_06_0702__row8909633"><td class="cellrowborder" valign="top" width="43.61%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0702__p50591634">405 Method Not Allowed</p>
</td>
<td class="cellrowborder" valign="top" width="56.38999999999999%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0702__p4281684">You are not allowed to use the method specified in the request.</p>
</td>
</tr>
<tr id="as_06_0702__row38535158"><td class="cellrowborder" valign="top" width="43.61%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0702__p34340132">406 Not Acceptable</p>
</td>
<td class="cellrowborder" valign="top" width="56.38999999999999%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0702__p30087318">The response generated by the server could not be accepted by the client.</p>
</td>
</tr>
<tr id="as_06_0702__row2350413"><td class="cellrowborder" valign="top" width="43.61%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0702__p56165728">407 Proxy Authentication Required</p>
</td>
<td class="cellrowborder" valign="top" width="56.38999999999999%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0702__p53130157">You must use the proxy server for authentication to process the request.</p>
</td>
</tr>
<tr id="as_06_0702__row8409368"><td class="cellrowborder" valign="top" width="43.61%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0702__p10070188">408 Request Timeout</p>
</td>
<td class="cellrowborder" valign="top" width="56.38999999999999%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0702__p10378893">The request timed out.</p>
</td>
</tr>
<tr id="as_06_0702__row26301173"><td class="cellrowborder" valign="top" width="43.61%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0702__p50020275">409 Conflict</p>
</td>
<td class="cellrowborder" valign="top" width="56.38999999999999%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0702__p25110514">The request could not be processed due to a conflict.</p>
</td>
</tr>
<tr id="as_06_0702__row24668042"><td class="cellrowborder" valign="top" width="43.61%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0702__p51954348">500 Internal Server Error</p>
</td>
<td class="cellrowborder" valign="top" width="56.38999999999999%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0702__p47552675">Failed to complete the request because of an internal service error.</p>
</td>
</tr>
<tr id="as_06_0702__row25320898"><td class="cellrowborder" valign="top" width="43.61%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0702__p37726867">501 Not Implemented</p>
</td>
<td class="cellrowborder" valign="top" width="56.38999999999999%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0702__p35977388">Failed to complete the request because the server does not support the requested function.</p>
</td>
</tr>
<tr id="as_06_0702__row55361044"><td class="cellrowborder" valign="top" width="43.61%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0702__p55059565">502 Bad Gateway</p>
</td>
<td class="cellrowborder" valign="top" width="56.38999999999999%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0702__p30639779">Failed to complete the request because the request is invalid.</p>
</td>
</tr>
<tr id="as_06_0702__row7322556"><td class="cellrowborder" valign="top" width="43.61%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0702__p56256135">503 Service Unavailable</p>
</td>
<td class="cellrowborder" valign="top" width="56.38999999999999%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0702__p60453091">Failed to complete the request because the system is unavailable.</p>
</td>
</tr>
<tr id="as_06_0702__row7206911"><td class="cellrowborder" valign="top" width="43.61%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_0702__p46888886">504 Gateway Timeout</p>
</td>
<td class="cellrowborder" valign="top" width="56.38999999999999%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_0702__p39903442">A gateway timeout error occurred.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="as_06_0702__section17669131616110"><h4 class="sectiontitle">Error Codes</h4><p id="as_06_0702__p172692548116">See <a href="as_07_0102.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="as_06_0700.html">Quotas</a></div>
</div>
</div>