All Products
Search
Document Center

VPN Gateway:DescribeVpnConnectionLogs

Last Updated:Mar 22, 2024

Queries logs of IPsec-VPN connections.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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.
OperationAccess levelResource typeCondition keyAssociated operation
vpc:DescribeVpnConnectionLogsList
  • VpnConnection
    acs:vpc:{#regionId}:{#accountId}:vpnconnection/{#VpnConnectionId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region to which the IPsec-VPN connection belongs.

You can call the DescribeRegions operation to query the most recent region list.

eu-central-1
VpnConnectionIdstringYes

The ID of the IPsec-VPN connection.

vco-m5evqnds4y459flt3****
FromintegerNo

The beginning of the time range to query. The value must be a UNIX timestamp. For example, 1671003744 specifies 15:42:24 (UTC+8) on December 14, 2022.

Note If you specify From, you must also specify To or MinutePeriod.
1671003744
TointegerNo

The end of the time range to query. The value must be a UNIX timestamp. For example, 1671004344 specifies 15:52:24 (UTC+8) on December 14, 2022.

Note If you specify To, you must also specify From or MinutePeriod.
1671004344
MinutePeriodintegerNo

The interval at which log data is queried. Valid values: 1 to 10. Unit: minutes.

Note If both From and To are not specified, you must specify MinutePeriod.
10
PageNumberintegerNo

The number of the page to return. Default value: 1.

1
PageSizeintegerNo

The number of entries to return on each page. Valid values: 1 to 50. Default value: 10.

10
TunnelIdstringNo

The tunnel ID of the IPsec-VPN connection. You can specify this parameter only for IPsec-VPN connections in dual-tunnel mode.

tun-opsqc4d97wni27****

Response parameters

ParameterTypeDescriptionExample
object
PageSizeinteger

The number of entries returned per page.

10
PageNumberinteger

The page number of the returned page.

1
RequestIdstring

The ID of the request.

CF161502-4959-5C3B-B499-09B87BA931D9
Countinteger

The number of entries on the current page.

10
IsCompletedboolean

Indicates whether the log is accurate. Valid values:

  • true: accurate
  • false: inaccurate
true
Dataarray

An array of strings.

Each item in the array is a log entry.

string

An array of strings.

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

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
403Forbbiden.SubUserUser 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.
403ForbiddenUser 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.
404InvalidVpnConnectionInstanceId.NotFoundThe 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 timeSummary of changesOperation
2024-01-04API Description Update. The Error code has changedsee changesets
Change itemChange content
API DescriptionAPI Description Update.
Error CodesThe Error code has changed.
    delete Error Codes: 403
    delete Error Codes: 404
    Added Error Codes: 400
2023-06-30The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 403
    delete Error Codes: 404
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: TunnelId