查询指定健康检查模板详细信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
alb:GetHealthCheckTemplateAttribute |
get |
*HealthCheckTemplate
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| HealthCheckTemplateId |
string |
是 |
健康检查模板 ID。 |
hct-x4jazoyi6tvsq9**** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| HealthCheckConnectPort |
integer |
健康检查使用的端口。 取值范围: 0~65535。 |
80 |
| HealthCheckHost |
string |
用于健康检查的域名。取值:
说明
只有 |
$SERVER_IP |
| HealthCheckCodes |
array |
健康检查正常的状态码列表。 |
|
|
string |
健康检查正常的 HTTP 状态码。
说明
只有 HealthCheckProtocol 为 HTTP 或 HTTPS 或 gRPC 时该参数生效。 |
http_2xx |
|
| HealthCheckHttpVersion |
string |
健康检查 HTTP 协议版本。 取值:HTTP1.0或HTTP1.1。 说明
只有 |
HTTP1.0 |
| HealthCheckTemplateId |
string |
健康检查模板 ID。 |
hct-x4jazoyi6tvsq9**** |
| HealthCheckInterval |
integer |
健康检查的时间间隔。单位:秒。取值范围:1~50。 |
3 |
| HealthCheckMethod |
string |
健康检查方法。取值:
说明
只有 HealthCheckProtocol 为 HTTP 或 HTTPS 或 gRPC 时该参数生效。 |
GET |
| HealthCheckPath |
string |
用于健康检查的 URL。 长度限制为 1~80,只能使用字母、数字和短划线(-)、正斜线(/)、半角句号(.)、百分号(%)、半角问号(?)、井号(#)、and(&)这些字符以及扩展字符集 说明
只有 HealthCheckProtocol 为 HTTP 或 HTTPS 或 gRPC 时该参数生效。 |
/test/index.html |
| HealthCheckProtocol |
string |
健康检查采用的协议。取值:
|
HTTP |
| HealthCheckTemplateName |
string |
健康检查模板名称。 长度为 2~128 个英文或中文字符,必须以大小字母或中文开头,可包含数字、半角句号(.)、下划线(_)和短划线(-)。 |
HealthCheckTemplate1 |
| HealthCheckTimeout |
integer |
接收来自运行状况检查的响应需要等待的时间。如果后端服务器在指定的时间内没有正确响应,则判定为健康检查失败。单位:秒。 取值范围:1~300。 |
200 |
| HealthyThreshold |
integer |
健康检查连续成功多少次后,将后端服务器的健康检查状态由失败判定为成功。 取值范围:2~10。 |
5 |
| RequestId |
string |
请求 ID。 |
DB1AFC33-DAE8-528E-AA4D-4A6A****** |
| UnhealthyThreshold |
integer |
健康检查连续失败多少次后,将后端服务器的健康检查状态由成功判定为失败。 取值范围:2~10。 |
5 |
| Tags |
array<object> |
标签。 |
|
|
object |
标签结构。 |
||
| Key |
string |
标签键。最多支持 128 个字符,不能以 |
env |
| Value |
string |
标签值。最多支持 128 个字符,不能以 |
product |
| ResourceGroupId |
string |
资源组 ID。 |
rg-atstuj3rtop**** |
示例
正常返回示例
JSON格式
{
"HealthCheckConnectPort": 80,
"HealthCheckHost": "$SERVER_IP",
"HealthCheckCodes": [
"http_2xx"
],
"HealthCheckHttpVersion": "HTTP1.0",
"HealthCheckTemplateId": "hct-x4jazoyi6tvsq9****",
"HealthCheckInterval": 3,
"HealthCheckMethod": "GET",
"HealthCheckPath": "/test/index.html",
"HealthCheckProtocol": "HTTP",
"HealthCheckTemplateName": "HealthCheckTemplate1",
"HealthCheckTimeout": 200,
"HealthyThreshold": 5,
"RequestId": "DB1AFC33-DAE8-528E-AA4D-4A6A******",
"UnhealthyThreshold": 5,
"Tags": [
{
"Key": "env",
"Value": "product"
}
],
"ResourceGroupId": "rg-atstuj3rtop****"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 403 | Forbidden.HealthCheckTemplate | Authentication has failed for HealthCheckTemplate. | 对HealthCheckTemplate鉴权失败 |
| 404 | ResourceNotFound.HealthCheckTemplate | The specified resource %s is not found. | 资源%s不存在。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。