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

负载均衡

复制全文
下载 pdf
服务器组
DescribeServerGroups - 查询服务器组列表
复制全文
下载 pdf
DescribeServerGroups - 查询服务器组列表
调用 DescribeServerGroups 接口,查询服务器组列表。​
使用说明​
每秒最多提交 200 个 API 请求。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:DescribeServerGroups​
要执行的操作,取值:DescribeServerGroups。​
​
Version string 必选 示例值:2020-04-01​
API的版本,取值:2020-04-01。​
​
VpcId string 可选 示例值:vpc-3th8z3ajkd4bwbhc****​
后端服务器组所属 Vpc 的 ID。​
​
PageNumber integer 可选 示例值:1​
列表的页码,默认值为1。​
​
PageSize integer 可选 示例值:10​
分页查询时每页的行数,取值1~100,默认为10。​
​
ServerGroupIds.N string[] 可选 示例值:ServerGroupIds.1=rsp-2fel9y8pxr56o5oxruuuu****&ServerGroupIds.2=rsp-1g0ogy36a8t8g8ibuxwy5****​
后端服务器组的ID。​
  • 参数- N:表示后端服务器组的序号,取值:1 ~ 20。​
  • 多个后端服务器组ID间使用“&”分隔。​
​
ServerGroupNames.N string[] 可选 示例值:ServerGroupNames.1=servergroup_1&ServerGroupNames.2=servergroup_2​
后端服务器组的名称。​
  • 参数- N:表示后端服务器组的序号,取值:1 ~ 10。​
  • 多个后端服务器组ID间使用“&”分隔。​
​
ServerGroupType string 可选 示例值:instance​
后端服务器组的类型。取值如下:​
  • instance:服务器类型,该类型服务器组支持添加 ecs、eni 实例作为后端服务器。​
  • ip:IP类型,该类型服务器组支持添加 IP 地址作为后端服务器。​
​
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)”,即查询同一标签键下添加其中一个标签值的ALB服务器组。​
  • 多个标签值之间用&分隔。​
说明​
  • 若传入该参数,则必须先传入TagFilters.N.Key。​
  • 传入空字符串时,表示查询标签值为空的ALB服务器组。​
​
TagFilters.N.Key string[] 可选 示例值:TagFilters.1.Key=k1&TagFilters.2.Key=k2​
标签的标签键。​
  • 参数 - N:表示标签键的序号,取值范围:1~10。​
  • 多个标签键之间用&分隔。多个标签键之间的关系为逻辑“与(AND)”,即查询同时添加多个标签键的ALB服务器组。​
  • 不允许重复。​
​
ProjectName string 可选 示例值:default​
后端服务器组所属项目名称。​
​
SpaceNetworkId string 可选 示例值:csn-bpkdt37pq72zv****​
ArkClaw 实例所在 SpaceNetwork 的 ID。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
RequestId string 示例值:20210811152539010225146063030****​
请求ID。​
​
PageSize integer 示例值:20​
当前分页的行数。​
​
PageNumber integer 示例值:1​
当前页码。​
​
TotalCount integer 示例值:50​
符合条件的后端服务器组总数。​
​
ServerGroups object[] 示例值:--​
符合条件的后端服务器组列表。​
ServerGroupId string 示例值:rsp-2fel9y8pxr56o5oxruuuu****​
后端服务器组的ID。​
​
ServerGroupName string 示例值:default_servergroup​
后端服务器组的名称。​
​
ServerGroupType string 示例值:instance​
后端服务器组的类型。​
​
Description string 示例值:this is the default servergroup​
后端服务器组的描述。​
​
CreateTime string 示例值:2021-08-11T16:37:37Z​
后端服务器组的创建时间。​
​
UpdateTime string 示例值:2021-08-11T16:37:37Z​
后端服务器组的最近操作时间。​
​
VpcId string 示例值:vpc-3th8z3ajkd4bwbhc****​
后端服务器组所属 Vpc 的 ID。​
​
Status string 示例值:Active​
服务器组状态。​
  • Creating:创建中。​
  • Active:运行中。​
  • Configuring:配置中。​
  • Deleting:删除中。​
