doc-exports/docs/vpc/api-ref/vpc_subnet01_0001.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

499 lines
46 KiB
HTML

<a name="vpc_subnet01_0001"></a><a name="vpc_subnet01_0001"></a>
<h1 class="topictitle1">Creating a Subnet</h1>
<div id="body20084682"><div class="section" id="vpc_subnet01_0001__section18389930"><h4 class="sectiontitle">Function</h4><p id="vpc_subnet01_0001__p16246551">This API is used to create a subnet.</p>
</div>
<div class="section" id="vpc_subnet01_0001__section31291646"><h4 class="sectiontitle">URI</h4><p id="vpc_subnet01_0001__p18160382396">POST /v1/{project_id}/subnets</p>
<div class="p" id="vpc_subnet01_0001__p12200319113610"><a href="#vpc_subnet01_0001__table21421675">Table 1</a> describes the parameters.
<div class="tablenoborder"><a name="vpc_subnet01_0001__table21421675"></a><a name="table21421675"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet01_0001__table21421675" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="vpc_subnet01_0001__row9119245"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.3.2.2.4.1.1"><p id="vpc_subnet01_0001__p461342">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.3.2.2.4.1.2"><p id="vpc_subnet01_0001__p37368736">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.3.2.2.4.1.3"><p id="vpc_subnet01_0001__p6968762">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_subnet01_0001__row27598869"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="vpc_subnet01_0001__p20915929">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="vpc_subnet01_0001__p16468652">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="vpc_subnet01_0001__p10487112">Specifies the project ID. </p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="vpc_subnet01_0001__section13189358"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet01_0001__table435429715639" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameter</caption><thead align="left"><tr id="vpc_subnet01_0001__row3955678815639"><th align="left" class="cellrowborder" valign="top" width="15.410000000000002%" id="mcps1.3.3.2.2.5.1.1"><p id="vpc_subnet01_0001__p4998329315639">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20.12%" id="mcps1.3.3.2.2.5.1.2"><p id="vpc_subnet01_0001__p2211493815639">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.610000000000003%" id="mcps1.3.3.2.2.5.1.3"><p id="vpc_subnet01_0001__p4647957215639">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="42.86000000000001%" id="mcps1.3.3.2.2.5.1.4"><p id="vpc_subnet01_0001__p674897815639">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_subnet01_0001__row979634915639"><td class="cellrowborder" valign="top" width="15.410000000000002%" headers="mcps1.3.3.2.2.5.1.1 "><p id="vpc_subnet01_0001__p5530678015639">subnet</p>
</td>
<td class="cellrowborder" valign="top" width="20.12%" headers="mcps1.3.3.2.2.5.1.2 "><p id="vpc_subnet01_0001__p5066418415639">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="21.610000000000003%" headers="mcps1.3.3.2.2.5.1.3 "><p id="vpc_subnet01_0001__p1015820015639"><a href="#vpc_subnet01_0001__table45596481">subnet</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="42.86000000000001%" headers="mcps1.3.3.2.2.5.1.4 "><p id="vpc_subnet01_0001__p2335287515639">Specifies the <a href="#vpc_subnet01_0001__table45596481">subnet objects</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="p" id="vpc_subnet01_0001__p1478716610414">
<div class="tablenoborder"><a name="vpc_subnet01_0001__table45596481"></a><a name="table45596481"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet01_0001__table45596481" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="vpc_subnet01_0001__b842352706154221">subnet</strong> objects</caption><thead align="left"><tr id="vpc_subnet01_0001__row36936550"><th align="left" class="cellrowborder" valign="top" width="21.990000000000002%" id="mcps1.3.3.3.1.2.5.1.1"><p id="vpc_subnet01_0001__p39070558">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.919999999999998%" id="mcps1.3.3.3.1.2.5.1.2"><p id="vpc_subnet01_0001__p10598606">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.040000000000001%" id="mcps1.3.3.3.1.2.5.1.3"><p id="vpc_subnet01_0001__p795223417488">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="46.050000000000004%" id="mcps1.3.3.3.1.2.5.1.4"><p id="vpc_subnet01_0001__p53180767">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_subnet01_0001__row12674872"><td class="cellrowborder" valign="top" width="21.990000000000002%" headers="mcps1.3.3.3.1.2.5.1.1 "><p id="vpc_subnet01_0001__p20031746">name</p>
</td>
<td class="cellrowborder" valign="top" width="16.919999999999998%" headers="mcps1.3.3.3.1.2.5.1.2 "><p id="vpc_subnet01_0001__p11958757">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15.040000000000001%" headers="mcps1.3.3.3.1.2.5.1.3 "><p id="vpc_subnet01_0001__p190787317482">String</p>
</td>
<td class="cellrowborder" valign="top" width="46.050000000000004%" headers="mcps1.3.3.3.1.2.5.1.4 "><ul id="vpc_subnet01_0001__ul16769054204218"><li id="vpc_subnet01_0001__li197688543425">Specifies the subnet name. </li><li id="vpc_subnet01_0001__li11768175484212">The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.).</li></ul>
</td>
</tr>
<tr id="vpc_subnet01_0001__row163965221710"><td class="cellrowborder" valign="top" width="21.990000000000002%" headers="mcps1.3.3.3.1.2.5.1.1 "><p id="vpc_subnet01_0001__p1237219541173">description</p>
</td>
<td class="cellrowborder" valign="top" width="16.919999999999998%" headers="mcps1.3.3.3.1.2.5.1.2 "><p id="vpc_subnet01_0001__p1372154161713">No</p>
</td>
<td class="cellrowborder" valign="top" width="15.040000000000001%" headers="mcps1.3.3.3.1.2.5.1.3 "><p id="vpc_subnet01_0001__p837295491716">String</p>
</td>
<td class="cellrowborder" valign="top" width="46.050000000000004%" headers="mcps1.3.3.3.1.2.5.1.4 "><ul id="vpc_subnet01_0001__ul237215542179"><li id="vpc_subnet01_0001__li19372754181713">Provides supplementary information about the subnet.</li><li id="vpc_subnet01_0001__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_0001__row33189039"><td class="cellrowborder" valign="top" width="21.990000000000002%" headers="mcps1.3.3.3.1.2.5.1.1 "><p id="vpc_subnet01_0001__p3957675">cidr</p>
</td>
<td class="cellrowborder" valign="top" width="16.919999999999998%" headers="mcps1.3.3.3.1.2.5.1.2 "><p id="vpc_subnet01_0001__p52136226">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15.040000000000001%" headers="mcps1.3.3.3.1.2.5.1.3 "><p id="vpc_subnet01_0001__p2032001117482">String</p>
</td>
<td class="cellrowborder" valign="top" width="46.050000000000004%" headers="mcps1.3.3.3.1.2.5.1.4 "><ul id="vpc_subnet01_0001__ul4678105864210"><li id="vpc_subnet01_0001__li1678195814420">Specifies the subnet CIDR block.</li><li id="vpc_subnet01_0001__li10678145810422">The value must be within the VPC CIDR block.</li><li id="vpc_subnet01_0001__li967818583427">The value must be in CIDR format. The subnet mask cannot be greater than 28.</li></ul>
</td>
</tr>
<tr id="vpc_subnet01_0001__row24692740"><td class="cellrowborder" valign="top" width="21.990000000000002%" headers="mcps1.3.3.3.1.2.5.1.1 "><p id="vpc_subnet01_0001__p53954942">gateway_ip</p>
</td>
<td class="cellrowborder" valign="top" width="16.919999999999998%" headers="mcps1.3.3.3.1.2.5.1.2 "><p id="vpc_subnet01_0001__p8274172">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15.040000000000001%" headers="mcps1.3.3.3.1.2.5.1.3 "><p id="vpc_subnet01_0001__p3530821417482">String</p>
</td>
<td class="cellrowborder" valign="top" width="46.050000000000004%" headers="mcps1.3.3.3.1.2.5.1.4 "><ul id="vpc_subnet01_0001__ul1561512264319"><li id="vpc_subnet01_0001__li1661415284313">Specifies the gateway of the subnet.</li><li id="vpc_subnet01_0001__li66152254315">The value must be an IP address in the subnet.</li><li id="vpc_subnet01_0001__li136154254315">The value must be a valid IP address.</li></ul>
</td>
</tr>
<tr id="vpc_subnet01_0001__row51681624151419"><td class="cellrowborder" valign="top" width="21.990000000000002%" headers="mcps1.3.3.3.1.2.5.1.1 "><p id="vpc_subnet01_0001__p2064323121413">ipv6_enable</p>
</td>
<td class="cellrowborder" valign="top" width="16.919999999999998%" headers="mcps1.3.3.3.1.2.5.1.2 "><p id="vpc_subnet01_0001__p14643153110149">No</p>
</td>
<td class="cellrowborder" valign="top" width="15.040000000000001%" headers="mcps1.3.3.3.1.2.5.1.3 "><p id="vpc_subnet01_0001__p14643113121416">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="46.050000000000004%" headers="mcps1.3.3.3.1.2.5.1.4 "><ul id="vpc_subnet01_0001__ul1638111712169"><li id="vpc_subnet01_0001__li4380170165">Specifies whether IPv6 is enabled. If IPv6 is enabled, you can use IPv6 CIDR blocks.</li><li id="vpc_subnet01_0001__li1738117201616">The value can be <strong id="vpc_subnet01_0001__b8322948132218">true</strong> (enabled) or <strong id="vpc_subnet01_0001__b932274810224">false</strong> (disabled).</li><li id="vpc_subnet01_0001__li224623361812">If this parameter is left blank, the system automatically sets it to <strong id="vpc_subnet01_0001__b13357195117229">false</strong> by default.</li></ul>
</td>
</tr>
<tr id="vpc_subnet01_0001__row60429346"><td class="cellrowborder" valign="top" width="21.990000000000002%" headers="mcps1.3.3.3.1.2.5.1.1 "><p id="vpc_subnet01_0001__p62938818">dhcp_enable</p>
</td>
<td class="cellrowborder" valign="top" width="16.919999999999998%" headers="mcps1.3.3.3.1.2.5.1.2 "><p id="vpc_subnet01_0001__p64879470">No</p>
</td>
<td class="cellrowborder" valign="top" width="15.040000000000001%" headers="mcps1.3.3.3.1.2.5.1.3 "><p id="vpc_subnet01_0001__p4139309817482">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="46.050000000000004%" headers="mcps1.3.3.3.1.2.5.1.4 "><ul id="vpc_subnet01_0001__ul18877710204319"><li id="vpc_subnet01_0001__li188761510184315">Specifies whether DHCP is enabled for the subnet.</li><li id="vpc_subnet01_0001__li5877191044319">The value can be <strong id="vpc_subnet01_0001__b78972133820">true</strong> (enabled) or <strong id="vpc_subnet01_0001__b28922113816">false</strong> (disabled).</li><li id="vpc_subnet01_0001__li13877181034313">If this parameter is left blank, the value is set to <strong id="vpc_subnet01_0001__b10407196134313">true</strong> by default. If this parameter is set to <strong id="vpc_subnet01_0001__b842352706155749">false</strong>, newly created ECSs cannot obtain IP addresses, and usernames and passwords cannot be injected using Cloud-init.</li></ul>
</td>
</tr>
<tr id="vpc_subnet01_0001__row10232270"><td class="cellrowborder" valign="top" width="21.990000000000002%" headers="mcps1.3.3.3.1.2.5.1.1 "><p id="vpc_subnet01_0001__p23507505">primary_dns</p>
</td>
<td class="cellrowborder" valign="top" width="16.919999999999998%" headers="mcps1.3.3.3.1.2.5.1.2 "><p id="vpc_subnet01_0001__p25059790">No</p>
</td>
<td class="cellrowborder" valign="top" width="15.040000000000001%" headers="mcps1.3.3.3.1.2.5.1.3 "><p id="vpc_subnet01_0001__p6450660517482">String</p>
</td>
<td class="cellrowborder" valign="top" width="46.050000000000004%" headers="mcps1.3.3.3.1.2.5.1.4 "><ul id="vpc_subnet01_0001__ul12206161414435"><li id="vpc_subnet01_0001__li1320515145430">Specifies the IP address of DNS server 1 on the subnet.</li><li id="vpc_subnet01_0001__li92061414164312">The value must be an IP address. If the value is not specified, the default value will be left blank.</li></ul>
</td>
</tr>
<tr id="vpc_subnet01_0001__row45988614"><td class="cellrowborder" valign="top" width="21.990000000000002%" headers="mcps1.3.3.3.1.2.5.1.1 "><p id="vpc_subnet01_0001__p34090260">secondary_dns</p>
</td>
<td class="cellrowborder" valign="top" width="16.919999999999998%" headers="mcps1.3.3.3.1.2.5.1.2 "><p id="vpc_subnet01_0001__p9847715">No</p>
</td>
<td class="cellrowborder" valign="top" width="15.040000000000001%" headers="mcps1.3.3.3.1.2.5.1.3 "><p id="vpc_subnet01_0001__p5765255417482">String</p>
</td>
<td class="cellrowborder" valign="top" width="46.050000000000004%" headers="mcps1.3.3.3.1.2.5.1.4 "><ul id="vpc_subnet01_0001__ul59230186430"><li id="vpc_subnet01_0001__li13923101824319">Specifies the IP address of DNS server 2 on the subnet.</li><li id="vpc_subnet01_0001__li14300191417273">The value must be an IP address. If the value is not specified, the default value will be left blank.<p id="vpc_subnet01_0001__p5169518102720"><a name="vpc_subnet01_0001__li14300191417273"></a><a name="li14300191417273"></a>If only <strong id="vpc_subnet01_0001__b1864347185810">secondary_dns</strong> is specified and <strong id="vpc_subnet01_0001__b10182014155816">primary_dns</strong> is not specified, <strong id="vpc_subnet01_0001__b8818162815581">primary_dns</strong> will automatically use the value of <strong id="vpc_subnet01_0001__b1950910567583">secondary_dns</strong>.</p>
<p id="vpc_subnet01_0001__p459193617304">If there is only one DNS server address, only <strong id="vpc_subnet01_0001__b876657105914">primary_dns</strong> is displayed.</p>
</li></ul>
</td>
</tr>
<tr id="vpc_subnet01_0001__row1596910210505"><td class="cellrowborder" valign="top" width="21.990000000000002%" headers="mcps1.3.3.3.1.2.5.1.1 "><p id="vpc_subnet01_0001__p1842890810505">dnsList</p>
</td>
<td class="cellrowborder" valign="top" width="16.919999999999998%" headers="mcps1.3.3.3.1.2.5.1.2 "><p id="vpc_subnet01_0001__p1634655410505">No</p>
</td>
<td class="cellrowborder" valign="top" width="15.040000000000001%" headers="mcps1.3.3.3.1.2.5.1.3 "><p id="vpc_subnet01_0001__p16634345155517">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="46.050000000000004%" headers="mcps1.3.3.3.1.2.5.1.4 "><ul id="vpc_subnet01_0001__ul32521424144310"><li id="vpc_subnet01_0001__li1925119241434">Specifies the DNS server address list of a subnet. This field is required if you need to use more than two DNS servers.</li><li id="vpc_subnet01_0001__li7252112424316">This parameter value is the superset of both DNS server address 1 and DNS server address 2. If the value is not specified, the default value will be left blank.</li></ul>
</td>
</tr>
<tr id="vpc_subnet01_0001__row53182860"><td class="cellrowborder" valign="top" width="21.990000000000002%" headers="mcps1.3.3.3.1.2.5.1.1 "><p id="vpc_subnet01_0001__p12844374">vpc_id</p>
</td>
<td class="cellrowborder" valign="top" width="16.919999999999998%" headers="mcps1.3.3.3.1.2.5.1.2 "><p id="vpc_subnet01_0001__p33761356">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15.040000000000001%" headers="mcps1.3.3.3.1.2.5.1.3 "><p id="vpc_subnet01_0001__p3285166017482">String</p>
</td>
<td class="cellrowborder" valign="top" width="46.050000000000004%" headers="mcps1.3.3.3.1.2.5.1.4 "><p id="vpc_subnet01_0001__p50315352">Specifies the ID of the VPC to which the subnet belongs.</p>
</td>
</tr>
<tr id="vpc_subnet01_0001__row13029301879"><td class="cellrowborder" valign="top" width="21.990000000000002%" headers="mcps1.3.3.3.1.2.5.1.1 "><p id="vpc_subnet01_0001__p8303103018715">extra_dhcp_opts</p>
</td>
<td class="cellrowborder" valign="top" width="16.919999999999998%" headers="mcps1.3.3.3.1.2.5.1.2 "><p id="vpc_subnet01_0001__p1030320304714">No</p>
</td>
<td class="cellrowborder" valign="top" width="15.040000000000001%" headers="mcps1.3.3.3.1.2.5.1.3 "><p id="vpc_subnet01_0001__p8303730570">Array of <a href="#vpc_subnet01_0001__table1805181451016">extra_dhcp_opt</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="46.050000000000004%" headers="mcps1.3.3.3.1.2.5.1.4 "><p id="vpc_subnet01_0001__p130310301176">Specifies the NTP server address configured for the subnet. For details, see <a href="#vpc_subnet01_0001__table1805181451016">Table 4</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="tablenoborder"><a name="vpc_subnet01_0001__table1805181451016"></a><a name="table1805181451016"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet01_0001__table1805181451016" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="vpc_subnet01_0001__b842352706165741">extra_dhcp_opt</strong> object</caption><thead align="left"><tr id="vpc_subnet01_0001__row1806141418109"><th align="left" class="cellrowborder" valign="top" width="21.740000000000002%" id="mcps1.3.3.4.2.5.1.1"><p id="vpc_subnet01_0001__p1948182811017"><strong id="vpc_subnet01_0001__b842352706195711">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.17%" id="mcps1.3.3.4.2.5.1.2"><p id="vpc_subnet01_0001__p19515288107">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.619999999999997%" id="mcps1.3.3.4.2.5.1.3"><p id="vpc_subnet01_0001__p755202861014">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="45.47%" id="mcps1.3.3.4.2.5.1.4"><p id="vpc_subnet01_0001__p66018281105"><strong id="vpc_subnet01_0001__b1716215324573">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_subnet01_0001__row19806161420105"><td class="cellrowborder" valign="top" width="21.740000000000002%" headers="mcps1.3.3.4.2.5.1.1 "><p id="vpc_subnet01_0001__p1834323611017">opt_value</p>
</td>
<td class="cellrowborder" valign="top" width="16.17%" headers="mcps1.3.3.4.2.5.1.2 "><p id="vpc_subnet01_0001__p1034310368108">No</p>
</td>
<td class="cellrowborder" valign="top" width="16.619999999999997%" headers="mcps1.3.3.4.2.5.1.3 "><p id="vpc_subnet01_0001__p15343163651014">String</p>
</td>
<td class="cellrowborder" valign="top" width="45.47%" headers="mcps1.3.3.4.2.5.1.4 "><ul id="vpc_subnet01_0001__ul1734314363102"><li id="vpc_subnet01_0001__li2034343671010">Specifies the NTP server address configured for the subnet.</li><li id="vpc_subnet01_0001__li12343183661011">Constraints:<p id="vpc_subnet01_0001__p1984274292214"><a name="vpc_subnet01_0001__li12343183661011"></a><a name="li12343183661011"></a>The option <strong id="vpc_subnet01_0001__b18312174218176">ntp</strong> for <strong id="vpc_subnet01_0001__b2456833191713">opt_name</strong> 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 (,). The option <strong id="vpc_subnet01_0001__b1973813315213">null</strong> for <strong id="vpc_subnet01_0001__b9368121819213">opt_name</strong> 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_0001__row48061714191011"><td class="cellrowborder" valign="top" width="21.740000000000002%" headers="mcps1.3.3.4.2.5.1.1 "><p id="vpc_subnet01_0001__p33437363104">opt_name</p>
</td>
<td class="cellrowborder" valign="top" width="16.17%" headers="mcps1.3.3.4.2.5.1.2 "><p id="vpc_subnet01_0001__p1634393613106">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="16.619999999999997%" headers="mcps1.3.3.4.2.5.1.3 "><p id="vpc_subnet01_0001__p14343113613104">String</p>
</td>
<td class="cellrowborder" valign="top" width="45.47%" headers="mcps1.3.3.4.2.5.1.4 "><ul id="vpc_subnet01_0001__ul1934353641010"><li id="vpc_subnet01_0001__li1534373631020">Specifies the NTP server address name configured for the subnet.</li><li id="vpc_subnet01_0001__li11343133651014">Currently, the value can only be set to <strong id="vpc_subnet01_0001__b185618261310">ntp</strong>.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="vpc_subnet01_0001__section367619512154"><h4 class="sectiontitle">Example Request</h4><ul id="vpc_subnet01_0001__ul1050795761518"><li id="vpc_subnet01_0001__li115072057201512">Create a subnet with name set to <strong id="vpc_subnet01_0001__b24093216462">subnet</strong>, CIDR block set to 192.168.20.0/24, and gateway IP address set to 192.168.20.1 in the VPC with ID of 3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85.<pre class="screen" id="vpc_subnet01_0001__screen45353676143832">POST https://{Endpoint}/v1/{project_id}/subnets
{
"subnet": {
"name": "subnet",
"description": "",
"cidr": "192.168.20.0/24",
"gateway_ip": "192.168.20.1",
"ipv6_enable": true,
"dhcp_enable": true,
"primary_dns": "114.xx.xx.114",
"secondary_dns": "114.xx.xx.115",
"dnsList": [
"114.xx.xx.114",
"114.xx.xx.115"
],
"vpc_id": "3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85",
"extra_dhcp_opts": [
{
"opt_value": "10.100.0.33,10.100.0.34",
"opt_name": "ntp"
}
]
}
}</pre>
</li></ul>
</div>
<div class="section" id="vpc_subnet01_0001__section51595365"><h4 class="sectiontitle">Response Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet01_0001__table3201287115737" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response parameter</caption><thead align="left"><tr id="vpc_subnet01_0001__row4941460315737"><th align="left" class="cellrowborder" valign="top" width="18.34%" id="mcps1.3.5.2.2.4.1.1"><p id="vpc_subnet01_0001__p4315992415737">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25.509999999999998%" id="mcps1.3.5.2.2.4.1.2"><p id="vpc_subnet01_0001__p3996487815737">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="56.15%" id="mcps1.3.5.2.2.4.1.3"><p id="vpc_subnet01_0001__p1592968015737">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_subnet01_0001__row1523569015737"><td class="cellrowborder" valign="top" width="18.34%" headers="mcps1.3.5.2.2.4.1.1 "><p id="vpc_subnet01_0001__p2613139715737">subnet</p>
</td>
<td class="cellrowborder" valign="top" width="25.509999999999998%" headers="mcps1.3.5.2.2.4.1.2 "><p id="vpc_subnet01_0001__p5206127615737"><a href="#vpc_subnet01_0001__table54041329">subnet</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="56.15%" headers="mcps1.3.5.2.2.4.1.3 "><p id="vpc_subnet01_0001__p3616274015737">Specifies the <a href="#vpc_subnet01_0001__table54041329">subnet objects</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpc_subnet01_0001__table54041329"></a><a name="table54041329"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet01_0001__table54041329" frame="border" border="1" rules="all"><caption><b>Table 6 </b><strong id="vpc_subnet01_0001__b164618163516">subnet</strong> objects</caption><thead align="left"><tr id="vpc_subnet01_0001__row3088388"><th align="left" class="cellrowborder" valign="top" width="28.860000000000003%" id="mcps1.3.5.3.2.4.1.1"><p id="vpc_subnet01_0001__p48832851">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.25%" id="mcps1.3.5.3.2.4.1.2"><p id="vpc_subnet01_0001__p31305988175034">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="49.89%" id="mcps1.3.5.3.2.4.1.3"><p id="vpc_subnet01_0001__p14620943">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_subnet01_0001__row43445707"><td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0001__p29441404">id</p>
</td>
<td class="cellrowborder" valign="top" width="21.25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0001__p52757101175034">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.89%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0001__p25747420">Specifies the resource identifier in the form of UUID.</p>
</td>
</tr>
<tr id="vpc_subnet01_0001__row30400195"><td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0001__p46496694">name</p>
</td>
<td class="cellrowborder" valign="top" width="21.25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0001__p45466823175034">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.89%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_subnet01_0001__ul23311559134110"><li id="vpc_subnet01_0001__li10331195974115">Specifies the subnet name. </li><li id="vpc_subnet01_0001__li13332135944118">The value can contain 1 to 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.).</li></ul>
</td>
</tr>
<tr id="vpc_subnet01_0001__row558919286262"><td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0001__p71821430112615">description</p>
</td>
<td class="cellrowborder" valign="top" width="21.25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0001__p4182153010268">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.89%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_subnet01_0001__ul183161512131417"><li id="vpc_subnet01_0001__li431661210149">Provides supplementary information about the subnet.</li><li id="vpc_subnet01_0001__li331631217147">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_0001__row51945267"><td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0001__p46817064">cidr</p>
</td>
<td class="cellrowborder" valign="top" width="21.25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0001__p58934074175034">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.89%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_subnet01_0001__ul899517162424"><li id="vpc_subnet01_0001__li69951816124210">Specifies the subnet CIDR block.</li><li id="vpc_subnet01_0001__li119951916144210">The value must be within the VPC CIDR block.</li><li id="vpc_subnet01_0001__li109951316154214">The value must be in CIDR format. The subnet mask cannot be greater than 28.</li></ul>
</td>
</tr>
<tr id="vpc_subnet01_0001__row39696553"><td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0001__p61304253">gateway_ip</p>
</td>
<td class="cellrowborder" valign="top" width="21.25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0001__p8930669175034">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.89%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_subnet01_0001__ul1526163074211"><li id="vpc_subnet01_0001__li426230114216">Specifies the gateway of the subnet.</li><li id="vpc_subnet01_0001__li72643012420">The value must be an IP address in the subnet.</li><li id="vpc_subnet01_0001__li1261302421">The value must be a valid IP address.</li></ul>
</td>
</tr>
<tr id="vpc_subnet01_0001__row185651850141918"><td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0001__p19297115231920">ipv6_enable</p>
</td>
<td class="cellrowborder" valign="top" width="21.25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0001__p529715528195">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="49.89%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0001__p102973527197">Specifies whether an IPv6 subnet can be created.</p>
</td>
</tr>
<tr id="vpc_subnet01_0001__row98259468191"><td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0001__p18297205218192">cidr_v6</p>
</td>
<td class="cellrowborder" valign="top" width="21.25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0001__p429725216193">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.89%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0001__p10395101392610">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_0001__row611284491918"><td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0001__p112970521191">gateway_ip_v6</p>
</td>
<td class="cellrowborder" valign="top" width="21.25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0001__p1629713522197">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.89%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0001__p17395813192617">Specifies the IPv6 subnet gateway. If the subnet is an IPv4 subnet, this parameter is not returned.</p>
</td>
</tr>
<tr id="vpc_subnet01_0001__row4606985"><td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0001__p37621475">dhcp_enable</p>
</td>
<td class="cellrowborder" valign="top" width="21.25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0001__p52295560175034">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="49.89%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0001__p29849008175159">Specifies whether DHCP is enabled for the subnet.</p>
</td>
</tr>
<tr id="vpc_subnet01_0001__row1048160"><td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0001__p17792110">primary_dns</p>
</td>
<td class="cellrowborder" valign="top" width="21.25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0001__p8081972175034">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.89%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_subnet01_0001__ul12973239121414"><li id="vpc_subnet01_0001__vpc_subnet01_0001_li1320515145430">Specifies the IP address of DNS server 1 on the subnet.</li><li id="vpc_subnet01_0001__vpc_subnet01_0001_li92061414164312">The value must be an IP address. If the value is not specified, the default value will be left blank.</li></ul>
</td>
</tr>
<tr id="vpc_subnet01_0001__row8622890"><td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0001__p27365507">secondary_dns</p>
</td>
<td class="cellrowborder" valign="top" width="21.25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0001__p50659992175034">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.89%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_subnet01_0001__ul13501925191515"><li id="vpc_subnet01_0001__vpc_subnet01_0001_li13923101824319">Specifies the IP address of DNS server 2 on the subnet.</li><li id="vpc_subnet01_0001__vpc_subnet01_0001_li14300191417273">The value must be an IP address. If the value is not specified, the default value will be left blank.<p id="vpc_subnet01_0001__vpc_subnet01_0001_p5169518102720"><a name="vpc_subnet01_0001__vpc_subnet01_0001_li14300191417273"></a><a name="vpc_subnet01_0001_li14300191417273"></a>If only <strong id="vpc_subnet01_0001__vpc_subnet01_0001_b1864347185810">secondary_dns</strong> is specified and <strong id="vpc_subnet01_0001__vpc_subnet01_0001_b10182014155816">primary_dns</strong> is not specified, <strong id="vpc_subnet01_0001__vpc_subnet01_0001_b8818162815581">primary_dns</strong> will automatically use the value of <strong id="vpc_subnet01_0001__vpc_subnet01_0001_b1950910567583">secondary_dns</strong>.</p>
<p id="vpc_subnet01_0001__vpc_subnet01_0001_p459193617304">If there is only one DNS server address, only <strong id="vpc_subnet01_0001__vpc_subnet01_0001_b876657105914">primary_dns</strong> is displayed.</p>
</li></ul>
</td>
</tr>
<tr id="vpc_subnet01_0001__row29925916105649"><td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0001__p8080156105649">dnsList</p>
</td>
<td class="cellrowborder" valign="top" width="21.25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0001__p9490145416555">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="49.89%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_subnet01_0001__ul49847504154"><li id="vpc_subnet01_0001__vpc_subnet01_0001_li1925119241434">Specifies the DNS server address list of a subnet. This field is required if you need to use more than two DNS servers.</li><li id="vpc_subnet01_0001__vpc_subnet01_0001_li7252112424316">This parameter value is the superset of both DNS server address 1 and DNS server address 2. If the value is not specified, the default value will be left blank.</li></ul>
</td>
</tr>
<tr id="vpc_subnet01_0001__row15677883"><td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0001__p61948991">vpc_id</p>
</td>
<td class="cellrowborder" valign="top" width="21.25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0001__p57118635175034">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.89%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0001__p36052245">Specifies the ID of the VPC to which the subnet belongs.</p>
</td>
</tr>
<tr id="vpc_subnet01_0001__row34550710"><td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0001__p47144157">status</p>
</td>
<td class="cellrowborder" valign="top" width="21.25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0001__p63206697175034">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.89%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_subnet01_0001__ul756817571315"><li id="vpc_subnet01_0001__li13201524194619">Specifies the status of the subnet.</li><li id="vpc_subnet01_0001__li18201524114619">The value can be <strong id="vpc_subnet01_0001__b14938216382">ACTIVE</strong>, <strong id="vpc_subnet01_0001__b1993132133816">UNKNOWN</strong>, or <strong id="vpc_subnet01_0001__b119319210386">ERROR</strong>.<ul id="vpc_subnet01_0001__ul83391032184614"><li id="vpc_subnet01_0001__li175681357183117"><strong id="vpc_subnet01_0001__b252312334119">ACTIVE</strong>: indicates that the subnet has been associated with a VPC.</li><li id="vpc_subnet01_0001__li5568157103111"><strong id="vpc_subnet01_0001__b842352706151633">UNKNOWN</strong>: indicates that the subnet has not been associated with a VPC.</li><li id="vpc_subnet01_0001__li85681932326"><strong id="vpc_subnet01_0001__b842352706151734">ERROR</strong>: indicates that the subnet is abnormal.</li></ul>
</li><li id="vpc_subnet01_0001__li22011924174614">The system creates a subnet and then associates the subnet with a VPC in the threads.<p id="vpc_subnet01_0001__p149484964617"><a name="vpc_subnet01_0001__li22011924174614"></a><a name="li22011924174614"></a>In the concurrent scenario, if the CIDR block of the created subnet is the same as that of an existing subnet, the created subnet fails to associate with a VPC after underlying system verification. As a result, the subnet creation fails.</p>
<p id="vpc_subnet01_0001__p116091753134614">In this scenario, the returned value of <strong id="vpc_subnet01_0001__b842352706172823">status</strong> is <strong id="vpc_subnet01_0001__b842352706172828">UNKNOWN</strong>.</p>
</li></ul>
</td>
</tr>
<tr id="vpc_subnet01_0001__row3884489103221"><td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0001__p34960403103221">neutron_network_id</p>
</td>
<td class="cellrowborder" valign="top" width="21.25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0001__p64221241103221">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.89%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0001__p34538004103221">Specifies the ID of the corresponding network (OpenStack Neutron API).</p>
</td>
</tr>
<tr id="vpc_subnet01_0001__row5205001104010"><td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0001__p18951959104010">neutron_subnet_id</p>
</td>
<td class="cellrowborder" valign="top" width="21.25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0001__p58188011104010">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.89%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0001__p15608450104010">Specifies the ID of the corresponding subnet (OpenStack Neutron API).</p>
</td>
</tr>
<tr id="vpc_subnet01_0001__row1850193520206"><td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0001__p114118445203">neutron_subnet_id_v6</p>
</td>
<td class="cellrowborder" valign="top" width="21.25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0001__p241144422016">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.89%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0001__p14181193312260">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_0001__row179381878268"><td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0001__p5714303263">extra_dhcp_opts</p>
</td>
<td class="cellrowborder" valign="top" width="21.25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0001__p01223042610">Array of <a href="#vpc_subnet01_0001__table019517383270">extra_dhcp_opt</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="49.89%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0001__p41825339261">Specifies the NTP server address configured for the subnet. For details, see <a href="#vpc_subnet01_0001__table019517383270">Table 7</a>.</p>
</td>
</tr>
<tr id="vpc_subnet01_0001__row188065151217"><td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0001__p83661745101212">scope</p>
</td>
<td class="cellrowborder" valign="top" width="21.25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0001__p4366945181218">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.89%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0001__p167191226171312">Specifies where the subnet is used in edge cloud scenario.</p>
<p id="vpc_subnet01_0001__p91113352131">Values:</p>
<ul id="vpc_subnet01_0001__ul39741155111314"><li id="vpc_subnet01_0001__li09751455101310"><strong id="vpc_subnet01_0001__b161581440132319">center</strong>: The subnet is used in a central AZ.</li><li id="vpc_subnet01_0001__li1997519553137"><em id="vpc_subnet01_0001__i97021648105716">{azId}</em>: The subnet is used in an edge AZ.</li></ul>
</td>
</tr>
<tr id="vpc_subnet01_0001__row293913118215"><td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0001__p8425113511211">tenant_id</p>
</td>
<td class="cellrowborder" valign="top" width="21.25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0001__p1342543532116">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.89%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_subnet01_0001__p9425143519213">Project ID</p>
</td>
</tr>
<tr id="vpc_subnet01_0001__row29401717212"><td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0001__p106711441172119">created_at</p>
</td>
<td class="cellrowborder" valign="top" width="21.25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0001__p867112418216">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.89%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_subnet01_0001__ul13463133512"><li id="vpc_subnet01_0001__li114610173513">Specifies the time (UTC) when the subnet is created.</li><li id="vpc_subnet01_0001__li84711133511">Format: <em id="vpc_subnet01_0001__i1328324510323">yyyy-MM-ddTHH:mm:ss</em></li></ul>
</td>
</tr>
<tr id="vpc_subnet01_0001__row189402118214"><td class="cellrowborder" valign="top" width="28.860000000000003%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_subnet01_0001__p96711541192118">updated_at</p>
</td>
<td class="cellrowborder" valign="top" width="21.25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_subnet01_0001__p1467116412217">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.89%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_subnet01_0001__ul9899124133520"><li id="vpc_subnet01_0001__li128991544351">Specifies the time (UTC) when the subnet is updated.</li><li id="vpc_subnet01_0001__li989913413351">Format: <em id="vpc_subnet01_0001__i219818217568">yyyy-MM-ddTHH:mm:ss</em></li></ul>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpc_subnet01_0001__table019517383270"></a><a name="table019517383270"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet01_0001__table019517383270" frame="border" border="1" rules="all"><caption><b>Table 7 </b><strong id="vpc_subnet01_0001__vpc_subnet01_0001_b842352706165741">extra_dhcp_opt</strong> object</caption><thead align="left"><tr id="vpc_subnet01_0001__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_0001__vpc_subnet01_0001_p1948182811017"><strong id="vpc_subnet01_0001__vpc_subnet01_0001_b842352706195711">Name</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_0001__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_0001__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_0001__vpc_subnet01_0001_p66018281105"><strong id="vpc_subnet01_0001__vpc_subnet01_0001_b1716215324573">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_subnet01_0001__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_0001__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_0001__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_0001__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_0001__vpc_subnet01_0001_ul1734314363102"><li id="vpc_subnet01_0001__vpc_subnet01_0001_li2034343671010">Specifies the NTP server address configured for the subnet.</li><li id="vpc_subnet01_0001__vpc_subnet01_0001_li12343183661011">Constraints:<p id="vpc_subnet01_0001__vpc_subnet01_0001_p1984274292214"><a name="vpc_subnet01_0001__vpc_subnet01_0001_li12343183661011"></a><a name="vpc_subnet01_0001_li12343183661011"></a>The option <strong id="vpc_subnet01_0001__vpc_subnet01_0001_b18312174218176">ntp</strong> for <strong id="vpc_subnet01_0001__vpc_subnet01_0001_b2456833191713">opt_name</strong> 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 (,). The option <strong id="vpc_subnet01_0001__vpc_subnet01_0001_b1973813315213">null</strong> for <strong id="vpc_subnet01_0001__vpc_subnet01_0001_b9368121819213">opt_name</strong> 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_0001__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_0001__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_0001__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_0001__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_0001__vpc_subnet01_0001_ul1934353641010"><li id="vpc_subnet01_0001__vpc_subnet01_0001_li1534373631020">Specifies the NTP server address name configured for the subnet.</li><li id="vpc_subnet01_0001__vpc_subnet01_0001_li11343133651014">Currently, the value can only be set to <strong id="vpc_subnet01_0001__vpc_subnet01_0001_b185618261310">ntp</strong>.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="vpc_subnet01_0001__section1964873651711"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="vpc_subnet01_0001__screen4123652914390">{
"subnet": {
"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": "UNKNOWN",
"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",
"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"
}
}</pre>
</div>
<div class="section" id="vpc_subnet01_0001__section31981619"><h4 class="sectiontitle">Status Code</h4><p id="vpc_subnet01_0001__p18112112662914">See <a href="vpc_api_0002.html">Status Codes</a>.</p>
</div>
<div class="section" id="vpc_subnet01_0001__section85821649202813"><h4 class="sectiontitle">Error Code</h4><p id="vpc_subnet01_0001__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>