Queries the configuration of an IPsec-VPN connection.
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:DownloadVpnConnectionConfig | get | *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-shanghai |
VpnConnectionId | string | Yes | The ID of the IPsec-VPN connection. | vco-bp1bbi27hojx80nck**** |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "0C68048B-0F70-40DA-B8AE-1B79B5CF62E3",
"VpnConnectionConfig": {
"Remote": "116.62.XX.XX",
"Local": "139.196.XX.XX",
"RemoteSubnet": "192.168.0.0/16",
"LocalSubnet": "10.0.0.0/8",
"IkeConfig": {
"RemoteId": "139.196.XX.XX",
"IkeLifetime": 86400,
"IkeEncAlg": "aes",
"LocalId": "116.62.XX.XX",
"IkeMode": "main",
"IkeVersion": "ikev1",
"IkePfs": "group2",
"Psk": "pgw6dy7d1i8i****",
"IkeAuthAlg": "sha1"
},
"IpsecConfig": {
"IpsecAuthAlg": "sha1",
"IpsecEncAlg": "aes",
"IpsecLifetime": 86400,
"IpsecPfs": "group2"
},
"TunnelsConfig": {
"TunnelConfig": [
{
"TunnelId": "tun-opsqc4d97wni27****",
"Local": "47.21.XX.XX",
"Remote": "47.24.XX.XX",
"IkeConfig": {
"Psk": "pgw6dy7d1i8i****",
"IkeVersion": "ikev1",
"IkeMode": "main",
"IkeEncAlg": "aes",
"IkeAuthAlg": "sha1",
"IkePfs": "group2",
"IkeLifetime": 86400,
"LocalId": "47.21.XX.XX",
"RemoteId": "47.24.XX.XX"
},
"IpsecConfig": {
"IpsecAuthAlg": "sha1",
"IpsecEncAlg": "aes",
"IpsecPfs": "group2",
"IpsecLifetime": 86400
}
}
]
}
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
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. |
404 | InvalidVpnConnectionInstanceId.NotFound | The specified vpn connection instance id does not exist. | The specified vpn connection instance id does not exist. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-08-01 | API Description Update. 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 |