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

310 lines
25 KiB
HTML

<a name="vpc_router_0003"></a><a name="vpc_router_0003"></a>
<h1 class="topictitle1">Creating a Router</h1>
<div id="body1495543735580"><div class="section" id="vpc_router_0003__section54866008205757"><h4 class="sectiontitle">Function</h4><p id="vpc_router_0003__p14961648205757">This API is used to create a router.</p>
</div>
<div class="section" id="vpc_router_0003__section437105205757"><h4 class="sectiontitle">URI</h4><p id="vpc_router_0003__p11102055163616">POST /v2.0/routers</p>
</div>
<div class="section" id="vpc_router_0003__section56558784205757"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_router_0003__table17858782205757" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request parameter</caption><thead align="left"><tr id="vpc_router_0003__row29195524205757"><th align="left" class="cellrowborder" valign="top" width="19.388061193880613%" id="mcps1.3.3.2.2.5.1.1"><p id="vpc_router_0003__p16027205205757"><strong id="vpc_router_0003__b1457511119615">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.548045195480455%" id="mcps1.3.3.2.2.5.1.2"><p id="vpc_router_0003__p23135223205757"><strong id="vpc_router_0003__b410113363">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.208179182081793%" id="mcps1.3.3.2.2.5.1.3"><p id="vpc_router_0003__p62013761205757"><strong id="vpc_router_0003__b13919165610517">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="42.85571442855714%" id="mcps1.3.3.2.2.5.1.4"><p id="vpc_router_0003__p57058764205757"><strong id="vpc_router_0003__b102221816261">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_router_0003__row58357184205757"><td class="cellrowborder" valign="top" width="19.388061193880613%" headers="mcps1.3.3.2.2.5.1.1 "><p id="vpc_router_0003__p29311427205757">router</p>
</td>
<td class="cellrowborder" valign="top" width="19.548045195480455%" headers="mcps1.3.3.2.2.5.1.2 "><p id="vpc_router_0003__p25415424205757"><a href="vpc_router_0003.html">router</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="18.208179182081793%" headers="mcps1.3.3.2.2.5.1.3 "><p id="vpc_router_0003__p45383453205757">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="42.85571442855714%" headers="mcps1.3.3.2.2.5.1.4 "><p id="vpc_router_0003__p52181058205757">Specifies the router. For details, see <a href="#vpc_router_0003__table24153696181443">Table 2</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpc_router_0003__table24153696181443"></a><a name="table24153696181443"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_router_0003__table24153696181443" frame="border" border="1" rules="all"><caption><b>Table 2 </b><strong id="vpc_router_0003__b93281241787">router</strong> objects</caption><thead align="left"><tr id="vpc_router_0003__row11861342181443"><th align="left" class="cellrowborder" valign="top" width="23.54%" id="mcps1.3.3.3.2.5.1.1"><p id="vpc_router_0003__p21244677181443"><strong id="vpc_router_0003__b4526018986">Attribute</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.740000000000002%" id="mcps1.3.3.3.2.5.1.2"><p id="vpc_router_0003__p981918394815"><strong id="vpc_router_0003__b597871915812">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.31%" id="mcps1.3.3.3.2.5.1.3"><p id="vpc_router_0003__p43097239181443"><strong id="vpc_router_0003__b167571520187">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="42.41%" id="mcps1.3.3.3.2.5.1.4"><p id="vpc_router_0003__p36728767181443"><strong id="vpc_router_0003__b1033117219813">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_router_0003__row19493885181443"><td class="cellrowborder" valign="top" width="23.54%" headers="mcps1.3.3.3.2.5.1.1 "><p id="vpc_router_0003__p35500827181443">name</p>
</td>
<td class="cellrowborder" valign="top" width="17.740000000000002%" headers="mcps1.3.3.3.2.5.1.2 "><p id="vpc_router_0003__p1881923164818">No</p>
</td>
<td class="cellrowborder" valign="top" width="16.31%" headers="mcps1.3.3.3.2.5.1.3 "><p id="vpc_router_0003__p56994705181443">String</p>
</td>
<td class="cellrowborder" valign="top" width="42.41%" headers="mcps1.3.3.3.2.5.1.4 "><p id="vpc_router_0003__p11978624181443">Specifies the router name.</p>
<p id="vpc_router_0003__p15156189113">Instructions:</p>
<p id="vpc_router_0003__p30744457181443">The name can contain only letters, digits, underscores (_), hyphens (-), and periods (.).</p>
</td>
</tr>
<tr id="vpc_router_0003__row8264657181443"><td class="cellrowborder" valign="top" width="23.54%" headers="mcps1.3.3.3.2.5.1.1 "><p id="vpc_router_0003__p65457453181443">admin_state_up</p>
</td>
<td class="cellrowborder" valign="top" width="17.740000000000002%" headers="mcps1.3.3.3.2.5.1.2 "><p id="vpc_router_0003__p9819193104813">No</p>
</td>
<td class="cellrowborder" valign="top" width="16.31%" headers="mcps1.3.3.3.2.5.1.3 "><p id="vpc_router_0003__p453502181443">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="42.41%" headers="mcps1.3.3.3.2.5.1.4 "><p id="vpc_router_0003__p48641520181443">Specifies the administrative status.</p>
<p id="vpc_router_0003__p35120501181443">The value can only be <strong id="vpc_router_0003__b159184241396">true</strong>.</p>
</td>
</tr>
<tr id="vpc_router_0003__row26765861181443"><td class="cellrowborder" valign="top" width="23.54%" headers="mcps1.3.3.3.2.5.1.1 "><p id="vpc_router_0003__p20551115181443">external_gateway_info</p>
</td>
<td class="cellrowborder" valign="top" width="17.740000000000002%" headers="mcps1.3.3.3.2.5.1.2 "><p id="vpc_router_0003__p1281914344820">No</p>
</td>
<td class="cellrowborder" valign="top" width="16.31%" headers="mcps1.3.3.3.2.5.1.3 "><p id="vpc_router_0003__p54027655181443"><a href="#vpc_router_0003__table11448068181443">external_gateway_info</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="42.41%" headers="mcps1.3.3.3.2.5.1.4 "><p id="vpc_router_0003__p12911840181443">Specifies the external gateway. This is an extended attribute. For details, see the <strong id="vpc_router_0003__b799745419471">external_gateway_info</strong> objects.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpc_router_0003__table11448068181443"></a><a name="table11448068181443"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_router_0003__table11448068181443" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="vpc_router_0003__b6853157134716">external_gateway_info</strong> objects</caption><thead align="left"><tr id="vpc_router_0003__row58732356181443"><th align="left" class="cellrowborder" valign="top" width="23.522352235223522%" id="mcps1.3.3.4.2.5.1.1"><p id="vpc_router_0003__p59700400181443"><strong id="vpc_router_0003__b355115917476">Attribute</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.22172217221722%" id="mcps1.3.3.4.2.5.1.2"><p id="vpc_router_0003__p1127212151208"><strong id="vpc_router_0003__b656415064819">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.021302130213023%" id="mcps1.3.3.4.2.5.1.3"><p id="vpc_router_0003__p3894228181443"><strong id="vpc_router_0003__b66481116486">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="46.23462346234623%" id="mcps1.3.3.4.2.5.1.4"><p id="vpc_router_0003__p1781307181443"><strong id="vpc_router_0003__b1471428481">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_router_0003__row10068178181443"><td class="cellrowborder" valign="top" width="23.522352235223522%" headers="mcps1.3.3.4.2.5.1.1 "><p id="vpc_router_0003__p10216081181443">network_id</p>
</td>
<td class="cellrowborder" valign="top" width="17.22172217221722%" headers="mcps1.3.3.4.2.5.1.2 "><p id="vpc_router_0003__p7272191582015">No</p>
</td>
<td class="cellrowborder" valign="top" width="13.021302130213023%" headers="mcps1.3.3.4.2.5.1.3 "><p id="vpc_router_0003__p22196257181443">String</p>
</td>
<td class="cellrowborder" valign="top" width="46.23462346234623%" headers="mcps1.3.3.4.2.5.1.4 "><p id="vpc_router_0003__p38375206181443">Specifies the UUID of the external network.</p>
<p id="vpc_router_0003__p21383968181443">You can use <strong id="vpc_router_0003__b1735498134816">GET /v2.0/networks?router:external=True</strong> or run the <strong id="vpc_router_0003__b1635514854810">neutron net-external-list</strong> command to query information about the external network.</p>
</td>
</tr>
<tr id="vpc_router_0003__row58237990181443"><td class="cellrowborder" valign="top" width="23.522352235223522%" headers="mcps1.3.3.4.2.5.1.1 "><p id="vpc_router_0003__p19656760181443">enable_snat</p>
</td>
<td class="cellrowborder" valign="top" width="17.22172217221722%" headers="mcps1.3.3.4.2.5.1.2 "><p id="vpc_router_0003__p132731315162019">No</p>
</td>
<td class="cellrowborder" valign="top" width="13.021302130213023%" headers="mcps1.3.3.4.2.5.1.3 "><p id="vpc_router_0003__p48693751181443">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="46.23462346234623%" headers="mcps1.3.3.4.2.5.1.4 "><p id="vpc_router_0003__p22976335181443">Specifies whether the SNAT function is enabled.</p>
<p id="vpc_router_0003__p49143812181443">The default value is <strong id="vpc_router_0003__b17245105811501">false</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="vpc_router_0003__section551691654513"><h4 class="sectiontitle">Example Request</h4><p id="vpc_router_0003__p20258031142318">Create a router named <strong id="vpc_router_0003__b177143431110">router-test2</strong>.</p>
<pre class="screen" id="vpc_router_0003__screen16941152414511">POST https://{Endpoint}/v2.0/routers
{
"router": {
"name": "router-test2",
"admin_state_up": true
}
}</pre>
</div>
<div class="section" id="vpc_router_0003__section56374749205757"><h4 class="sectiontitle">Response Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_router_0003__table2951934205757" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response parameter</caption><thead align="left"><tr id="vpc_router_0003__row46218389205757"><th align="left" class="cellrowborder" valign="top" width="23.169999999999998%" id="mcps1.3.5.2.2.4.1.1"><p id="vpc_router_0003__p52702038205757"><strong id="vpc_router_0003__b842352706182020">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25.61%" id="mcps1.3.5.2.2.4.1.2"><p id="vpc_router_0003__p41006687205757"><strong id="vpc_router_0003__b842352706115456">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="51.22%" id="mcps1.3.5.2.2.4.1.3"><p id="vpc_router_0003__p5443692205757"><strong id="vpc_router_0003__b84235270691717">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_router_0003__row38285887205757"><td class="cellrowborder" valign="top" width="23.169999999999998%" headers="mcps1.3.5.2.2.4.1.1 "><p id="vpc_router_0003__p14149114205757">router</p>
</td>
<td class="cellrowborder" valign="top" width="25.61%" headers="mcps1.3.5.2.2.4.1.2 "><p id="vpc_router_0003__p5227590205757"><a href="#vpc_router_0003__table1923815121475">router</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="51.22%" headers="mcps1.3.5.2.2.4.1.3 "><p id="vpc_router_0003__p5591471205757">Specifies the router. For details, see <a href="#vpc_router_0003__table1923815121475">Table 5</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpc_router_0003__table1923815121475"></a><a name="table1923815121475"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_router_0003__table1923815121475" frame="border" border="1" rules="all"><caption><b>Table 5 </b><strong id="vpc_router_0003__b14250142810516">router</strong> objects</caption><thead align="left"><tr id="vpc_router_0003__row1723891210478"><th align="left" class="cellrowborder" valign="top" width="26.669999999999998%" id="mcps1.3.5.3.2.4.1.1"><p id="vpc_router_0003__p16238151211471"><strong id="vpc_router_0003__b117421530195118">Attribute</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="23.330000000000002%" id="mcps1.3.5.3.2.4.1.2"><p id="vpc_router_0003__p723831234719"><strong id="vpc_router_0003__b7211113395117">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.3.2.4.1.3"><p id="vpc_router_0003__p11238131214710"><strong id="vpc_router_0003__b131301734195119">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_router_0003__row22240136181443"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_router_0003__p56620590181443">id</p>
</td>
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_router_0003__p22865048181443">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_router_0003__p46905229181443">Specifies the router ID.</p>
<p id="vpc_router_0003__p121142486504">This parameter is not mandatory when you query routers.</p>
</td>
</tr>
<tr id="vpc_router_0003__row112381012204717"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_router_0003__p17238141219479">name</p>
</td>
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_router_0003__p142381412104710">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_router_0003__p52381412104714">Specifies the router name.</p>
<p id="vpc_router_0003__p122389120477">The name can contain only letters, digits, underscores (_), hyphens (-), and periods (.).</p>
</td>
</tr>
<tr id="vpc_router_0003__row16238101211472"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_router_0003__p123911294714">admin_state_up</p>
</td>
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_router_0003__p18239171220477">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_router_0003__p12395124476">Specifies the administrative status.</p>
<p id="vpc_router_0003__p023921210476">The value can only be <strong id="vpc_router_0003__b723503013527">true</strong>.</p>
</td>
</tr>
<tr id="vpc_router_0003__row47649056181443"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_router_0003__p34368308181443">status</p>
</td>
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_router_0003__p32369557181443">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_router_0003__p4016564181443">Specifies the router status. The value can be <strong id="vpc_router_0003__b1278999155817">ACTIVE</strong>, <strong id="vpc_router_0003__b1179015995814">DOWN</strong>, or <strong id="vpc_router_0003__b37921293586">ERROR</strong>.</p>
</td>
</tr>
<tr id="vpc_router_0003__row36149082181443"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_router_0003__p42394506181443">tenant_id</p>
</td>
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_router_0003__p11402971181443">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_router_0003__p10487112">Specifies the project ID. </p>
</td>
</tr>
<tr id="vpc_router_0003__row5239171218479"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_router_0003__p18239101217478">external_gateway_info</p>
</td>
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_router_0003__p1239161213474"><a href="vpc_router_0003.html">external_gateway_info</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_router_0003__p1223916124478">Specifies the external gateway. This is an extended attribute. For details, see the <strong id="vpc_router_0003__b5862143755213">external_gateway_info</strong> objects.</p>
</td>
</tr>
<tr id="vpc_router_0003__row49097702181443"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_router_0003__p17490925181443">routes</p>
</td>
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_router_0003__p7478812181443">Array of <a href="#vpc_router_0003__table18829650181443">route</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_router_0003__p5122123194853">Specifies a route list. This is an extended attribute. For details, see <a href="#vpc_router_0003__table18829650181443">Table 7</a>.</p>
</td>
</tr>
<tr id="vpc_router_0003__row7278189151614"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_router_0003__p870051413911">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_router_0003__p15700614790">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_router_0003__p8813182510263">Specifies the project ID. </p>
</td>
</tr>
<tr id="vpc_router_0003__row172292215166"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_router_0003__p1953114119914">created_at</p>
</td>
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_router_0003__p595318416919">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_router_0003__p1395374115919">Specifies the time (UTC) when the router is created.</p>
<p id="vpc_router_0003__p65980291419">Format: <em id="vpc_router_0003__i92763917535">yyyy-MM-ddTHH:mm:ss</em></p>
</td>
</tr>
<tr id="vpc_router_0003__row106341917161611"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_router_0003__p139719548912">updated_at</p>
</td>
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_router_0003__p53971154594">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_router_0003__p1339713549918">Specifies the time (UTC) when the router is updated.</p>
<p id="vpc_router_0003__p1329962217483">Format: <em id="vpc_router_0003__i1748961535317">yyyy-MM-ddTHH:mm:ss</em></p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_router_0003__table5241191216479" frame="border" border="1" rules="all"><caption><b>Table 6 </b><strong id="vpc_router_0003__b220281720530">external_gateway_info</strong> objects</caption><thead align="left"><tr id="vpc_router_0003__row172411312144717"><th align="left" class="cellrowborder" valign="top" width="26.669999999999998%" id="mcps1.3.5.4.2.4.1.1"><p id="vpc_router_0003__p1724181214477"><strong id="vpc_router_0003__b13911101865312">Attribute</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="23.34%" id="mcps1.3.5.4.2.4.1.2"><p id="vpc_router_0003__p1024191213473"><strong id="vpc_router_0003__b92271620205311">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="49.99%" id="mcps1.3.5.4.2.4.1.3"><p id="vpc_router_0003__p1324121218471"><strong id="vpc_router_0003__b123519218539">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_router_0003__row142411124472"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.4.2.4.1.1 "><p id="vpc_router_0003__p19241151274710">network_id</p>
</td>
<td class="cellrowborder" valign="top" width="23.34%" headers="mcps1.3.5.4.2.4.1.2 "><p id="vpc_router_0003__p424101218477">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.99%" headers="mcps1.3.5.4.2.4.1.3 "><p id="vpc_router_0003__p22411412144715">Specifies the UUID of the external network.</p>
<p id="vpc_router_0003__p4241912204710">You can use <strong id="vpc_router_0003__b17901192415532">GET /v2.0/networks?router:external=True</strong> or run the <strong id="vpc_router_0003__b590362405315">neutron net-external-list</strong> command to query information about the external network.</p>
</td>
</tr>
<tr id="vpc_router_0003__row1624171218472"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.4.2.4.1.1 "><p id="vpc_router_0003__p132411128476">enable_snat</p>
</td>
<td class="cellrowborder" valign="top" width="23.34%" headers="mcps1.3.5.4.2.4.1.2 "><p id="vpc_router_0003__p1241912124716">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="49.99%" headers="mcps1.3.5.4.2.4.1.3 "><p id="vpc_router_0003__p22411812124711">Specifies whether the SNAT function is enabled.</p>
<p id="vpc_router_0003__p32411120478">The default value is <strong id="vpc_router_0003__b438813476537">false</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpc_router_0003__table18829650181443"></a><a name="table18829650181443"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_router_0003__table18829650181443" frame="border" border="1" rules="all"><caption><b>Table 7 </b><strong id="vpc_router_0003__b20416195044217">route</strong> objects</caption><thead align="left"><tr id="vpc_router_0003__row60542282181443"><th align="left" class="cellrowborder" valign="top" width="26.669999999999998%" id="mcps1.3.5.5.2.4.1.1"><p id="vpc_router_0003__p4977811181443"><strong id="vpc_router_0003__b854875013535">Attribute</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="23.34%" id="mcps1.3.5.5.2.4.1.2"><p id="vpc_router_0003__p549581181443"><strong id="vpc_router_0003__b13431125375315">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="49.99%" id="mcps1.3.5.5.2.4.1.3"><p id="vpc_router_0003__p9206714181443"><strong id="vpc_router_0003__b1269932119583">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_router_0003__row7546366181443"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.5.2.4.1.1 "><p id="vpc_router_0003__p7275939181443">destination</p>
</td>
<td class="cellrowborder" valign="top" width="23.34%" headers="mcps1.3.5.5.2.4.1.2 "><p id="vpc_router_0003__p52480209181443">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.99%" headers="mcps1.3.5.5.2.4.1.3 "><p id="vpc_router_0003__p66892155181443">Specifies the IP address range.</p>
</td>
</tr>
<tr id="vpc_router_0003__row65158490181443"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.5.2.4.1.1 "><p id="vpc_router_0003__p43346313181443">nexthop</p>
</td>
<td class="cellrowborder" valign="top" width="23.34%" headers="mcps1.3.5.5.2.4.1.2 "><p id="vpc_router_0003__p21390453181443">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.99%" headers="mcps1.3.5.5.2.4.1.3 "><p id="vpc_router_0003__p17763616181443">Specifies the next hop IP address. The IP address can only be one in the subnet associated with the router.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="vpc_router_0003__section50323245205757"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="vpc_router_0003__screen8641934174514">{
"router": {
"id": "f5dbdfe0-86f9-4b0a-9a32-6be143f0a076",
"name": "router-test2",
"status": "ACTIVE",
"tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
"project_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
"admin_state_up": true,
"external_gateway_info": {
"network_id": "0a2228f2-7f8a-45f1-8e09-9039e1d09975",
"enable_snat": false
},
"routes": [],
"created_at": "2018-09-20T02:06:07",
"updated_at": "2018-09-20T02:06:09"
}
}</pre>
</div>
<div class="section" id="vpc_router_0003__section10470352390"><h4 class="sectiontitle">Status Code</h4><p id="vpc_router_0003__p18112112662914">See <a href="vpc_api_0002.html">Status Codes</a>.</p>
</div>
<div class="section" id="vpc_router_0003__section85821649202813"><h4 class="sectiontitle">Error Code</h4><p id="vpc_router_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_router_0000.html">Router</a></div>
</div>
</div>