doc-exports/docs/vpn/api-ref/vpn_api_0038.html
Hongwei, King Wang 32c06a10a2 vpn_api
Reviewed-by: Sarda, Priya <prsarda@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: Hongwei, King Wang <king.wanghongwei@huawei.com>
Co-committed-by: Hongwei, King Wang <king.wanghongwei@huawei.com>
2024-08-15 14:18:28 +00:00

151 lines
15 KiB
HTML

<a name="EN-US_TOPIC_0000001807370484"></a><a name="EN-US_TOPIC_0000001807370484"></a>
<h1 class="topictitle1">Querying Quotas</h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_section20114008"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p106016241747">This API is used to query VPN resource quotas of a tenant, including VPN gateways, customer gateways, and VPN connections.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_section18104173342818"><h4 class="sectiontitle">Calling Method</h4><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p1951651315332">For details, see <a href="vpn_api_0008.html#EN-US_TOPIC_0000001807530276">Calling APIs</a>.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_section46808346"><h4 class="sectiontitle">URI</h4><div class="p" id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p9863195515817">GET /v5/{project_id}/vpn/quotas
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_table3672032" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_row10026740"><th align="left" class="cellrowborder" valign="top" width="20.61793820617938%" id="mcps1.3.3.2.1.2.5.1.1"><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p6859639">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.02809719028097%" id="mcps1.3.3.2.1.2.5.1.2"><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p179611479215">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="11.798820117988202%" id="mcps1.3.3.2.1.2.5.1.3"><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p18759866">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="48.555144485551445%" id="mcps1.3.3.2.1.2.5.1.4"><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p43154149">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_row5825185"><td class="cellrowborder" valign="top" width="20.61793820617938%" headers="mcps1.3.3.2.1.2.5.1.1 "><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p2077973">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="19.02809719028097%" headers="mcps1.3.3.2.1.2.5.1.2 "><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p177965479212">String</p>
</td>
<td class="cellrowborder" valign="top" width="11.798820117988202%" headers="mcps1.3.3.2.1.2.5.1.3 "><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p34098154">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="48.555144485551445%" headers="mcps1.3.3.2.1.2.5.1.4 "><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p124954510236">Specifies a project ID. You can obtain the project ID by referring to <a href="vpn_api_0051.html#EN-US_TOPIC_0000001807530332">Obtaining the Project ID</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_section18621933"><h4 class="sectiontitle">Request</h4><ul id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_ul5992193374713"><li id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_li644145121510">Request parameters<p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p271211515159"><a name="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_li644145121510"></a><a name="en-us_topic_0000001543513468_li644145121510"></a>None</p>
</li><li id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_li1663874215201">Example request<pre class="screen" id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_screen1778465375316">GET https://{Endpoint}/v5/{project_id}/vpn/quotas</pre>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_section33379675"><h4 class="sectiontitle">Response</h4><ul id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_ul2144514204819"><li id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_li61441714114816">Response parameters<p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p9607122418411"><a name="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_li61441714114816"></a><a name="en-us_topic_0000001543513468_li61441714114816"></a>Returned status code 200: successful query</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_table72131" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters in the response body</caption><thead align="left"><tr id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_row1260712241649"><th align="left" class="cellrowborder" valign="top" width="22.220000000000002%" id="mcps1.3.5.2.1.2.2.4.1.1"><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p16074249414">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="22.220000000000002%" id="mcps1.3.5.2.1.2.2.4.1.2"><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p1060712241948">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.559999999999995%" id="mcps1.3.5.2.1.2.2.4.1.3"><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p1460842419416">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_row146071241249"><td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p1260819246414">quotas</p>
</td>
<td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p1660962417420"><a href="#EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_table72132">Quotas</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p166095240419">Specifies the quotas object.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_row14177339553"><td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p1044574416511">request_id</p>
</td>
<td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p1151785155116">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p75177595117">Specifies a request ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_table72132"></a><a name="en-us_topic_0000001543513468_table72132"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_table72132" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Quotas</caption><thead align="left"><tr id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_row16609724948"><th align="left" class="cellrowborder" valign="top" width="22.220000000000002%" id="mcps1.3.5.2.1.3.2.4.1.1"><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p1361022413419">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="22.220000000000002%" id="mcps1.3.5.2.1.3.2.4.1.2"><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p7610924842">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.559999999999995%" id="mcps1.3.5.2.1.3.2.4.1.3"><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p6610824549">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_row660912241046"><td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p196108241648">resources</p>
</td>
<td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p9610024949">Array of <a href="#EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_table1398102318478">QuotaInfo</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.1.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p186111624043">Specifies the resources object.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_table1398102318478"></a><a name="en-us_topic_0000001543513468_table1398102318478"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_table1398102318478" frame="border" border="1" rules="all"><caption><b>Table 4 </b>QuotaInfo</caption><thead align="left"><tr id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_row1898182316477"><th align="left" class="cellrowborder" valign="top" width="22.220000000000002%" id="mcps1.3.5.2.1.4.2.4.1.1"><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p1498110235474">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="22.220000000000002%" id="mcps1.3.5.2.1.4.2.4.1.2"><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p18981162320474">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.559999999999995%" id="mcps1.3.5.2.1.4.2.4.1.3"><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p2098117239476">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_row1598192313477"><td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.4.2.4.1.1 "><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p4981122334720">type</p>
</td>
<td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.4.2.4.1.2 "><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p7981623194713">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.1.4.2.4.1.3 "><ul id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_ul89701544141811"><li id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_li1268716241419">Specifies a resource type.</li><li id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_li535517414216">Value range:<ul id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_ul18541174615212"><li id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_li12541046328"><strong id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_b183022818345">customer_gateway</strong>: customer gateway</li><li id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_li203360817316"><strong id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_b13164630153413">vpn_connection</strong>: Enterprise Edition VPN connection</li><li id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_li18642131419313"><strong id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_b82391333103413">vpn_gateway</strong>: Enterprise Edition VPN gateway</li></ul>
</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_row112487509470"><td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.4.2.4.1.1 "><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p22482501474">quota</p>
</td>
<td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.4.2.4.1.2 "><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p7248350154713">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.1.4.2.4.1.3 "><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p11248350164713">Specifies the quota upper limit.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_row38021353134717"><td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.4.2.4.1.1 "><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p7802953164713">used</p>
</td>
<td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.4.2.4.1.2 "><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p1780265344710">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.1.4.2.4.1.3 "><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p93721928164812">Specifies the number of resources in use.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_li1214115392014">Example response<pre class="screen" id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_screen678017232489">{
"quotas": {
"resources": [
{
"type": "customer_gateway",
"quota": 100,
"used": 13
},
{
"type": "vpn_connection",
"quota": 5000,
"used": 306
},
{
"type": "vpn_gateway",
"quota": 50,
"used": 23
}
]
},
"request_id": "9aeb7f73-e1b6-42eb-96ad-b68aef8186e3"
}</pre>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_section31981619"><h4 class="sectiontitle">Status Codes</h4><p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p1289319224439">For details, see <a href="vpn_api_0052.html#EN-US_TOPIC_0000001807370508">Status Codes</a>.</p>
<p id="EN-US_TOPIC_0000001807370484__en-us_topic_0000001543513468_p16930616124411"></p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="vpn_api_0037.html">Quota</a></div>
</div>
</div>