Queries the logs of an IPsec server.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListIpsecServerLogs

The operation that you want to perform. Set the value to ListIpsecServerLogs.

RegionId String Yes cn-hangzhou

The ID of the region where the IPsec server is created.

You can call the DescribeRegions operation to obtain the region ID.

IpsecServerId String Yes iss-2zei2n5q5zhirfh73****

The ID of the IPsec server.

From Integer No 1671003744

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.
To Integer No 1671004344

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.
MinutePeriod Integer No 10

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.
PageNumber Integer No 1

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

PageSize Integer No 10

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

Response parameters

Parameter Type Example Description
PageSize Integer 10

The number of entries returned per page.

PageNumber Integer 1

The page number of the returned page.

RequestId String DEDAC5B1-9292-5BF7-BDDF-61BA58CFB2FB

The ID of the request.

Count Integer 10

The number of entries on the current page.

IsCompleted Boolean true

Indicates whether the log is accurate. Valid values:

  • true: accurate
  • false: inaccurate
Data Array of String "2022-12-15 17:00:43 [INFO]: : iss-2zei2n5q5zhirfh73**** del ipsec policy successfully", "2022-12-15 17:00:43 [INFO]: : iss-2zei2n5q5zhirfh73**** add ipsec policy successfully"

An array of strings.

Each item in the array is a log entry.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListIpsecServerLogs
&RegionId=cn-hangzhou
&IpsecServerId=iss-bp1bo3xuvcxo7ixll****
&From=1671003744
&To=1671004344
&MinutePeriod=10
&PageNumber=1
&PageSize=10
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListIpsecServerLogsResponse>
    <PageSize>10</PageSize>
    <RequestId>B6DB370B-2CDB-5396-BD7C-EDCBA2756553</RequestId>
    <PageNumber>1</PageNumber>
    <IsCompleted>true</IsCompleted>
    <Data>2022-12-15 17:00:43 [INFO]: : iss-2zei2n5q5zhirfh73**** del ipsec policy successfully</Data>
    <Data>2022-12-15 17:00:43 [INFO]: : iss-2zei2n5q5zhirfh73**** add ipsec policy successfully</Data>
    <Data>2022-12-15 17:04:20 iss-2zei2n5q5zhirfh73**** [INFO]: : nat keepalive msg send</Data>
    <Data>2022-12-15 17:04:20 iss-2zei2n5q5zhirfh73**** [DEBUG]: sockmisc.c:327:sendfromto(): sockname 192.168.1.70[500]</Data>
    <Data>2022-12-15 17:04:20 iss-2zei2n5q5zhirfh73**** [DEBUG]: sockmisc.c:329:sendfromto(): send packet from 192.168.1.70[500]</Data>
    <Data>2022-12-15 17:04:20 iss-2zei2n5q5zhirfh73**** [DEBUG]: sockmisc.c:331:sendfromto(): send packet to 223.XX.XX.215[17489]</Data>
    <Data>2022-12-15 17:04:20 iss-2zei2n5q5zhirfh73**** [DEBUG]: sockmisc.c:514:sendfromto(): 1 times of 1 bytes message will be sent to 223.XX.XX.215[17489]</Data>
    <Data>2022-12-15 17:04:20 iss-2zei2n5q5zhirfh73**** [INFO]: : nat keepalive msg send</Data>
    <Data>2022-12-15 17:04:20 iss-2zei2n5q5zhirfh73**** [DEBUG]: sockmisc.c:327:sendfromto(): sockname 192.168.1.70[4500]</Data>
    <Data>2022-12-15 17:04:20 iss-2zei2n5q5zhirfh73**** [DEBUG]: sockmisc.c:329:sendfromto(): send packet from 192.168.1.70[4500]</Data>
    <Count>10</Count>
</ListIpsecServerLogsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "PageSize" : 10,
  "RequestId" : "B6DB370B-2CDB-5396-BD7C-EDCBA2756553",
  "PageNumber" : 1,
  "IsCompleted" : true,
  "Data" : [ "2022-12-15 17:00:43 [INFO]: : iss-2zei2n5q5zhirfh73**** del ipsec policy successfully", "2022-12-15 17:00:43 [INFO]: : iss-2zei2n5q5zhirfh73**** add ipsec policy successfully", "2022-12-15 17:04:20 iss-2zei2n5q5zhirfh73**** [INFO]: : nat keepalive msg send", "2022-12-15 17:04:20 iss-2zei2n5q5zhirfh73**** [DEBUG]: sockmisc.c:327:sendfromto(): sockname 192.168.1.70[500]", "2022-12-15 17:04:20 iss-2zei2n5q5zhirfh73**** [DEBUG]: sockmisc.c:329:sendfromto(): send packet from 192.168.1.70[500]", "2022-12-15 17:04:20 iss-2zei2n5q5zhirfh73**** [DEBUG]: sockmisc.c:331:sendfromto(): send packet to 223.XX.XX.215[17489]", "2022-12-15 17:04:20 iss-2zei2n5q5zhirfh73**** [DEBUG]: sockmisc.c:514:sendfromto(): 1 times of 1 bytes message will be sent to 223.XX.XX.215[17489]", "2022-12-15 17:04:20 iss-2zei2n5q5zhirfh73**** [INFO]: : nat keepalive msg send", "2022-12-15 17:04:20 iss-2zei2n5q5zhirfh73**** [DEBUG]: sockmisc.c:327:sendfromto(): sockname 192.168.1.70[4500]", "2022-12-15 17:04:20 iss-2zei2n5q5zhirfh73**** [DEBUG]: sockmisc.c:329:sendfromto(): send packet from 192.168.1.70[4500]" ],
  "Count" : 10
}

Error codes

HttpCode Error code Error message Description
403 Forbidden User not authorized to operate on the specified resource. The error message returned because you are not authorized to perform the operation on the specified resource. Acquire the required permissions and try again.

For a list of error codes, see Service error codes.