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

负载均衡

复制全文
下载 pdf
转发规则
DescribeRules - 查询转发规则列表
复制全文
下载 pdf
DescribeRules - 查询转发规则列表
调用 DescribeRules 接口查询指定HTTP/HTTPS监听器中的转发规则列表。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
Action String 必选 示例值:DescribeRules​
要执行的操作,取值:DescribeRules。​
​
Version String 必选 示例值:2020-04-01​
API的版本信息,当前版本为 2020-04-01。​
​
ListenerId String 必选 示例值:lsn-2fea4ayvu2g3k5oxruuz****​
监听器ID。​
您可以调用DescribeListeners接口,获取监听器ID。​
​
TagFilters.N.Key String 可选 示例值:k1​
标签的标签键。​
  • 参数 - N:表示标签键的序号,取值范围:1~10。​
  • 多个标签键之间用&分隔。多个标签键之间的关系为逻辑“与(AND)”,即查询同时添加多个标签键的转发规则。​
  • 不允许重复。​
​
TagFilters.N.Values.N String 可选 示例值:v1​
标签的标签值。​
  • 第一个N:表示标签键的序号,取值范围:1~10。​
  • 第二个N:表示标签值的序号,取值范围:1~3。同一标签键多个标签值之间的关系为逻辑“或(OR)”,即查询同一标签键下添加其中一个标签值的转发规则。​
  • 多个标签值之间用&分隔。​
说明​
若传入该参数,则必须先传入TagFilters.N.Key。​
传入空字符串时,表示查询标签值为空的转发规则​
​
​
​
返回参数​
RequestId String 示例值:20210811152539010225146063030****​
请求ID。​
​
Rules Object[] 示例值:-​
符合条件的转发规则的详细信息。​
Url String 示例值:/lujing​
转发规则的URL。​
​
Tags Object[] 示例值:-​
CLB实例的标签信息。​
Key String 示例值:k1​
标签的标签键。​
​
Value String 示例值:v1​
标签的标签值。​
​
​
Domain String 示例值:www.test.com​
转发规则的域名。​
​
RuleId String 示例值:rule-2fegss1cplxxc5oxruvvq****​
转发规则ID。​
​
ActionType String 示例值:Forward​
转发规则的转发动作。​
  • Forward:转发至。​
  • Redirect:重定向至。​
​
Description String 示例值:rule1​
转发规则的描述。​
​
ServerGroupId String 示例值:rsp-2fel9y8pxr56o5oxruuuu****​
转发规则关联的后端服务器组ID。​
​
RedirectConfig Object 示例值:--​
重定向相关配置信息。​
Host String 示例值:www.test.com​
重定向的域名。​
​
Path String 示例值:/path​
重定向的路径。​
​
Port String 示例值:80​
重定向的端口。​
​
Protocol String 示例值:HTTP​
重定向的协议。​
​
StatusCode String 示例值:301​
重定向状态码。​
​
​
​
​
​
请求示例​
​
GET /?Action=DescribeRules&Version=2020-04-01&ListenerId=lsn-2fea4ayvu2g3k5oxruuz****&TagFilters.1.Key=k1&TagFilters.1.Values.1=v1​
Host: clb.cn-beijing.volcengineapi.com​
X-Date: 20251121T094038Z​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20251121/cn-beijing/clb/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "20230604110420****100232280022D31",​
"Action": "DescribeRules",​
"Version": "2020-04-01",​
"Service": "clb",​
"Region": "cn-beijing"​
},​
"Result": {​
"RequestId": "20210811152539010225146063030****",​
"Rules": [​
{​
"Url": "/lujing",​
"Tags": [​
{​
"Key": "k1",​
"Value": "v1"​
}​
],​
"Domain": "www.test.com",​
"RuleId": "rule-2fegss1cplxxc5oxruvvq****",​
"ActionType": "Forward",​
"Description": "rule1",​
"ServerGroupId": "rsp-2fel9y8pxr56o5oxruuuu****",​
"RedirectConfig": {​
"Host": "www.test.com",​
"Path": "/path",​
"Port": "80",​
"Protocol": "HTTP",​
"StatusCode": "301"​
}​
}​
]​
}​
}​
​
错误码​
此处仅展示当前API的错误码,更多错误码请参见公共错误码。​
​
状态码​
错误码​
错误信息​
说明​
400​
InvalidIncorrectOrder.Malformed​
The specified index order is malformed.​
指定的索引顺序参数格式不合法。​
400​
InvalidTagKey.Malformed​
The specified TagKey is malformed.​
指定的 TagKey 参数格式不合法。​
400​
InvalidTagValue.Malformed​
The specified TagValue is malformed.​
指定的 TagValue 参数格式不合法。​
400​
LimitExceeded.TagFilterKey​
You've reached the limit on the number of tag keys that you can filter.​
已达到单次可指定过滤标签键数量的上限。​
400​
LimitExceeded.TagFilterValues​
You've reached the limit on the number of tag values that you can filter.​
已达到单次可指定过滤标签键值数量的上限。​
400​
MissingParameter​
The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request; for example, the 'ListenerId'.​
该请求缺少必要参数。请确保发起请求已提供全部必要参数,比如 ListenerId。​
400​
MissingParameter​
The request is missing a required parameter. Ensure that you have supplied all the required parameters for the request; for example, the ''.​
该请求缺少必要参数。请确保发起请求已提供全部必要参数,比如 。​
404​
InvalidListener.NotFound​
The specified Listener does not exist.​
指定的监听器不存在。​
500​
InternalError​
An internal error has occurred.​
发生内部错误。​
​
​
最近更新时间:2026.02.13 10:33:00
这个页面对您有帮助吗?
有用
有用
无用
无用