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

负载均衡

复制全文
下载 pdf
服务器组
DescribeServerGroupAttributes - 查询服务器组的详细信息
复制全文
下载 pdf
DescribeServerGroupAttributes - 查询服务器组的详细信息
调用 DescribeServerGroupAttributes 接口,查询服务器组的详细信息。​
使用说明​
每秒最多提交 200 个 API 请求。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:DescribeServerGroupAttributes​
要执行的操作,取值:DescribeServerGroupAttributes。​
​
Version string 必选 示例值:2020-04-01​
API的版本,取值:2020-04-01。​
​
ServerGroupId string 必选 示例值:rsp-bp1o94dp5i6ea****​
后端服务器组ID。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
RequestId string 示例值:20210811152539010225146063030****​
请求ID。​
​
ServerGroupId string 示例值:rsp-bp1o94dp5i6ea****​
后端服务器组的ID。​
​
ServerGroupName string 示例值:default_servergroup​
后端服务器组的名称。​
​
ServerGroupType string 示例值:instance​
后端服务器组的类型。​
  • instance:服务器类型,该类型服务器组支持添加 ecs、eni 实例作为后端服务器。​
  • ip:IP类型,该类型服务器组支持添加 IP 地址作为后端服务器。​
​
Description string 示例值:This is the default servergroup​
后端服务器组的描述。​
​
Status string 示例值:Active​
服务器组状态。​
  • Creating:创建中。​
  • Active:运行中。​
  • Configuring:配置中。​
  • Deleting:删除中。​
​
VpcId string 示例值:vpc-3th8z3ajkd4bwbhc****​
后端服务器组所属 Vpc 的 ID。​
​
Scheduler string 示例值:wrr​
调度算法。​
  • wrr:加权轮询。​
  • wlc:加权最小连接数。​
  • sh:源地址哈希。​
​
HealthCheck object 示例值:--​
服务器组健康检查配置信息。​
Enabled string 示例值:on​
监听器是否开启健康检查功能。​
  • on:开启。​
  • off:不开启。​
​
Interval integer 示例值:2​
执行健康检查的时间间隔。 单位:秒,取值:1~60s,默认值为 2。​
​
Timeout integer 示例值:2​
健康检查的响应超时时间。​
  • 表示如果后端服务器在指定的时间内没有正确响应,则判定为健康检查异常。​
  • 单位:秒,取值:1~60,默认值为 2。​
​
HealthyThreshold integer 示例值:3​
健康检查的健康阈值。​
  • 表示连续执行指定次数的健康检查,结果均为正常的后端服务器将判定为健康检查正常。​
  • 单位:次,取值:2~10,默认值为 3。​
​
UnhealthyThreshold integer 示例值:3​
健康检查的不健康阈值。​
  • 表示连续执行指定次数的健康检查,结果均为异常的后端服务器将判定为健康检查异常。​
  • 单位:次,取值:2~10,默认值为 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。​
​
Port integer 示例值:80​
健康检查端口。参数值为0时,表示使用后端服务器端口进行健康检查。​
​
HttpVersion string 示例值:HTTP1.0​
健康检查HTTP协议版本,只有 Protocol 为 HTTP 时才存在该参数。​
  • HTTP1.0(使用API时,HTTP协议版本默认值)。​
  • HTTP1.1。​
​
​
Listeners string[] 示例值:[lsn-2fek3rgsxhrsw5oxruwec****,lsn-3fek4rgsxhrsw5oxruwec****]​
后端服务器组关联的监听器。​
​
Servers object[] 示例值:--​
后端服务器组中服务器的信息。​
ServerId string 示例值:rs-3cig8e5o0kxs06c6rrsqn****​
后端服务器ID。​
​
InstanceId string 示例值:i-3tkuehz8oa3vj0wz****​
云服务器实例或网卡的ID。​
​
Type string 示例值:ecs​
后端服务器实例类型。​
  • ecs:云服务器实例。​
  • eni:辅助网卡。​
  • ip:IP地址(仅 Ip 类型服务器组有效)。​
​
RemoteEnabled string 示例值:on​
是否开启远端IP功能。当后端服务器实例类型为IP地址,即 Type 取值为 ip 时,此字段有效。​
  • on:开启。​
  • off:不开启。​
​
Weight integer 示例值:100​
后端服务器的权重。​
​
Ip string 示例值:192.XX.XX.2​
后端服务器的私网IP地址。​
​
Port integer 示例值:88​
后端服务器接收请求的端口号。​
​
Description string 示例值:This is a backend server​
后端服务器的描述。​
​
​
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​
慢启动持续时间。 单位:秒。​
​
​
SpaceNetworkId string 示例值:csn-bpkdt37pq72zv****​
ArkClaw 实例所在 SpaceNetwork 的 ID。​
​
​
​
请求示例​
​
GET /?Action=DescribeServerGroupAttributes&ServerGroupId=rsp-bp1o94dp5i6ea****&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": "20260331155608038225060003DE8808",​
"Action": "DescribeServerGroupAttributes",​
"Version": "2020-04-01",​
"Service": "alb",​
"Region": "cn-beijing"​
},​
"Result": {​
"RequestId": "20210811152539010225146063030****",​
"ServerGroupId": "rsp-bp1o94dp5i6ea****",​
"ServerGroupName": "default_servergroup",​
"ServerGroupType": "instance",​
"Description": "This is the default servergroup",​
"Status": "Active",​
"VpcId": "vpc-3th8z3ajkd4bwbhc****",​
"Scheduler": "wrr",​
"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"​
},​
"Listeners": [​
"[lsn-2fek3rgsxhrsw5oxruwec****,lsn-3fek4rgsxhrsw5oxruwec****]"​
],​
"Servers": [​
{​
"ServerId": "rs-3cig8e5o0kxs06c6rrsqn****",​
"InstanceId": "i-3tkuehz8oa3vj0wz****",​
"Type": "ecs",​
"RemoteEnabled": "on",​
"Weight": 100,​
"Ip": "192.XX.XX.2",​
"Port": 88,​
"Description": "This is a backend server"​
}​
],​
"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.​
请求解析失败。​
404​
InvalidServerGroup.NotFound​
The specified ServerGroup does not exist.​
指定的服务器组不存在。​
500​
InternalError​
An internal error has occurred.​
发生内部错误。请稍后重试或联系工程师进一步咨询。​
​
​
最近更新时间:2026.05.19 08:35:35
这个页面对您有帮助吗?
有用
有用
无用
无用