Queries the log information of an IPsec-VPN connection by calling the DescribeVpnConnections operation.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
vpc:DescribeVpnConnectionLogs |
list |
*VpnConnection
|
None | 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 region IDs. |
eu-central-1 |
| VpnConnectionId |
string |
Yes |
The ID of the IPsec-VPN connection. |
vco-m5evqnds4y459flt3**** |
| From |
integer |
No |
The start time of the log. Only UNIX timestamps in seconds are supported. For example, 1671003744 represents 2022-12-14 15:42:24. Note
If you specify From, you must also specify To or MinutePeriod. |
1671003744 |
| To |
integer |
No |
The end time of the log. Only UNIX timestamps in seconds are supported. For example, 1671004344 represents 2022-12-14 15:52:24. Note
If you specify To, you must also specify From or MinutePeriod. |
1671004344 |
| MinutePeriod |
integer |
No |
The log period. Valid values: 1 to 10. Unit: minutes. Note
If you do not specify From or 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 for paging. Valid values: 1 to 50. Default value: 10. |
10 |
| TunnelId |
string |
No |
The tunnel ID of the IPsec-VPN connection. This parameter is supported only for IPsec-VPN connections in dual-tunnel mode. |
tun-opsqc4d97wni27**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| PageSize |
integer |
The number of entries per page for paging. |
10 |
| PageNumber |
integer |
The page number. |
1 |
| RequestId |
string |
The request ID. |
CF161502-4959-5C3B-B499-09B87BA931D9 |
| Count |
integer |
The number of log entries on the current page. |
10 |
| IsCompleted |
boolean |
Indicates whether the queried logs are accurate. Valid values:
|
true |
| Data |
object |
||
| Logs |
array |
The list of log entries. |
|
|
string |
A string array. Each item in the array is a log entry. |
"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****" ] |
Examples
Success response
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. | |
| 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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.