This API is used to query a VPN connection with a specified connection ID.
For details, see Calling APIs.
GET /v5/{project_id}/vpn-connection/{vpn_connection_id}
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
project_id |
String |
Yes |
Specifies a project ID. You can obtain the project ID by referring to Obtaining the Project ID. |
vpn_connection_id |
String |
Yes |
Specifies a VPN connection ID. |
Returned status code 200: successful operation
Parameter |
Type |
Description |
|---|---|---|
vpn_connection |
ResponseVpnConnection object |
Specifies the VPN connection object. |
request_id |
String |
Specifies a request ID. |
Parameter |
Type |
Description |
|---|---|---|
id |
String |
|
name |
String |
|
status |
String |
|
vgw_id |
String |
|
vgw_ip |
String |
|
style |
String |
|
cgw_id |
String |
|
peer_subnets |
Array of String |
Specifies an IPv4 customer subnet. This parameter is not returned when attachment_type of the VPN gateway is set to ER and style is set to BGP or POLICY. |
tunnel_local_address |
String |
Specifies the tunnel interface address configured on the VPN gateway in route-based mode. This parameter is valid only when style is STATIC or BGP. |
tunnel_peer_address |
String |
Specifies the tunnel interface address configured on the customer gateway device in route-based mode. This parameter is valid only when style is STATIC or BGP. |
enable_nqa |
Boolean |
|
enable_hub |
Boolean |
|
policy_rules |
Array of PolicyRule objects |
Specifies IPv4 policy rules, which are returned only when style is set to POLICY and ip_version of the VPN gateway is set to ipv4. |
ikepolicy |
IkePolicy object |
Specifies the IKE policy object. |
ipsecpolicy |
IpsecPolicy object |
Specifies the IPsec policy object. |
created_at |
String |
|
updated_at |
String |
|
enterprise_project_id |
String |
|
connection_monitor_id |
String |
|
ha_role |
String |
|
tags |
Array of VpnResourceTag objects |
Specifies a tag list. |
eip_id |
String |
|
type |
String |
|
route_mode |
String |
Parameter |
Type |
Description |
|---|---|---|
source |
String |
Specifies a source CIDR block. |
destination |
Array of String |
Specifies a destination CIDR block. An example IPv4 CIDR block is 192.168.52.0/24. A maximum of 50 destination CIDR blocks can be returned for each policy rule. |
Parameter |
Type |
Description |
|---|---|---|
ike_version |
String |
|
phase1_negotiation_mode |
String |
|
authentication_algorithm |
String |
|
encryption_algorithm |
String |
|
dh_group |
String |
|
authentication_method |
String |
|
lifetime_seconds |
Integer |
|
local_id_type |
String |
|
local_id |
String |
Specifies the local ID. When local_id_type is set to ip, the local ID specified when the VPN connection is created or updated is returned. If no local ID is specified, the VPN gateway IP address corresponding to the VPN connection is returned. |
peer_id_type |
String |
|
peer_id |
String |
Specifies the peer ID. When peer_id_type is set to ip, the peer ID specified when the VPN connection is created or updated is returned. If no peer ID is specified, the IP address of the customer gateway is returned. |
dpd |
Dpd object |
Specifies the DPD object. |
Parameter |
Type |
Description |
|---|---|---|
timeout |
Integer |
|
interval |
Integer |
|
msg |
String |
Parameter |
Type |
Description |
|---|---|---|
authentication_algorithm |
String |
|
encryption_algorithm |
String |
|
pfs |
String |
|
transform_protocol |
String |
|
lifetime_seconds |
Integer |
|
encapsulation_mode |
String |
Parameter |
Type |
Description |
|---|---|---|
key |
String |
|
value |
String |
|
{
"vpn_connection": {
"id": "98c5af8a-demo-a8df-va86-ae2280a6f4c3",
"name": "vpn-1655",
"status": "DOWN",
"vgw_id": "b32d91a4-demo-a8df-va86-e907174eb11d",
"vgw_ip": "0c464dad-demo-a8df-va86-c22bb0eb0bde",
"style": "POLICY",
"cgw_id": "5247ae10-demo-a8df-va86-dd36659a7f5d",
"peer_subnets": ["192.168.0.0/24"],
"tunnel_local_address": "169.254.56.225/30",
"tunnel_peer_address": "169.254.56.226/30",
"policy_rules": [{
"rule_index": 1,
"source": "10.0.0.0/24",
"destination": [
"192.168.0.0/24"
]
}],
"ikepolicy": {
"ike_version": "v2",
"authentication_algorithm": "sha2-256",
"encryption_algorithm": "aes-128",
"dh_group": "group15",
"authentication_method": "pre-share",
"lifetime_seconds": 86400,
"local_id_type": "ip",
"local_id": "10.***.***.134",
"peer_id_type": "ip",
"peer_id": "88.***.***.164",
"dpd": {
"timeout": 15,
"interval": 30,
"msg": "seq-hash-notify"
}
},
"ipsecpolicy": {
"authentication_algorithm": "sha2-256",
"encryption_algorithm": "aes-128",
"pfs": "group15",
"transform_protocol": "esp",
"lifetime_seconds": 3600,
"encapsulation_mode": "tunnel"
},
"created_at": "2025-06-26T13:41:34.626Z",
"updated_at": "2025-06-26T13:41:34.626Z",
"enterprise_project_id": "0",
"ha_role":"master",
"tags": [],
},
"eip_id": "07f1efbf-01f5-4231-b22c-171005a352d4",
"type": "ROUTE",
"route_mode": "BGP"
},
"request_id": "f91082d4-6d49-479c-ad1d-4e552a9f5cae"
}
For details, see Status Codes.