doc-exports/docs/vpc/api-ref/vpc_subnet02_0003.html
Qin Ying, Fan 310d2d9eb1 VPC API 20230106 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>
2024-02-06 08:38:37 +00:00

553 lines
44 KiB
HTML

<a name="vpc_subnet02_0003"></a><a name="vpc_subnet02_0003"></a>
<h1 class="topictitle1">Creating a Subnet</h1>
<div id="body1496890183069"><div class="section" id="vpc_subnet02_0003__section54540374"><h4 class="sectiontitle">Function</h4><p id="vpc_subnet02_0003__p57902635">This API is used to create a subnet.</p>
</div>
<div class="section" id="vpc_subnet02_0003__section4226816142612"><h4 class="sectiontitle">Notes and Constraints</h4><ul id="vpc_subnet02_0003__ul425569192820"><li id="vpc_subnet02_0003__li1722019137282">IPv6 subnets can be created only when IPv4 subnets have been created on the network.</li></ul>
</div>
<div class="section" id="vpc_subnet02_0003__section21101319"><h4 class="sectiontitle">URI</h4><p id="vpc_subnet02_0003__p1218516583143">POST /v2.0/subnets</p>
</div>
<div class="section" id="vpc_subnet02_0003__section31485239"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet02_0003__table26517876" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request parameter</caption><thead align="left"><tr id="vpc_subnet02_0003__row40476817"><th align="left" class="cellrowborder" valign="top" width="16.689999999999998%" id="mcps1.3.4.2.2.5.1.1"><p id="vpc_subnet02_0003__p57396781">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12.55%" id="mcps1.3.4.2.2.5.1.2"><p id="vpc_subnet02_0003__p18627652">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.74%" id="mcps1.3.4.2.2.5.1.3"><p id="vpc_subnet02_0003__p32444864">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="51.019999999999996%" id="mcps1.3.4.2.2.5.1.4"><p id="vpc_subnet02_0003__p10788361">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_subnet02_0003__row1442054"><td class="cellrowborder" valign="top" width="16.689999999999998%" headers="mcps1.3.4.2.2.5.1.1 "><p id="vpc_subnet02_0003__p49697568">subnet</p>
</td>
<td class="cellrowborder" valign="top" width="12.55%" headers="mcps1.3.4.2.2.5.1.2 "><p id="vpc_subnet02_0003__p66080062"><a href="#vpc_subnet02_0003__table12211980105515">subnet</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="19.74%" headers="mcps1.3.4.2.2.5.1.3 "><p id="vpc_subnet02_0003__p50884809">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="51.019999999999996%" headers="mcps1.3.4.2.2.5.1.4 "><p id="vpc_subnet02_0003__p19248251">Specifies the subnet. For details, see <a href="#vpc_subnet02_0003__table12211980105515">Table 2</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpc_subnet02_0003__table12211980105515"></a><a name="table12211980105515"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet02_0003__table12211980105515" frame="border" border="1" rules="all"><caption><b>Table 2 </b><strong id="vpc_subnet02_0003__b1126555441514">subnet</strong> objects</caption><thead align="left"><tr id="vpc_subnet02_0003__row32722637105515"><th align="left" class="cellrowborder" valign="top" width="24.93%" id="mcps1.3.4.3.2.5.1.1"><p id="vpc_subnet02_0003__p60075710105815"><strong id="vpc_subnet02_0003__b13132185617152">Attribute</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12.02%" id="mcps1.3.4.3.2.5.1.2"><p id="vpc_subnet02_0003__p194182022104514"><strong id="vpc_subnet02_0003__b14232135711510">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.93%" id="mcps1.3.4.3.2.5.1.3"><p id="vpc_subnet02_0003__p34294369105815"><strong id="vpc_subnet02_0003__b842555811517">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="38.12%" id="mcps1.3.4.3.2.5.1.4"><p id="vpc_subnet02_0003__p25203839105815"><strong id="vpc_subnet02_0003__b62027597159">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_subnet02_0003__row43081158105515"><td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.4.3.2.5.1.1 "><p id="vpc_subnet02_0003__p54833166105624">name</p>
</td>
<td class="cellrowborder" valign="top" width="12.02%" headers="mcps1.3.4.3.2.5.1.2 "><p id="vpc_subnet02_0003__p11418162219452">No</p>
</td>
<td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.4.3.2.5.1.3 "><p id="vpc_subnet02_0003__p12301465105624">String</p>
</td>
<td class="cellrowborder" valign="top" width="38.12%" headers="mcps1.3.4.3.2.5.1.4 "><p id="vpc_subnet02_0003__p14797472105624">Specifies the subnet name.</p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row9772661105515"><td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.4.3.2.5.1.1 "><p id="vpc_subnet02_0003__p49939441105624">ip_version</p>
</td>
<td class="cellrowborder" valign="top" width="12.02%" headers="mcps1.3.4.3.2.5.1.2 "><p id="vpc_subnet02_0003__p841892219451">No</p>
</td>
<td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.4.3.2.5.1.3 "><p id="vpc_subnet02_0003__p18562940105624">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="38.12%" headers="mcps1.3.4.3.2.5.1.4 "><p id="vpc_subnet02_0003__p27415757105624">Specifies the IP address version.</p>
<p id="vpc_subnet02_0003__p45415223105624">The value can be <strong id="vpc_subnet02_0003__b195404467517">4</strong> (IPv4) or <strong id="vpc_subnet02_0003__b654024610520">6</strong> (IPv6). </p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row49397935105515"><td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.4.3.2.5.1.1 "><p id="vpc_subnet02_0003__p23027912105624">ipv6_address_mode</p>
</td>
<td class="cellrowborder" valign="top" width="12.02%" headers="mcps1.3.4.3.2.5.1.2 "><p id="vpc_subnet02_0003__p3418622124511">No</p>
</td>
<td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.4.3.2.5.1.3 "><p id="vpc_subnet02_0003__p53321590105624">String</p>
</td>
<td class="cellrowborder" valign="top" width="38.12%" headers="mcps1.3.4.3.2.5.1.4 "><p id="vpc_subnet02_0003__p6910789105624">Specifies the IPv6 addressing mode.</p>
<p id="vpc_subnet02_0003__p62197106105624">Only <strong id="vpc_subnet02_0003__b198151849131916">dhcpv6-stateful</strong> is supported.</p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row25915264105515"><td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.4.3.2.5.1.1 "><p id="vpc_subnet02_0003__p43207439105624">ipv6_ra_mode</p>
</td>
<td class="cellrowborder" valign="top" width="12.02%" headers="mcps1.3.4.3.2.5.1.2 "><p id="vpc_subnet02_0003__p541812294510">No</p>
</td>
<td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.4.3.2.5.1.3 "><p id="vpc_subnet02_0003__p10141705105624">String</p>
</td>
<td class="cellrowborder" valign="top" width="38.12%" headers="mcps1.3.4.3.2.5.1.4 "><p id="vpc_subnet02_0003__p63146998105624">Specifies the IPv6 route broadcast mode.</p>
<p id="vpc_subnet02_0003__p31452074105624">Only <strong id="vpc_subnet02_0003__b2077316587196">dhcpv6-stateful</strong> is supported.</p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row25349309105515"><td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.4.3.2.5.1.1 "><p id="vpc_subnet02_0003__p4452630910577">network_id</p>
</td>
<td class="cellrowborder" valign="top" width="12.02%" headers="mcps1.3.4.3.2.5.1.2 "><p id="vpc_subnet02_0003__p641822254515">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.4.3.2.5.1.3 "><p id="vpc_subnet02_0003__p4986127810577">String</p>
</td>
<td class="cellrowborder" valign="top" width="38.12%" headers="mcps1.3.4.3.2.5.1.4 "><p id="vpc_subnet02_0003__p2195327310577">Specifies the ID of the network to which the subnet belongs.</p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row8244803105515"><td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.4.3.2.5.1.1 "><p id="vpc_subnet02_0003__p3202678510577">cidr</p>
</td>
<td class="cellrowborder" valign="top" width="12.02%" headers="mcps1.3.4.3.2.5.1.2 "><p id="vpc_subnet02_0003__p2418122234515">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.4.3.2.5.1.3 "><p id="vpc_subnet02_0003__p4403276010577">String</p>
</td>
<td class="cellrowborder" valign="top" width="38.12%" headers="mcps1.3.4.3.2.5.1.4 "><p id="vpc_subnet02_0003__p6113352410577">Specifies the CIDR format.</p>
<p id="vpc_subnet02_0003__p9638641211">Only the IPv4 addresses in the 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 ranges are supported. The subnet mask cannot be greater than 28.</p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row62757710105647"><td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.4.3.2.5.1.1 "><p id="vpc_subnet02_0003__p5097986810577">gateway_ip</p>
</td>
<td class="cellrowborder" valign="top" width="12.02%" headers="mcps1.3.4.3.2.5.1.2 "><p id="vpc_subnet02_0003__p1841872219452">No</p>
</td>
<td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.4.3.2.5.1.3 "><p id="vpc_subnet02_0003__p3572863210577">String</p>
</td>
<td class="cellrowborder" valign="top" width="38.12%" headers="mcps1.3.4.3.2.5.1.4 "><p id="vpc_subnet02_0003__p1242857210116">The gateway IP address cannot conflict with IP addresses configured for <strong id="vpc_subnet02_0003__b213034392310">allocation_pools</strong>.</p>
<p id="vpc_subnet02_0003__p854120544319">This attribute cannot be modified. </p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row2545218105647"><td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.4.3.2.5.1.1 "><p id="vpc_subnet02_0003__p1395064410577">allocation_pools</p>
</td>
<td class="cellrowborder" valign="top" width="12.02%" headers="mcps1.3.4.3.2.5.1.2 "><p id="vpc_subnet02_0003__p19418122284515">No</p>
</td>
<td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.4.3.2.5.1.3 "><p id="vpc_subnet02_0003__p5626034310577">Array of <a href="#vpc_subnet02_0003__table24611730">allocation_pool</a> objects</p>
<p id="vpc_subnet02_0003__p3658104710577"></p>
</td>
<td class="cellrowborder" valign="top" width="38.12%" headers="mcps1.3.4.3.2.5.1.4 "><p id="vpc_subnet02_0003__p2390980910577">Specifies the available IP address pool. For details, see <a href="#vpc_subnet02_0003__table24611730">Table 3</a>.</p>
<p id="vpc_subnet02_0003__p1386169010577">Example: [ { "start": "10.0.0.2", "end": "10.0.0.251"} ]</p>
<p id="vpc_subnet02_0003__p9527936133612">The last three and the first IP addresses in each subnet are the ones reserved by the system. For example, in subnet 192.168.1.0/24, IP addresses 192.168.1.0, 192.168.1.253, 192.168.1.254, and 192.168.1.255 are reserved by the system.</p>
<p id="vpc_subnet02_0003__p14178729172918">[{"start": "2001:db8:a583:9::2", "end": "2001:db8:a583:9:ffff:ffff:ffff:fffc"}]</p>
<p id="vpc_subnet02_0003__p15322181416320">In IPv6 subnet 2001:db8:a583:9::/64, IP addresses 2001:db8:a583:9::1, 2001:db8:a583:9:ffff:ffff:ffff:fffd, 2001:db8:a583:9:ffff:ffff:ffff:fffe, and 2001:db8:a583:9:ffff:ffff:ffff:ffff are reserved by the system.</p>
<p id="vpc_subnet02_0003__p1961191927">By default, the IP addresses reserved by the system are not in the IP address pool specified by <strong id="vpc_subnet02_0003__b6941144172615">allocation_pool</strong>.</p>
<p id="vpc_subnet02_0003__p5764635410577">When updating an IP address pool, the <strong id="vpc_subnet02_0003__b342599182612">allocation_pool</strong> value can contain neither gateway nor broadcast IP addresses. </p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row22360302105653"><td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.4.3.2.5.1.1 "><p id="vpc_subnet02_0003__p1404384110577">dns_nameservers</p>
</td>
<td class="cellrowborder" valign="top" width="12.02%" headers="mcps1.3.4.3.2.5.1.2 "><p id="vpc_subnet02_0003__p2418922154512">No</p>
</td>
<td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.4.3.2.5.1.3 "><p id="vpc_subnet02_0003__p6380932110577">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="38.12%" headers="mcps1.3.4.3.2.5.1.4 "><p id="vpc_subnet02_0003__p324929310577">Specifies the DNS server address.</p>
<p id="vpc_subnet02_0003__p26509468181443">Instructions:</p>
<p id="vpc_subnet02_0003__p2924364410577">Example: "dns_nameservers": ["8.xx.xx.8","8.xx.xx.4"]</p>
<p id="vpc_subnet02_0003__p8200621151510">A maximum of five DNS server addresses are supported.</p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row17847900105653"><td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.4.3.2.5.1.1 "><p id="vpc_subnet02_0003__p4510693110577">host_routes</p>
</td>
<td class="cellrowborder" valign="top" width="12.02%" headers="mcps1.3.4.3.2.5.1.2 "><p id="vpc_subnet02_0003__p3418112264518">No</p>
</td>
<td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.4.3.2.5.1.3 "><p id="vpc_subnet02_0003__p166911588244">Array of <a href="#vpc_subnet02_0003__table5232330">host_route</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="38.12%" headers="mcps1.3.4.3.2.5.1.4 "><p id="vpc_subnet02_0003__p2002497710577">Specifies the static VM routes. For details, see <a href="#vpc_subnet02_0003__table5232330">Table 4</a>.</p>
<p id="vpc_subnet02_0003__p4600706610577">Static routes are not supported, and entered information will be ignored.</p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row21625046105653"><td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.4.3.2.5.1.1 "><p id="vpc_subnet02_0003__p4495318510577">enable_dhcp</p>
</td>
<td class="cellrowborder" valign="top" width="12.02%" headers="mcps1.3.4.3.2.5.1.2 "><p id="vpc_subnet02_0003__p1041812214516">No</p>
</td>
<td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.4.3.2.5.1.3 "><p id="vpc_subnet02_0003__p1732939410577">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="38.12%" headers="mcps1.3.4.3.2.5.1.4 "><p id="vpc_subnet02_0003__p2100438810577">Specifies whether to enable the DHCP function. Value <strong id="vpc_subnet02_0003__b1547084315296">false</strong> indicates that the DHCP function is not enabled.</p>
<p id="vpc_subnet02_0003__p5482176910577">The value can only be <strong id="vpc_subnet02_0003__b184861648112920">true</strong>.</p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row1595943182019"><td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.4.3.2.5.1.1 "><p id="vpc_subnet02_0003__p6248062120">use_default_subnetpool</p>
</td>
<td class="cellrowborder" valign="top" width="12.02%" headers="mcps1.3.4.3.2.5.1.2 "><p id="vpc_subnet02_0003__p1424180112117">No</p>
</td>
<td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.4.3.2.5.1.3 "><p id="vpc_subnet02_0003__p10252013215">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="38.12%" headers="mcps1.3.4.3.2.5.1.4 "><p id="vpc_subnet02_0003__p9253052116">Specifies whether the default address pool is used.</p>
<p id="vpc_subnet02_0003__p6251101212">The value can be set to <strong id="vpc_subnet02_0003__b0594457182911">true</strong> only when IPv6 is used.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpc_subnet02_0003__table24611730"></a><a name="table24611730"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet02_0003__table24611730" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="vpc_subnet02_0003__b051513216306">allocation_pool</strong> objects</caption><thead align="left"><tr id="vpc_subnet02_0003__row15154020"><th align="left" class="cellrowborder" valign="top" width="21.18%" id="mcps1.3.4.4.2.5.1.1"><p id="vpc_subnet02_0003__p19516075"><strong id="vpc_subnet02_0003__b118195153010">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.7%" id="mcps1.3.4.4.2.5.1.2"><p id="vpc_subnet02_0003__p1327122842316"><strong id="vpc_subnet02_0003__b20295617300">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.78%" id="mcps1.3.4.4.2.5.1.3"><p id="vpc_subnet02_0003__p37298263"><strong id="vpc_subnet02_0003__b31491976305">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="46.339999999999996%" id="mcps1.3.4.4.2.5.1.4"><p id="vpc_subnet02_0003__p15727687"><strong id="vpc_subnet02_0003__b15998177113018">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_subnet02_0003__row7331458"><td class="cellrowborder" valign="top" width="21.18%" headers="mcps1.3.4.4.2.5.1.1 "><p id="vpc_subnet02_0003__p56977217">start</p>
</td>
<td class="cellrowborder" valign="top" width="14.7%" headers="mcps1.3.4.4.2.5.1.2 "><p id="vpc_subnet02_0003__p227112286236">No</p>
</td>
<td class="cellrowborder" valign="top" width="17.78%" headers="mcps1.3.4.4.2.5.1.3 "><p id="vpc_subnet02_0003__p51751889">String</p>
</td>
<td class="cellrowborder" valign="top" width="46.339999999999996%" headers="mcps1.3.4.4.2.5.1.4 "><p id="vpc_subnet02_0003__p51610228">Specifies the start IP address of a network pool.</p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row61838871"><td class="cellrowborder" valign="top" width="21.18%" headers="mcps1.3.4.4.2.5.1.1 "><p id="vpc_subnet02_0003__p42892680">end</p>
</td>
<td class="cellrowborder" valign="top" width="14.7%" headers="mcps1.3.4.4.2.5.1.2 "><p id="vpc_subnet02_0003__p1727314281237">No</p>
</td>
<td class="cellrowborder" valign="top" width="17.78%" headers="mcps1.3.4.4.2.5.1.3 "><p id="vpc_subnet02_0003__p51755094">String</p>
</td>
<td class="cellrowborder" valign="top" width="46.339999999999996%" headers="mcps1.3.4.4.2.5.1.4 "><p id="vpc_subnet02_0003__p10006650">Specifies the end IP address of a network pool.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpc_subnet02_0003__table5232330"></a><a name="table5232330"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet02_0003__table5232330" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="vpc_subnet02_0003__b34632518300">host_route</strong> objects</caption><thead align="left"><tr id="vpc_subnet02_0003__row65973637"><th align="left" class="cellrowborder" valign="top" width="21.55%" id="mcps1.3.4.5.2.5.1.1"><p id="vpc_subnet02_0003__p42264412"><strong id="vpc_subnet02_0003__b144071427183019">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.649999999999999%" id="mcps1.3.4.5.2.5.1.2"><p id="vpc_subnet02_0003__p197406419246"><strong id="vpc_subnet02_0003__b15178528203017">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.63%" id="mcps1.3.4.5.2.5.1.3"><p id="vpc_subnet02_0003__p865310"><strong id="vpc_subnet02_0003__b926612973010">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="47.17%" id="mcps1.3.4.5.2.5.1.4"><p id="vpc_subnet02_0003__p31641985"><strong id="vpc_subnet02_0003__b1498992933010">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_subnet02_0003__row16342414"><td class="cellrowborder" valign="top" width="21.55%" headers="mcps1.3.4.5.2.5.1.1 "><p id="vpc_subnet02_0003__p48667192">destination</p>
</td>
<td class="cellrowborder" valign="top" width="14.649999999999999%" headers="mcps1.3.4.5.2.5.1.2 "><p id="vpc_subnet02_0003__p181671451247">No</p>
</td>
<td class="cellrowborder" valign="top" width="16.63%" headers="mcps1.3.4.5.2.5.1.3 "><p id="vpc_subnet02_0003__p49728507">String</p>
</td>
<td class="cellrowborder" valign="top" width="47.17%" headers="mcps1.3.4.5.2.5.1.4 "><p id="vpc_subnet02_0003__p28535525">Specifies the destination subnet of a route.</p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row55493137"><td class="cellrowborder" valign="top" width="21.55%" headers="mcps1.3.4.5.2.5.1.1 "><p id="vpc_subnet02_0003__p65759080">nexthop</p>
</td>
<td class="cellrowborder" valign="top" width="14.649999999999999%" headers="mcps1.3.4.5.2.5.1.2 "><p id="vpc_subnet02_0003__p174054102412">No</p>
</td>
<td class="cellrowborder" valign="top" width="16.63%" headers="mcps1.3.4.5.2.5.1.3 "><p id="vpc_subnet02_0003__p24885284">String</p>
</td>
<td class="cellrowborder" valign="top" width="47.17%" headers="mcps1.3.4.5.2.5.1.4 "><p id="vpc_subnet02_0003__p51086148">Specifies the next-hop IP address of a route.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="vpc_subnet02_0003__section1370316281414"><h4 class="sectiontitle">Example Request</h4><p id="vpc_subnet02_0003__p201891539122117">Create an IPv4 subnet named <strong id="vpc_subnet02_0003__b1810113331011">subnet-test</strong>, set its network ID to 0133cd73-34d4-4d4c-bf1f-e65b24603206, and CIDR block to 172.16.2.0/24.</p>
<pre class="screen" id="vpc_subnet02_0003__screen634721319427">POST https://{Endpoint}/v2.0/subnets
{
"subnet": {
"name": "subnet-test",
"network_id": "0133cd73-34d4-4d4c-bf1f-e65b24603206",
"cidr": "172.16.2.0/24",
"enable_dhcp": true
}
}</pre>
</div>
<p id="vpc_subnet02_0003__p6190118111216">Create an IPv6 subnet named <strong id="vpc_subnet02_0003__b7396128121610">subnet-ipv6-test</strong> and with network ID of <strong id="vpc_subnet02_0003__b0852134417162">0133cd73-34d4-4d4c-bf1f-e65b24603206</strong>.</p>
<pre class="screen" id="vpc_subnet02_0003__screen6758661572">POST https://{Endpoint}/v2.0/subnets
{
"subnet": {
"name": "subnet-ipv6-test",
"network_id": "0133cd73-34d4-4d4c-bf1f-e65b24603206",
"ip_version": 6,
"enable_dhcp": true,
"ipv6_address_mode": "dhcpv6-stateful",
"ipv6_ra_mode": "dhcpv6-stateful",
}
}</pre>
<div class="section" id="vpc_subnet02_0003__section14931696"><h4 class="sectiontitle">Response Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet02_0003__table31929956" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response parameter</caption><thead align="left"><tr id="vpc_subnet02_0003__row12454319"><th align="left" class="cellrowborder" valign="top" width="15.73%" id="mcps1.3.8.2.2.4.1.1"><p id="vpc_subnet02_0003__p2166929">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="8.99%" id="mcps1.3.8.2.2.4.1.2"><p id="vpc_subnet02_0003__p41303584">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="75.28%" id="mcps1.3.8.2.2.4.1.3"><p id="vpc_subnet02_0003__p7224675">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_subnet02_0003__row48327783"><td class="cellrowborder" valign="top" width="15.73%" headers="mcps1.3.8.2.2.4.1.1 "><p id="vpc_subnet02_0003__p22236344">subnet</p>
</td>
<td class="cellrowborder" valign="top" width="8.99%" headers="mcps1.3.8.2.2.4.1.2 "><p id="vpc_subnet02_0003__p56313405"><a href="#vpc_subnet02_0003__table176735992713">subnet</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="75.28%" headers="mcps1.3.8.2.2.4.1.3 "><p id="vpc_subnet02_0003__p37955333">Specifies the subnet. For details, see <a href="#vpc_subnet02_0003__table176735992713">Table 6</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpc_subnet02_0003__table176735992713"></a><a name="table176735992713"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet02_0003__table176735992713" frame="border" border="1" rules="all"><caption><b>Table 6 </b><strong id="vpc_subnet02_0003__b14979203053120">subnet</strong> objects</caption><thead align="left"><tr id="vpc_subnet02_0003__row176713593276"><th align="left" class="cellrowborder" valign="top" width="28.332833283328334%" id="mcps1.3.8.3.2.4.1.1"><p id="vpc_subnet02_0003__p136755912715"><strong id="vpc_subnet02_0003__b17401932203110">Attribute</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="28.332833283328334%" id="mcps1.3.8.3.2.4.1.2"><p id="vpc_subnet02_0003__p667105912718"><strong id="vpc_subnet02_0003__b6205833193113">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="43.33433343334334%" id="mcps1.3.8.3.2.4.1.3"><p id="vpc_subnet02_0003__p26855915275"><strong id="vpc_subnet02_0003__b1829193412314">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_subnet02_0003__row28303131105515"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.1 "><p id="vpc_subnet02_0003__p2014344105614">id</p>
</td>
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.2 "><p id="vpc_subnet02_0003__p28944191105614">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.8.3.2.4.1.3 "><p id="vpc_subnet02_0003__p53796361105614">Specifies the subnet ID.</p>
<p id="vpc_subnet02_0003__p2677113954519">This parameter is not mandatory when you query subnets.</p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row1868135972719"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.1 "><p id="vpc_subnet02_0003__p37015595272">name</p>
</td>
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.2 "><p id="vpc_subnet02_0003__p18706591271">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.8.3.2.4.1.3 "><p id="vpc_subnet02_0003__p1870259172715">Specifies the subnet name.</p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row670165910271"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.1 "><p id="vpc_subnet02_0003__p187012596279">ip_version</p>
</td>
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.2 "><p id="vpc_subnet02_0003__p137095922720">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.8.3.2.4.1.3 "><p id="vpc_subnet02_0003__p870155932715">Specifies the IP address version.</p>
<p id="vpc_subnet02_0003__p10708598273">The value can be <strong id="vpc_subnet02_0003__b16233135063">4</strong> (IPv4) or <strong id="vpc_subnet02_0003__b1023311515618">6</strong> (IPv6).</p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row1270135915274"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.1 "><p id="vpc_subnet02_0003__p1770105919271">ipv6_address_mode</p>
</td>
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.2 "><p id="vpc_subnet02_0003__p1370205912279">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.8.3.2.4.1.3 "><p id="vpc_subnet02_0003__p5701759142713">Specifies the IPv6 addressing mode.</p>
<p id="vpc_subnet02_0003__p167055910273">Only <strong id="vpc_subnet02_0003__b102721253143115">dhcpv6-stateful</strong> is supported.</p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row57075913279"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.1 "><p id="vpc_subnet02_0003__p070195972715">ipv6_ra_mode</p>
</td>
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.2 "><p id="vpc_subnet02_0003__p1970559102716">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.8.3.2.4.1.3 "><p id="vpc_subnet02_0003__p19701959152712">Specifies the IPv6 route broadcast mode.</p>
<p id="vpc_subnet02_0003__p1270185982712">Only <strong id="vpc_subnet02_0003__b829131713329">dhcpv6-stateful</strong> is supported.</p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row970185911274"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.1 "><p id="vpc_subnet02_0003__p5719599271">network_id</p>
</td>
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.2 "><p id="vpc_subnet02_0003__p1671105982710">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.8.3.2.4.1.3 "><p id="vpc_subnet02_0003__p1071259102716">Specifies the ID of the network to which the subnet belongs.</p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row9711659142718"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.1 "><p id="vpc_subnet02_0003__p1471155922712">cidr</p>
</td>
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.2 "><p id="vpc_subnet02_0003__p1871155912279">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.8.3.2.4.1.3 "><p id="vpc_subnet02_0003__p471115972720">Specifies the CIDR format.</p>
<p id="vpc_subnet02_0003__p171105952717">Only the addresses in the 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 ranges are supported. In addition, the subnet mask cannot be greater than 28. </p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row373659122718"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.1 "><p id="vpc_subnet02_0003__p173195914274">gateway_ip</p>
</td>
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.2 "><p id="vpc_subnet02_0003__p16733594272">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.8.3.2.4.1.3 "><p id="vpc_subnet02_0003__p167319597276">The gateway IP address cannot conflict with IP addresses configured for <strong id="vpc_subnet02_0003__b92791240193211">allocation_pools</strong>.</p>
<p id="vpc_subnet02_0003__p1773175918271">This attribute cannot be modified. </p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row6733598278"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.1 "><p id="vpc_subnet02_0003__p37325918273">allocation_pools</p>
</td>
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.2 "><p id="vpc_subnet02_0003__p974125918276">Array of <a href="#vpc_subnet02_0003__table1777145918276">allocation_pool</a> objects</p>
<p id="vpc_subnet02_0003__p107495982715"></p>
</td>
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.8.3.2.4.1.3 "><p id="vpc_subnet02_0003__p13740597271">Specifies the available IP address pool. For details, see the <strong id="vpc_subnet02_0003__b82945614349">allocation_pool</strong> objects.</p>
<p id="vpc_subnet02_0003__p41184234584"><a href="#vpc_subnet02_0003__table1777145918276">Table 7</a></p>
<p id="vpc_subnet02_0003__p137415915279">Example: [ { "start": "10.0.0.2", "end": "10.0.0.251"} ]</p>
<p id="vpc_subnet02_0003__p167414592279">The last three and the first IP addresses in each subnet are the ones reserved by the system. For example, in subnet <strong id="vpc_subnet02_0003__b990511819351">192.168.1.0/24</strong>, IP addresses 192.168.1.0, 192.168.1.253, 192.168.1.254, and 192.168.1.255 are reserved by the system. By default, the IP addresses reserved by the system are not in the IP address pool specified by <strong id="vpc_subnet02_0003__b10747710193511">allocation_pool</strong>.</p>
<p id="vpc_subnet02_0003__p656135675219">[{"start": "2001:db8:a583:9::2", "end": "2001:db8:a583:9:ffff:ffff:ffff:fffc"}]</p>
<p id="vpc_subnet02_0003__p145613568523">In IPv6 subnet 2001:db8:a583:9::/64, IP addresses 2001:db8:a583:9::1, 2001:db8:a583:9:ffff:ffff:ffff:fffd, 2001:db8:a583:9:ffff:ffff:ffff:fffe, and 2001:db8:a583:9:ffff:ffff:ffff:ffff are reserved by the system.</p>
<p id="vpc_subnet02_0003__p074359192720">When updating an IP address pool, the <strong id="vpc_subnet02_0003__b1435921716355">allocation_pool</strong> value can contain neither gateway nor broadcast IP addresses. </p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row474205911270"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.1 "><p id="vpc_subnet02_0003__p774105972720">dns_nameservers</p>
</td>
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.2 "><p id="vpc_subnet02_0003__p1474155952710">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.8.3.2.4.1.3 "><p id="vpc_subnet02_0003__p10743593273">Specifies the DNS server address.</p>
<p id="vpc_subnet02_0003__p97485912712">Example: "dns_nameservers": ["8.xx.xx.8","8.xx.xx.4"]</p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row6741659182714"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.1 "><p id="vpc_subnet02_0003__p574959122713">host_routes</p>
</td>
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.2 "><p id="vpc_subnet02_0003__p151679506277">Array of <a href="#vpc_subnet02_0003__table177865912715">host_route</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.8.3.2.4.1.3 "><p id="vpc_subnet02_0003__p2074459132712">Specifies the static VM routes. For details, see <a href="#vpc_subnet02_0003__table177865912715">Table 8</a>.</p>
<p id="vpc_subnet02_0003__p1674359172717">Static routes are not supported, and entered information will be ignored.</p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row42017779105653"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.1 "><p id="vpc_subnet02_0003__p5182838910577">tenant_id</p>
</td>
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.2 "><p id="vpc_subnet02_0003__p3734998010577">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.8.3.2.4.1.3 "><p id="vpc_subnet02_0003__p10487112">Specifies the project ID. </p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row97535914274"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.1 "><p id="vpc_subnet02_0003__p475959202718">enable_dhcp</p>
</td>
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.2 "><p id="vpc_subnet02_0003__p2755596279">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.8.3.2.4.1.3 "><p id="vpc_subnet02_0003__p47595962710">Specifies whether to enable the DHCP function. Value <strong id="vpc_subnet02_0003__b769091113611">false</strong> indicates that the DHCP function is not enabled.</p>
<p id="vpc_subnet02_0003__p57535914276">The value can only be <strong id="vpc_subnet02_0003__b11652272368">true</strong>.</p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row5751059162715"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.1 "><p id="vpc_subnet02_0003__p976659192718">use_default_subnetpool</p>
</td>
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.2 "><p id="vpc_subnet02_0003__p27655942716">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.8.3.2.4.1.3 "><p id="vpc_subnet02_0003__p20761598272">Specifies whether the default address pool is used.</p>
<p id="vpc_subnet02_0003__p127625920276">The value can be set to <strong id="vpc_subnet02_0003__b1783410138362">true</strong> only when IPv6 is used.</p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row41014255591"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.1 "><p id="vpc_subnet02_0003__p1711142512596">subnetpool_id</p>
</td>
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.2 "><p id="vpc_subnet02_0003__p511425115919">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.8.3.2.4.1.3 "><p id="vpc_subnet02_0003__p211132512598">Specifies the subnet pool ID.</p>
<p id="vpc_subnet02_0003__p345014515117">Currently, only IPv6 is supported.</p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row63315321123"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.1 "><p id="vpc_subnet02_0003__p870051413911">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.2 "><p id="vpc_subnet02_0003__p45641422124917">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.8.3.2.4.1.3 "><p id="vpc_subnet02_0003__p10610183420256">Specifies the project ID. </p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row126291040191211"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.1 "><p id="vpc_subnet02_0003__p1953114119914">created_at</p>
</td>
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.2 "><p id="vpc_subnet02_0003__p595318416919">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.8.3.2.4.1.3 "><p id="vpc_subnet02_0003__p1395374115919">Specifies the time (UTC) when the subnet is created.</p>
<p id="vpc_subnet02_0003__p65980291419">Format: <em id="vpc_subnet02_0003__i333433053616">yyyy-MM-ddTHH:mm:ss</em></p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row1084513362123"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.1 "><p id="vpc_subnet02_0003__p139719548912">updated_at</p>
</td>
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.8.3.2.4.1.2 "><p id="vpc_subnet02_0003__p53971154594">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.8.3.2.4.1.3 "><p id="vpc_subnet02_0003__p1339713549918">Specifies the time (UTC) when the subnet is updated.</p>
<p id="vpc_subnet02_0003__p4375710124715">Format: <em id="vpc_subnet02_0003__i3543153643610">yyyy-MM-ddTHH:mm:ss</em></p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpc_subnet02_0003__table1777145918276"></a><a name="table1777145918276"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet02_0003__table1777145918276" frame="border" border="1" rules="all"><caption><b>Table 7 </b><strong id="vpc_subnet02_0003__b1054523733611">allocation_pool</strong> objects</caption><thead align="left"><tr id="vpc_subnet02_0003__row11772597275"><th align="left" class="cellrowborder" valign="top" width="23.65%" id="mcps1.3.8.4.2.4.1.1"><p id="vpc_subnet02_0003__p1477155962713"><strong id="vpc_subnet02_0003__b0610446368">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.610000000000003%" id="mcps1.3.8.4.2.4.1.2"><p id="vpc_subnet02_0003__p1077859162717"><strong id="vpc_subnet02_0003__b93319459362">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="51.739999999999995%" id="mcps1.3.8.4.2.4.1.3"><p id="vpc_subnet02_0003__p5771159182718"><strong id="vpc_subnet02_0003__b01062467368">Remarks</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_subnet02_0003__row167785982711"><td class="cellrowborder" valign="top" width="23.65%" headers="mcps1.3.8.4.2.4.1.1 "><p id="vpc_subnet02_0003__p1077159182720">start</p>
</td>
<td class="cellrowborder" valign="top" width="24.610000000000003%" headers="mcps1.3.8.4.2.4.1.2 "><p id="vpc_subnet02_0003__p2077125912718">String</p>
</td>
<td class="cellrowborder" valign="top" width="51.739999999999995%" headers="mcps1.3.8.4.2.4.1.3 "><p id="vpc_subnet02_0003__p2078205910275">Specifies the start IP address of a network pool.</p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row1782594271"><td class="cellrowborder" valign="top" width="23.65%" headers="mcps1.3.8.4.2.4.1.1 "><p id="vpc_subnet02_0003__p9781459162717">end</p>
</td>
<td class="cellrowborder" valign="top" width="24.610000000000003%" headers="mcps1.3.8.4.2.4.1.2 "><p id="vpc_subnet02_0003__p1778115952719">String</p>
</td>
<td class="cellrowborder" valign="top" width="51.739999999999995%" headers="mcps1.3.8.4.2.4.1.3 "><p id="vpc_subnet02_0003__p187825911271">Specifies the end IP address of a network pool.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpc_subnet02_0003__table177865912715"></a><a name="table177865912715"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet02_0003__table177865912715" frame="border" border="1" rules="all"><caption><b>Table 8 </b><strong id="vpc_subnet02_0003__b8958711123712">host_route</strong> objects</caption><thead align="left"><tr id="vpc_subnet02_0003__row1779145992719"><th align="left" class="cellrowborder" valign="top" width="23.712371237123715%" id="mcps1.3.8.5.2.4.1.1"><p id="vpc_subnet02_0003__p2794593271"><strong id="vpc_subnet02_0003__b12242413173716">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.4024402440244%" id="mcps1.3.8.5.2.4.1.2"><p id="vpc_subnet02_0003__p14791594271"><strong id="vpc_subnet02_0003__b55511114183712">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="51.88518851885189%" id="mcps1.3.8.5.2.4.1.3"><p id="vpc_subnet02_0003__p14791459172716"><strong id="vpc_subnet02_0003__b202452152377">Remarks</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_subnet02_0003__row1379165919277"><td class="cellrowborder" valign="top" width="23.712371237123715%" headers="mcps1.3.8.5.2.4.1.1 "><p id="vpc_subnet02_0003__p979165972710">destination</p>
</td>
<td class="cellrowborder" valign="top" width="24.4024402440244%" headers="mcps1.3.8.5.2.4.1.2 "><p id="vpc_subnet02_0003__p37995952710">String</p>
</td>
<td class="cellrowborder" valign="top" width="51.88518851885189%" headers="mcps1.3.8.5.2.4.1.3 "><p id="vpc_subnet02_0003__p10791559172714">Specifies the destination subnet of a route.</p>
</td>
</tr>
<tr id="vpc_subnet02_0003__row1779185915279"><td class="cellrowborder" valign="top" width="23.712371237123715%" headers="mcps1.3.8.5.2.4.1.1 "><p id="vpc_subnet02_0003__p6791359102719">nexthop</p>
</td>
<td class="cellrowborder" valign="top" width="24.4024402440244%" headers="mcps1.3.8.5.2.4.1.2 "><p id="vpc_subnet02_0003__p107935942717">String</p>
</td>
<td class="cellrowborder" valign="top" width="51.88518851885189%" headers="mcps1.3.8.5.2.4.1.3 "><p id="vpc_subnet02_0003__p87975920278">Specifies the next-hop IP address of a route.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="vpc_subnet02_0003__section38241653113834"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="vpc_subnet02_0003__screen12180115084416">{
"subnet": {
"name": "subnet-test",
"cidr": "172.16.2.0/24",
"id": "98bac90c-0ba7-4a63-8995-097da9bead1c",
"enable_dhcp": true,
"network_id": "0133cd73-34d4-4d4c-bf1f-e65b24603206",
"tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
"project_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
"dns_nameservers": [],
"allocation_pools": [
{
"start": "172.16.2.2",
"end": "172.16.2.251"
}
],
"host_routes": [],
"ip_version": 4,
"gateway_ip": "172.16.2.1",
"created_at": "2018-09-20T02:02:16",
"updated_at": "2018-09-20T02:02:16"
}
}</pre>
</div>
<pre class="screen" id="vpc_subnet02_0003__screen16181333135611">{
"subnet": {
"id": "011fc878-5521-4654-a1ad-f5b0b58203ac",
"name": "subnet-ipv6-test",
"tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
"network_id": "0133cd73-34d4-4d4c-bf1f-e65b24603206",
"ip_version": 6,
"cidr": "2001:db8:a583:a0::/64",
"subnetpool_id": "cb03d100-8687-4c0a-9441-ea568dcae47d",
"allocation_pools": [{
"start": "2001:db8:a583:a0::2",
"end": "2001:db8:a583:a0:ffff:ffff:ffff:fffc"
}],
"gateway_ip": "2001:db8:a583:a0::1",
"enable_dhcp": true,
"ipv6_ra_mode": "dhcpv6-stateful",
"ipv6_address_mode": "dhcpv6-stateful",
"description": "",
"dns_nameservers": [],
"host_routes": [],
"project_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
"created_at": "2021-07-01T07:59:28",
"updated_at": "2021-07-01T07:59:28"
}
}</pre>
<div class="section" id="vpc_subnet02_0003__section10470352390"><h4 class="sectiontitle">Status Code</h4><p id="vpc_subnet02_0003__p18112112662914">See <a href="vpc_api_0002.html">Status Codes</a>.</p>
</div>
<div class="section" id="vpc_subnet02_0003__section85821649202813"><h4 class="sectiontitle">Error Code</h4><p id="vpc_subnet02_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_subnet02_0000.html">Subnet</a></div>
</div>
</div>