forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: gtema <artem.goncharov@gmail.com> Co-committed-by: gtema <artem.goncharov@gmail.com>
218 lines
18 KiB
HTML
218 lines
18 KiB
HTML
<a name="en_topic_0093011498"></a><a name="en_topic_0093011498"></a>
|
|
|
|
<h1 class="topictitle1">Creating a VPN Service</h1>
|
|
<div id="body14118753"><div class="section" id="en_topic_0093011498__section34534866"><h4 class="sectiontitle"><strong id="en_topic_0093011498__b842352706112523">Function</strong></h4><p id="en_topic_0093011498__p2768364">This interface is used to create a VPN service.</p>
|
|
<div class="note" id="en_topic_0093011498__note1680373019307"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="en_topic_0093011498__p980319305309">Only one VPN service can be created for each VPC.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="en_topic_0093011498__ole_link136"><h4 class="sectiontitle">URI</h4><p id="en_topic_0093011498__p1259392082911">POST /v2.0/vpn/vpnservices</p>
|
|
</div>
|
|
<div class="section" id="en_topic_0093011498__section10093828"><h4 class="sectiontitle">Request Message</h4><p id="en_topic_0093011498__p12671549102910"><a href="#en_topic_0093011498__table35351135">Table 1</a> describes the request parameters.</p>
|
|
|
|
<div class="tablenoborder"><a name="en_topic_0093011498__table35351135"></a><a name="table35351135"></a><table cellpadding="4" cellspacing="0" summary="" id="en_topic_0093011498__table35351135" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request parameters</caption><thead align="left"><tr id="en_topic_0093011498__row50516929"><th align="left" class="cellrowborder" valign="top" width="25.507449255074494%" id="mcps1.3.3.3.2.5.1.1"><p id="en_topic_0093011498__p65339469">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.288571142885711%" id="mcps1.3.3.3.2.5.1.2"><p id="en_topic_0093011498__p58005670">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.288571142885711%" id="mcps1.3.3.3.2.5.1.3"><p id="en_topic_0093011498__p838835">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="45.91540845915409%" id="mcps1.3.3.3.2.5.1.4"><p id="en_topic_0093011498__p836829">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="en_topic_0093011498__row53242138"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.3.3.2.5.1.1 "><p id="en_topic_0093011498__p17645916">subnet_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.2 "><p id="en_topic_0093011498__p20033078">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.3 "><p id="en_topic_0093011498__p12066641">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.91540845915409%" headers="mcps1.3.3.3.2.5.1.4 "><p id="en_topic_0093011498__p37873877">Specifies the subnet ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en_topic_0093011498__row5320573"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.3.3.2.5.1.1 "><p id="en_topic_0093011498__p28313264">router_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.2 "><p id="en_topic_0093011498__p11673056">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.3 "><p id="en_topic_0093011498__p5993460">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.91540845915409%" headers="mcps1.3.3.3.2.5.1.4 "><p id="en_topic_0093011498__p15708245">Specifies the router ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en_topic_0093011498__row7156477"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.3.3.2.5.1.1 "><p id="en_topic_0093011498__p42803771">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.2 "><p id="en_topic_0093011498__p44553466">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.3 "><p id="en_topic_0093011498__p52061026">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.91540845915409%" headers="mcps1.3.3.3.2.5.1.4 "><p id="en_topic_0093011498__p56193562">Specifies the VPN service name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en_topic_0093011498__row35980011"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.3.3.2.5.1.1 "><p id="en_topic_0093011498__p28699807">admin_state_up</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.2 "><p id="en_topic_0093011498__p42983031">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.3 "><p id="en_topic_0093011498__p59073500">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.91540845915409%" headers="mcps1.3.3.3.2.5.1.4 "><p id="en_topic_0093011498__p20224181">Specifies the administrative status. The value can be <strong id="en_topic_0093011498__b842352706221557">true</strong> or <strong id="en_topic_0093011498__b84235270622160">false</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en_topic_0093011498__row47799905"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.3.3.2.5.1.1 "><p id="en_topic_0093011498__p46587076">tenant_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.2 "><p id="en_topic_0093011498__p15456783">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.3 "><p id="en_topic_0093011498__p44039915">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.91540845915409%" headers="mcps1.3.3.3.2.5.1.4 "><p id="en_topic_0093011498__p10463359">Specifies the project ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en_topic_0093011498__row27061374"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.3.3.2.5.1.1 "><p id="en_topic_0093011498__p44487706">description</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.2 "><p id="en_topic_0093011498__p46734467">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.3 "><p id="en_topic_0093011498__p27395488">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.91540845915409%" headers="mcps1.3.3.3.2.5.1.4 "><p id="en_topic_0093011498__p4442074">Provides supplementary information about the VPN service.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en_topic_0093011498__row39978669"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.3.3.2.5.1.1 "><p id="en_topic_0093011498__p17046748">vpnservice</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.2 "><p id="en_topic_0093011498__p38609372">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.3 "><p id="en_topic_0093011498__p40351445">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.91540845915409%" headers="mcps1.3.3.3.2.5.1.4 "><p id="en_topic_0093011498__p47241582">Specifies the VPN service object.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="note" id="en_topic_0093011498__note9581195119309"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ol id="en_topic_0093011498__ol921225817304"><li id="en_topic_0093011498__li5212105820300">The <strong id="en_topic_0093011498__en-us_topic_0053740027_b84235270620329">project_id</strong> parameter is not supported.</li><li id="en_topic_0093011498__li1321285803017">The value of <strong id="en_topic_0093011498__b120501305120950">tenant_id</strong> can contain a maximum of 255 characters.</li><li id="en_topic_0093011498__li132201558163019">The value of <strong id="en_topic_0093011498__b842352706144933">name</strong> can contain 1 to 64 characters.</li><li id="en_topic_0093011498__li722015581307">The value of <strong id="en_topic_0093011498__b1705273613">description</strong> can contain a maximum of 255 characters.</li><li id="en_topic_0093011498__li102281758173014">The value of <strong id="en_topic_0093011498__b842352706175948">router_id</strong> must be the VPC router ID.</li><li id="en_topic_0093011498__li8228205853015">The value of <strong id="en_topic_0093011498__b842352706203227">admin_state_up</strong> can only be <strong id="en_topic_0093011498__b842352706203236">true</strong>.</li><li id="en_topic_0093011498__li182281258173013">This interface cannot be used to create a VPN service in the active-active VPN scenarios.</li><li id="en_topic_0093011498__li1022825813020">Bandwidth limiting is used by default. The recommended bandwidth is 300 Mbit/s. This interface cannot be used to change the bandwidth size.</li><li id="en_topic_0093011498__li423565813309">In standalone mode, only one VPC service can be created for each VPN. In active-active mode, two VPC services can be created for each VPN.</li></ol>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="en_topic_0093011498__section23735588"><h4 class="sectiontitle">Response Message</h4><p id="en_topic_0093011498__p1615932193119"><a href="#en_topic_0093011498__table1362895">Table 2</a> describes the response parameters.</p>
|
|
|
|
<div class="tablenoborder"><a name="en_topic_0093011498__table1362895"></a><a name="table1362895"></a><table cellpadding="4" cellspacing="0" summary="" id="en_topic_0093011498__table1362895" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameters</caption><thead align="left"><tr id="en_topic_0093011498__row67057771"><th align="left" class="cellrowborder" valign="top" width="29.76%" id="mcps1.3.4.3.2.4.1.1"><p id="en_topic_0093011498__p62970394">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16.67%" id="mcps1.3.4.3.2.4.1.2"><p id="en_topic_0093011498__p328285">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="53.57000000000001%" id="mcps1.3.4.3.2.4.1.3"><p id="en_topic_0093011498__p6398145">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="en_topic_0093011498__row48487730"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="en_topic_0093011498___Hlk477539510">router_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.3.2.4.1.2 "><p id="en_topic_0093011498__p31981592">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="en_topic_0093011498__p48922001">Specifies the router ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en_topic_0093011498__row37644831"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="en_topic_0093011498__p29332447">status</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.3.2.4.1.2 "><p id="en_topic_0093011498__p27118016">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="en_topic_0093011498__p15707907">Specifies whether the VPN service is currently operational. The value can be <strong id="en_topic_0093011498__b842352706212822">ACTIVE</strong>, <strong id="en_topic_0093011498__b842352706212827">DOWN</strong>, <strong id="en_topic_0093011498__b842352706212832">BUILD</strong>, <strong id="en_topic_0093011498__b842352706212835">ERROR</strong>, <strong id="en_topic_0093011498__b842352706212840">PENDING_CREATE</strong>, <strong id="en_topic_0093011498__b842352706212845">PENDING_UPDATE</strong>, or <strong id="en_topic_0093011498__b842352706212850">PENDING_DELETE</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en_topic_0093011498__row7153442"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="en_topic_0093011498__p42557928">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.3.2.4.1.2 "><p id="en_topic_0093011498__p24640114">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="en_topic_0093011498__p65645300">Specifies the VPN service name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en_topic_0093011498__row53936788"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="en_topic_0093011498__p6803737">external_v6_ip</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.3.2.4.1.2 "><p id="en_topic_0093011498__p14231847">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="en_topic_0093011498__p26719483">Specifies the IPv6 address of the VPN service external gateway.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en_topic_0093011498__row39148759"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="en_topic_0093011498__p16932901">admin_state_up</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.3.2.4.1.2 "><p id="en_topic_0093011498__p29387744">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="en_topic_0093011498__p9223355">Specifies the administrative status. The value can be <strong id="en_topic_0093011498__b832554619">true</strong> or <strong id="en_topic_0093011498__b288746640">false</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en_topic_0093011498__row15901331"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="en_topic_0093011498__p12939396">subnet_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.3.2.4.1.2 "><p id="en_topic_0093011498__p41458150">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="en_topic_0093011498__p14698523">Specifies the subnet ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en_topic_0093011498__row65177848"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="en_topic_0093011498__p44914359">tenant_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.3.2.4.1.2 "><p id="en_topic_0093011498__p14184458">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="en_topic_0093011498__p51347342">Specifies the project ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en_topic_0093011498__row59472897"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="en_topic_0093011498__p52575367">external_v4_ip</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.3.2.4.1.2 "><p id="en_topic_0093011498__p30746341">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="en_topic_0093011498__p64613452">Specifies the IPv4 address of the VPN service external gateway.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en_topic_0093011498__row44650158"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="en_topic_0093011498__p59893061">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.3.2.4.1.2 "><p id="en_topic_0093011498__p19499801">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="en_topic_0093011498__p28702870">Specifies the VPN service ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en_topic_0093011498__row56999240"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="en_topic_0093011498__p53535755">description</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.3.2.4.1.2 "><p id="en_topic_0093011498__p41428878">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="en_topic_0093011498__p23970293">Provides supplementary information about the VPN service.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en_topic_0093011498__row14406049"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="en_topic_0093011498__p26039288">vpnservice</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.3.2.4.1.2 "><p id="en_topic_0093011498__p28807604">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="en_topic_0093011498__p28134778">Specifies the VPN service object.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="en_topic_0093011498__section12293700"><h4 class="sectiontitle">Example</h4><ul id="en_topic_0093011498__ul392316508318"><li id="en_topic_0093011498__li1092314508316">Example Request<pre class="screen" id="en_topic_0093011498__screen5115320">POST /v2.0/vpn/vpnservices
|
|
{
|
|
"vpnservice": {
|
|
"subnet_id": null,
|
|
"router_id": "66e3b16c-8ce5-40fb-bb49-ab6d8dc3f2aa",
|
|
"name": "myservice",
|
|
"admin_state_up": true
|
|
}
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<ul id="en_topic_0093011498__ul1888518217326"><li id="en_topic_0093011498__li128854215329">Example Response<pre class="screen" id="en_topic_0093011498__screen82881214113216">{
|
|
"vpnservice" : {
|
|
"router_id" : "66e3b16c-8ce5-40fb-bb49-ab6d8dc3f2aa",
|
|
"status" : "PENDING_CREATE",
|
|
"name" : "myservice",
|
|
"external_v6_ip" : "2001:db8::1",
|
|
"admin_state_up" : true,
|
|
"subnet_id" : null,
|
|
"project_id" : "10039663455a446d8ba2cbb058b0f578",
|
|
"tenant_id" : "10039663455a446d8ba2cbb058b0f578",
|
|
"external_v4_ip" : "172.32.1.11",
|
|
"id" : "5c561d9d-eaea-45f6-ae3e-08d1a7080828",
|
|
"description" : ""
|
|
}
|
|
}</pre>
|
|
</li></ul>
|
|
<div class="section" id="en_topic_0093011498__section6578292"><h4 class="sectiontitle">Returned Values</h4><p id="en_topic_0093011498__en-us_topic_0053740035_p19515943486">For details, see section <a href="en_topic_0093011522.html">Common Returned Values</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="en_topic_0093011497.html">VPN Service Management</a></div>
|
|
</div>
|
|
</div>
|
|
|