Queries logs of 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:DescribeVpnConnectionLogs | list |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the IPsec-VPN connection. You can call the DescribeRegions operation to query the most recent region list. | eu-central-1 |
VpnConnectionId | string | Yes | The ID of the IPsec-VPN connection. | vco-m5evqnds4y459flt3**** |
From | integer | No | The start time of the flow log. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. Note
If you specify From, you must specify To or MinutePeriod.
| 1671003744 |
To | integer | No | The end time of the flow log. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. Note
If you specify To, you must specify From or MinutePeriod.
| 1671004344 |
MinutePeriod | integer | No | The interval at which log data is collected. Valid values: 1 to 10. Unit: minutes. Note
If you do not specify From and To, you must specify MinutePeriod.
| 10 |
PageNumber | integer | No | The page number. Default value: 1. | 1 |
PageSize | integer | No | The number of entries per page. Valid values: 1 to 50. Default value: 10. | 10 |
TunnelId | string | No | The ID of the IPsec-VPN connection. This parameter is available only for a dual-tunnel IPsec-VPN connection. | tun-opsqc4d97wni27**** |
Response parameters
Examples
Sample success responses
JSON
format
{
"PageSize": 10,
"PageNumber": 1,
"RequestId": "CF161502-4959-5C3B-B499-09B87BA931D9",
"Count": 10,
"IsCompleted": true,
"Data": {
"Logs": [
"\"Logs\": [ \"2022-12-14 15:52:28 vco-m5evqnds4y459flt3**** [DEBUG]: isakmp_inf.c:1514:isakmp****\", \"2022-12-14 15:52:28 vco-m5evqnds4y459flt3**** [DEBUG]: oakley.c:2832:oak****\", \"2022-12-14 15:52:28 vco-m5evqnds4y459flt3**** [DEBUG]: oakley.c:2833:oak****\" ]"
]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | QueryVpnConnectionLog.NotFound | the connection log of the vpn connection is not found. | the connection log of the vpn connection is not found. |
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 |
---|---|---|
2024-01-04 | API Description Update. The Error code has changed | View Change Details |
2023-06-30 | The Error code has changed. The request parameters of the API has changed | View Change Details |