全部產品
Search
文件中心

VPN Gateway:DescribeVpnConnectionLogs - 查詢IPsec串連的日誌

更新時間:Apr 27, 2026

調用DescribeVpnConnections介面查詢IPsec串連的日誌資訊。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

當前API暫無授權資訊透出。

請求參數

名稱

類型

必填

描述

樣本值

RegionId

string

IPsec 串連所屬的地區 ID。

您可以通過調用 DescribeRegions 介面擷取地區 ID。

eu-central-1

VpnConnectionId

string

IPsec 串連的 ID。

vco-m5evqnds4y459flt3****

From

integer

日誌起始時間,僅支援傳入 UNIX 秒級時間戳記,例如 1671003744,1671003744 表示的時間為 2022 年 12 月 14 日 15:42:24。

說明

如果指定 From,則必須指定 ToMinutePeriod

1671003744

To

integer

日誌結束時間,僅支援傳入 UNIX 秒級時間戳記,例如 1671004344,1671004344 表示的時間為 2022 年 12 月 14 日 15:52:24。

說明

如果指定 To,則必須指定 FromMinutePeriod

1671004344

MinutePeriod

integer

日誌周期。取值範圍:1~10。單位:分鐘。

說明

如果不指定 FromTo,則必須指定 MinutePeriod

10

PageNumber

integer

列表的頁碼。預設值:1

1

PageSize

integer

分頁查詢時每頁顯示的條目數。取值範圍:1~50。預設值:10

10

TunnelId

string

IPsec 串連的隧道 ID。

僅雙隧道模式的 IPsec 串連支援配置該項。

tun-opsqc4d97wni27****

返回參數

名稱

類型

描述

樣本值

object

返回結果。

PageSize

integer

分頁查詢時每頁顯示的條目數。

10

PageNumber

integer

列表的頁碼。

1

RequestId

string

請求 ID。

CF161502-4959-5C3B-B499-09B87BA931D9

Count

integer

當前頁下日誌的條目數。

10

IsCompleted

boolean

查詢的日誌是否精確。取值:

  • true:精確。

  • false:不精確。

true

Data

object

Logs

array

日誌資訊列表。

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****" ]

樣本

正常返回樣本

JSON格式

{
  "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****\" ]"
    ]
  }
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 QueryVpnConnectionLog.NotFound the connection log of the vpn connection is not found. 未查詢到該vpn 串連下的串連日誌
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是否正確。

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情