Queries IPsec-VPN connections.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
vpc:DescribeVpnConnections | list | *VpnConnection acs:vpc:{#regionId}:{#accountId}:vpnconnection/* *VpnConnection acs:vpc:{#regionId}:{#accountId}:vpnconnection/{#VpnConnectionId} |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The ID of the region where the IPsec-VPN connection is created. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
VpnGatewayId | string | No | The ID of the VPN gateway. | vpn-bp1q8bgx4xnkx**** |
CustomerGatewayId | string | No | The ID of the customer gateway. | cgw-bp1mvj4g9kogw**** |
PageNumber | integer | No | The number of the page to return. Default value: 1. | 1 |
PageSize | integer | No | The number of entries to return on each page. 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 tag value. The tag value can be an empty string and cannot exceed 128 characters in length. It cannot start with Each tag key corresponds to one tag value. You can specify up to 20 tag values in each call. | |
object | No | The tag value. | ||
Key | string | No | The tag key. The tag key cannot be an empty string. It can be at most 64 characters in length, and cannot contain You can specify at most 20 tag keys in each call. | TagKey |
Value | string | No | The tag value. The tag value can be an empty string and cannot exceed 128 characters in length. It cannot start with Each tag key corresponds to one tag value. You can specify at most 20 tag values in each call. | TagValue |
ResourceGroupId | string | No | The ID of the resource group to which the IPsec-VPN connection belongs. You can call the ListResourceGroups operation to query the resource group ID. | rg-acfmzs372yg**** |
Response parameters
Examples
Sample success responses
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",
"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****"
}
]
}
}
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. | You are unauthorized to perform this operation on the specified resource. Acquire the required permissions and try again. |
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. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-10-24 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-10-19 | The Error code has changed. The request parameters of the API has changed. The response structure of the API has changed | View Change Details |
2023-08-01 | API Description Update. The Error code has changed. The response structure of the API has changed | View Change Details |
2023-06-30 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-06-13 | The Error code has changed. The response structure of the API has changed | View Change Details |
2023-05-04 | The Error code has changed | View Change Details |