调用DescribeVpnConnections接口查询IPsec连接的日志信息。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String DescribeVpnConnectionLogs

系统规定参数。取值:DescribeVpnConnectionLogs

RegionId String cn-hangzhou

IPsec连接所属的地域ID。

您可以通过调用DescribeRegions接口获取地域ID。

VpnConnectionId String vco-m5evqnds4y459flt3****

IPsec连接的ID。

From Integer 1671003744

日志起始时间,仅支持传入UNIX秒级时间戳,例如1671003744,1671003744表示的时间为2022年12月14日15:42:24。

说明 如果指定From,则必须指定ToMinutePeriod
To Integer 1671004344

日志结束时间,仅支持传入UNIX秒级时间戳,例如1671004344,1671004344表示的时间为2022年12月14日15:52:24。

说明 如果指定To,则必须指定FromMinutePeriod
MinutePeriod Integer 10

日志周期。取值范围:1~10。单位:分钟。

说明 如果不指定FromTo,则必须指定MinutePeriod
PageNumber Integer 1

列表的页码。默认值:1

PageSize Integer 10

分页查询时每页显示的条目数。取值范围:1~50。默认值:10

返回数据

名称 类型 示例值 描述
PageSize Integer 10

分页查询时每页显示的条目数。

PageNumber Integer 1

列表的页码。

RequestId String CF161502-4959-5C3B-B499-09B87BA931D9

请求ID。

Count Integer 10

当前页下日志的条目数。

IsCompleted Boolean true

查询的日志是否精确。取值:

  • true:精确。
  • false:不精确。
Data Array of String "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****" ]

字符串数组。

数组中的每一项都为一条日志。

示例

请求示例

http(s)://[Endpoint]/?Action=DescribeVpnConnectionLogs
&RegionId=cn-hangzhou
&VpnConnectionId=vco-m5evqnds4y459flt3****
&From=1600738962
&To=1600738962
&MinutePeriod=10
&PageNumber=1
&PageSize=10
&公共请求参数

正常返回示例

XML格式

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

<DescribeVpnConnectionLogsResponse>
    <PageSize>10</PageSize>
    <RequestId>CF161502-4959-5C3B-B499-09B87BA931D9</RequestId>
    <PageNumber>1</PageNumber>
    <IsCompleted>true</IsCompleted>
    <Data>
        <Logs>2022-12-14 15:52:28 vco-m5evqnds4y459flt3**** [DEBUG]: isakmp_inf.c:1514:isakmp_info_send_r_u(): DPD monitoring....</Logs>
        <Logs>2022-12-14 15:52:28 vco-m5evqnds4y459flt3**** [DEBUG]: oakley.c:2832:oakley_newiv2(): compute IV for phase2</Logs>
        <Logs>2022-12-14 15:52:28 vco-m5evqnds4y459flt3**** [DEBUG]: oakley.c:2833:oakley_newiv2(): phase1 last IV:</Logs>
        <Logs>2022-12-14 15:52:28 vco-m5evqnds4y459flt3**** [DEBUG]: algorithm.c:381:alg_oakley_hashdef(): hash(sha1)</Logs>
        <Logs>2022-12-14 15:52:28 vco-m5evqnds4y459flt3**** [DEBUG]: algorithm.c:524:alg_oakley_encdef(): encryption(aes)</Logs>
        <Logs>2022-12-14 15:52:28 vco-m5evqnds4y459flt3**** [DEBUG]: oakley.c:2867:oakley_newiv2(): phase2 IV computed:</Logs>
        <Logs>2022-12-14 15:52:28 vco-m5evqnds4y459flt3**** [DEBUG]: oakley.c:657:oakley_compute_hash1(): HASH with:</Logs>
        <Logs>2022-12-14 15:52:28 vco-m5evqnds4y459flt3**** [DEBUG]: algorithm.c:464:alg_oakley_hmacdef(): hmac(hmac_sha1)</Logs>
        <Logs>2022-12-14 15:52:28 vco-m5evqnds4y459flt3**** [DEBUG]: oakley.c:667:oakley_compute_hash1(): HASH computed:</Logs>
        <Logs>2022-12-14 15:52:28 vco-m5evqnds4y459flt3**** [DEBUG]: oakley.c:3035:oakley_do_encrypt(): begin encryption.</Logs>
    </Data>
    <Count>10</Count>
</DescribeVpnConnectionLogsResponse>

JSON格式

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

{
  "PageSize" : 10,
  "RequestId" : "CF161502-4959-5C3B-B499-09B87BA931D9",
  "PageNumber" : 1,
  "IsCompleted" : true,
  "Data" : {
    "Logs" : [ "2022-12-14 15:52:28 vco-m5evqnds4y459flt3**** [DEBUG]: isakmp_inf.c:1514:isakmp_info_send_r_u(): DPD monitoring....", "2022-12-14 15:52:28 vco-m5evqnds4y459flt3**** [DEBUG]: oakley.c:2832:oakley_newiv2(): compute IV for phase2", "2022-12-14 15:52:28 vco-m5evqnds4y459flt3**** [DEBUG]: oakley.c:2833:oakley_newiv2(): phase1 last IV:", "2022-12-14 15:52:28 vco-m5evqnds4y459flt3**** [DEBUG]: algorithm.c:381:alg_oakley_hashdef(): hash(sha1)", "2022-12-14 15:52:28 vco-m5evqnds4y459flt3**** [DEBUG]: algorithm.c:524:alg_oakley_encdef(): encryption(aes)", "2022-12-14 15:52:28 vco-m5evqnds4y459flt3**** [DEBUG]: oakley.c:2867:oakley_newiv2(): phase2 IV computed:", "2022-12-14 15:52:28 vco-m5evqnds4y459flt3**** [DEBUG]: oakley.c:657:oakley_compute_hash1(): HASH with:", "2022-12-14 15:52:28 vco-m5evqnds4y459flt3**** [DEBUG]: algorithm.c:464:alg_oakley_hmacdef(): hmac(hmac_sha1)", "2022-12-14 15:52:28 vco-m5evqnds4y459flt3**** [DEBUG]: oakley.c:667:oakley_compute_hash1(): HASH computed:", "2022-12-14 15:52:28 vco-m5evqnds4y459flt3**** [DEBUG]: oakley.c:3035:oakley_do_encrypt(): begin encryption." ]
  },
  "Count" : 10
}

错误码

HttpCode 错误码 错误信息 描述
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. 您没有权限操作指定资源,请申请权限后再操作。
404 InvalidVpnConnectionInstanceId.NotFound The specified vpn connection instance id does not exist. 指定的VPN连接不存在,请您检查该VPN连接ID是否正确。

访问错误中心查看更多错误码。