doc-exports/docs/dc/api-ref/en-us_topic_0055025322.html
Qin Ying, Fan 62ab8a5fe2 DC API 20231101 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-03-11 15:10:40 +00:00

203 lines
16 KiB
HTML

<a name="en-us_topic_0055025322"></a><a name="en-us_topic_0055025322"></a>
<h1 class="topictitle1">Creating a Virtual Gateway</h1>
<div id="body1506566169644"><div class="section" id="en-us_topic_0055025322__section17487184"><h4 class="sectiontitle">Function</h4><p id="en-us_topic_0055025322__p2106791092910">This API is used to create a virtual gateway.</p>
</div>
<div class="section" id="en-us_topic_0055025322__section853188092910"><h4 class="sectiontitle">URI</h4><p id="en-us_topic_0055025322__p153101282423">POST /v2.0/dcaas/virtual-gateways</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0055025322__table116196219413" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="en-us_topic_0055025322__row1162611216418"><th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.2.3.2.5.1.1"><p id="en-us_topic_0055025322__p3628921415">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.000000000000002%" id="mcps1.3.2.3.2.5.1.2"><p id="en-us_topic_0055025322__p126302264110">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.2.3.2.5.1.3"><p id="en-us_topic_0055025322__p1463272144111">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.00000000000001%" id="mcps1.3.2.3.2.5.1.4"><p id="en-us_topic_0055025322__p66345214415">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0055025322__row463615254119"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.2.3.2.5.1.1 "><p id="en-us_topic_0055025322__p16638723418">virtual_gateway</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.2.3.2.5.1.2 "><p id="en-us_topic_0055025322__p1263922194115">Dictionary</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.2.3.2.5.1.3 "><p id="en-us_topic_0055025322__p1642721414">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="55.00000000000001%" headers="mcps1.3.2.3.2.5.1.4 "><p id="en-us_topic_0055025322__p14646152154117">Specifies the <strong id="en-us_topic_0055025322__b8423527061905">virtual_gateway</strong> object.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="en-us_topic_0055025322__section2281784192910"><a name="en-us_topic_0055025322__section2281784192910"></a><a name="section2281784192910"></a><h4 class="sectiontitle">Request</h4><p id="en-us_topic_0055025322__p5712311614534">For details about the <strong id="en-us_topic_0055025322__b842352706184937">virtual_gateway</strong> field, see <a href="#en-us_topic_0055025322__table3523051192910">Table 2</a>.</p>
<div class="tablenoborder"><a name="en-us_topic_0055025322__table3523051192910"></a><a name="table3523051192910"></a><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0055025322__table3523051192910" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameters</caption><thead align="left"><tr id="en-us_topic_0055025322__row1307920992910"><th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.3.3.2.5.1.1"><p id="en-us_topic_0055025322__p4450739192910">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.000000000000002%" id="mcps1.3.3.3.2.5.1.2"><p id="en-us_topic_0055025322__p26394292910">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.3.3.2.5.1.3"><p id="en-us_topic_0055025322__p6472145192910">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="54%" id="mcps1.3.3.3.2.5.1.4"><p id="en-us_topic_0055025322__p6443764692910">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0055025322__row2660185192910"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.1 "><p id="en-us_topic_0055025322__p3605816293239">tenant_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.3.2.5.1.2 "><p id="en-us_topic_0055025322__p6629905993311">String</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.3 "><p id="en-us_topic_0055025322__p5941630693257">No</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.3.3.2.5.1.4 "><p id="en-us_topic_0055025322__p1074630693412">Specifies the project ID.</p>
</td>
</tr>
<tr id="en-us_topic_0055025322__row2405214492910"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.1 "><p id="en-us_topic_0055025322__p1588715393239">name</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.3.2.5.1.2 "><p id="en-us_topic_0055025322__p2631109893311">String</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.3 "><p id="en-us_topic_0055025322__p1210552293257">No</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.3.3.2.5.1.4 "><p id="en-us_topic_0055025322__p464917193412">Specifies the virtual gateway name.</p>
<p id="en-us_topic_0055025322__p35081830113419"><span id="en-us_topic_0055025322__text15699204710333">Only letters, digits, underscores (_), hyphens (-), and periods (.) are allowed.</span></p>
</td>
</tr>
<tr id="en-us_topic_0055025322__row5264583392910"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.1 "><p id="en-us_topic_0055025322__p4444139293239">description</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.3.2.5.1.2 "><p id="en-us_topic_0055025322__p45532693311">String</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.3 "><p id="en-us_topic_0055025322__p3573563593257">No</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.3.3.2.5.1.4 "><p id="en-us_topic_0055025322__p6458631593412">Provides supplementary information about the virtual gateway.</p>
<p id="en-us_topic_0055025322__p13554151310417"><span id="en-us_topic_0055025322__text243011117548">Angle brackets (&lt;&gt;) are not allowed.</span></p>
</td>
</tr>
<tr id="en-us_topic_0055025322__row677461492910"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.1 "><p id="en-us_topic_0055025322__p3751344893239">vpc_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.3.2.5.1.2 "><p id="en-us_topic_0055025322__p1832518793311">String</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.3 "><p id="en-us_topic_0055025322__p3680570793257">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.3.3.2.5.1.4 "><p id="en-us_topic_0055025322__p4777447793412">Specifies the ID of the VPC to be accessed.</p>
</td>
</tr>
<tr id="en-us_topic_0055025322__row2673906492910"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.1 "><p id="en-us_topic_0055025322__p2167589193239">local_ep_group_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.3.2.5.1.2 "><p id="en-us_topic_0055025322__p1287368693311">String</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.3 "><p id="en-us_topic_0055025322__p2246540693257">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.3.3.2.5.1.4 "><p id="en-us_topic_0055025322__p3012004693412">Specifies the ID of the local endpoint group that records CIDR blocks of the VPC subnets.</p>
<p id="en-us_topic_0055025322__p5580254111215">For details about how to obtain the ID, see section <a href="en-us_topic_0055025336.html">Creating an Endpoint Group</a>.</p>
</td>
</tr>
<tr id="en-us_topic_0055025322__row47364260306"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.1 "><p id="en-us_topic_0055025322__p5486593211531">bgp_asn</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.3.2.5.1.2 "><p id="en-us_topic_0055025322__p1752129811559">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.3 "><p id="en-us_topic_0055025322__p1835599911632">No</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.3.3.2.5.1.4 "><p id="en-us_topic_0055025322__p6033433511712">Specifies the BGP ASN of the virtual gateway.</p>
</td>
</tr>
<tr id="en-us_topic_0055025322__row4354445992910"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.1 "><p id="en-us_topic_0055025322__p40746793239">device_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.3.2.5.1.2 "><p id="en-us_topic_0055025322__p5176382993311">String</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.3 "><p id="en-us_topic_0055025322__p4979474293257">No</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.3.3.2.5.1.4 "><p id="en-us_topic_0055025322__p384989993412">Specifies the ID of the physical device used by the virtual gateway.</p>
</td>
</tr>
<tr id="en-us_topic_0055025322__row4939414495544"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.1 "><p id="en-us_topic_0055025322__p5641288995553">redundant_device_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.3.2.5.1.2 "><p id="en-us_topic_0055025322__p1681455295553">String</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.3 "><p id="en-us_topic_0055025322__p2527378495553">No</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.3.3.2.5.1.4 "><p id="en-us_topic_0055025322__p4245896095553">Specifies the ID of the redundant physical device used by the virtual gateway.</p>
</td>
</tr>
<tr id="en-us_topic_0055025322__row43184565141256"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.1 "><p id="en-us_topic_0055025322__p5942965514139">type</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.3.2.5.1.2 "><p id="en-us_topic_0055025322__p4907275914139">String</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.3 "><p id="en-us_topic_0055025322__p30502401142656">No</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.3.3.2.5.1.4 "><p id="en-us_topic_0055025322__p4515284414139">Specifies the virtual gateway type. The value can only be <strong id="en-us_topic_0055025322__b4353101615117">default</strong>.</p>
</td>
</tr>
<tr id="en-us_topic_0055025322__row6233967292910"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.1 "><p id="en-us_topic_0055025322__p6228249193239">admin_state_up</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.3.2.5.1.2 "><p id="en-us_topic_0055025322__p682237893311">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.3.2.5.1.3 "><p id="en-us_topic_0055025322__p386476593257">No</p>
</td>
<td class="cellrowborder" valign="top" width="54%" headers="mcps1.3.3.3.2.5.1.4 "><p id="en-us_topic_0055025322__p5996447511383">Specifies the administrative status of the virtual gateway.</p>
<p id="en-us_topic_0055025322__p5798730593412">The value can be <strong id="en-us_topic_0055025322__b842352706154840">true</strong> or <strong id="en-us_topic_0055025322__b842352706154844">false</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="en-us_topic_0055025322__section1915447592910"><a name="en-us_topic_0055025322__section1915447592910"></a><a name="section1915447592910"></a><h4 class="sectiontitle">Response</h4><p id="en-us_topic_0055025322__p17268844145745"><a href="#en-us_topic_0055025322__table50992744154526">Table 3</a> lists the response parameter.</p>
<div class="tablenoborder"><a name="en-us_topic_0055025322__table50992744154526"></a><a name="table50992744154526"></a><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0055025322__table50992744154526" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response parameter</caption><thead align="left"><tr id="en-us_topic_0055025322__row20073554154526"><th align="left" class="cellrowborder" valign="top" width="28.999999999999996%" id="mcps1.3.4.3.2.4.1.1"><p id="en-us_topic_0055025322__p15345186154526">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="28.000000000000004%" id="mcps1.3.4.3.2.4.1.2"><p id="en-us_topic_0055025322__p35000534154526">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="43%" id="mcps1.3.4.3.2.4.1.3"><p id="en-us_topic_0055025322__p59082508154526">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="en-us_topic_0055025322__row20953821154526"><td class="cellrowborder" valign="top" width="28.999999999999996%" headers="mcps1.3.4.3.2.4.1.1 "><p id="en-us_topic_0055025322__p19537972154526">virtual_gateway</p>
</td>
<td class="cellrowborder" valign="top" width="28.000000000000004%" headers="mcps1.3.4.3.2.4.1.2 "><p id="en-us_topic_0055025322__p39071862154526">Dictionary</p>
</td>
<td class="cellrowborder" valign="top" width="43%" headers="mcps1.3.4.3.2.4.1.3 "><p id="en-us_topic_0055025322__p61739489154526">Specifies the <strong id="en-us_topic_0055025322__b84235270619636">virtual_gateway</strong> object.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="en-us_topic_0055025322__p1023625610325">For details about the <strong id="en-us_topic_0055025322__b075012423320">virtual_gateway</strong> field, see <a href="en-us_topic_0055025321.html#en-us_topic_0055025321__en-us_topic_0070676570_table49902238182444">Table 1</a>.</p>
</div>
<div class="section" id="en-us_topic_0055025322__section5174176392910"><a name="en-us_topic_0055025322__section5174176392910"></a><a name="section5174176392910"></a><h4 class="sectiontitle">Examples</h4><ul id="en-us_topic_0055025322__ul896216492467"><li id="en-us_topic_0055025322__li196213494461">Example request<pre class="screen" id="en-us_topic_0055025322__screen2013533392910">POST /v2.0/dcaas/virtual-gateways
{
"virtual_gateway" : {
"name" : "virtual gateway1",
"vpc_id" : "5352423b-b4ff-4a9e-839d-02698c2b36af ",
"local_ep_group_id" : "f8834cf1-5468-87c7-223d-56e78b9699ab",
"device_id" : "aaa_01"
}
}</pre>
</li></ul>
</div>
<ul id="en-us_topic_0055025322__ul5241010134714"><li id="en-us_topic_0055025322__li6241410114711">Example response<pre class="screen" id="en-us_topic_0055025322__screen071291924710">{
"virtual_gateway":{
"id": "0a0888a6-4096-43a6-81c6-923912933451",
"name": "virtual gateway",
"description": null,
"tenant_id": "0605768a3300d5762f82c01180692873",
"vpc_id": "5352423b-b4ff-4a9e-839d-02698c2b36af",
"local_ep_group_id": "f8834cf1-5468-87c7-223d-56e78b9699ab",
"local_ep_group_ipv6_id": null,
"device_id": "aaa_01",
"redundant_device_id": null,
"type": "default",
"ipsec_bandwidth": 1,
"status": "PENDING_CREATE",
"admin_state_up": true,
"bgp_asn": null,
"region_id": null
}
}</pre>
</li></ul>
<div class="section" id="en-us_topic_0055025322__sd936e658d4c44ad2b8ae55a74398fcd9"><h4 class="sectiontitle">Status Codes</h4><p id="en-us_topic_0055025322__p176816317298">For details, see <a href="en-us_topic_0055025342.html">Common Status Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0055025320.html">Virtual Gateway</a></div>
</div>
</div>