IPsec VPN相關資源用量
更新時間 2023-12-28 15:00:11
最近更新時間: 2023-12-28 15:00:11
分享文章
查詢VPN連接相關的資源使用情況。
接口功能介紹
查詢VPN連接相關的資源使用情況
接口約束
支持主備模式資源池。
URI
GET /v4/vpn/usage/query
路徑參數
無
Query 參數
無
請求參數
請求頭 header 參數
無
請求體 body 參數
| 參數 | 是否必填 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|---|
| regionID | 是 | String | 資源池ID | ||
| resourceType | 是 | String | 本參數表示VPN資源類型。 取值范圍: all:所有類型 vpn_gateway:VPN網關類型 user_gateway:用戶網關類型 vpn_connection:VPN連接類型 |
響應參數
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| statusCode | Integer | 返回狀態碼(800為成功,900為失敗) | ||
| message | String | 失敗時的錯誤描述,一般為英文描述 | ||
| description | String | 失敗時的錯誤描述,一般為中文描述 | ||
| returnObj | Object | 返回對象 | returnObj | |
| errorCode | String | 業務細分碼,為product.module.code三段式碼 | ||
| errorDetail | Object | 錯誤明細 |
表returnObj
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| currentCount | Interger | 當前返回數據的數量 | ||
| totalCount | Interger | 總共數據的數量 | ||
| totalPage | Interger | 總共數據的頁數 | ||
| results | Array of Object | VPN連接資源用量信息列表 | Usage | |
| errorCode | String | 錯誤碼 | ||
| message | String | 錯誤信息 | ||
| description | String | 描述 | ||
| statusCode | String | 800成功,900失敗 |
表Usage
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| vpnGatewayCount | Integer | VPN網關數量 | ||
| userGatewayCount | Integer | 用戶網關數量 | ||
| vpnConnectionCount | Integer | VPN連接數量 |
請求示例
請求頭
無
請求體 body
{
"regionID": "81f7728662dd11ec810800155d307d5b",
"resourceType": "all"
}
響應示例
{
"returnObj": {
"currentCount": 1,
"totalCount": 1,
"totalPage": 1,
"results": [{
"vpnGatewayCount": 1,
"userGatewayCount": 1,
"vpnConnectionCount": 1
}]
},
"errorCode": "",
"message": "",
"description": "",
"statusCode": 800
}
狀態碼
| 狀態碼 | 描述 |
|---|---|
| 800 | 表示請求成功 |
| 900 | 表示請求未成功 |