​
Scheduler string 示例值:wrr​
调度算法。​
  • wrr:加权轮询。​
  • wlc:加权最小连接数。​
  • sh:源地址哈希。​
​
ServerCount integer 示例值:50​
服务器组内后端服务器的个数。​
​
Listeners string[] 示例值:[lsn-2fek3rgsxhrsw5oxruwec****,lsn-3fek4rgsxhrsw5oxruwec****]​
后端服务器组关联的监听器。​
​
HealthCheck object 示例值:--​
服务器组健康检查配置信息。​
Enabled string 示例值:on​
监听器是否开启健康检查功能。​
  • on:开启。​
  • off:不开启。​
​
Interval integer 示例值:2​
执行健康检查的时间间隔。 单位为秒。​
​
Timeout integer 示例值:2​
健康检查的响应超时时间。​
  • 表示如果后端服务器在指定的时间内没有正确响应,则判定为健康检查异常。​
  • 单位:秒。​
​
HealthyThreshold integer 示例值:3​
健康检查的健康阈值。​
  • 表示连续执行指定次数的健康检查,结果均为正常的后端服务器将判定为健康检查正常。​
  • 单位:次。​
​
UnhealthyThreshold integer 示例值:3​
健康检查的不健康阈值。​
  • 表示连续执行指定次数的健康检查,结果均为异常的后端服务器将判定为健康检查异常。​
  • 单位:次。​
​
Method string 示例值:HEAD​
健康检查的方法。只有 Protocol 为 HTTP 时才存在该参数。​
  • GET:服务器需支持GET方法。​
  • HEAD:服务器仅返回HEAD头部信息,可以降低后端性能消耗,但是服务器需要支持HEAD方法。​
​
Domain string 示例值:www.test.com​
健康检查的域名,需配置为后端服务器上真实对外提供服务的地址。只有 Protocol 为 HTTP 时才存在该参数。​
​
URI string 示例值:health​
健康检查的路径,需配置为后端服务器上真实对外提供的路径。只有 Protocol 为 HTTP 时才存在该参数。​
​
HttpCode string 示例值:"http_2xx,http_3xx"​
健康检查正常的HTTP状态码,多个状态码间用半角逗号","分隔。只有 Protocol 为 HTTP 时才存在该参数。​
  • http_2xx(默认值)。​
  • http_3xx(默认值)。​
  • http_4xx 。​
  • http_5xx 。​
​
Protocol string 示例值:HTTP​
健康检查协议,当前支持HTTP、TCP。默认值为 HTTP。​
​
Port integer 示例值:80​
健康检查端口。参数值为0时,表示使用后端服务器端口进行健康检查。​
​
HttpVersion string 示例值:HTTP1.0​
健康检查HTTP协议版本,只有 Protocol 为 HTTP 时才存在该参数。​
  • HTTP1.0(使用API时,HTTP协议版本默认值)。​
  • HTTP1.1。​
​
​
StickySessionConfig object 示例值:--​
会话保持功能的参数信息。​
Cookie string 示例值:MY_COOKIE​
服务配置的会话保持 Cookie 名称。​
​
CookieTimeout integer 示例值:1000​
会话保持 Cookie 超时时间。超时时间的取值范围:1~86400。 单位:秒。​
​
StickySessionType string 示例值:insert​
对 Cookie 的处理方式。​
  • insert:植入 Cookie;ALB 会记录客户端请求第一次转发到的后端服务器。ALB 在返回请求中植入 Cookie ,后续客户端请求携带此 Cookie,ALB 会将请求转发到之前记录的后端服务器上。​
  • server:重写 Cookie;开启重写 Cookie 的会话保持后,在客户端请求第一次转发到后端服务器后,ALB 在返回请求中发现您自定义的 Cookie 时,会对原来的 Cookie 进行重写。后续客户端请求携带改写后的 Cookie,ALB 会将请求转发到之前记录的后端服务器上。​
​
StickySessionEnabled string 示例值:off​
是否开启会话保持。​
  • on:开启;​
  • off:关闭。​
