doc-exports/docs/vpcep/api-ref/vpcep_06_0401.html
Qin Ying, Fan ef5d2cd3cf VPCEP API 20230307 version
Reviewed-by: Sarda, Priya <prsarda@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: Qin Ying, Fan <fanqinying@huawei.com>
Co-committed-by: Qin Ying, Fan <fanqinying@huawei.com>
2023-06-14 11:56:35 +00:00

158 lines
13 KiB
HTML

<a name="vpcep_06_0401"></a><a name="vpcep_06_0401"></a>
<h1 class="topictitle1">Querying the Quota</h1>
<div id="body1543043225601"><div class="section" id="vpcep_06_0401__section547312521673"><h4 class="sectiontitle">Function</h4><p id="vpcep_06_0401__p146536521276">This API is used to query the quota of your resources, including VPC endpoint services and VPC endpoints.</p>
</div>
<div class="section" id="vpcep_06_0401__section1347915523719"><h4 class="sectiontitle">URI</h4><p id="vpcep_06_0401__p1965417521579">GET /v1/{project_id}/quotas?type={resource_type}</p>
<div class="msonormal" id="vpcep_06_0401__p624413203159"><a href="#vpcep_06_0401__table1148411527716">Table 1</a> describes the parameter in this URI.
<div class="tablenoborder"><a name="vpcep_06_0401__table1148411527716"></a><a name="table1148411527716"></a><table cellpadding="4" cellspacing="0" summary="" id="vpcep_06_0401__table1148411527716" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameter</caption><thead align="left"><tr id="vpcep_06_0401__row106548523719"><th align="left" class="cellrowborder" valign="top" width="32.65%" id="mcps1.3.2.3.2.2.4.1.1"><p id="vpcep_06_0401__p136545529718"><strong id="vpcep_06_0401__b108861620114">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="26.529999999999998%" id="mcps1.3.2.3.2.2.4.1.2"><p id="vpcep_06_0401__p06542521472"><strong id="vpcep_06_0401__b1544441416111">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40.82%" id="mcps1.3.2.3.2.2.4.1.3"><p id="vpcep_06_0401__p116545521373"><strong id="vpcep_06_0401__b7342115131116">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpcep_06_0401__row1765475213713"><td class="cellrowborder" valign="top" width="32.65%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="vpcep_06_0401__p12654552071">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="26.529999999999998%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="vpcep_06_0401__p126547522077">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="40.82%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="vpcep_06_0401__p1865418520717">Specifies the project ID. For details about how to obtain the project ID, see <a href="vpcep_08_0003.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="tablenoborder"><a name="vpcep_06_0401__table5505175211710"></a><a name="table5505175211710"></a><table cellpadding="4" cellspacing="0" summary="" id="vpcep_06_0401__table5505175211710" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Query parameter</caption><thead align="left"><tr id="vpcep_06_0401__row1665510521073"><th align="left" class="cellrowborder" valign="top" width="24%" id="mcps1.3.2.4.2.5.1.1"><p id="vpcep_06_0401__p196553528716"><strong id="vpcep_06_0401__b84841522161119">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18%" id="mcps1.3.2.4.2.5.1.2"><p id="vpcep_06_0401__p565513525720"><strong id="vpcep_06_0401__b1671737566">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13%" id="mcps1.3.2.4.2.5.1.3"><p id="vpcep_06_0401__p1565535214710"><strong id="vpcep_06_0401__b366412469114">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="45%" id="mcps1.3.2.4.2.5.1.4"><p id="vpcep_06_0401__p14655165220712"><strong id="vpcep_06_0401__b1224556604">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpcep_06_0401__row765515219718"><td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.2.4.2.5.1.1 "><p id="vpcep_06_0401__p136557522711">type</p>
</td>
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.2.4.2.5.1.2 "><p id="vpcep_06_0401__p1865517522716">No</p>
</td>
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.2.4.2.5.1.3 "><p id="vpcep_06_0401__p0655115210718">String</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.2.4.2.5.1.4 "><p id="vpcep_06_0401__p32561544163216">Specifies the resource type.</p>
<ul id="vpcep_06_0401__ul17816144515482"><li id="vpcep_06_0401__li14816184504820"><strong id="vpcep_06_0401__b395219817292">endpoint_service</strong>: indicates the VPC endpoint service.</li><li id="vpcep_06_0401__li08161045124818"><strong id="vpcep_06_0401__b20678830113112">endpoint</strong>: indicates the VPC endpoint.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="vpcep_06_0401__section104962522074"><h4 class="sectiontitle">Request</h4><ul id="vpcep_06_0401__ul9654185210712"><li id="vpcep_06_0401__li196555523711"><a name="vpcep_06_0401__li196555523711"></a><a name="li196555523711"></a>Parameter description<p id="vpcep_06_0401__p1796895613317"><a name="vpcep_06_0401__li196555523711"></a><a name="li196555523711"></a>None</p>
</li><li id="vpcep_06_0401__li1458463664317">Example request<p id="vpcep_06_0401__p1229974341111"><a name="vpcep_06_0401__li1458463664317"></a><a name="li1458463664317"></a>This request is to query the quota of VPC endpoint services.</p>
<pre class="codeblock" id="vpcep_06_0401__codeblock114917585114">GET https://{endpoint}/v1/{project_id}/quotas?type=endpoint_service</pre>
</li></ul>
</div>
<div class="section" id="vpcep_06_0401__section115113521171"><h4 class="sectiontitle">Response</h4><ul id="vpcep_06_0401__ul1265618521976"><li id="vpcep_06_0401__li1165619521476">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpcep_06_0401__en-us_topic_0130978821_table62266580" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response parameter</caption><thead align="left"><tr id="vpcep_06_0401__en-us_topic_0130978821_row18576134"><th align="left" class="cellrowborder" valign="top" width="24.242424242424242%" id="mcps1.3.4.2.1.1.2.4.1.1"><p id="vpcep_06_0401__en-us_topic_0130978821_p28271860"><strong id="vpcep_06_0401__b79351534181412">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="22.042204220422043%" id="mcps1.3.4.2.1.1.2.4.1.2"><p id="vpcep_06_0401__en-us_topic_0130978821_p8319290"><strong id="vpcep_06_0401__b3616184815332">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53.71537153715372%" id="mcps1.3.4.2.1.1.2.4.1.3"><p id="vpcep_06_0401__en-us_topic_0130978821_p2773889"><strong id="vpcep_06_0401__b446933517136">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpcep_06_0401__en-us_topic_0130978821_row23358448"><td class="cellrowborder" valign="top" width="24.242424242424242%" headers="mcps1.3.4.2.1.1.2.4.1.1 "><p id="vpcep_06_0401__p6963371876">quotas</p>
</td>
<td class="cellrowborder" valign="top" width="22.042204220422043%" headers="mcps1.3.4.2.1.1.2.4.1.2 "><p id="vpcep_06_0401__p155105916445">Object</p>
</td>
<td class="cellrowborder" valign="top" width="53.71537153715372%" headers="mcps1.3.4.2.1.1.2.4.1.3 "><p id="vpcep_06_0401__p144861542444">Specifies quota details. For details, see <a href="#vpcep_06_0401__table862171544417">Table 4</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpcep_06_0401__table862171544417"></a><a name="table862171544417"></a><table cellpadding="4" cellspacing="0" summary="" id="vpcep_06_0401__table862171544417" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Quotas parameter</caption><thead align="left"><tr id="vpcep_06_0401__row166213152440"><th align="left" class="cellrowborder" valign="top" width="24.29%" id="mcps1.3.4.2.1.2.2.4.1.1"><p id="vpcep_06_0401__p9612150445"><strong id="vpcep_06_0401__b12368161453414">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="22.259999999999998%" id="mcps1.3.4.2.1.2.2.4.1.2"><p id="vpcep_06_0401__p9611315194419"><strong id="vpcep_06_0401__b1943030757">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53.449999999999996%" id="mcps1.3.4.2.1.2.2.4.1.3"><p id="vpcep_06_0401__p1962151512445"><strong id="vpcep_06_0401__b1244608479">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpcep_06_0401__row4621115144412"><td class="cellrowborder" valign="top" width="24.29%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="vpcep_06_0401__p15621015164415">resources</p>
</td>
<td class="cellrowborder" valign="top" width="22.259999999999998%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="vpcep_06_0401__p19621315194411">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="53.449999999999996%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="vpcep_06_0401__p1620155448">Lists the resources. For details, see <a href="#vpcep_06_0401__table1170141514413">Table 5</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpcep_06_0401__table1170141514413"></a><a name="table1170141514413"></a><table cellpadding="4" cellspacing="0" summary="" id="vpcep_06_0401__table1170141514413" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Resource parameters</caption><thead align="left"><tr id="vpcep_06_0401__row11691153447"><th align="left" class="cellrowborder" valign="top" width="24.387561243875613%" id="mcps1.3.4.2.1.3.2.4.1.1"><p id="vpcep_06_0401__p1162115184419"><strong id="vpcep_06_0401__b1361633673414">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="22.187781221877813%" id="mcps1.3.4.2.1.3.2.4.1.2"><p id="vpcep_06_0401__p136241520441"><strong id="vpcep_06_0401__b584351621">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53.42465753424658%" id="mcps1.3.4.2.1.3.2.4.1.3"><p id="vpcep_06_0401__p106919154440"><strong id="vpcep_06_0401__b1018470856">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpcep_06_0401__row107041515449"><td class="cellrowborder" valign="top" width="24.387561243875613%" headers="mcps1.3.4.2.1.3.2.4.1.1 "><p id="vpcep_06_0401__p1969915164416">type</p>
</td>
<td class="cellrowborder" valign="top" width="22.187781221877813%" headers="mcps1.3.4.2.1.3.2.4.1.2 "><p id="vpcep_06_0401__p1770121584417">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.42465753424658%" headers="mcps1.3.4.2.1.3.2.4.1.3 "><p id="vpcep_06_0401__p1870191515441">Specifies the resource type. You can query the quota of resources of a specified type by configuring this parameter.</p>
<ul id="vpcep_06_0401__ul157041517444"><li id="vpcep_06_0401__li27001516446"><strong id="vpcep_06_0401__b3630122113520">endpoint_service</strong>: indicates the VPC endpoint service.</li><li id="vpcep_06_0401__li187041554414"><strong id="vpcep_06_0401__b177410244356">endpoint</strong>: indicates the VPC endpoint.</li></ul>
</td>
</tr>
<tr id="vpcep_06_0401__row8701815124418"><td class="cellrowborder" valign="top" width="24.387561243875613%" headers="mcps1.3.4.2.1.3.2.4.1.1 "><p id="vpcep_06_0401__p19704157441">used</p>
</td>
<td class="cellrowborder" valign="top" width="22.187781221877813%" headers="mcps1.3.4.2.1.3.2.4.1.2 "><p id="vpcep_06_0401__p070191524412">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="53.42465753424658%" headers="mcps1.3.4.2.1.3.2.4.1.3 "><p id="vpcep_06_0401__p157016155448">Specifies the number of created resources.</p>
<p id="vpcep_06_0401__p167091564419">The value ranges from <strong id="vpcep_06_0401__b1407708997192551">0</strong> to the value of <strong id="vpcep_06_0401__b637466560192551">quota</strong>.</p>
</td>
</tr>
<tr id="vpcep_06_0401__row370101512448"><td class="cellrowborder" valign="top" width="24.387561243875613%" headers="mcps1.3.4.2.1.3.2.4.1.1 "><p id="vpcep_06_0401__p1470111594414">quota</p>
</td>
<td class="cellrowborder" valign="top" width="22.187781221877813%" headers="mcps1.3.4.2.1.3.2.4.1.2 "><p id="vpcep_06_0401__p8704154444">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="53.42465753424658%" headers="mcps1.3.4.2.1.3.2.4.1.3 "><p id="vpcep_06_0401__p117041510446">Specifies the maximum quota of resources.</p>
<p id="vpcep_06_0401__p147012155448">The value ranges from the default quota value to the maximum quota value.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="vpcep_06_0401__li965775211719">Example response<pre class="screen" id="vpcep_06_0401__screen3951113918817">{
"quotas":{
"resources":[
{
"type":"<em id="vpcep_06_0401__i7709134410247">endpoint</em>",
"used":<em id="vpcep_06_0401__i859314702414">4</em>,
"quota":<em id="vpcep_06_0401__i15976144942413">150</em>
},
{
"type":"<em id="vpcep_06_0401__i11260205412411">endpoint_service</em>",
"used":<em id="vpcep_06_0401__i143612082516">10</em>,
"quota": <em id="vpcep_06_0401__i1983163112514">100</em>
}
]
}
}</pre>
</li></ul>
</div>
<div class="section" id="vpcep_06_0401__section135401523718"><h4 class="sectiontitle">Status Codes</h4><p id="vpcep_06_0401__p265775218714">See <a href="vpcep_08_0001.html">Status Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="vpcep_06_0400.html">Resource Quota</a></div>
</div>
</div>