You need to enable JavaScript to run this app.
文档中心
负载均衡

负载均衡

复制全文
下载 pdf
健康检查模板
DescribeHealthCheckTemplates - 获取健康检查模板列表
复制全文
下载 pdf
DescribeHealthCheckTemplates - 获取健康检查模板列表
调用 DescribeHealthCheckTemplates 接口,查询健康检查模板列表。​
使用说明​
  • 单次根据 ID 可查询的模板上限为 20 个。​
  • 每秒最多提交 40 个 API 请求。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:DescribeHealthCheckTemplates​
要执行的操作,取值:DescribeHealthCheckTemplates。​
​
Version string 必选 示例值:2020-04-01​
API的版本,取值:2020-04-01。​
​
TagFilters.N.Key string[] 可选 示例值:TagFilters.1.Key=k1&TagFilters.2.Key=k2​
标签的标签键。​
  • 参数 - N:表示标签键的序号,取值范围:1~10。​
  • 多个标签键之间用&分隔。多个标签键之间的关系为逻辑“与(AND)”,即查询同时添加多个标签键的健康检查模板。​
  • 不允许重复。​
​
TagFilters.N.Values.N string[] 可选 示例值:TagFilters.1.Value.1=v1&TagFilters.1.Value.2=v2&TagFilters.2.Value.1=v3​
标签的标签值。​
  • 第一个N:表示标签键的序号,取值范围:1~10。​
  • 第二个N:表示标签值的序号,取值范围:1~3。同一标签键多个标签值之间的关系为逻辑“或(OR)”,即查询同一标签键下添加其中一个标签值的健康检查模板。​
  • 多个标签值之间用&分隔。​
说明​
  • 若传入该参数,则必须先传入TagFilters.N.Key。​
  • 传入空字符串时,表示查询标签值为空的健康检查模板。​
​
HealthCheckTemplateIds.N string[] 可选 示例值:HealthCheckTemplateIds.1=hctpl-123****765&HealthCheckTemplateIds.2=hctpl-123****123​
健康检查模板的ID。​
  • 参数- N:表示健康检查模板的序号,取值范围为1 ~ 20。​
  • 多个健康检查模板间使用“&”分隔。​
​
HealthCheckTemplateName string 可选 示例值:test​
健康检查模板的名称。​
​
PageNumber integer 可选 示例值:1​
列表的页码,默认值为 1。​
​
PageSize integer 可选 示例值:20​
分页查询时每页的行数,取值1-100,默认为10。​
​
ProjectName string 可选 示例值:default​
健康检查模板所属项目名称。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
PageSize integer 示例值:20​
当前分页的行数。​
​
PageNumber integer 示例值:1​
当前页码。​
​
TotalCount integer 示例值:50​
符合条件的健康检查模板总数。​
​
HealthCheckTemplates object[] 示例值:--​
符合条件的健康检查模板详情。​
HealthCheckTemplateId string 示例值:hctpl-123*******765​
健康检查模板 ID。​
​
HealthCheckTemplateName string 示例值:test​
健康检查模板的名称。​
​
HealthCheckInterval integer 示例值:2​
执行健康检查的时间间隔,默认为2,取值1-300。​
​
HealthCheckTimeout integer 示例值:2​
健康检查的响应超时时间,默认为2,取值1-60。​
​
HealthyThreshold integer 示例值:3​
健康检查的健康阈值,默认为3,取值2-10。​
​
UnhealthyThreshold integer 示例值:3​
健康检查的不健康阈值,默认为3,取值2-10。​
​
HealthCheckMethod string 示例值:GET​
健康检查的方法,只有 HealthCheckProtocol 设置为 HTTP 时,才存在该参数。​
  • GET​
  • HEAD​
​
HealthCheckDomain string 示例值:a.com​
健康检查的域名。只有 HealthCheckProtocol 设置为 HTTP 时,才存在该参数。​
​
HealthCheckURI string 示例值:/​
健康检查的路径,只有 HealthCheckProtocol 设置为 HTTP 时,才存在该参数。默认为“/”。​
​
HealthCheckHttpCode string 示例值:http_2xx​
健康检查正常的HTTP状态码,只有 HealthCheckProtocol 设置为 HTTP 时,才存在该参数。默认为http_2xx、http_3xx,以半角逗号分隔。​
​
HealthCheckProtocol string 示例值:HTTP​
健康检查的协议。​
  • HTTP​
  • TCP​
​
HealthCheckHttpVersion string 示例值:HTTP1.0​
健康检查HTTP协议版本,只有 HealthCheckProtocol 设置为 HTTP 时,才存在该参数。​
  • HTTP1.0​
  • HTTP1.1​
