查询HTTP监听器
更新时间:2026-07-15
描述
- 查询指定LoadBalancer下所有HTTP监听器的信息
- 支持按监听器端口进行匹配查询
- 结果支持marker分页,分页大小默认为1000,可通过maxKeys参数指定
OpenAPI Explorer
去调试
您可以在 OpenAPI Explorer 中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer 可以自动生成 SDK 代码示例。
请求结构
Text
1GET /v{version}/blb/{blbId}/HTTPlistener?listenerPort={listenerPort}&marker={marker}&maxKeys={maxKeys} HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string
请求头域
除公共头域外,无其他特殊头域
请求参数
| 参数名称 | 类型 | 是否必需 | 参数位置 | 描述 |
|---|---|---|---|---|
| version | String | 是 | URL参数 | API版本号,当前取值1 |
| blbId | String | 是 | URL参数 | 所属LoadBalancer的标识符 |
| listenerPort | int | 否 | Query参数 | 要查询的监听器端口 |
| marker | String | 否 | Query参数 | 批量获取列表的查询的起始位置,是一个由系统生成的字符串 |
| maxKeys | int | 否 | Query参数 | 每页包含的最大数量,最大数量不超过1000。缺省值为1000 |
返回头域
除公共头域外,无其他特殊头域
返回参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| listenerList | List<HTTPListenerModel> | 包含查询结果的列表 |
| marker | string | 标记查询的起始位置,若结果列表为空,此项不存在 |
| isTruncated | boolean | true表示后面还有数据,false表示已经是最后一页 |
| nextMarker | String | 获取下一页所需要传递的marker值。当isTruncated为false时,该域不出现 |
| maxKeys | int | 每页包含的最大数量 |
请求示例
Text
1GET /v1/blb/lb-j8UqijYf/HTTPlistener?maxKeys=2 HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string
响应示例
Text
1HTTP/1.1 200 OK
2x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
3Date: Fri, 03 Jun 2016 06:42:44 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Server: BWS
7
8{
9 "listenerList": [
10 {
11 "listenerPort": 90,
12 "backendPort": 90,
13 "scheduler": "LeastConnection",
14 "healthCheckTimeoutInSecond": 4,
15 "healthCheckInterval": 5,
16 "unhealthyThreshold": 2,
17 "healthyThreshold": 3,
18 "keepSession": false,
19 "keepSessionType": null,
20 "keepSessionDuration": null,
21 "keepSessionCookieName": null,
22 "xForwardFor": false,
23 "additionalAttributes": {
24 "gzipJson": "on"
25 },
26 "healthCheckType": "HTTP",
27 "healthCheckPort": 90,
28 "healthCheckURI": "/",
29 "healthCheckNormalStatus": "http_2xx|http_3xx",
30 "serverTimeout": 30,
31 "redirectPort": 80
32 },
33 {
34 "listenerPort": 95,
35 "backendPort": 95,
36 "scheduler": "LeastConnection",
37 "healthCheckTimeoutInSecond": 4,
38 "healthCheckInterval": 5,
39 "unhealthyThreshold": 2,
40 "healthyThreshold": 3,
41 "keepSession": false,
42 "additionalAttributes": {
43 "gzipJson": "off"
44 },
45 "keepSessionType": null,
46 "keepSessionDuration": null,
47 "keepSessionCookieName": null,
48 "xForwardFor": false,
49 "healthCheckType": "HTTP",
50 "healthCheckPort": 95,
51 "healthCheckURI": "/",
52 "healthCheckNormalStatus": "http_1xx|http_2xx",
53 "serverTimeout": 1800,
54 "redirectPort": 80
55 }
56 ],
57 "marker": "listener-005A",
58 "nextMarker": "listener-0322",
59 "isTruncated": true,
60 "maxKeys": 2
61}
评价此篇文章
