doc-exports/docs/vpn/api-ref/vpn_api_0034.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

160 lines
17 KiB
HTML

<a name="EN-US_TOPIC_0000001807370480"></a><a name="EN-US_TOPIC_0000001807370480"></a>
<h1 class="topictitle1">Querying a VPN Connection Monitor</h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_section20114008"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p14324135919311">This API is used to query a VPN connection monitor with a specified ID.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_section18104173342818"><h4 class="sectiontitle">Calling Method</h4><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p5375161133313">For details, see <a href="vpn_api_0008.html#EN-US_TOPIC_0000001807530276">Calling APIs</a>.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_section46808346"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p590514195520">GET /v5/{project_id}/connection-monitors/{connection_monitor_id}</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_table3672032" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_row10026740"><th align="left" class="cellrowborder" valign="top" width="20.61793820617938%" id="mcps1.3.3.3.2.5.1.1"><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p6859639">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.02809719028097%" id="mcps1.3.3.3.2.5.1.2"><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p179611479215">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="11.798820117988202%" id="mcps1.3.3.3.2.5.1.3"><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p18759866">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="48.555144485551445%" id="mcps1.3.3.3.2.5.1.4"><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p43154149">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_row5825185"><td class="cellrowborder" valign="top" width="20.61793820617938%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p2077973">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="19.02809719028097%" headers="mcps1.3.3.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p177965479212">String</p>
</td>
<td class="cellrowborder" valign="top" width="11.798820117988202%" headers="mcps1.3.3.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p34098154">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="48.555144485551445%" headers="mcps1.3.3.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p199639252285">Specifies a project ID. You can obtain the project ID by referring to <a href="vpn_api_0051.html#EN-US_TOPIC_0000001807530332">Obtaining the Project ID</a>.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_row41331944122620"><td class="cellrowborder" valign="top" width="20.61793820617938%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p11326359131">connection_monitor_id</p>
</td>
<td class="cellrowborder" valign="top" width="19.02809719028097%" headers="mcps1.3.3.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p73261359333">String</p>
</td>
<td class="cellrowborder" valign="top" width="11.798820117988202%" headers="mcps1.3.3.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p113262591313">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="48.555144485551445%" headers="mcps1.3.3.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p209711144114212">Specifies the ID of a VPN connection monitor.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_section18621933"><h4 class="sectiontitle">Request</h4><ul id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_ul5992193374713"><li id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_li6248558181420">Request parameters<p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p549645871410"><a name="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_li6248558181420"></a><a name="en-us_topic_0000001594472957_li6248558181420"></a>None</p>
</li><li id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_li1187412205194">Example request<pre class="screen" id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_screen1778465375316">GET https://{Endpoint}/v5/{project_id}/connection-monitors/{connection_monitor_id}</pre>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_section33379675"><h4 class="sectiontitle">Response</h4><ul id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_ul2144514204819"><li id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_li61441714114816">Response parameters<p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p133019591316"><a name="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_li61441714114816"></a><a name="en-us_topic_0000001594472957_li61441714114816"></a>Returned status code 200: successful query</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_table72122" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters in the response body</caption><thead align="left"><tr id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_row1333065918316"><th align="left" class="cellrowborder" valign="top" width="22.220000000000002%" id="mcps1.3.5.2.1.2.2.4.1.1"><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p183307591934">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="22.220000000000002%" id="mcps1.3.5.2.1.2.2.4.1.2"><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p033019591239">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.559999999999995%" id="mcps1.3.5.2.1.2.2.4.1.3"><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p53316591319">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_row433025917313"><td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p18331159436">connection_monitor</p>
</td>
<td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p183315591432"><a href="#EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_table72123">ConnectionMonitorInfo</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p133311259031">Specifies the connection_monitor object.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_row1841375719166"><td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p19807143518129">request_id</p>
</td>
<td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p3807153571217">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p2807535171212">Specifies a request ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_table72123"></a><a name="en-us_topic_0000001594472957_table72123"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_table72123" frame="border" border="1" rules="all"><caption><b>Table 3 </b>ConnectionMonitorInfo</caption><thead align="left"><tr id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_row11332159832"><th align="left" class="cellrowborder" valign="top" width="22.220000000000002%" id="mcps1.3.5.2.1.3.2.4.1.1"><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p2979144411420">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="22.220000000000002%" id="mcps1.3.5.2.1.3.2.4.1.2"><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p398024417422">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.559999999999995%" id="mcps1.3.5.2.1.3.2.4.1.3"><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p19980134474213">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_row6332115910310"><td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p17980844134212">id</p>
</td>
<td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p1798004414215">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.1.3.2.4.1.3 "><ul id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_ul1064673414438"><li id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_li4646123404312">Specifies the ID of a VPN connection monitor.</li><li id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_li2044713122414">The value is a UUID containing 36 characters.</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_row2765164817562"><td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p5184165415568">status</p>
</td>
<td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p4184175411564">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.1.3.2.4.1.3 "><ul id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_ul12184054145612"><li id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_li14184165485616">Specifies the status of the VPN connection monitor.</li><li id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_li5184105412567">Value range:<p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p12328172511462"><a name="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_li5184105412567"></a><a name="en-us_topic_0000001594472957_li5184105412567"></a><strong id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_b191954381888">ACTIVE</strong>: normal</p>
<p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p91471023174615"><strong id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_b186584405816">PENDING_CREATE</strong>: creating</p>
<p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p51478233460"><strong id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_b10840542083">PENDING_DELETE</strong>: deleting</p>
</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_row13255113318565"><td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p174632406567">vpn_connection_id</p>
</td>
<td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p12463104011567">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.1.3.2.4.1.3 "><ul id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_ul194631640185615"><li id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_li3463124015565">Specifies the ID of the VPN connection to be monitored.</li><li id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_li2046314019568">The value is a UUID containing 36 characters.</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_row74691235135612"><td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p54637409561">type</p>
</td>
<td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p2463114011567">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.1.3.2.4.1.3 "><ul id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_ul3463134016561"><li id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_li946314045617">Specifies the type of objects to be monitored.</li><li id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_li846374095617">The value can only be <strong id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_b15070192275">gateway</strong>.</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_row1033210592310"><td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p139822044124213">source_ip</p>
</td>
<td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p1698213447424">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.1.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p298294415424">Specifies the source address to be monitored.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_row333295916311"><td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p11982194416426">destination_ip</p>
</td>
<td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p20982744154212">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.1.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p10983544104213">Specifies the destination address to be monitored.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_row16332659131"><td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p189831544174212">proto_type</p>
</td>
<td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p0983184417427">String</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.1.3.2.4.1.3 "><ul id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_ul1178312588143"><li id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_li1176782131516">Specifies the protocol used by NQA.</li><li id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_li156188711153">The value can only be <strong id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_b4429113412711">icmp</strong>.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_li9780193991919">Example response<pre class="screen" id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_screen678017232489">{
"connection_monitor": {
"id": "76f64229-demo-a8df-va86-3907e2815b6d",
"status": "ACTIVE",
"vpn_connection_id": "cae286f2-demo-a8df-va86-e22416ca1220",
"type": "gateway",
"source_ip": "88.***.***.60",
"destination_ip": "88.***.***.32",
"proto_type": "icmp"
},
"request_id": "6d212bc0-ecb1-457b-977b-5e815fce658d"
}</pre>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_section31981619"><h4 class="sectiontitle">Status Codes</h4><p id="EN-US_TOPIC_0000001807370480__en-us_topic_0000001594472957_p18112112662914">For details, see <a href="vpn_api_0052.html#EN-US_TOPIC_0000001807370508">Status Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="vpn_api_0032.html">VPN Connection Monitoring</a></div>
</div>
</div>