Files
doc-exports/docs/vpc/api-ref/vpc_subnet01_0003.html
fanqinying 05458809ab VPC API 20250121 version
Reviewed-by: Szirovicza Gergő <a94652429@noreply.gitea.eco.tsi-dev.otc-service.com>
Reviewed-by: Sarda, Priya <prsarda@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: fanqinying <fanqinying@huawei.com>
Co-committed-by: fanqinying <fanqinying@huawei.com>
2025-09-11 14:33:55 +00:00

374 lines
33 KiB
HTML

<a name="vpc_subnet01_0003"></a><a name="vpc_subnet01_0003"></a>
<h1 class="topictitle1">Querying Subnets</h1>
<div id="body2854726"><div class="section" id="vpc_subnet01_0003__section49967061"><h4 class="sectiontitle">Function</h4><p id="vpc_subnet01_0003__p29906272">This API is used to query subnets using search criteria and to display the subnets in a list.</p>
</div>
<div class="section" id="vpc_subnet01_0003__section47050372"><h4 class="sectiontitle">URI</h4><p id="vpc_subnet01_0003__p11347535134915">GET /v1/{project_id}/subnets</p>
<div class="p" id="vpc_subnet01_0003__p1161213844918">Example:<pre class="screen" id="vpc_subnet01_0003__screen32273037144016">GET https://{Endpoint}/v1/{project_id}/subnets?limit=10&amp;marker=4779ab1c-7c1a-44b1-a02e-93dfc361b32d&amp;vpc_id=3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85</pre>
</div>
<div class="p" id="vpc_subnet01_0003__p24474419496"><a href="#vpc_subnet01_0003__table42526340">Table 1</a> describes the parameters.
<div class="tablenoborder"><a name="vpc_subnet01_0003__table42526340"></a><a name="table42526340"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet01_0003__table42526340" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="vpc_subnet01_0003__row55636561"><th align="left" class="cellrowborder" valign="top" width="20.11201120112011%" id="mcps1.3.2.4.2.2.5.1.1"><p id="vpc_subnet01_0003__p10267631">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.04180418041804%" id="mcps1.3.2.4.2.2.5.1.2"><p id="vpc_subnet01_0003__p26371793">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.72137213721372%" id="mcps1.3.2.4.2.2.5.1.3"><p id="vpc_subnet01_0003__p6814361175820">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="48.12481248124813%" id="mcps1.3.2.4.2.2.5.1.4"><p id="vpc_subnet01_0003__p55740512">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_subnet01_0003__row18687619"><td class="cellrowborder" valign="top" width="20.11201120112011%" headers="mcps1.3.2.4.2.2.5.1.1 "><p id="vpc_subnet01_0003__p37302179">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="18.04180418041804%" headers="mcps1.3.2.4.2.2.5.1.2 "><p id="vpc_subnet01_0003__p1577639">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="13.72137213721372%" headers="mcps1.3.2.4.2.2.5.1.3 "><p id="vpc_subnet01_0003__p15092369175820">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.12481248124813%" headers="mcps1.3.2.4.2.2.5.1.4 "><p id="vpc_subnet01_0003__p10487112">Specifies the project ID. </p>
</td>
</tr>
<tr id="vpc_subnet01_0003__row9248440"><td class="cellrowborder" valign="top" width="20.11201120112011%" headers="mcps1.3.2.4.2.2.5.1.1 "><p id="vpc_subnet01_0003__p10926182">marker</p>
</td>
<td class="cellrowborder" valign="top" width="18.04180418041804%" headers="mcps1.3.2.4.2.2.5.1.2 "><p id="vpc_subnet01_0003__p12605589">No</p>
</td>
<td class="cellrowborder" valign="top" width="13.72137213721372%" headers="mcps1.3.2.4.2.2.5.1.3 "><p id="vpc_subnet01_0003__p14522390175820">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.12481248124813%" headers="mcps1.3.2.4.2.2.5.1.4 "><p id="vpc_subnet01_0003__p28526205175853">Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID.</p>
<p id="vpc_subnet01_0003__p538818488578">This parameter can work together with the parameter <strong id="vpc_subnet01_0003__vpc_api01_0003_b650614119446">limit</strong>.</p>
<ul id="vpc_subnet01_0003__ul12704811125810"><li id="vpc_subnet01_0003__vpc_api01_0003_li325418407124">If parameters <strong id="vpc_subnet01_0003__vpc_api01_0003_b736582413514">marker</strong> and <strong id="vpc_subnet01_0003__vpc_api01_0003_b17435293518">limit</strong> are not passed, resource records on the first page will be returned.</li><li id="vpc_subnet01_0003__vpc_api01_0003_li1923817171338">If the parameter <strong id="vpc_subnet01_0003__vpc_api01_0003_b1505159195414">marker</strong> is not passed and the value of parameter <strong id="vpc_subnet01_0003__vpc_api01_0003_b14146122925417">limit</strong> is set to <strong id="vpc_subnet01_0003__vpc_api01_0003_b13594516546">10</strong>, the first 10 resource records will be returned.</li><li id="vpc_subnet01_0003__vpc_api01_0003_li2076741203417">If the value of the parameter <strong id="vpc_subnet01_0003__vpc_api01_0003_b13589356163415">marker</strong> is set to the resource ID of the 10th record and the value of parameter <strong id="vpc_subnet01_0003__vpc_api01_0003_b1557415118357">limit</strong> is set to <strong id="vpc_subnet01_0003__vpc_api01_0003_b10574171193511">10</strong>, the 11th to 20th resource records will be returned.</li><li id="vpc_subnet01_0003__vpc_api01_0003_li108512113551">If the value of the parameter <strong id="vpc_subnet01_0003__vpc_api01_0003_b9403193716543">marker</strong> is set to the resource ID of the 10th record and the parameter <strong id="vpc_subnet01_0003__vpc_api01_0003_b10358823165519">limit</strong> is not passed, 11th to 2,000th resource records will be returned. The default value of <strong id="vpc_subnet01_0003__vpc_api01_0003_b112010101639">limit</strong> is <strong id="vpc_subnet01_0003__vpc_api01_0003_b206061121438">2000</strong>.</li></ul>
</td>
</tr>
<tr id="vpc_subnet01_0003__row43066942"><td class="cellrowborder" valign="top" width="20.11201120112011%" headers="mcps1.3.2.4.2.2.5.1.1 "><p id="vpc_subnet01_0003__p65870306">limit</p>
</td>
<td class="cellrowborder" valign="top" width="18.04180418041804%" headers="mcps1.3.2.4.2.2.5.1.2 "><p id="vpc_subnet01_0003__p33894570">No</p>
</td>
<td class="cellrowborder" valign="top" width="13.72137213721372%" headers="mcps1.3.2.4.2.2.5.1.3 "><p id="vpc_subnet01_0003__p35462927175820">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="48.12481248124813%" headers="mcps1.3.2.4.2.2.5.1.4 "><p id="vpc_subnet01_0003__p2017153116589">Specifies the number of records that will be returned on each page. The value is from 0 to intmax (2^31-1). The default value is 2000.</p>
<p id="vpc_subnet01_0003__p125192338584"><strong id="vpc_subnet01_0003__vpc_api01_0003_b7164124258">limit</strong> can be used together with <strong id="vpc_subnet01_0003__vpc_api01_0003_b15985310854">marker</strong>. For details, see the parameter description of <strong id="vpc_subnet01_0003__vpc_api01_0003_b193281854847">marker</strong>.</p>
</td>
</tr>
<tr id="vpc_subnet01_0003__row4071301142654"><td class="cellrowborder" valign="top" width="20.11201120112011%" headers="mcps1.3.2.4.2.2.5.1.1 "><p id="vpc_subnet01_0003__p61339955142654">vpc_id</p>
</td>
<td class="cellrowborder" valign="top" width="18.04180418041804%" headers="mcps1.3.2.4.2.2.5.1.2 "><p id="vpc_subnet01_0003__p2480462142654">No</p>
</td>
<td class="cellrowborder" valign="top" width="13.72137213721372%" headers="mcps1.3.2.4.2.2.5.1.3 "><p id="vpc_subnet01_0003__p66699709142654">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.12481248124813%" headers="mcps1.3.2.4.2.2.5.1.4 "><p id="vpc_subnet01_0003__p2678389014283">Specifies the VPC ID that is used to query subnets.</p>
<p id="vpc_subnet01_0003__p13743141181413">This field is mandatory for the fine-grained authorization by enterprise project.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="vpc_subnet01_0003__section20800170"><h4 class="sectiontitle">Request Parameters</h4><p id="vpc_subnet01_0003__p51540969203856">None</p>
</div>
<div class="section" id="vpc_subnet01_0003__section888512391059"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="vpc_subnet01_0003__screen5812133564510">GET https://{Endpoint}/v1/{project_id}/subnets</pre>
</div>
<div class="section" id="vpc_subnet01_0003__section52983808"><h4 class="sectiontitle">Response Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet01_0003__table162269121588" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameter</caption><thead align="left"><tr id="vpc_subnet01_0003__row95582811588"><th align="left" class="cellrowborder" valign="top" width="18.34%" id="mcps1.3.5.2.2.4.1.1"><p id="vpc_subnet01_0003__p360232861588">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="22.15%" id="mcps1.3.5.2.2.4.1.2"><p id="vpc_subnet01_0003__p584710571588">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="59.51%" id="mcps1.3.5.2.2.4.1.3"><p id="vpc_subnet01_0003__p385351831588">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_subnet01_0003__row343421581588"><td class="cellrowborder" valign="top" width="18.34%" headers="mcps1.3.5.2.2.4.1.1 "><p id="vpc_subnet01_0003__p302514461588">subnets</p>
</td>
<td class="cellrowborder" valign="top" width="22.15%" headers="mcps1.3.5.2.2.4.1.2 "><p id="vpc_subnet01_0003__p26395826172022">Array of <a href="#vpc_subnet01_0003__table946390317596">subnet</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="59.51%" headers="mcps1.3.5.2.2.4.1.3 "><p id="vpc_subnet01_0003__p530125231588">Specifies the subnet objects.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpc_subnet01_0003__table946390317596"></a><a name="table946390317596"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet01_0003__table946390317596" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="vpc_subnet01_0003__b3558758143713">subnet</strong> objects</caption><thead align="left"><tr id="vpc_subnet01_0003__row2260217717596"><th align="left" class="cellrowborder" valign="top" width="29.017098290170978%" id="mcps1.3.5.3.2.4.1.1"><p id="vpc_subnet01_0003__p1883706917596">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.6983301669833%" id="mcps1.3.5.3.2.4.1.2"><p id="vpc_subnet01_0003__p4259704317596">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="54.284571542845704%" id="mcps1.3.5.3.2.4.1.3"><p id="vpc_subnet01_0003__p2780847717596">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_subnet01_0003__row3789415517596"><td class="cellrowborder" valign="top" width="29.017098290170978%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0003__p4952771817596">id</p>
</td>
<td class="cellrowborder" valign="top" width="16.6983301669833%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0003__p1023955317596">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.284571542845704%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0003__p2409742517596">Specifies a resource ID in UUID format.</p>
</td>
</tr>
<tr id="vpc_subnet01_0003__row1555023417596"><td class="cellrowborder" valign="top" width="29.017098290170978%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0003__p5160943617596">name</p>
</td>
<td class="cellrowborder" valign="top" width="16.6983301669833%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0003__p4529288117596">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.284571542845704%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_subnet01_0003__ul23311559134110"><li id="vpc_subnet01_0003__li10331195974115">Specifies the subnet name.</li><li id="vpc_subnet01_0003__li13332135944118">The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.).</li></ul>
</td>
</tr>
<tr id="vpc_subnet01_0003__row6838204320315"><td class="cellrowborder" valign="top" width="29.017098290170978%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0003__p541524553114">description</p>
</td>
<td class="cellrowborder" valign="top" width="16.6983301669833%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0003__p0415745133114">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.284571542845704%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_subnet01_0003__ul237215542179"><li id="vpc_subnet01_0003__li19372754181713">Provides supplementary information about the subnet.</li><li id="vpc_subnet01_0003__li13372125412173">The value can contain no more than 255 characters and cannot contain angle brackets (&lt; or &gt;).</li></ul>
</td>
</tr>
<tr id="vpc_subnet01_0003__row94962917596"><td class="cellrowborder" valign="top" width="29.017098290170978%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0003__p981112017596">cidr</p>
</td>
<td class="cellrowborder" valign="top" width="16.6983301669833%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0003__p1336165217596">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.284571542845704%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0003__p855202117596">Specifies the subnet CIDR block.</p>
</td>
</tr>
<tr id="vpc_subnet01_0003__row985932517596"><td class="cellrowborder" valign="top" width="29.017098290170978%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0003__p6040786717596">gateway_ip</p>
</td>
<td class="cellrowborder" valign="top" width="16.6983301669833%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0003__p5817993817596">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.284571542845704%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0003__p1495452217596">Specifies the subnet gateway address.</p>
</td>
</tr>
<tr id="vpc_subnet01_0003__row01329409323"><td class="cellrowborder" valign="top" width="29.017098290170978%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0003__p10179154219327">ipv6_enable</p>
</td>
<td class="cellrowborder" valign="top" width="16.6983301669833%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0003__p717914219329">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="54.284571542845704%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0003__p161791642143214">Specifies whether IPv6 is enabled.</p>
</td>
</tr>
<tr id="vpc_subnet01_0003__row1084973618322"><td class="cellrowborder" valign="top" width="29.017098290170978%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0003__p14179204233219">cidr_v6</p>
</td>
<td class="cellrowborder" valign="top" width="16.6983301669833%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0003__p1180742173214">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.284571542845704%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0003__p1574118123311">Specifies the IPv6 subnet CIDR block. If the subnet is an IPv4 subnet, this parameter is not returned.</p>
</td>
</tr>
<tr id="vpc_subnet01_0003__row16727133373216"><td class="cellrowborder" valign="top" width="29.017098290170978%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0003__p13180164273217">gateway_ip_v6</p>
</td>
<td class="cellrowborder" valign="top" width="16.6983301669833%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0003__p15180174283216">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.284571542845704%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0003__p674114112337">Specifies the IPv6 subnet gateway address. If the subnet is an IPv4 subnet, this parameter is not returned.</p>
</td>
</tr>
<tr id="vpc_subnet01_0003__row37297117596"><td class="cellrowborder" valign="top" width="29.017098290170978%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0003__p3021071917596">dhcp_enable</p>
</td>
<td class="cellrowborder" valign="top" width="16.6983301669833%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0003__p4005526017596">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="54.284571542845704%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0003__p2325061317596">Specifies whether the DHCP function is enabled for the subnet.</p>
</td>
</tr>
<tr id="vpc_subnet01_0003__row792892917596"><td class="cellrowborder" valign="top" width="29.017098290170978%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0003__p3826349217596">primary_dns</p>
</td>
<td class="cellrowborder" valign="top" width="16.6983301669833%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0003__p5962058717596">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.284571542845704%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0003__p6453823917596">Specifies the primary IP address of DNS server on the subnet.</p>
</td>
</tr>
<tr id="vpc_subnet01_0003__row4397324617596"><td class="cellrowborder" valign="top" width="29.017098290170978%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0003__p506319417596">secondary_dns</p>
</td>
<td class="cellrowborder" valign="top" width="16.6983301669833%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0003__p73411217596">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.284571542845704%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0003__p5946313017596">Specifies the standby IP address of DNS server on the subnet.</p>
</td>
</tr>
<tr id="vpc_subnet01_0003__row545834911143"><td class="cellrowborder" valign="top" width="29.017098290170978%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0003__p591866701143">dnsList</p>
</td>
<td class="cellrowborder" valign="top" width="16.6983301669833%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0003__p318589811143">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="54.284571542845704%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0003__p304407061143">Specifies the IP address list of DNS servers on the subnet.</p>
</td>
</tr>
<tr id="vpc_subnet01_0003__row6540612517596"><td class="cellrowborder" valign="top" width="29.017098290170978%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0003__p6340476417596">availability_zone</p>
</td>
<td class="cellrowborder" valign="top" width="16.6983301669833%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0003__p5792277317596">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.284571542845704%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0003__p6123300617596">Identifies the AZ that the subnet belongs to. The value of this parameter is the AZ specified when the subnet is created and does not limit the usage scope of the subnet.</p>
</td>
</tr>
<tr id="vpc_subnet01_0003__row1422614217596"><td class="cellrowborder" valign="top" width="29.017098290170978%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0003__p1146682617596">vpc_id</p>
</td>
<td class="cellrowborder" valign="top" width="16.6983301669833%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0003__p481418517596">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.284571542845704%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0003__p5440471517596">Specifies the ID of the VPC that the subnet belongs to.</p>
</td>
</tr>
<tr id="vpc_subnet01_0003__row1988039417596"><td class="cellrowborder" valign="top" width="29.017098290170978%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0003__p6680804517596">status</p>
</td>
<td class="cellrowborder" valign="top" width="16.6983301669833%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0003__p3959872717596">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.284571542845704%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_subnet01_0003__ul1290083685410"><li id="vpc_subnet01_0003__li13201524194619">Specifies the status of the subnet.</li><li id="vpc_subnet01_0003__li18201524114619">The value can be <strong id="vpc_subnet01_0003__b11841625131719">ACTIVE</strong>, <strong id="vpc_subnet01_0003__b1618482531716">UNKNOWN</strong>, or <strong id="vpc_subnet01_0003__b418416254171">ERROR</strong>.<ul id="vpc_subnet01_0003__ul83391032184614"><li id="vpc_subnet01_0003__li175681357183117"><strong id="vpc_subnet01_0003__b1282232355019">ACTIVE</strong>: indicates that the subnet has been associated with a VPC.</li><li id="vpc_subnet01_0003__li5568157103111"><strong id="vpc_subnet01_0003__b5558132585016">UNKNOWN</strong>: indicates that the subnet has not been associated with a VPC.</li><li id="vpc_subnet01_0003__li85681932326"><strong id="vpc_subnet01_0003__b842352706151734">ERROR</strong>: indicates that the subnet is abnormal.</li></ul>
</li></ul>
</td>
</tr>
<tr id="vpc_subnet01_0003__row6437766611027"><td class="cellrowborder" valign="top" width="29.017098290170978%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0003__p2150517711033">neutron_network_id</p>
</td>
<td class="cellrowborder" valign="top" width="16.6983301669833%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0003__p3263900011033">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.284571542845704%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0003__p2651330711033">Specifies the ID of the network (OpenStack Neutron API).</p>
</td>
</tr>
<tr id="vpc_subnet01_0003__row2552805011031"><td class="cellrowborder" valign="top" width="29.017098290170978%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0003__p84866711033">neutron_subnet_id</p>
</td>
<td class="cellrowborder" valign="top" width="16.6983301669833%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0003__p6517899211033">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.284571542845704%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0003__p4500696511033">Specifies the ID of the subnet (OpenStack Neutron API).</p>
</td>
</tr>
<tr id="vpc_subnet01_0003__row94748518332"><td class="cellrowborder" valign="top" width="29.017098290170978%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0003__p934337113313">neutron_subnet_id_v6</p>
</td>
<td class="cellrowborder" valign="top" width="16.6983301669833%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0003__p19343179338">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.284571542845704%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0003__p6433919123311">Specifies the ID of the IPv6 subnet (OpenStack Neutron API). If the subnet is an IPv4 subnet, this parameter is not returned.</p>
</td>
</tr>
<tr id="vpc_subnet01_0003__row147527203715"><td class="cellrowborder" valign="top" width="29.017098290170978%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0003__p5714303263">extra_dhcp_opts</p>
</td>
<td class="cellrowborder" valign="top" width="16.6983301669833%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0003__p01223042610">Array of <a href="#vpc_subnet01_0003__table019517383270">extra_dhcp_opt</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="54.284571542845704%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0003__p111573015263">Specifies the NTP server address configured for the subnet. For details, see <a href="#vpc_subnet01_0003__table019517383270">Table 4</a>.</p>
</td>
</tr>
<tr id="vpc_subnet01_0003__row1365545151216"><td class="cellrowborder" valign="top" width="29.017098290170978%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0003__p83661745101212">scope</p>
</td>
<td class="cellrowborder" valign="top" width="16.6983301669833%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0003__p4366945181218">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.284571542845704%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_subnet01_0003__ul39741155111314"><li id="vpc_subnet01_0003__li12262025338">Specifies where the subnet is used in edge cloud scenario.</li><li id="vpc_subnet01_0003__li299516311931">The value can be:<ul id="vpc_subnet01_0003__ul14629144011310"><li id="vpc_subnet01_0003__li1462944017310"><strong id="vpc_subnet01_0003__b194921320115613">center</strong>: The subnet is used in a central AZ.</li><li id="vpc_subnet01_0003__li178642815317"><em id="vpc_subnet01_0003__i14859431719">{publicBorderGroup}</em>: The subnet is used in a public border group. The public border group limits the usage scope of a subnet but can have multiple edge AZs associated. You can obtain the AZs by the API for Listing AZs.</li></ul>
</li></ul>
</td>
</tr>
<tr id="vpc_subnet01_0003__row106098351358"><td class="cellrowborder" valign="top" width="29.017098290170978%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0003__p8425113511211">tenant_id</p>
</td>
<td class="cellrowborder" valign="top" width="16.6983301669833%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0003__p1342543532116">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.284571542845704%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_subnet01_0003__ul187061519502"><li id="vpc_subnet01_0003__li6706151919019">Project ID</li></ul>
</td>
</tr>
<tr id="vpc_subnet01_0003__row1760933510514"><td class="cellrowborder" valign="top" width="29.017098290170978%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0003__p106711441172119">created_at</p>
</td>
<td class="cellrowborder" valign="top" width="16.6983301669833%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0003__p867112418216">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.284571542845704%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_subnet01_0003__ul13463133512"><li id="vpc_subnet01_0003__li114610173513">Specifies the time (UTC) when the subnet is created.</li><li id="vpc_subnet01_0003__li84711133511">Format: <em id="vpc_subnet01_0003__i64699535178">yyyy-MM-ddTHH:mm:ss</em></li></ul>
</td>
</tr>
<tr id="vpc_subnet01_0003__row160933513511"><td class="cellrowborder" valign="top" width="29.017098290170978%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0003__p96711541192118">updated_at</p>
</td>
<td class="cellrowborder" valign="top" width="16.6983301669833%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0003__p1467116412217">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.284571542845704%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_subnet01_0003__ul9899124133520"><li id="vpc_subnet01_0003__li128991544351">Specifies the time (UTC) when the subnet is updated.</li><li id="vpc_subnet01_0003__li989913413351">Format: <em id="vpc_subnet01_0003__i2054195941713">yyyy-MM-ddTHH:mm:ss</em></li></ul>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpc_subnet01_0003__table019517383270"></a><a name="table019517383270"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet01_0003__table019517383270" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="vpc_subnet01_0003__vpc_subnet01_0001_b842352706165741">extra_dhcp_opt</strong> object</caption><thead align="left"><tr id="vpc_subnet01_0003__vpc_subnet01_0001_row1806141418109"><th align="left" class="cellrowborder" valign="top" width="21.740000000000002%" id="mcps1.3.5.4.2.5.1.1"><p id="vpc_subnet01_0003__vpc_subnet01_0001_p1948182811017"><strong id="vpc_subnet01_0003__vpc_subnet01_0001_b842352706195711">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.17%" id="mcps1.3.5.4.2.5.1.2"><p id="vpc_subnet01_0003__vpc_subnet01_0001_p19515288107">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.619999999999997%" id="mcps1.3.5.4.2.5.1.3"><p id="vpc_subnet01_0003__vpc_subnet01_0001_p755202861014">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="45.47%" id="mcps1.3.5.4.2.5.1.4"><p id="vpc_subnet01_0003__vpc_subnet01_0001_p66018281105"><strong id="vpc_subnet01_0003__vpc_subnet01_0001_b1716215324573">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_subnet01_0003__vpc_subnet01_0001_row19806161420105"><td class="cellrowborder" valign="top" width="21.740000000000002%" headers="mcps1.3.5.4.2.5.1.1 "><p id="vpc_subnet01_0003__vpc_subnet01_0001_p1834323611017">opt_value</p>
</td>
<td class="cellrowborder" valign="top" width="16.17%" headers="mcps1.3.5.4.2.5.1.2 "><p id="vpc_subnet01_0003__vpc_subnet01_0001_p1034310368108">No</p>
</td>
<td class="cellrowborder" valign="top" width="16.619999999999997%" headers="mcps1.3.5.4.2.5.1.3 "><p id="vpc_subnet01_0003__vpc_subnet01_0001_p15343163651014">String</p>
</td>
<td class="cellrowborder" valign="top" width="45.47%" headers="mcps1.3.5.4.2.5.1.4 "><ul id="vpc_subnet01_0003__vpc_subnet01_0001_ul1734314363102"><li id="vpc_subnet01_0003__vpc_subnet01_0001_li2034343671010">Specifies the NTP server address configured for the subnet.</li><li id="vpc_subnet01_0003__vpc_subnet01_0001_li12343183661011">Constraints:<p id="vpc_subnet01_0003__vpc_subnet01_0001_p1984274292214"><a name="vpc_subnet01_0003__vpc_subnet01_0001_li12343183661011"></a><a name="vpc_subnet01_0001_li12343183661011"></a>If <strong id="vpc_subnet01_0003__vpc_subnet01_0001_b1854816203119">opt_name</strong> is set to <strong id="vpc_subnet01_0003__vpc_subnet01_0001_b18312174218176">ntp</strong>, the value indicates the NTP server configured for the subnet. Currently, only IPv4 addresses are supported. A maximum of four IP addresses can be configured, and each address must be unique. Multiple IP addresses must be separated using commas (,). If <strong id="vpc_subnet01_0003__vpc_subnet01_0001_b104061248161117">opt_name</strong> is set to <strong id="vpc_subnet01_0003__vpc_subnet01_0001_b1973813315213">null</strong>, the value indicates that no NTP server is configured for the subnet. The parameter value cannot be an empty string.</p>
</li></ul>
</td>
</tr>
<tr id="vpc_subnet01_0003__vpc_subnet01_0001_row48061714191011"><td class="cellrowborder" valign="top" width="21.740000000000002%" headers="mcps1.3.5.4.2.5.1.1 "><p id="vpc_subnet01_0003__vpc_subnet01_0001_p33437363104">opt_name</p>
</td>
<td class="cellrowborder" valign="top" width="16.17%" headers="mcps1.3.5.4.2.5.1.2 "><p id="vpc_subnet01_0003__vpc_subnet01_0001_p1634393613106">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="16.619999999999997%" headers="mcps1.3.5.4.2.5.1.3 "><p id="vpc_subnet01_0003__vpc_subnet01_0001_p14343113613104">String</p>
</td>
<td class="cellrowborder" valign="top" width="45.47%" headers="mcps1.3.5.4.2.5.1.4 "><ul id="vpc_subnet01_0003__vpc_subnet01_0001_ul1934353641010"><li id="vpc_subnet01_0003__vpc_subnet01_0001_li1534373631020">Specifies the NTP server address configured for the subnet.</li><li id="vpc_subnet01_0003__vpc_subnet01_0001_li11343133651014">Currently, the value can be <strong id="vpc_subnet01_0003__vpc_subnet01_0001_b185618261310">ntp</strong>.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="vpc_subnet01_0003__section885555515510"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="vpc_subnet01_0003__screen50654438144051">{
"subnets": [
{
"id": "4779ab1c-7c1a-44b1-a02e-93dfc361b32d",
"name": "subnet",
"description": "",
"cidr": "192.168.20.0/24",
"dnsList": [
"114.xx.xx.114",
"114.xx.xx.115"
],
"status": "ACTIVE",
"vpc_id": "3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85",
"gateway_ip": "192.168.20.1",
"ipv6_enable": true,
"cidr_v6": "2001:db8:a583::/64",
"gateway_ip_v6": "2001:db8:a583::1",
"dhcp_enable": true,
"primary_dns": "114.xx.xx.114",
"secondary_dns": "114.xx.xx.115",
"availability_zone": "aa-bb-cc",
"neutron_network_id": "4779ab1c-7c1a-44b1-a02e-93dfc361b32d",
"neutron_subnet_id": "213cb9d-3122-2ac1-1a29-91ffc1231a12",
"neutron_subnet_id_v6": "e0fa7de1-a6e2-44c9-b052-b9d8cebe93c4",
"extra_dhcp_opts": [
{
"opt_value": "10.100.0.33,10.100.0.34",
"opt_name": "ntp"
}
],
"tenant_id": "087679f0aa80d32a2f4ec0172f5e902b",
"created_at": "2022-12-15T02:42:07",
"updated_at": "2022-12-15T02:42:07"
},
{
"id": "531dec0f-3116-411b-a21b-e612e42349fd",
"name": "Subnet1",
"description": "",
"cidr": "192.168.1.0/24",
"dnsList": [
"114.xx.xx.114",
"114.xx.xx.115"
],
"status": "ACTIVE",
"vpc_id": "3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85",
"gateway_ip": "192.168.1.1",
"ipv6_enable": false,
"dhcp_enable": true,
"primary_dns": "114.xx.xx.114",
"secondary_dns": "114.xx.xx.115",
"availability_zone": "aa-bb-cc",
"neutron_network_id": "531dec0f-3116-411b-a21b-e612e42349fd",
"neutron_subnet_id": "1aac193-a2ad-f153-d122-12d64c2c1d78",
"extra_dhcp_opts": [
{
"opt_value": "10.100.0.33,10.100.0.34",
"opt_name": "ntp"
}
],
"tenant_id": "087679f0aa80d32a2f4ec0172f5e902b",
"created_at": "2022-12-15T03:41:22",
"updated_at": "2022-12-15T03:41:22"
}
]
}</pre>
</div>
<div class="section" id="vpc_subnet01_0003__section31981619"><h4 class="sectiontitle">Status Code</h4><p id="vpc_subnet01_0003__p18112112662914">See <a href="vpc_api_0002.html">Status Codes</a>.</p>
</div>
<div class="section" id="vpc_subnet01_0003__section85821649202813"><h4 class="sectiontitle">Error Code</h4><p id="vpc_subnet01_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_subnet01_0000.html">Subnet</a></div>
</div>
</div>