​
​
Protocol string 示例值:HTTP​
后端协议。​
  • HTTP​
  • HTTPS​
​
CrossZoneEnabled string 示例值:on​
服务器组是否已开启跨可用区负载均衡功能。​
  • on:已开启。​
  • off:未开启。​
​
ProjectName string 示例值:default​
后端服务器组所属项目名称。​
​
Tags object[] 示例值:--​
服务器组所属标签。​
Key string 示例值:key​
用户标签的标签键。​
​
Value string 示例值:value​
用户标签的标签值。​
​
​
IpAddressType string 示例值:IPv4​
服务器组IP地址类型。​
  • IPv4:IPv4类型。​
​
SlowStartConfig object 示例值:--​
慢启动配置。​
SlowStartEnabled string 示例值:off​
是否开启慢启动功能。​
  • on:开启​
  • off:不开启​
​
SlowStartDuration integer 示例值:30​
慢启动持续时间。 单位:秒。​
​
​
​
​
​
请求示例​
​
GET /?Action=DescribeServerGroups&ServerGroupIds.1=rsp-1g0lh2f1a****8ibuxx6z7fm8&Version=2020-04-01 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": "2026033115584005508013913991E43D",​
"Action": "DescribeServerGroups",​
"Version": "2020-04-01",​
"Service": "alb",​
"Region": "cn-beijing"​
},​
"Result": {​
"RequestId": "20210811152539010225146063030****",​
"PageSize": 20,​
"PageNumber": 1,​
"TotalCount": 50,​
"ServerGroups": [​
{​
"ServerGroupId": "rsp-2fel9y8pxr56o5oxruuuu****",​
"ServerGroupName": "default_servergroup",​
"ServerGroupType": "instance",​
"Description": "this is the default servergroup",​
"CreateTime": "2021-08-11T16:37:37Z",​
"UpdateTime": "2021-08-11T16:37:37Z",​
"VpcId": "vpc-3th8z3ajkd4bwbhc****",​
"Status": "Active",​
"Scheduler": "wrr",​
"ServerCount": 50,​
"Listeners": [​
"[lsn-2fek3rgsxhrsw5oxruwec****,lsn-3fek4rgsxhrsw5oxruwec****]"​
],​
"HealthCheck": {​
"Enabled": "on",​
"Interval": 2,​
"Timeout": 2,​
"HealthyThreshold": 3,​
"UnhealthyThreshold": 3,​
"Method": "HEAD",​
"Domain": "www.test.com",​
"URI": "health",​
"HttpCode": "\"http_2xx,http_3xx\"",​
"Protocol": "HTTP",​
"Port": 80,​
"HttpVersion": "HTTP1.0"​
},​
"StickySessionConfig": {​
"Cookie": "MY_COOKIE",​
"CookieTimeout": 1000,​
"StickySessionType": "insert",​
"StickySessionEnabled": "off"​
},​
"Protocol": "HTTP",​
"CrossZoneEnabled": "on",​
"ProjectName": "default",​
"Tags": [​
{​
"Key": "key",​
"Value": "value"​
}​
],​
"IpAddressType": "IPv4",​
"SlowStartConfig": {​
"SlowStartEnabled": "off",​
"SlowStartDuration": 30​
}​
}​
]​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
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​
InvalidPaging.Malformed​
The specified PageNumber or PageSize is malformed.​
指定的分页参数格式不合法。​
400​
LimitExceed.ServerGroup​
You've reached the limit on the number of server groups that you can operate at a time.​
已达到单次可操作的服务器组的数量上限。​
400​
InvalidServerGroupName.Malformed​
The specified ServerGroupName is malformed.​
指定的 ServerGroupName 参数格式不合法。​
400​
InvalidServerGroupType.Malformed​
The specified ServerGroupType is malformed.​
指定的 ServerGroupType 参数格式不合法。​
500​
InternalError​
An internal error has occurred.​
发生内部错误。请稍后重试或联系工程师进一步咨询。​
​
​
最近更新时间:2026.05.19 08:35:35
这个页面对您有帮助吗?
有用
有用
无用
无用