Queries information about IPsec-VPN connections.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:DescribeVpnConnections |
list |
VpnConnection
VpnConnection
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the IPsec-VPN connection. |
cn-hangzhou |
| VpnGatewayId |
string |
No |
The instance ID of the VPN gateway. |
vpn-bp1q8bgx4xnkx**** |
| CustomerGatewayId |
string |
No |
The ID of the customer gateway. |
cgw-bp1mvj4g9kogw**** |
| PageNumber |
integer |
No |
The page number of the list. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page in a paging query. Default value: 10. Valid values: 1 to 50. |
10 |
| VpnConnectionId |
string |
No |
The ID of the IPsec-VPN connection. |
vco-bp10lz7aejumd**** |
| Tag |
array<object> |
No |
The list of tags bound to the IPsec-VPN connection. |
|
|
object |
No |
The tag information. |
||
| Key |
string |
No |
The tag key. This value cannot be an empty string. The tag key can be up to 64 characters in length. It cannot start with You can specify up to 20 tag keys at a time. |
TagKey |
| Value |
string |
No |
The tag value. |
TagValue |
| ResourceGroupId |
string |
No |
The ID of the resource group to which the IPsec-VPN connection belongs. |
rg-acfmzs372yg**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| PageSize |
integer |
The number of entries per page in a paging query. |
10 |
| RequestId |
string |
The request ID. |
238752DC-0693-49BE-9C85-711D5691D3E5 |
| PageNumber |
integer |
The page number. |
1 |
| TotalCount |
integer |
The total number of entries returned. |
2 |
| VpnConnections |
object |
||
| VpnConnection |
array<object> |
The list of IPsec-VPN connection configurations. |
|
|
array<object> |
The configuration of an IPsec-VPN connection. |
||
| Status |
string |
The status of the IPsec-VPN connection.
|
ipsec_sa_established |
| EnableNatTraversal |
boolean |
Indicates whether NAT traversal is enabled for the IPsec-VPN connection.
|
true |
| RemoteCaCertificate |
string |
The CA certificate of the peer. |
-----BEGIN CERTIFICATE----- MIIB7zCCAZW**** -----END CERTIFICATE----- |
| CreateTime |
integer |
The timestamp when the IPsec-VPN connection was created. Unit: milliseconds. The timestamp is in the UNIX format and represents the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. |
1492753817000 |
| EffectImmediately |
boolean |
Indicates whether the IPsec-VPN connection configuration takes effect immediately.
|
true |
| VpnGatewayId |
string |
The instance ID of the VPN gateway. |
vpn-bp1q8bgx4xnkm**** |
| LocalSubnet |
string |
The CIDR block on the Alibaba Cloud side of the IPsec-VPN connection. Multiple CIDR blocks are separated by commas (,). |
192.168.0.0/16,172.17.0.0/16 |
| VpnConnectionId |
string |
The ID of the IPsec-VPN connection. |
vco-bp10lz7aejumd**** |
| RemoteSubnet |
string |
The CIDR block on the on-premises data center side. Multiple CIDR blocks are separated by commas (,). |
10.0.0.0/8,172.16.0.0/16 |
| CustomerGatewayId |
string |
The instance ID of the customer gateway associated with the IPsec-VPN connection. |
cgw-bp1mvj4g9kogw**** |
| Name |
string |
The name of the IPsec-VPN connection. |
nametest |
| EnableDpd |
boolean |
Indicates whether Dead Peer Detection (DPD) is enabled for the IPsec-VPN connection.
|
true |
| IkeConfig |
object |
The Phase 1 negotiation configuration. |
|
| RemoteId |
string |
The identifier on the Alibaba Cloud side of the IPsec-VPN connection. |
139.17.XX.XX |
| IkeLifetime |
integer |
The IKE phase lifetime. Unit: seconds. |
86400 |
| IkeEncAlg |
string |
The encryption algorithm in the IKE phase. |
aes |
| LocalId |
string |
The identifier on the on-premises data center side of the IPsec-VPN connection. |
116.64.XX.XX |
| IkeMode |
string |
The IKE negotiation mode.
|
main |
| IkeVersion |
string |
The IKE protocol version.
Compared with IKEv1, IKEv2 simplifies the SA negotiation process and provides better support for multi-CIDR-block scenarios. |
ikev1 |
| IkePfs |
string |
The DH group in the IKE phase. |
group2 |
| Psk |
string |
The pre-shared key. |
pgw6dy7**** |
| IkeAuthAlg |
string |
The authentication algorithm in the IKE phase. |
sha1 |
| IpsecConfig |
object |
The Phase 2 negotiation configuration. |
|
| IpsecAuthAlg |
string |
The authentication algorithm in the IPsec phase. |
sha1 |
| IpsecLifetime |
integer |
The IPsec phase lifetime. Unit: seconds. |
86400 |
| IpsecEncAlg |
string |
The encryption algorithm in the IPsec phase. |
aes |
| IpsecPfs |
string |
The DH group in the IPsec phase. |
group2 |
| VcoHealthCheck |
object |
The health check configuration of the IPsec-VPN connection. |
|
| Status |
string |
The health check status.
|
success |
| Dip |
string |
The destination IP address. |
192.168.0.1 |
| Interval |
integer |
The health check interval. Unit: seconds. |
2 |
| Retry |
integer |
The number of retries for the health check. |
3 |
| Sip |
string |
The source IP address. |
192.168.0.50 |
| Enable |
string |
The enabling status of the health check.
|
true |
| Policy |
string |
Indicates whether published routes are withdrawn when the health check fails.
|
revoke_route |
| VpnBgpConfig |
object |
The BGP routing protocol configuration of the IPsec-VPN connection. |
|
| Status |
string |
The BGP routing protocol negotiation status.
|
success |
| PeerBgpIp |
string |
The BGP IP address of the peer. |
169.254.10.1 |
| TunnelCidr |
string |
The BGP CIDR block of the IPsec-VPN connection. The CIDR block is a subnet of 169.254.0.0/16 with a subnet mask length of 30. |
169.254.10.0/30 |
| LocalBgpIp |
string |
The BGP IP address on the Alibaba Cloud side. |
169.254.10.2 |
| PeerAsn |
integer |
The autonomous system number of the peer. |
65530 |
| LocalAsn |
integer |
The autonomous system number on the Alibaba Cloud side. |
65531 |
| AuthKey |
string |
The authentication key of the BGP routing protocol. |
AuthKey**** |
| AttachType |
string |
The type of resource bound to the IPsec-VPN connection.
|
CEN |
| NetworkType |
string |
The network type of the IPsec-VPN connection.
|
public |
| AttachInstanceId |
string |
The ID of the Cloud Enterprise Network (CEN) instance to which the transit routing instance belongs. |
cen-lxxpbpalc776qz**** |
| Spec |
string |
The bandwidth specification of the IPsec-VPN connection. Unit: Mbps. |
1000M |
| State |
string |
The binding status of the IPsec-VPN connection and the transit router instance.
|
attached |
| TransitRouterId |
string |
The ID of the transit router instance bound to the IPsec-VPN connection. |
tr-p0we2edef9qr44a85**** |
| TransitRouterName |
string |
The name of the transit router instance. |
nametest |
| CrossAccountAuthorized |
boolean |
Indicates whether the IPsec-VPN connection is bound to a transit router instance under a different Alibaba Cloud account.
|
false |
| InternetIp |
string |
The gateway IP address of the IPsec-VPN connection. Note
This parameter is returned only when the IPsec-VPN connection is bound to a transit router instance. |
10.XX.XX.10 |
| Tag |
object |
||
| Tag |
array<object> |
The list of tags bound to the IPsec-VPN connection. |
|
|
object |
The tag information. |
||
| Key |
string |
The tag key. |
TagKey |
| Value |
string |
The tag value. |
TagValue |
| TunnelOptionsSpecification |
object |
||
| TunnelOptions |
array<object> |
The tunnel configuration of the IPsec-VPN connection. The parameters under TunnelOptionsSpecification are returned only when you query an IPsec-VPN connection in dual-tunnel mode. |
|
|
array<object> |
The tunnel configuration. |
||
| TunnelId |
string |
The tunnel ID. |
tun-opsqc4d97wni27**** |
| CustomerGatewayId |
string |
The ID of the customer gateway associated with the tunnel. |
cgw-p0wy363lucf1uyae8**** |
| EnableDpd |
string |
Indicates whether Dead Peer Detection (DPD) is enabled for the tunnel.
|
true |
| EnableNatTraversal |
string |
Indicates whether NAT traversal is enabled for the tunnel.
|
true |
| InternetIp |
string |
The IP address of the tunnel. |
47.21.XX.XX |
| RemoteCaCertificate |
string |
The CA certificate of the tunnel peer. This parameter is returned only when the VPN gateway instance uses the China Cryptographic Algorithm (SM). |
-----BEGIN CERTIFICATE----- MIIB7zCCAZW**** -----END CERTIFICATE----- |
| Role |
string |
The role of the tunnel.
|
master |
| TunnelIndex |
integer |
The creation order of the tunnel.
Note
This parameter is returned only when the IPsec-VPN connection is bound to a transit router instance. |
1 |
| State |
string |
The status of the tunnel.
|
active |
| Status |
string |
The status of the IPsec-VPN connection.
|
ipsec_sa_established |
| TunnelBgpConfig |
object |
The BGP configuration of the tunnel. |
|
| BgpStatus |
string |
The BGP negotiation status.
|
success |
| LocalAsn |
string |
The autonomous system number on the local end (Alibaba Cloud side) of the tunnel. |
65530 |
| LocalBgpIp |
string |
The BGP IP address on the local end (Alibaba Cloud side) of the tunnel. |
169.254.10.1 |
| PeerAsn |
string |
The autonomous system number of the tunnel peer. |
65531 |
| PeerBgpIp |
string |
The BGP IP address of the tunnel peer. |
169.254.10.2 |
| TunnelCidr |
string |
The BGP CIDR block of the tunnel. |
169.254.10.0/30 |
| TunnelIkeConfig |
object |
The Phase 1 negotiation configuration. |
|
| IkeAuthAlg |
string |
The authentication algorithm in the IKE phase. |
sha1 |
| IkeEncAlg |
string |
The encryption algorithm in the IKE phase. |
aes |
| IkeLifetime |
string |
The IKE phase lifetime. Unit: seconds. |
86400 |
| IkeMode |
string |
The IKE negotiation mode.
|
main |
| IkePfs |
string |
The DH group in the IKE phase. |
group2 |
| IkeVersion |
string |
The IKE protocol version. |
ikev1 |
| LocalId |
string |
The identifier on the local end (Alibaba Cloud side) of the tunnel. |
47.21.XX.XX |
| Psk |
string |
The pre-shared key. |
123456**** |
| RemoteId |
string |
The identifier of the tunnel peer. |
47.42.XX.XX |
| TunnelIpsecConfig |
object |
The Phase 2 negotiation configuration. |
|
| IpsecAuthAlg |
string |
The authentication algorithm in the IPsec phase. |
sha1 |
| IpsecEncAlg |
string |
The encryption algorithm in the IPsec phase. |
aes |
| IpsecLifetime |
string |
The IPsec phase lifetime. Unit: seconds. |
86400 |
| IpsecPfs |
string |
The DH group in the IPsec phase. |
group2 |
| ZoneNo |
string |
The zone in which the tunnel is deployed. |
ap-southeast-5a |
| EnableTunnelsBgp |
boolean |
The enabling status of BGP for the tunnels.
|
true |
| ResourceGroupId |
string |
The ID of the resource group to which the IPsec-VPN connection belongs. You can call ListResourceGroups to query resource group information. |
rg-acfmzs372yg**** |
| TunnelBandwidth |
string |
The bandwidth specification of a single VPN tunnel. Valid values: Standard (default): Standard type with a default bandwidth of 1 Gbps. Large: Large type with a default bandwidth of 3 Gbps. |
Standard |
Examples
Success response
JSON format
{
"PageSize": 10,
"RequestId": "238752DC-0693-49BE-9C85-711D5691D3E5",
"PageNumber": 1,
"TotalCount": 2,
"VpnConnections": {
"VpnConnection": [
{
"Status": "ipsec_sa_established",
"EnableNatTraversal": true,
"RemoteCaCertificate": "-----BEGIN CERTIFICATE----- MIIB7zCCAZW**** -----END CERTIFICATE-----",
"CreateTime": 1492753817000,
"EffectImmediately": true,
"VpnGatewayId": "vpn-bp1q8bgx4xnkm****",
"LocalSubnet": "192.168.0.0/16,172.17.0.0/16",
"VpnConnectionId": "vco-bp10lz7aejumd****",
"RemoteSubnet": "10.0.0.0/8,172.16.0.0/16",
"CustomerGatewayId": "cgw-bp1mvj4g9kogw****",
"Name": "nametest",
"EnableDpd": true,
"IkeConfig": {
"RemoteId": "139.17.XX.XX",
"IkeLifetime": 86400,
"IkeEncAlg": "aes",
"LocalId": "116.64.XX.XX",
"IkeMode": "main",
"IkeVersion": "ikev1",
"IkePfs": "group2",
"Psk": "pgw6dy7****",
"IkeAuthAlg": "sha1"
},
"IpsecConfig": {
"IpsecAuthAlg": "sha1",
"IpsecLifetime": 86400,
"IpsecEncAlg": "aes",
"IpsecPfs": "group2"
},
"VcoHealthCheck": {
"Status": "success",
"Dip": "192.168.0.1",
"Interval": 2,
"Retry": 3,
"Sip": "192.168.0.50",
"Enable": "true",
"Policy": "revoke_route"
},
"VpnBgpConfig": {
"Status": "success",
"PeerBgpIp": "169.254.10.1",
"TunnelCidr": "169.254.10.0/30",
"LocalBgpIp": "169.254.10.2",
"PeerAsn": 65530,
"LocalAsn": 65531,
"AuthKey": "AuthKey****"
},
"AttachType": "CEN",
"NetworkType": "public",
"AttachInstanceId": "cen-lxxpbpalc776qz****",
"Spec": "1000M",
"State": "attached",
"TransitRouterId": "tr-p0we2edef9qr44a85****",
"TransitRouterName": "nametest",
"CrossAccountAuthorized": false,
"InternetIp": "10.XX.XX.10",
"Tag": {
"Tag": [
{
"Key": "TagKey",
"Value": "TagValue"
}
]
},
"TunnelOptionsSpecification": {
"TunnelOptions": [
{
"TunnelId": "tun-opsqc4d97wni27****",
"CustomerGatewayId": "cgw-p0wy363lucf1uyae8****",
"EnableDpd": "true",
"EnableNatTraversal": "true",
"InternetIp": "47.21.XX.XX",
"RemoteCaCertificate": "-----BEGIN CERTIFICATE----- MIIB7zCCAZW**** -----END CERTIFICATE-----",
"Role": "master",
"TunnelIndex": 1,
"State": "active",
"Status": "ipsec_sa_established",
"TunnelBgpConfig": {
"BgpStatus": "success",
"LocalAsn": "65530",
"LocalBgpIp": "169.254.10.1",
"PeerAsn": "65531",
"PeerBgpIp": "169.254.10.2",
"TunnelCidr": "169.254.10.0/30"
},
"TunnelIkeConfig": {
"IkeAuthAlg": "sha1",
"IkeEncAlg": "aes",
"IkeLifetime": "86400",
"IkeMode": "main",
"IkePfs": "group2",
"IkeVersion": "ikev1",
"LocalId": "47.21.XX.XX",
"Psk": "123456****",
"RemoteId": "47.42.XX.XX"
},
"TunnelIpsecConfig": {
"IpsecAuthAlg": "sha1",
"IpsecEncAlg": "aes",
"IpsecLifetime": "86400",
"IpsecPfs": "group2"
},
"ZoneNo": "ap-southeast-5a"
}
]
},
"EnableTunnelsBgp": true,
"ResourceGroupId": "rg-acfmzs372yg****",
"TunnelBandwidth": "Standard"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Forbidden.TagKey.Duplicated | The specified tag key already exists. | The tag resources are duplicate. |
| 400 | SizeLimitExceeded.TagNum | The maximum number of tags is exceeded. | The number of tags has reached the upper limit. |
| 400 | InvalidParameter.TagValue | The specified parameter TagValue is invalid. | The error message returned because the specified tag value is invalid. |
| 400 | InvalidParameter.TagKey | The specified parameter TagKey is invalid. | The error message returned because the specified tag key is invalid. |
| 400 | Duplicated.TagKey | The specified parameter TagKey is duplicated. | The error message returned because the specified tag key already exists. |
| 403 | Forbbiden.SubUser | User not authorized to operate on the specified resource as your account is created by another user. | |
| 403 | Forbidden | User not authorized to operate on the specified resource. | You do not have the permissions to manage the specified resource. Apply for the permissions and try again. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.