forked from docs/doc-exports
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>
206 lines
16 KiB
HTML
206 lines
16 KiB
HTML
<a name="vpc_subnetpools_0003"></a><a name="vpc_subnetpools_0003"></a>
|
|
|
|
<h1 class="topictitle1">Querying a Subnet Pool</h1>
|
|
<div id="body1515565658182"><div class="section" id="vpc_subnetpools_0003__section17487184"><h4 class="sectiontitle">Function</h4><p id="vpc_subnetpools_0003__p51221589">This API is used to query details about the specific subnet pool.</p>
|
|
</div>
|
|
<div class="section" id="vpc_subnetpools_0003__section23166934"><h4 class="sectiontitle">URI</h4><p id="vpc_subnetpools_0003__p9372185302814">GET /v2.0/subnetpools/{subnetpool_id}</p>
|
|
</div>
|
|
<div class="section" id="vpc_subnetpools_0003__section64582388"><h4 class="sectiontitle">Request Message</h4><p id="vpc_subnetpools_0003__p34978441">None</p>
|
|
</div>
|
|
<div class="section" id="vpc_subnetpools_0003__section44370581"><h4 class="sectiontitle">Response Message</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnetpools_0003__table14681450" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Response parameter</caption><thead align="left"><tr id="vpc_subnetpools_0003__row21069217"><th align="left" class="cellrowborder" valign="top" width="23.169999999999998%" id="mcps1.3.4.2.2.4.1.1"><p id="vpc_subnetpools_0003__p28885026">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25.61%" id="mcps1.3.4.2.2.4.1.2"><p id="vpc_subnetpools_0003__p57985771">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="51.22%" id="mcps1.3.4.2.2.4.1.3"><p id="vpc_subnetpools_0003__p4499576">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_subnetpools_0003__row28921355"><td class="cellrowborder" valign="top" width="23.169999999999998%" headers="mcps1.3.4.2.2.4.1.1 "><p id="vpc_subnetpools_0003__p60928390">subnetpool</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25.61%" headers="mcps1.3.4.2.2.4.1.2 "><p id="vpc_subnetpools_0003__p36252562"><a href="#vpc_subnetpools_0003__table149662441462">subnetpool </a>object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51.22%" headers="mcps1.3.4.2.2.4.1.3 "><p id="vpc_subnetpools_0003__p19248251">Specifies the subnet pool list. For details, see <a href="#vpc_subnetpools_0003__table149662441462">Table 2</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="vpc_subnetpools_0003__table149662441462"></a><a name="table149662441462"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnetpools_0003__table149662441462" frame="border" border="1" rules="all"><caption><b>Table 2 </b><strong id="vpc_subnetpools_0003__b8818550329">subnetpool</strong> objects</caption><thead align="left"><tr id="vpc_subnetpools_0003__row496617442612"><th align="left" class="cellrowborder" valign="top" width="28.29%" id="mcps1.3.4.3.2.4.1.1"><p id="vpc_subnetpools_0003__p1596613445611"><strong id="vpc_subnetpools_0003__b15585693214">Attribute</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="28.29%" id="mcps1.3.4.3.2.4.1.2"><p id="vpc_subnetpools_0003__p49667449616"><strong id="vpc_subnetpools_0003__b988095615324">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="43.419999999999995%" id="mcps1.3.4.3.2.4.1.3"><p id="vpc_subnetpools_0003__p8966144413616"><strong id="vpc_subnetpools_0003__b196172057143218">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_subnetpools_0003__row28303131105515"><td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnetpools_0003__p2014344105614">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnetpools_0003__p28944191105614">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnetpools_0003__p53796361105614">Specifies the subnet pool ID.</p>
|
|
<p id="vpc_subnetpools_0003__p1089535311426">This parameter is not mandatory when you query subnet pools.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnetpools_0003__row1196634410618"><td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnetpools_0003__p696615445611">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnetpools_0003__p3966104412620">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnetpools_0003__p89666442613">Specifies the subnet pool name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnetpools_0003__row9772661105515"><td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnetpools_0003__p49939441105624">ip_version</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnetpools_0003__p18562940105624">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnetpools_0003__p682749310257">Specifies the IP address version.</p>
|
|
<p id="vpc_subnetpools_0003__p33352482102727">The value can be <strong id="vpc_subnetpools_0003__b17238571084">4</strong> (IPv4) or <strong id="vpc_subnetpools_0003__b1023847285">6</strong> (IPv6).</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnetpools_0003__row89665441569"><td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnetpools_0003__p79664442613">default_quota</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnetpools_0003__p496616449616">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnetpools_0003__p7968244361">Specifies the upper limit of the prefix space that can be allocated from the subnet pool to the subnet. For IPv4 subnet pools, <strong id="vpc_subnetpools_0003__b83781311164611">default_quota</strong> is measured in units of /32. For IPv6 subnet pools, <strong id="vpc_subnetpools_0003__b1437914118467">default_quota</strong> is measured in units of /64.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnetpools_0003__row157121839115912"><td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnetpools_0003__p870051413911">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnetpools_0003__p15700614790">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnetpools_0003__p10487112">Specifies the project ID. </p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnetpools_0003__row2067783695917"><td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnetpools_0003__p11508184345913">created_at</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnetpools_0003__p1651534311599">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnetpools_0003__p552334314592">Specifies the time (UTC) when the subnet pool is created.</p>
|
|
<p id="vpc_subnetpools_0003__p65980291419">Format: <em id="vpc_subnetpools_0003__i155061842103312">yyyy-MM-ddTHH:mm:ss</em></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnetpools_0003__row1428916334597"><td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnetpools_0003__p15531114325914">updated_at</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnetpools_0003__p853513432597">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnetpools_0003__p1954364325913">Specifies the time (UTC) when the subnet pool rule is updated.</p>
|
|
<p id="vpc_subnetpools_0003__p1031451281813">Format: <em id="vpc_subnetpools_0003__i171939504334">yyyy-MM-ddTHH:mm:ss</em></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnetpools_0003__row1796820448610"><td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnetpools_0003__p296834417616">prefixes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnetpools_0003__p209681244961">Array of strings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnetpools_0003__p1496884418618">Specifies a list of subnet prefixes that are assigned to the subnet pool. The adjacent prefixes are merged and treated as a single prefix. Each subnet prefix must be unique.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnetpools_0003__row14968744267"><td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnetpools_0003__p199681944763">min_prefixlen</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnetpools_0003__p49682044566">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnetpools_0003__p397084410616">Specifies the minimum number for the prefix of a subnet that can be allocated from the subnet pool. The minimum number for the prefix of an IPv4 subnet is <strong id="vpc_subnetpools_0003__b592202311466">8</strong>, and that of an IPv6 subnet is <strong id="vpc_subnetpools_0003__b6938236461">64</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnetpools_0003__row22360302105653"><td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnetpools_0003__p1404384110577">address_scope_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnetpools_0003__p930111615640">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnetpools_0003__p2924364410577">Specifies the ID of the address range allocated to the subnet pool.</p>
|
|
<p id="vpc_subnetpools_0003__p62544866102532">Only the administrator can specify this attribute.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnetpools_0003__row1597013444615"><td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnetpools_0003__p19970184415616">shared</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnetpools_0003__p597044417614">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnetpools_0003__p159708444612">Specifies whether the network can be shared to all projects. </p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnetpools_0003__row99704441966"><td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnetpools_0003__p3970744162">tenant_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnetpools_0003__p597014415620">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnetpools_0003__p51861911193217">Specifies the project ID. </p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnetpools_0003__row139702441463"><td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnetpools_0003__p4970154418614">default_prefixlen</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnetpools_0003__p397018441063">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnetpools_0003__p3970044567">Specifies the default prefix to be allocated to a subnet if the <strong id="vpc_subnetpools_0003__b872282316182">cidr</strong> or <strong id="vpc_subnetpools_0003__b1972892361818">prefixlen</strong> is not specified when you create the subnet. The default value is <strong id="vpc_subnetpools_0003__b524943011812">8</strong> for an IPv4 subnet and <strong id="vpc_subnetpools_0003__b18249163081812">64</strong> for an IPv6 subnet.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnetpools_0003__row197118445620"><td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnetpools_0003__p1297110441967">max_prefixlen</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnetpools_0003__p697184412610">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnetpools_0003__p497164414613">Specifies the maximum number for the prefix of a subnet that can be allocated from the subnet pool. The maximum number for the prefix of an IPv4 subnet is <strong id="vpc_subnetpools_0003__b77961037144615">32</strong>, and that of an IPv6 subnet is <strong id="vpc_subnetpools_0003__b188023372466">128</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnetpools_0003__row1597174413610"><td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnetpools_0003__p397114441268">description</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnetpools_0003__p5971104410613">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnetpools_0003__p097164411616">Provides supplementary information about the subnet pool.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnetpools_0003__row129712441610"><td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnetpools_0003__p1971174417613">is_default</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnetpools_0003__p1597254413618">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnetpools_0003__p17972114418620">Specifies whether this is the default subnet pool.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnetpools_0003__row1241441316596"><td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnetpools_0003__p6578142025814">tags</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.29%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnetpools_0003__p1847018315584">Array of strings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnetpools_0003__p10578120125815">Specifies the tags.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="vpc_subnetpools_0003__section63790914"><h4 class="sectiontitle">Example:</h4><p id="vpc_subnetpools_0003__p18792203662916">Example request</p>
|
|
<pre class="screen" id="vpc_subnetpools_0003__screen15604521">GET https://{Endpoint}/v2.0/subnetpools/03f761e6-eee0-43fc-a921-8acf64c14988</pre>
|
|
</div>
|
|
<div class="section" id="vpc_subnetpools_0003__section5622282111547"><h4 class="sectiontitle">Response</h4><p id="vpc_subnetpools_0003__p6201942182917">Example response</p>
|
|
<pre class="screen" id="vpc_subnetpools_0003__screen6087102615397">{
|
|
"subnetpool": {
|
|
"min_prefixlen": 64,
|
|
"address_scope_id": null,
|
|
"default_prefixlen": 64,
|
|
"id": "03f761e6-eee0-43fc-a921-8acf64c14988",
|
|
"max_prefixlen": 64,
|
|
"name": "my-subnet-pool",
|
|
"default_quota": null,
|
|
"is_default": false,
|
|
"project_id": "9fadcee8aa7c40cdb2114fff7d569c08",
|
|
"tenant_id": "9fadcee8aa7c40cdb2114fff7d569c08",
|
|
"created_at": "2016-03-08T20:19:41",
|
|
"prefixes": [
|
|
"2001:db8:0:2::/64",
|
|
"2001:db8::/63"
|
|
],
|
|
"updated_at": "2016-03-08T20:19:41",
|
|
"ip_version": 6,
|
|
"shared": false,
|
|
"description": "",
|
|
"tags": []
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="vpc_subnetpools_0003__section10470352390"><h4 class="sectiontitle">Status Code</h4><p id="vpc_subnetpools_0003__p18112112662914">See <a href="vpc_api_0002.html">Status Codes</a>.</p>
|
|
</div>
|
|
<div class="section" id="vpc_subnetpools_0003__section85821649202813"><h4 class="sectiontitle">Error Code</h4><p id="vpc_subnetpools_0003__p7233105282813">See <a href="vpc_api_0003.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="vpc_subnetpools_0000.html">Subnet Pool</a></div>
|
|
</div>
|
|
</div>
|
|
|