查看健康檢查詳情
更新時間 2025-10-22 18:26:46
最近更新時間: 2025-10-22 18:26:46
分享文章
接口功能介紹
查看健康檢查詳情
接口約束
無
URI
GET /v4/elb/show-health-check
路徑參數 無
Query參數
| 參數 | 是否必填 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|---|
| regionID | 是 | String | 區域ID | 81f7728662dd11ec810800155d307d5b | |
| id | 否 | String | 健康檢查ID, 后續廢棄該字段 | xxxx | |
| healthCheckID | 是 | String | 健康檢查ID, 推薦使用該字段, 當同時使用 id 和 healthCheckID 時,優先使用 healthCheckID | hc-m2zb05f7s8 |
請求參數
請求頭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 | Object | 接口業務數據 | returnObj | |
| 表 returnObj |
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| regionID | String | 區域ID | 81f7728662dd11ec810800155d307d5b | |
| azName | String | 可用區名稱 | az1 | |
| projectID | String | 項目ID | 0 | |
| ID | String | 健康檢查ID | hc-xxx | |
| 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/show-health-check?regionID=81f7728662dd11ec810800155d307d5b&id=hc-m2zb05f7s8
請求頭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"
}
狀態碼
請參考
錯誤碼
請參考