VPN網關查詢
更新時間 2023-12-28 15:00:10
最近更新時間: 2023-12-28 15:00:10
分享文章
查詢賬戶下已創建的VPN網關。
接口功能介紹
查詢賬戶下已創建的VPN網關。
接口約束
支持主備模式資源池
URI
GET /v4/vpn/gateway/list
路徑參數
無
Query 參數
無
請求參數
請求頭 header 參數
無
請求體 body 參數
| 參數 | 是否必填 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|---|
| regionID | 是 | String | 資源池ID | ||
| pageNo | 否 | String | 頁碼 | 1 | |
| pageSize | 否 | String | 頁大小 | 10 | |
| vpnGatewayID | 否 | String | VPN網關ID | ||
| vpnGatewayName | 否 | String | VPN網關名稱 | ||
| queryContent | 否 | String | 模糊查詢 |
響應參數
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| statusCode | Integer | 返回狀態碼(800為成功,900為失敗) | ||
| message | String | 失敗時的錯誤描述,一般為英文描述 | ||
| description | String | 失敗時的錯誤描述,一般為中文描述 | ||
| returnObj | Object | 返回對象 | returnObj | |
| errorCode | String | 業務細分碼,為product.module.code三段式碼 | ||
| errorDetail | Object | 錯誤明細 |
表returnObj
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| currentCount | Integer | 當前數據量 | ||
| totalCount | Integer | 總數據量 | ||
| totalPage | Integer | 總頁數 | ||
| results | Array of Object | VPN網關列表 | Gateway | |
| errorCode | String | 錯誤碼 | ||
| message | String | 錯誤信息 | ||
| description | String | 描述 | ||
| statusCode | String | 800成功,900失敗 |
表Gateway
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| vpnConnectionID | String | VPN連接ID | ||
| type | String | 本參數表示VPN類型。 取值范圍: IPSec SSL |
||
| linkSpec | Integer | VPN連接數限制 | ||
| vpnLinkID | String | VPN連接ID | ||
| linkResourceID | String | VPN連接資源ID | ||
| vpcID | String | VPC ID | ||
| vpnConnectionCount | Integer | VPN連接數 | ||
| bandwidth | Interger | VPN網關帶寬 | ||
| vpnGatewayName | String | VPN網關名字 | ||
| vpnGatewayID | String | VPN網關ID | ||
| vpcName | String | VPC 名字 | ||
| resourceID | String | VPN網關資源ID | ||
| ipAddress | String | IP地址 | ||
| azName | String | 可能區名字 | ||
| dataID | String | 數據ID | ||
| isMaz | Boolean | 是否多可用區 | ||
| isPaas | Boolean | 是否為Paas | ||
| description | String | 描述 | ||
| azID | String | 可用區ID | ||
| isExpire | Boolean | 是否過期 | ||
| regionId | String | 資源池ID | ||
| availabilityZone | String | 可用區 | ||
| isTalkOrder | Boolean | 是否按需單 | ||
| status | String | 本參數表示VPN網關狀態。 取值范圍: normal creating expired |
||
| azDisplayName | String | 可用區展示名字 | ||
| paymentType | String | 本參數表示付款類型。 取值范圍: MONTH YEAR onDemand |
||
| projectIDEcs | String | Project ID | ||
| customerId | String | 客戶ID | ||
| createDate | String | 創建時間 | ||
| expiredTime | String | 過期時間 | ||
| updatedTime | String | 更新時間 |
請求示例
請求頭
無
請求體 body
{
"regionID": "81f7728662dd11ec810800155d307d5b",
"pageNo": "1",
"pageSize": "2"
}
響應示例
{
"returnObj": {
"currentCount": 1,
"totalCount": 1,
"totalPage": 1,
"results": [{
"vpnConnectionID": "",
"dataID": null,
"availabilityZone": null,
"description": "for api test",
"azID": null,
"type": "IPsec",
"linkSpec": 20,
"bandwidth": 10,
"regionId": "b73e3ad4-417f-11ed-bad1-525400cc3b79",
"expiredTime": "2023-03-05T02:40:48Z",
"linkResourceID": "e060c7b355754dda921b61d4ae377c8d",
"isTalkOrder": false,
"vpcName": "vpc-for-api-vpn-test01",
"status": "normal",
"isExpire": false,
"azName": null,
"tenantId": null,
"vpnGatewayID": "fadf6f54-6fbd-5d5a-9c99-392de68e919e",
"vpnLinkID": "bbcc41a4-934a-4f5d-aadc-e6b6c067c227",
"isMaz": false,
"updatedTime": "2022-11-05T02:41:49Z",
"vpcID": "vpc-iyj4b6tmh0",
"isPaas": false,
"vpnGatewayName": "vpn-gateway-forAPI-test01",
"paymentType": null,
"resourceID": "7d7568aeabe8453e8aba002eb7628af1",
"vpnConnectionCount": 0,
"customerId": "84e0ef66-b86d-5927-b144-95f47f63a91f",
"createDate": "2022-11-05T02:40:48Z",
"projectIDEcs": "0",
"ipAddress": "100.124.5.171/32",
"azDisplayName": ""
}]
},
"errorCode": "",
"message": "",
"description": "",
"statusCode": 800
}
狀態碼
| 狀態碼 | 描述 |
|---|---|
| 800 | 表示請求成功 |
| 900 | 表示請求未成功 |
錯誤碼
| errorCode | 描述 |
|---|---|
| OPENAPI.PatternCheck.NotValid | 請求參數無效 |
| OPENAPI.VPN.AccessFailed | 內部錯誤,請重試。如果多次嘗試失敗,請提交工單 |