​
Description string 示例值:test​
健康检查的描述。​
​
HealthCheckPort integer 示例值:80​
健康检查端口。参数值为0时,表示使用后端服务器端口进行健康检查。​
​
Tags object[] 示例值:-​
健康检查模板关联的标签。​
Key string 示例值:key​
用户标签的标签键。​
​
Value string 示例值:value​
用户标签的标签值。​
​
​
CreateTime string 示例值:2024-12-29T16:37:37Z​
健康检查模版的创建时间。​
​
UpdateTime string 示例值:2024-12-29T16:37:37Z​
健康检查模版最近一次的操作时间。​
​
ProjectName string 示例值:default​
健康检查模版所属项目名称。​
​
​
RequestId string 示例值:20210816110638****2514606306AF947C​
请求ID 。​
​
​
​
请求示例​
​
GET /?Action=DescribeHealthCheckTemplates&Version=2020-04-01&PageSize=20&PageNumber=1&HealthCheckTemplateIds.1=hctpl-123****765&HealthCheckTemplateIds.2=hctpl-123****123 HTTP/1.1​
Host: alb.cn-beijing.volcengineapi.com​
X-Date: 20251121T094038Z​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20251121/cn-beijing/alb/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "20210816110638****2514606306AF947C",​
"Action": "DescribeHealthCheckTemplates",​
"Version": "2020-04-01",​
"Service": "alb",​
"Region": "cn-beijing"​
},​
"Result": {​
"RequestId": "20210814160835****2514606300FFE0F3",​
"PageNumber": 1,​
"PageSize": 20,​
"TotalCount": 1,​
"HealthCheckTemplates": [​
{​
"HealthCheckTemplateId": "hctpl-123*******765",​
"HealthCheckTemplateName": "test",​
"HealthCheckInterval": 2,​
"HealthCheckTimeout": 2,​
"HealthyThreshold": 3,​
"UnhealthyThreshold": 3,​
"HealthCheckMethod": "GET",​
"HealthCheckDomain": "a.com",​
"HealthCheckURI": "/",​
"HealthCheckHttpCode": "http_2xx",​
"HealthCheckProtocol": "HTTP",​
"Description": "test"​
},​
{​
"HealthCheckTemplateId": "hctpl-123*******765",​
"HealthCheckTemplateName": "test",​
"HealthCheckInterval": 2,​
"HealthCheckTimeout": 2,​
"HealthyThreshold": 3,​
"UnhealthyThreshold": 3,​
"HealthCheckMethod": "HEAD",​
"HealthCheckDomain": "a.com",​
"HealthCheckURI": "/",​
"HealthCheckHttpCode": "http_2xx",​
"HealthCheckProtocol": "HTTP",​
"Description": "test"​
}​
]​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
Invalid%s.Malformed​
MismatchThe specified %s is malformed.​
指定的 %s 参数格式不合法。​
400​
MissingParameter​
The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request; for example, '%s'.​
该请求缺少必要参数。请确保发起请求已提供全部必要参数,比如: %s。​
400​
InvalidParameter​
Data unmarshal failed.​
请求解析失败。​
400​
LimitExceed.HealthCheckTemplate​
You've reached the limit on the number of health check templates that you can operate at a time.​
已达到单次可操作的健康检查模板的数量上限。​
400​
InvalidHealthCheckTemplateName.Malformed​
The specified HealthCheckTemplateName is malformed.​
指定的 HealthCheckTemplateName 参数格式不合法。​
400​
InvalidPaging.Malformed​
The specified PageNumber or PageSize is malformed.​
指定的分页参数格式不合法。​
400​
LimitExceed.TagFilters.Values​
You've reached the limit on the number of tag filter values that you can operate at a time.​
已达到单次可操作的标签值的数量上限。​
400​
InvalidTagFilters.Key.Malformed​
The specified TagFilters.Key is malformed.​
指定的 TagFilters.Key 参数格式不合法。​
400​
InvalidTagFilters.Value.Malformed​
The specified TagFilters.Value is malformed.​
指定的 TagFilters.Value 参数格式不合法。​
400​
InvalidTagFilters.Key.Duplicated​
The specified TagFilters.Key is duplicated.​
指定的 TagFilters.Key 重复。​
500​
InternalError​
An internal error has occurred.​
发生内部错误。请稍后重试或联系工程师进一步咨询。​
​
​
最近更新时间:2026.02.27 11:57:37
这个页面对您有帮助吗?
有用
有用
无用
无用