doc-exports/docs/vpn/api-ref/vpn_api_1030.html
Hongwei, King Wang 32c06a10a2 vpn_api
Reviewed-by: Sarda, Priya <prsarda@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: Hongwei, King Wang <king.wanghongwei@huawei.com>
Co-committed-by: Hongwei, King Wang <king.wanghongwei@huawei.com>
2024-08-15 14:18:28 +00:00

320 lines
34 KiB
HTML

<a name="EN-US_TOPIC_0000001854089261"></a><a name="EN-US_TOPIC_0000001854089261"></a>
<h1 class="topictitle1">Creating a VPN Service</h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_section34534866"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p2768364">This API is used to create a VPN service.</p>
<div class="note" id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_note1680373019307"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p980319305309">Only one VPN service can be created for each VPC.</p>
</div></div>
</div>
<div class="section" id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_ole_link136"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p1259392082911">POST /v2.0/vpn/vpnservices</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_section10093828"><h4 class="sectiontitle">Request</h4><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p12671549102910"><a href="#EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_table35351135">Table 1</a> describes the request parameters.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_table35351135"></a><a name="en-us_topic_0000001541296746_table35351135"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_table35351135" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row50516929"><th align="left" class="cellrowborder" valign="top" width="25.507449255074494%" id="mcps1.3.3.3.2.5.1.1"><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_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-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_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-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_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-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p836829">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row53242138"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_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-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p20033078">String</p>
</td>
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p12066641">No</p>
</td>
<td class="cellrowborder" valign="top" width="45.91540845915409%" headers="mcps1.3.3.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p37873877">Specifies the subnet ID.</p>
<p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p151643110619">The subnet here is the VPC subnet. Query the subnet and enter the correct ID.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row5320573"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_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-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p11673056">String</p>
</td>
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p5993460">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="45.91540845915409%" headers="mcps1.3.3.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p15708245">Specifies the router ID.</p>
<p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p11189231154510">The value of <strong id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_b652775014215">router_id</strong> must be the VPC router ID.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row7156477"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p42803771">name</p>
</td>
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p44553466">String</p>
</td>
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p52061026">No</p>
</td>
<td class="cellrowborder" valign="top" width="45.91540845915409%" headers="mcps1.3.3.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p56193562">Specifies the VPN service name.</p>
<p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p3734165010442">The name can contain 1 to 64 characters.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row35980011"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_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-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p42983031">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p59073500">No</p>
</td>
<td class="cellrowborder" valign="top" width="45.91540845915409%" headers="mcps1.3.3.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p20224181">Specifies the administrative status, which can be <strong id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_b18908192531211">true</strong> or <strong id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_b10909152571211">false</strong>.</p>
<p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p52357591443">Currently, <strong id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_b1630628101211">admin_state_up</strong> can only be <strong id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_b7631122819124">true</strong>.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row47799905"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_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-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p15456783">String</p>
</td>
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p44039915">No</p>
</td>
<td class="cellrowborder" valign="top" width="45.91540845915409%" headers="mcps1.3.3.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p10463359">Specifies the project ID.</p>
<p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p6740124494412">The ID can contain up to 255 characters.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row27061374"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p44487706">description</p>
</td>
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p46734467">String</p>
</td>
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p27395488">No</p>
</td>
<td class="cellrowborder" valign="top" width="45.91540845915409%" headers="mcps1.3.3.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p4442074">Provides supplementary information about the VPN service.</p>
<p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p295291016463">The description can contain up to 255 characters.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row6116122365410"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p18771112855418">order_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p14771142812541">String</p>
</td>
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p16771128115414">No</p>
</td>
<td class="cellrowborder" valign="top" width="45.91540845915409%" headers="mcps1.3.3.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p5771428145413">Specifies the ID of a yearly/monthly order.</p>
<p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p3942129185518">The ID can contain up to 255 characters.</p>
<p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p10971195984816">This parameter is only available to yearly/monthly VPNs.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row4116112345416"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p17771152814542">product_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p1677116287545">String</p>
</td>
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p377162810541">No</p>
</td>
<td class="cellrowborder" valign="top" width="45.91540845915409%" headers="mcps1.3.3.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p47711828165416">Specifies the ID of a product that is billed on a yearly/monthly basis.</p>
<p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p188321315165514">The ID can contain up to 255 characters.</p>
<p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p199014576489">This parameter is only available to yearly/monthly VPNs.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row161174232549"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p12771202845414">prepay_connection_num</p>
</td>
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p877118282544">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p11771172820540">No</p>
</td>
<td class="cellrowborder" valign="top" width="45.91540845915409%" headers="mcps1.3.3.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p3771132835420">Specifies the number of connections of the yearly/monthly VPN service.</p>
<p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p5755849164816">This parameter is only available to yearly/monthly VPNs.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row0325927175418"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p19771928115413">resource_speccode</p>
</td>
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p47714285542">String</p>
</td>
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p1577122815416">No</p>
</td>
<td class="cellrowborder" valign="top" width="45.91540845915409%" headers="mcps1.3.3.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p477119289544">Specifies the specifications of the product that is billed on a yearly/monthly basis.</p>
<p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p519911188554">The specifications can contain up to 255 characters.</p>
<p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p35041055194813">This parameter is only available to yearly/monthly VPNs.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row432512272543"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p207722028135411">external_v4_ip</p>
</td>
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p1077217281545">String</p>
</td>
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p977272818542">No</p>
</td>
<td class="cellrowborder" valign="top" width="45.91540845915409%" headers="mcps1.3.3.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p16772528155410">Specifies the IPv4 address of the VPN service external gateway.</p>
<p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p177518201552">The address can contain up to 255 characters.</p>
<div class="note" id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_note846383310910"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p104636331920">When you configure this parameter, ensure that the tenant meets one of the following conditions:</p>
<ul id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_ul518616014104"><li id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_li81863001017"><strong id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_b188781530111313">role</strong> is <strong id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_b4808333141310">admin</strong>.</li><li id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_li1380916316109"><strong id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_b617510383136">role</strong> is <strong id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_b199017453135">internal_admin</strong>.</li><li id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_li3193121771010"><strong id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_b319912535131">role</strong> is <strong id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_b13931358111316">op_service</strong>.</li><li id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_li166152317105"><strong id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_b111521129161410">role</strong> is <strong id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_b2052473213144">vpn_adm</strong> and operations can be performed only on resources of the current tenant.</li></ul>
</div></div>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row39978669"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p17046748">vpnservice</p>
</td>
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p38609372">Object</p>
</td>
<td class="cellrowborder" valign="top" width="14.288571142885711%" headers="mcps1.3.3.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p40351445">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="45.91540845915409%" headers="mcps1.3.3.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p47241582">Specifies the VPN service object.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_note9581195119309"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_ul24351424134612"><li id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_li7436224104615">Parameter <strong id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_b444518164197">project_id</strong> is not supported.</li><li id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_li2043642412467">This API cannot be used to create a VPN service that works in active- standby mode with a Direct Connect connection.</li><li id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_li14436142474616">Bandwidth limiting is used by default. The recommended bandwidth is 300 Mbit/s. This API cannot be used to change the bandwidth size.</li><li id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_li6436152414619">In the standalone scenario, one VPC corresponds to one VPN service. In the active-active scenario, one VPC corresponds to two VPN services.</li></ul>
</div></div>
</div>
<div class="section" id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_section23735588"><h4 class="sectiontitle">Response</h4><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p1615932193119"><a href="#EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_table1362895">Table 2</a> describes the response parameters.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_table1362895"></a><a name="en-us_topic_0000001541296746_table1362895"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_table1362895" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row67057771"><th align="left" class="cellrowborder" valign="top" width="29.76%" id="mcps1.3.4.3.2.4.1.1"><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_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-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_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-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p6398145">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row48487730"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746__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-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p31981592">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p48922001">Specifies the router ID.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row37644831"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p29332447">status</p>
</td>
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p27118016">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p15707907">Specifies whether the VPN service is operational. The value can be <strong id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_b842352706212822">ACTIVE</strong>, <strong id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_b842352706212827">DOWN</strong>, <strong id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_b842352706212832">BUILD</strong>, <strong id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_b842352706212835">ERROR</strong>, <strong id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_b842352706212840">PENDING_CREATE</strong>, <strong id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_b842352706212845">PENDING_UPDATE</strong>, or <strong id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_b842352706212850">PENDING_DELETE</strong>.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row7153442"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p42557928">name</p>
</td>
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p24640114">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p65645300">Specifies the VPN service name.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row53936788"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_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-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p14231847">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p26719483">Specifies the IPv6 address of the VPN service external gateway.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row39148759"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_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-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p29387744">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p9223355">Specifies the administrative status, which can be <strong id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_b3101174482918">true</strong> or <strong id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_b1102144162917">false</strong>.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row15901331"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_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-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p41458150">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p14698523">Specifies the subnet ID.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row65177848"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_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-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p14184458">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p51347342">Specifies the project ID.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row59472897"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_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-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p30746341">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p64613452">Specifies the IPv4 address of the VPN service external gateway.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row44650158"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p59893061">id</p>
</td>
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p19499801">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p28702870">Specifies the VPN service ID.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row56999240"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p53535755">description</p>
</td>
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p41428878">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p23970293">Provides supplementary information about the VPN service.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row13134155061313"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p1455045113137">order_id</p>
</td>
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p4550151141310">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p145501951131310">Specifies the ID of a yearly/monthly order.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row51341950181317"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p75505513137">product_id</p>
</td>
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p17550165114138">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p1555025114131">Specifies the ID of a product that is billed on a yearly/monthly basis.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row6134350111316"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p1755075110131">prepay_connection_num</p>
</td>
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p16550115111131">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p18550165120134">Specifies the number of connections of the yearly/monthly VPN service.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row71341750121318"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p6550851171317">resource_speccode</p>
</td>
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p6550051151319">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p1550175115132">Specifies the specifications of the product that is billed on a yearly/monthly basis.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row5135185014139"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p17550175114131">created_at</p>
</td>
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p17550155141311">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p755005111311">Specifies the time when the VPN service was created.</p>
<p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p15396112118284">The time is in <em id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_i11406933102418">YYYY-mm-dd HH:MM:SS.ffffff</em> format.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_row14406049"><td class="cellrowborder" valign="top" width="29.76%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p26039288">vpnservice</p>
</td>
<td class="cellrowborder" valign="top" width="16.67%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p28807604">Object</p>
</td>
<td class="cellrowborder" valign="top" width="53.57000000000001%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_p28134778">Specifies the VPN service object.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_section12293700"><h4 class="sectiontitle">Example</h4><ul id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_ul392316508318"><li id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_li1092314508316">Example request<pre class="screen" id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_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-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_ul1888518217326"><li id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_li128854215329">Example response<pre class="screen" id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_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,
"tenant_id" : "10039663455a446d8ba2cbb058b0f578",
"external_v4_ip" : "172.32.1.11",
"id" : "5c561d9d-eaea-45f6-ae3e-08d1a7080828",
"description" : "",
"prepay_connection_num": 0,
"resource_speccode": "",
"order_id": "",
"product_id": "",
"created_at": "2020-08-05 12:36:35.921257"
}
}</pre>
</li></ul>
<div class="section" id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_section6578292"><h4 class="sectiontitle">Returned Values</h4><p id="EN-US_TOPIC_0000001854089261__en-us_topic_0000001541296746_en-us_topic_0053740035_p19515943486">For details, see <a href="vpn_api_1054.html#EN-US_TOPIC_0000001854089293">Common Returned Values</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="vpn_api_1029.html">VPN Service Management</a></div>
</div>
</div>