查詢目的路由
更新時間 2025-04-03 11:17:10
最近更新時間: 2025-04-03 11:17:10
分享文章
查詢目的路由。
接口功能介紹
IPsec vpn目的路由查詢
接口約束
支持集群模式資源池。
URI
GET /v4/vpn/ipsec-static-route/list
路徑參數
無
Query參數
| 參數 | 是否必填 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|---|
| regionID | 是 | String | 資源池ID | b342b77ef26b11ecb0ac0242ac110002 | |
| vpnGatewayID | 是 | String | vpn網關ID | 556781e8-7488-11ee-b5fc-525400af7402 | |
| queryContent | 否 | String | 模糊查詢 | ipsec |
請求參數
請求header參數
無
請求body參數
無
響應參數
| 參數 | 是否必填 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|---|
| statusCode | 否 | Integer | 返回狀態碼 取值范圍: 800:成功 900:失敗 | 800 | |
| errorCode | 否 | String | 業務細分碼,為product.module.code三段式碼 | ||
| message | 否 | String | 失敗時的錯誤描述,一般為英文描述 | ||
| description | 否 | String | 失敗時的錯誤描述,一般為中文描述 | ||
| returnObj | 否 | Object | 返回參數 | returnObj |
表returnObj
| 參數 | 是否必填 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|---|
| totalCount | 否 | Integer | 查詢的總記錄數 | 3 | |
| currentCount | 否 | Integer | 當前頁記錄數 | 3 | |
| totalPage | 否 | Integer | 總頁數 | 1 | |
| logMark | 否 | String | 鏈路追蹤ID | 74cb2e66-1f95-45da-aac5-ee013470fd96 | |
| results | 否 | Array Of Objects | 列表 | results |
表results
| 參數 | 是否必填 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|---|
| routeID | 否 | String | 目的路由ID | 5da93879-b50b-4aed-bbfb-9fd989f52058 | |
| targetIP | 否 | String | 目的IP | 2.123.22.0/24 | |
| nextHopType | 否 | Integer | 下一跳類型 | 1 | |
| nextHop | 否 | String | 下一跳具體資源 | 725b7f5a-d25d-11ef-a030-525400bf5caf | |
| nextHopName | 否 | String | 下一跳具體資源名稱 | connection-215f | |
| preference | 否 | String | 路由權重,取值范圍: master:主鏈路 slave:從鏈路 | master | |
| vpnGatewayID | 否 | String | vpn gw id | 2ac9a9f4-86c8-4521-998b-2e0a7c624eed | |
| isPublish | 否 | Boolean | 是否發布 | true | |
| vpcID | 否 | String | vpc ID | vpc-gscta6zp8m | |
| projectID | 否 | String | project id | 0 | |
| ipsecConnectStatus | 否 | String | IPSec連接狀態 | inaccessible | |
| routeWeight | 否 | String | 路由權重,取值范圍:[1~255] | 100 | |
| healthStatus | 否 | String | 健康檢查狀態 | disable | |
| createTime | 否 | String | create time | 2025-02-19 07:24:03 |
請求示例
請求url
無
請求頭header
無
請求體body
無
響應示例
{
"statusCode": 800,
"returnObj": {
"totalCount": 3,
"currentCount": 3,
"totalPage": 1,
"logMark": "74cb2e66-1f95-45da-aac5-ee013470fd96",
"results": [
{
"routeID": "5da93879-b50b-4aed-bbfb-9fd989f52058",
"targetIP": "2.123.22.0/24",
"nextHopType": "1",
"nextHop": "725b7f5a-d25d-11ef-a030-525400bf5caf",
"nextHopName": "connection-215f",
"preference": "master",
"vpnGatewayID": "2ac9a9f4-86c8-4521-998b-2e0a7c624eed",
"isPublish": true,
"vpcID": "vpc-gscta6zp8m",
"projectID": "0",
"ipsecConnectStatus": "inaccessible",
"routeWeight": "100",
"healthStatus": "disable",
"createTime": "2025-02-19 07:24:03"
}
]
}
}
{"returnObj": {"currentCount": 2, "totalCount": 2, "totalPage": null, "results": [{"ipsecConnectStatus": "inaccessible", "routeWeight": "100", "vpcID": "vpc-gscta6zp8m", "projectID": "0", "nextHop": "725b7f5a-d25d-11ef-a030-525400bf5caf", "preference": "master", "nextHopType": "1", "priority": null, "targetIP": "2.123.22.0/24", "healthStatus": "disable", "vpnGatewayID": "2ac9a9f4-86c8-4521-998b-2e0a7c624eed", "isPublish": true, "createTime": "2025-02-19 07:24:03", "nextHopName": "connection-215f", "policyRouteID": "5da93879-b50b-4aed-bbfb-9fd989f52058"}, {"ipsecConnectStatus": "inaccessible", "routeWeight": "100", "vpcID": "vpc-gscta6zp8m", "projectID": "0", "nextHop": "725b7f5a-d25d-11ef-a030-525400bf5caf", "preference": "master", "nextHopType": "1", "priority": null, "targetIP": "12.3.4.0/24", "healthStatus": "disable", "vpnGatewayID": "2ac9a9f4-86c8-4521-998b-2e0a7c624eed", "isPublish": false, "createTime": "2025-02-19 07:24:03", "nextHopName": "connection-215f", "policyRouteID": "917ac0b2-ee91-11ef-a350-525400bf5caf"}], "logMark": "764278726238"}, "errorCode": "", "message": "success", "description": "", "statusCode": 800}狀態碼
| 狀態碼 | 含義 |
|---|---|
| 200 | 請求成功 |
錯誤碼
| errorCode | 含義 |
|---|---|
| StaticRoute.PatternCheck.NotValid | 請求參數無效 |