forked from docs/doc-exports
Reviewed-by: Kucerak, Kristian <kristian.kucerak@t-systems.com> Co-authored-by: gtema <artem.goncharov@gmail.com> Co-committed-by: gtema <artem.goncharov@gmail.com>
409 lines
33 KiB
HTML
409 lines
33 KiB
HTML
<a name="vpc_subnet02_0004"></a><a name="vpc_subnet02_0004"></a>
|
|
|
|
<h1 class="topictitle1">Updating a Subnet</h1>
|
|
<div id="body1496890183069"><div class="section" id="vpc_subnet02_0004__section10267951"><h4 class="sectiontitle">Function</h4><p id="vpc_subnet02_0004__p15526968">This API is used to update information about a subnet.</p>
|
|
<p id="vpc_subnet02_0004__p1296719174175">Restrictions</p>
|
|
<p id="vpc_subnet02_0004__p105299247172">When updating the <strong id="vpc_subnet02_0004__b842352706154934">allocation_pools</strong> field, neither gateway nor broadcast IP addresses can be included.</p>
|
|
</div>
|
|
<div class="section" id="vpc_subnet02_0004__section25302698"><h4 class="sectiontitle">URI</h4><p id="vpc_subnet02_0004__p129735251611">PUT /v2.0/subnets/{subnet_id}</p>
|
|
</div>
|
|
<div class="section" id="vpc_subnet02_0004__section36252627"><h4 class="sectiontitle">Request Message</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet02_0004__table40701910" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request parameter</caption><thead align="left"><tr id="vpc_subnet02_0004__row5914937"><th align="left" class="cellrowborder" valign="top" width="17.67176717671767%" id="mcps1.3.3.2.2.5.1.1"><p id="vpc_subnet02_0004__p9347893">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.861286128612862%" id="mcps1.3.3.2.2.5.1.2"><p id="vpc_subnet02_0004__p18981865">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.09180918091809%" id="mcps1.3.3.2.2.5.1.3"><p id="vpc_subnet02_0004__p61136126">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="51.375137513751376%" id="mcps1.3.3.2.2.5.1.4"><p id="vpc_subnet02_0004__p53079196">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_subnet02_0004__row4447594"><td class="cellrowborder" valign="top" width="17.67176717671767%" headers="mcps1.3.3.2.2.5.1.1 "><p id="vpc_subnet02_0004__p24710800">subnet</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.861286128612862%" headers="mcps1.3.3.2.2.5.1.2 "><p id="vpc_subnet02_0004__p55417783"><a href="#vpc_subnet02_0004__table12211980105515">subnet</a> object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.09180918091809%" headers="mcps1.3.3.2.2.5.1.3 "><p id="vpc_subnet02_0004__p59655430">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51.375137513751376%" headers="mcps1.3.3.2.2.5.1.4 "><p id="vpc_subnet02_0004__p37955333">Specifies the subnet. For details, see <a href="#vpc_subnet02_0004__table12211980105515">Table 2</a>.</p>
|
|
<p id="vpc_subnet02_0004__p2265180">You must specify at least one attribute when updating a subnet.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="vpc_subnet02_0004__table12211980105515"></a><a name="table12211980105515"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet02_0004__table12211980105515" frame="border" border="1" rules="all"><caption><b>Table 2 </b><strong id="vpc_subnet02_0004__b3558758143713">subnet</strong> objects</caption><thead align="left"><tr id="vpc_subnet02_0004__row32722637105515"><th align="left" class="cellrowborder" valign="top" width="24.93%" id="mcps1.3.3.3.2.5.1.1"><p id="vpc_subnet02_0004__p60075710105815"><strong id="vpc_subnet02_0004__b1960412388385">Attribute</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.02%" id="mcps1.3.3.3.2.5.1.2"><p id="vpc_subnet02_0004__p194182022104514"><strong id="vpc_subnet02_0004__b1358373914383">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="24.93%" id="mcps1.3.3.3.2.5.1.3"><p id="vpc_subnet02_0004__p34294369105815"><strong id="vpc_subnet02_0004__b9825114083812">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="38.12%" id="mcps1.3.3.3.2.5.1.4"><p id="vpc_subnet02_0004__p25203839105815"><strong id="vpc_subnet02_0004__b37601241153816">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_subnet02_0004__row43081158105515"><td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.3.3.2.5.1.1 "><p id="vpc_subnet02_0004__p54833166105624">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.02%" headers="mcps1.3.3.3.2.5.1.2 "><p id="vpc_subnet02_0004__p11418162219452">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.3.3.2.5.1.3 "><p id="vpc_subnet02_0004__p12301465105624">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="38.12%" headers="mcps1.3.3.3.2.5.1.4 "><p id="vpc_subnet02_0004__p14797472105624">Specifies the subnet name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnet02_0004__row2545218105647"><td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.3.3.2.5.1.1 "><p id="vpc_subnet02_0004__p1395064410577">allocation_pools</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.02%" headers="mcps1.3.3.3.2.5.1.2 "><p id="vpc_subnet02_0004__p19418122284515">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.3.3.2.5.1.3 "><p id="vpc_subnet02_0004__p5626034310577">Array of <a href="#vpc_subnet02_0004__table24611730">allocation_pool</a> objects</p>
|
|
<p id="vpc_subnet02_0004__p3658104710577"></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="38.12%" headers="mcps1.3.3.3.2.5.1.4 "><p id="vpc_subnet02_0004__p2390980910577">Specifies the available IP address pool. For details about the <strong id="vpc_subnet02_0004__b842352706192134">allocation_pool</strong> objects, see <a href="#vpc_subnet02_0004__table24611730">Table 3</a>.</p>
|
|
<p id="vpc_subnet02_0004__p1386169010577">Example: [ { "start": "10.0.0.2", "end": "10.0.0.251"} ]</p>
|
|
<p id="vpc_subnet02_0004__p1961191927">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_0004__b10846899393">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_0004__b766815245395">allocation_pool</strong>.</p>
|
|
<p id="vpc_subnet02_0004__p5764635410577">When updating an IP address pool, the <strong id="vpc_subnet02_0004__b182341927123916">allocation_pool</strong> value can contain neither gateway nor broadcast IP addresses. </p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnet02_0004__row22360302105653"><td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.3.3.2.5.1.1 "><p id="vpc_subnet02_0004__p1404384110577">dns_nameservers</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.02%" headers="mcps1.3.3.3.2.5.1.2 "><p id="vpc_subnet02_0004__p2418922154512">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.3.3.2.5.1.3 "><p id="vpc_subnet02_0004__p6380932110577">Array of strings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="38.12%" headers="mcps1.3.3.3.2.5.1.4 "><p id="vpc_subnet02_0004__p324929310577">Specifies the DNS server address.</p>
|
|
<p id="vpc_subnet02_0004__p1218711851714">Instructions:</p>
|
|
<p id="vpc_subnet02_0004__p2924364410577">Example: "dns_nameservers": ["8.xx.xx.8","8.xx.xx.4"]</p>
|
|
<p id="vpc_subnet02_0004__p1294111141716">A maximum of five DNS server addresses are supported.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnet02_0004__row17847900105653"><td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.3.3.2.5.1.1 "><p id="vpc_subnet02_0004__p4510693110577">host_routes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.02%" headers="mcps1.3.3.3.2.5.1.2 "><p id="vpc_subnet02_0004__p3418112264518">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.3.3.2.5.1.3 "><p id="vpc_subnet02_0004__p166911588244">Array of <a href="#vpc_subnet02_0004__table5232330">host_route</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="38.12%" headers="mcps1.3.3.3.2.5.1.4 "><p id="vpc_subnet02_0004__p2002497710577">Specifies the static VM routes. For details, see <a href="#vpc_subnet02_0004__table5232330">Table 4</a>.</p>
|
|
<p id="vpc_subnet02_0004__p4600706610577">Static routes are not supported, and entered information will be ignored.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnet02_0004__row21625046105653"><td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.3.3.2.5.1.1 "><p id="vpc_subnet02_0004__p4495318510577">enable_dhcp</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.02%" headers="mcps1.3.3.3.2.5.1.2 "><p id="vpc_subnet02_0004__p1041812214516">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.93%" headers="mcps1.3.3.3.2.5.1.3 "><p id="vpc_subnet02_0004__p1732939410577">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="38.12%" headers="mcps1.3.3.3.2.5.1.4 "><p id="vpc_subnet02_0004__p2100438810577">Specifies whether to enable the DHCP function. Value <strong id="vpc_subnet02_0004__b19658165919430">false</strong> indicates that the DHCP function is not enabled.</p>
|
|
<p id="vpc_subnet02_0004__p5482176910577">The value can only be <strong id="vpc_subnet02_0004__b5528126184513">true</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="vpc_subnet02_0004__table24611730"></a><a name="table24611730"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet02_0004__table24611730" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="vpc_subnet02_0004__b1496503216459">allocation_pool</strong> objects</caption><thead align="left"><tr id="vpc_subnet02_0004__row15154020"><th align="left" class="cellrowborder" valign="top" width="21.18%" id="mcps1.3.3.4.2.5.1.1"><p id="vpc_subnet02_0004__p19516075"><strong id="vpc_subnet02_0004__b168601438114519">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.7%" id="mcps1.3.3.4.2.5.1.2"><p id="vpc_subnet02_0004__p1327122842316"><strong id="vpc_subnet02_0004__b1410411408459">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.78%" id="mcps1.3.3.4.2.5.1.3"><p id="vpc_subnet02_0004__p37298263"><strong id="vpc_subnet02_0004__b13407164174516">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="46.339999999999996%" id="mcps1.3.3.4.2.5.1.4"><p id="vpc_subnet02_0004__p15727687"><strong id="vpc_subnet02_0004__b1512154218453">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_subnet02_0004__row7331458"><td class="cellrowborder" valign="top" width="21.18%" headers="mcps1.3.3.4.2.5.1.1 "><p id="vpc_subnet02_0004__p56977217">start</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.7%" headers="mcps1.3.3.4.2.5.1.2 "><p id="vpc_subnet02_0004__p227112286236">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.78%" headers="mcps1.3.3.4.2.5.1.3 "><p id="vpc_subnet02_0004__p51751889">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="46.339999999999996%" headers="mcps1.3.3.4.2.5.1.4 "><p id="vpc_subnet02_0004__p51610228">Specifies the start IP address of a network pool.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnet02_0004__row61838871"><td class="cellrowborder" valign="top" width="21.18%" headers="mcps1.3.3.4.2.5.1.1 "><p id="vpc_subnet02_0004__p42892680">end</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.7%" headers="mcps1.3.3.4.2.5.1.2 "><p id="vpc_subnet02_0004__p1727314281237">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.78%" headers="mcps1.3.3.4.2.5.1.3 "><p id="vpc_subnet02_0004__p51755094">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="46.339999999999996%" headers="mcps1.3.3.4.2.5.1.4 "><p id="vpc_subnet02_0004__p10006650">Specifies the end IP address of a network pool.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="vpc_subnet02_0004__table5232330"></a><a name="table5232330"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet02_0004__table5232330" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="vpc_subnet02_0004__b8570335144618">host_route</strong> objects</caption><thead align="left"><tr id="vpc_subnet02_0004__row65973637"><th align="left" class="cellrowborder" valign="top" width="21.55%" id="mcps1.3.3.5.2.5.1.1"><p id="vpc_subnet02_0004__p42264412"><strong id="vpc_subnet02_0004__b14654153617462">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.649999999999999%" id="mcps1.3.3.5.2.5.1.2"><p id="vpc_subnet02_0004__p197406419246"><strong id="vpc_subnet02_0004__b9401337154614">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16.63%" id="mcps1.3.3.5.2.5.1.3"><p id="vpc_subnet02_0004__p865310"><strong id="vpc_subnet02_0004__b14292038174615">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="47.17%" id="mcps1.3.3.5.2.5.1.4"><p id="vpc_subnet02_0004__p31641985"><strong id="vpc_subnet02_0004__b214343904610">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_subnet02_0004__row16342414"><td class="cellrowborder" valign="top" width="21.55%" headers="mcps1.3.3.5.2.5.1.1 "><p id="vpc_subnet02_0004__p48667192">destination</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.649999999999999%" headers="mcps1.3.3.5.2.5.1.2 "><p id="vpc_subnet02_0004__p181671451247">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.63%" headers="mcps1.3.3.5.2.5.1.3 "><p id="vpc_subnet02_0004__p49728507">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="47.17%" headers="mcps1.3.3.5.2.5.1.4 "><p id="vpc_subnet02_0004__p28535525">Specifies the destination subnet of a route.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnet02_0004__row55493137"><td class="cellrowborder" valign="top" width="21.55%" headers="mcps1.3.3.5.2.5.1.1 "><p id="vpc_subnet02_0004__p65759080">nexthop</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.649999999999999%" headers="mcps1.3.3.5.2.5.1.2 "><p id="vpc_subnet02_0004__p174054102412">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.63%" headers="mcps1.3.3.5.2.5.1.3 "><p id="vpc_subnet02_0004__p24885284">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="47.17%" headers="mcps1.3.3.5.2.5.1.4 "><p id="vpc_subnet02_0004__p51086148">Specifies the next-hop IP address of a route.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="vpc_subnet02_0004__section57838187"><h4 class="sectiontitle">Response Message</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet02_0004__table49261880" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response parameter</caption><thead align="left"><tr id="vpc_subnet02_0004__row31386613"><th align="left" class="cellrowborder" valign="top" width="31.7%" id="mcps1.3.4.2.2.4.1.1"><p id="vpc_subnet02_0004__p59287744">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.080000000000002%" id="mcps1.3.4.2.2.4.1.2"><p id="vpc_subnet02_0004__p37577972">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="51.22%" id="mcps1.3.4.2.2.4.1.3"><p id="vpc_subnet02_0004__p58217140">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_subnet02_0004__row17967889"><td class="cellrowborder" valign="top" width="31.7%" headers="mcps1.3.4.2.2.4.1.1 "><p id="vpc_subnet02_0004__p46112886">subnet</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.080000000000002%" headers="mcps1.3.4.2.2.4.1.2 "><p id="vpc_subnet02_0004__p44156300"><a href="#vpc_subnet02_0004__table176735992713">subnet</a> object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51.22%" headers="mcps1.3.4.2.2.4.1.3 "><p id="vpc_subnet02_0004__p522217">Specifies the subnet. For details, see <a href="#vpc_subnet02_0004__table176735992713">Table 6</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="vpc_subnet02_0004__table176735992713"></a><a name="table176735992713"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet02_0004__table176735992713" frame="border" border="1" rules="all"><caption><b>Table 6 </b><strong id="vpc_subnet02_0004__b17257457194618">subnet</strong> objects</caption><thead align="left"><tr id="vpc_subnet02_0004__row176713593276"><th align="left" class="cellrowborder" valign="top" width="28.332833283328334%" id="mcps1.3.4.3.2.4.1.1"><p id="vpc_subnet02_0004__p136755912715"><strong id="vpc_subnet02_0004__b15294115864614">Attribute</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="28.332833283328334%" id="mcps1.3.4.3.2.4.1.2"><p id="vpc_subnet02_0004__p667105912718"><strong id="vpc_subnet02_0004__b1593719598461">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="43.33433343334334%" id="mcps1.3.4.3.2.4.1.3"><p id="vpc_subnet02_0004__p26855915275"><strong id="vpc_subnet02_0004__b1678270124720">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_subnet02_0004__row28303131105515"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnet02_0004__p2014344105614">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnet02_0004__p28944191105614">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnet02_0004__p53796361105614">Specifies the subnet ID.</p>
|
|
<p id="vpc_subnet02_0004__p2677113954519">This parameter is not mandatory when you query subnets.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnet02_0004__row1868135972719"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnet02_0004__p37015595272">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnet02_0004__p18706591271">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnet02_0004__p1870259172715">Specifies the subnet name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnet02_0004__row670165910271"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnet02_0004__p187012596279">ip_version</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnet02_0004__p137095922720">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnet02_0004__p870155932715">Specifies the IP address version.</p>
|
|
<p id="vpc_subnet02_0004__p10708598273">Supported versions: IPv4</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnet02_0004__row970185911274"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnet02_0004__p5719599271">network_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnet02_0004__p1671105982710">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnet02_0004__p1071259102716">Specifies the ID of the network to which the subnet belongs.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnet02_0004__row9711659142718"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnet02_0004__p1471155922712">cidr</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnet02_0004__p1871155912279">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnet02_0004__p471115972720">Specifies the CIDR format.</p>
|
|
<p id="vpc_subnet02_0004__p171105952717">Only the addresses in the 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 network segments are supported. In addition, the subnet mask cannot be greater than 28. </p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnet02_0004__row373659122718"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnet02_0004__p173195914274">gateway_ip</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnet02_0004__p16733594272">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnet02_0004__p167319597276">The gateway IP address cannot conflict with IP addresses configured for <strong id="vpc_subnet02_0004__b517545917470">allocation_pools</strong>.</p>
|
|
<p id="vpc_subnet02_0004__p1773175918271">This attribute cannot be modified. </p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnet02_0004__row6733598278"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnet02_0004__p37325918273">allocation_pools</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnet02_0004__p974125918276">Array of <a href="#vpc_subnet02_0004__table1777145918276">allocation_pool</a> objects</p>
|
|
<p id="vpc_subnet02_0004__p107495982715"></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnet02_0004__p13740597271">Specifies the available IP address pool. For details, see the <strong id="vpc_subnet02_0004__b75841341562">allocation_pool</strong> objects.</p>
|
|
<p id="vpc_subnet02_0004__p8891441195814"><a href="#vpc_subnet02_0004__table1777145918276">Table 7</a></p>
|
|
<p id="vpc_subnet02_0004__p137415915279">Example: [ { "start": "10.0.0.2", "end": "10.0.0.251"} ]</p>
|
|
<p id="vpc_subnet02_0004__p10157152183615">The last three and the first IP addresses in each subnet are the ones reserved by the system. For example, in IPv4 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_0004__p167414592279">By default, the IP addresses reserved by the system are not in the IP address pool specified by <strong id="vpc_subnet02_0004__b1632291717563">allocation_pool</strong>.</p>
|
|
<p id="vpc_subnet02_0004__p074359192720">When updating an IP address pool, the <strong id="vpc_subnet02_0004__b258412115618">allocation_pool</strong> value can contain neither gateway nor broadcast IP addresses. </p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnet02_0004__row474205911270"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnet02_0004__p774105972720">dns_nameservers</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnet02_0004__p1474155952710">Array of strings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnet02_0004__p10743593273">Specifies the DNS server address.</p>
|
|
<p id="vpc_subnet02_0004__p97485912712">Example: "dns_nameservers": ["8.xx.xx.8","8.xx.xx.4"]</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnet02_0004__row6741659182714"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnet02_0004__p574959122713">host_routes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnet02_0004__p3169174310293">Array of <a href="#vpc_subnet02_0004__table177865912715">host_route</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnet02_0004__p2074459132712">Specifies the static VM routes. For details, see <a href="#vpc_subnet02_0004__table177865912715">Table 8</a>.</p>
|
|
<p id="vpc_subnet02_0004__p1674359172717">Static routes are not supported, and entered information will be ignored.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnet02_0004__row42017779105653"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnet02_0004__p5182838910577">tenant_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnet02_0004__p3734998010577">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnet02_0004__p10487112">Specifies the project ID. </p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnet02_0004__row97535914274"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnet02_0004__p475959202718">enable_dhcp</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnet02_0004__p2755596279">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnet02_0004__p47595962710">Specifies whether to enable the DHCP function. Value <strong id="vpc_subnet02_0004__b2789114445716">false</strong> indicates that the DHCP function is not enabled.</p>
|
|
<p id="vpc_subnet02_0004__p57535914276">The value can only be <strong id="vpc_subnet02_0004__b1694831813588">true</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnet02_0004__row63315321123"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnet02_0004__p870051413911">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnet02_0004__p45641422124917">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnet02_0004__p16855104462516">Specifies the project ID. </p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnet02_0004__row126291040191211"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnet02_0004__p1953114119914">created_at</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnet02_0004__p595318416919">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnet02_0004__p1395374115919">Specifies the time (UTC) when the subnet is created.</p>
|
|
<p id="vpc_subnet02_0004__p65980291419">Format: <em id="vpc_subnet02_0004__i510913620586">yyyy-MM-ddTHH:mm:ss</em></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnet02_0004__row1084513362123"><td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_subnet02_0004__p139719548912">updated_at</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.332833283328334%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_subnet02_0004__p53971154594">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="43.33433343334334%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_subnet02_0004__p1339713549918">Specifies the time (UTC) when the subnet is updated.</p>
|
|
<p id="vpc_subnet02_0004__p173172815471">Format: <em id="vpc_subnet02_0004__i472475555813">yyyy-MM-ddTHH:mm:ss</em></p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="vpc_subnet02_0004__table1777145918276"></a><a name="table1777145918276"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet02_0004__table1777145918276" frame="border" border="1" rules="all"><caption><b>Table 7 </b><strong id="vpc_subnet02_0004__b918635715810">allocation_pool</strong> objects</caption><thead align="left"><tr id="vpc_subnet02_0004__row11772597275"><th align="left" class="cellrowborder" valign="top" width="23.65%" id="mcps1.3.4.4.2.4.1.1"><p id="vpc_subnet02_0004__p1477155962713"><strong id="vpc_subnet02_0004__b637355845814">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="24.610000000000003%" id="mcps1.3.4.4.2.4.1.2"><p id="vpc_subnet02_0004__p1077859162717"><strong id="vpc_subnet02_0004__b35811459165818">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="51.739999999999995%" id="mcps1.3.4.4.2.4.1.3"><p id="vpc_subnet02_0004__p5771159182718"><strong id="vpc_subnet02_0004__b63661801594">Remarks</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_subnet02_0004__row167785982711"><td class="cellrowborder" valign="top" width="23.65%" headers="mcps1.3.4.4.2.4.1.1 "><p id="vpc_subnet02_0004__p1077159182720">start</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.610000000000003%" headers="mcps1.3.4.4.2.4.1.2 "><p id="vpc_subnet02_0004__p2077125912718">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51.739999999999995%" headers="mcps1.3.4.4.2.4.1.3 "><p id="vpc_subnet02_0004__p2078205910275">Specifies the start IP address of a network pool.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnet02_0004__row1782594271"><td class="cellrowborder" valign="top" width="23.65%" headers="mcps1.3.4.4.2.4.1.1 "><p id="vpc_subnet02_0004__p9781459162717">end</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.610000000000003%" headers="mcps1.3.4.4.2.4.1.2 "><p id="vpc_subnet02_0004__p1778115952719">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51.739999999999995%" headers="mcps1.3.4.4.2.4.1.3 "><p id="vpc_subnet02_0004__p187825911271">Specifies the end IP address of a network pool.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="vpc_subnet02_0004__table177865912715"></a><a name="table177865912715"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_subnet02_0004__table177865912715" frame="border" border="1" rules="all"><caption><b>Table 8 </b><strong id="vpc_subnet02_0004__b1963161085912">host_route</strong> objects</caption><thead align="left"><tr id="vpc_subnet02_0004__row1779145992719"><th align="left" class="cellrowborder" valign="top" width="23.712371237123715%" id="mcps1.3.4.5.2.4.1.1"><p id="vpc_subnet02_0004__p2794593271"><strong id="vpc_subnet02_0004__b1450763595914">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="24.4024402440244%" id="mcps1.3.4.5.2.4.1.2"><p id="vpc_subnet02_0004__p14791594271"><strong id="vpc_subnet02_0004__b573083611594">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="51.88518851885189%" id="mcps1.3.4.5.2.4.1.3"><p id="vpc_subnet02_0004__p14791459172716"><strong id="vpc_subnet02_0004__b1863623745913">Remarks</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_subnet02_0004__row1379165919277"><td class="cellrowborder" valign="top" width="23.712371237123715%" headers="mcps1.3.4.5.2.4.1.1 "><p id="vpc_subnet02_0004__p979165972710">destination</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.4024402440244%" headers="mcps1.3.4.5.2.4.1.2 "><p id="vpc_subnet02_0004__p37995952710">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51.88518851885189%" headers="mcps1.3.4.5.2.4.1.3 "><p id="vpc_subnet02_0004__p10791559172714">Specifies the destination subnet of a route.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_subnet02_0004__row1779185915279"><td class="cellrowborder" valign="top" width="23.712371237123715%" headers="mcps1.3.4.5.2.4.1.1 "><p id="vpc_subnet02_0004__p6791359102719">nexthop</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.4024402440244%" headers="mcps1.3.4.5.2.4.1.2 "><p id="vpc_subnet02_0004__p107935942717">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51.88518851885189%" headers="mcps1.3.4.5.2.4.1.3 "><p id="vpc_subnet02_0004__p87975920278">Specifies the next-hop IP address of a route.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="vpc_subnet02_0004__section5055526711495"><h4 class="sectiontitle">Example:</h4><p id="vpc_subnet02_0004__p15728162101811">Example request</p>
|
|
<pre class="screen" id="vpc_subnet02_0004__screen11881280581">PUT https://{Endpoint}/v2.0/subnets/98bac90c-0ba7-4a63-8995-097da9bead1c
|
|
|
|
{
|
|
"subnet": {
|
|
"name": "subnet-test"
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<p id="vpc_subnet02_0004__p4573915161813">Example response</p>
|
|
<pre class="screen" id="vpc_subnet02_0004__screen995294755814">{
|
|
"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:03:03"
|
|
}
|
|
}</pre>
|
|
<div class="section" id="vpc_subnet02_0004__section10470352390"><h4 class="sectiontitle">Status Code</h4><p id="vpc_subnet02_0004__p18112112662914">See <a href="vpc_api_0002.html">Status Codes</a>.</p>
|
|
</div>
|
|
<div class="section" id="vpc_subnet02_0004__section85821649202813"><h4 class="sectiontitle">Error Code</h4><p id="vpc_subnet02_0004__p7233105282813">See <a href="vpc_api_0003.html">Error Codes</a>.</p>
|
|
</div>
|
|
<p id="vpc_subnet02_0004__p8060118"></p>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="vpc_subnet02_0000.html">Subnet</a></div>
|
|
</div>
|
|
</div>
|
|
|