獲取健康檢查列表
更新時間 2025-10-22 18:26:44
最(zui)近更新時(shi)間(jian): 2025-10-22 18:26:44
分享(xiang)文章(zhang)
接口功能介紹
獲取健康檢查列表
接口約束
無
URI
GET /v4/elb/list-health-check
路徑參數 無
Query參數
| 參數 | 是否必填 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|---|
| clientToken | 否 | String | 客戶端存根,用于保證訂單冪等性。要求單個云平臺賬戶內唯一 | xxxx | |
| regionID | 是 | String | 區域ID | 81f7728662dd11ec810800155d307d5b | |
| IDs | 否 | Array of Strings | 健康檢查ID列表 | ["hc-xxx"] | |
| name | 否 | String | 健康檢查名稱, 只能由數字,字母,-組成不能以數字和-開頭,最大長度32 | test |
請求參數
請求頭header參數 無
請求體body參數 無
響應參數
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| statusCode | Integer | 返回狀態碼(800為成功,900為失敗) | 800 | |
| message | String | statusCode為900時的錯誤信息; statusCode為800時為success, 英文 | success | |
| description | String | statusCode為900時的錯誤信息; statusCode為800時為成功, 中文 | 成功 | |
| errorCode | String | statusCode為900時為業務細分錯誤碼,三段式:product.module.code; statusCode為800時為SUCCESS | SUCCESS | |
| returnObj | Array of Objects | 接口業務數據 | returnObj | |
| 表 returnObj |
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| regionID | String | 區域ID | 81f7728662dd11ec810800155d307d5b | |
| azName | String | 可用區名稱 | az1 | |
| projectID | String | 項目ID | 0 | |
| ID | String | 健康檢查ID | xxxx | |
| name | String | 健康檢查名稱 | test | |
| description | String | 描述 | desc | |
| protocol | String | 健康檢查協議: TCP / UDP / HTTP | TCP | |
| protocolPort | Integer | 健康檢查端口 | 0 | |
| timeout | Integer | 健康檢查響應的最大超時時間 | 3 | |
| Integererval | Integer | 負載均衡進行健康檢查的時間間隔 | 1 | |
| maxRetry | Integer | 最大重試次數 | 1 | |
| httpMethod | String | HTTP請求的方法 | get | |
| httpUrlPath | String | HTTP請求url路徑 | // | |
| httpExpectedCodes | String | HTTP預期碼 | xxx | |
| status | Integer | 狀態 1 表示 UP, 0 表示 DOWN | 1 | |
| createTime | String | 創建時間,為UTC格式 | 2022-10-03T09: 44: 22Z | |
| domainEnabled | Integer | 健康檢查支持域名功能開關 | 0 | |
| domain | String | 域名 | xxx | |
| customReqRespEnabled | Integer | 自定義請求響應功能開關 | 0 | |
| customRequest | String | 自定義請求 | xxx | |
| customResponse | String | 自定義響應 | xxx |
枚舉參數
無
請求示例
請求url
GET /v4/elb/list-health-check?regionID=81f7728662dd11ec810800155d307d5b
請求頭header
無
請求體body
無
響應示例
#### 成功響應示例
{
"statusCode": 800,
"errorCode": "SUCCESS",
"message": "success",
"description": "成功",
"returnObj": [
{
"regionID": "81f7728662dd11ec810800155d307d5b",
"azName": null,
"projectID": "0",
"ID": "hc-m2zb05f7s8",
"name": "testHTTP",
"description": "tianyi-2",
"protocol": "HTTP",
"protocolPort": 0,
"timeout": 3,
"Integererval": 1,
"maxRetry": 1,
"httpMethod": "GET",
"httpUrlPath": "",
"httpExpectedCodes": "http_2xx",
"status": 1,
"createTime": "2022-10-02T07: 27: 42Z"
}
]
}
#### 失敗響應示例
{
"statusCode": 900,
"message": "request param error",
"description": "參數錯誤",
"errorCode": "Openapi.Parameter.Error"
}
狀態碼
請參考
錯誤碼
請參考