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

负载均衡

复制全文
下载 pdf
后端服务器组
DescribeNLBServerGroups - 查询满足指定条件的服务器组
复制全文
下载 pdf
DescribeNLBServerGroups - 查询满足指定条件的服务器组
调用 DescribeNLBServerGroups 接口,查询满足指定条件的服务器组。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
Action String 必选 示例值:DescribeNLBServerGroups​
要执行的操作,取值为 DescribeNLBServerGroups。​
​
Version String 必选 示例值:2020-04-01​
API版本信息,当前版本为 2020-04-01。​
​
VpcId String 可选 示例值:vpc-bp1o94dp5i6ea****​
服务器所属的私有网络ID。​
​
ServerGroupName String 可选 示例值:myservergroup​
服务器组的名称。​
​
Type String 可选 示例值:instance​
服务器组类型。​
​
ServerGroupIds.N String 可选 示例值:rsp-2fel9y8pxr56o5oxruuuu****​
服务器组的ID。​
  • 参数 - N:表示服务器组的序号,取值范围 1~20。​
  • 多个服务器组ID间使用&分隔。​
​
InstanceIds.N String 可选 示例值:i-3tkuehz8oa3vj0wz****​
后端服务器的ID。​
  • 参数 - N:表示后端服务器ID的序号,取值范围 1~20。​
  • 多个后端服务器的ID间使用&分隔。​
​
ServerIps.N String 可选 示例值:192.168.1.20​
后端服务器的IP地址。​
  • 参数 - N:表示后端服务器IP的序号,取值范围 1~20。​
  • 多个服务器组ID间使用&分隔。​
​
NextToken String 可选 示例值:caeba0bbb2be03f84eb48b699f0a****​
分页查询凭证,用于标记分页的位置,初次调用该接口时无需设置。下次查询时,取值为上一次API调用返回的NextToken参数值。​
​
ProjectName String 可选 示例值:default​
服务器组所属项目的名称。​
​
TagFilters.N.Key String 可选 示例值:k1​
标签的标签键。指定多个标签键时,表示查询同时包含所有指定标签键的服务器组。​
  • 参数 - N:表示标签键的序号,取值范围为1~10。​
  • 多个标签键之间使用&分隔。​
​
TagFilters.N.Values.N String 可选 示例值:v1​
标签的标签值。​
  • 第一个N:表示标签键的序号,取值范围 1~10。​
  • 第二个N:表示标签值的序号,取值范围 1~3。同一标签键多个标签值之间的关系为逻辑“或(OR)”,即查询同一标签键下添加其中一个标签值的资源。​
  • 多个标签值之间使用&分隔。​
说明​
  • 如果传入该参数,则必须先传入TagFilters.N.Key。​
  • 该参数传入空值时,表示查询指定标签键下标签值为空的资源。​
​
MaxResults Integer 可选 示例值:10​
查询的数量,默认为 10,最大为100。​
​
​
​
返回参数​
RequestId String 示例值:2024092952539010225146063030****​
请求ID。​
​
NextToken String 示例值:caeba0bbb2be03f84eb48b699f0a****​
本次调用返回的查询凭证值,返回为空表示没有下一页。​
​
ServerGroups Object[] 示例值:--​
符合条件的服务器组的详细信息。​
CreateTime String 示例值:2024-08-11T16:37:37Z​
服务器组的创建时间。​
​
UpdateTime String 示例值:2024-08-11T16:37:37Z​
服务器组的最近操作时间。​
​
AccountId String 示例值:2100066126​
服务器组所属的账号ID。​
​
ProjectName String 示例值:default​
服务器组所属项目的名称。​
​
ServerGroupId String 示例值:rsp-bp1o94dp5i6ea****​
服务器组的ID。​
​
Protocol String 示例值:TCP​
NLB转发流量到后端服务器时使用的通信协议。​
  • TCP​
  • UDP​
​
Status String 示例值:Active​
服务器组的状态。​
​
VpcId String 示例值:vpc-p2ed5i6eaefh****​
服务器组所属的私有网络ID。​
​
ServerGroupName String 示例值:myservergroup​
服务器组的名称。​
​
Type String 示例值:instance​
服务器组的类型。​
  • instance:服务器类型。支持添加云服务器实例和已绑定云服务器实例的辅助网卡作为后端服务器。​
  • ip:IP地址类型。支持添加任何网络可达的VPC或IDC中的服务器作为后端服务器。​
​
Description String 示例值:test​
服务器组的描述。​
​
Scheduler String 示例值:wrr​
调度算法。​
​
IpAddressVersion String 示例值:ipv4​
服务器组的IP版本。​
​
AnyPortEnabled Boolean 示例值:true​
是否开启全端口转发。​
​
ConnectionDrainEnabled Boolean 示例值:true​
是否开启连接优雅中断。​
​
ConnectionDrainTimeout Integer 示例值:60​
连接优雅中断超时时间。​
​
PreserveClientIpEnabled Boolean 示例值:true​
是否开启源地址保持。​
​
SessionPersistenceEnabled Boolean 示例值:true​
是否开启会话保持。​
​
SessionPersistenceTimeout Integer 示例值:60​
会话保持超时时间。​
​
ProxyProtocolType String 示例值:off​
是否启用Proxy-Protocol协议。取值如下:​
  • off:关闭。​
  • standard:开启。NLB将通过Proxy-Protocol协议携带客户端源IP地址转发至服务器,还需要在服务器上配置Proxy-Protocol。​
​
HealthCheck Object 示例值:--​
服务器组中后端服务器的健康检查信息。​
Enabled Boolean 示例值:true​
监听器是否开启健康检查功能。​
  • true :开启。​
  • false:关闭。​
​
Type String 示例值:HTTP​
健康检查的类型。​
  • TCP:发送SYN握手报文,以此检测后端服务器端口的状态是否正常。​
  • HTTP:发送HEAD或GET请求模拟浏览访问行为,以此检测后端服务器应用是否正常。​
  • UDP:发送ICMP或UDP探测报文,以此检测后端服务器是否正常。​
​
Port Integer 示例值:10​
健康检查的端口。​
0表示使用后端服务器的端口进行健康检查。​
​
Interval Integer 示例值:2​
健康检查的时间间隔。​
​
HealthyThreshold Integer 示例值:3​
健康检查的健康阈值。​
连续执行指定次数的健康检查,结果均为“正常”的后端服务器将被判定为健康检查“正常”。​
​
Timeout Integer 示例值:2​
健康检查的响应超时时间。​
如果后端服务器在指定的时间内没有正确响应,则判定为健康检查异常。​
​
Method String 示例值:GET​
健康检查的方法。​
  • GET:服务器需支持GET方法。​
  • HEAD:服务器仅返回HEAD头部信息,可以降低后端开销,但要求服务器支持HEAD方法。​
说明​
仅参数Type为“HTTP”时,返回该参数。​
​
Uri String 示例值:/​
健康检查的路径。​
说明​
仅参数Type为“HTTP”时,返回该参数。​
​
Domain String 示例值:www.test​
健康检查的域名。​
​
HttpCode String 示例值:http_2xx,http_3xx​
健康检查正常的HTTP状态码。​
说明​
仅参数Type为“HTTP”时,返回该参数。​
​
UdpRequest String 示例值:Request123​
UDP健康检查的请求字符串。​
​
UdpExpect String 示例值:Expect123​
UDP健康检查的预期响应字符串。​
​
UnhealthyThreshold Integer 示例值:3​
健康检查的不健康阈值。​
连续执行指定次数的健康检查,结果均为“异常”的后端服务器将被判定为健康检查“异常”。​
​
​
RelatedLoadBalancerIds String[] 示例值:["nlb-qwdekht56fvb****", "nlb-wtglishtbg0oi****"]​
服务器组关联的NLB实例。​
​
ServerCount Integer 示例值:1​
服务器组中后端服务器的数量。​
​
BypassSecurityGroupEnabled Boolean 示例值:false​
是否开启了放通后端安全组功能。​
  • true:开启。​
  • false:未开启。​
​
TimestampRemoveEnabled Boolean 示例值:false​
是否开启清除TCP/HTTP/HTTPS报文的timestamp(即时间戳)的功能。​
  • true:开启。​
  • false:不开启。​
说明​
本功能正在邀测中,如需试用,请联系客户经理。​
​
Tags Object[] 示例值:--​
服务器组的标签信息。​
Key String 示例值:k1​
标签的标签键。​
​
Value String 示例值:v1​
标签的标签值。​
​
​
​
​
​
请求示例​
​
GET /?Action=DescribeNLBServerGroups&Version=2020-04-01&VpcId=vpc-bp1o94dp5i6ea****&ServerGroupName=myservergroup&Type=instance&ServerGroupIds.1=rsp-2fel9y8pxr56o5oxruuuu****&InstanceIds.1=i-3tkuehz8oa3vj0wz****&ServerIps.1=192.168.1.20&NextToken=caeba0bbb2be03f84eb48b699f0a****&ProjectName=default&TagFilters.1.Key=k1&TagFilters.1.Values.1=v1&MaxResults=10 HTTP/1.1​
Host: clb.cn-beijing.volcengineapi.com​
Date: 20260310T094038Z​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20251121/cn-beijing/clb/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "20230604110420****100232280022D31",​
"Action": "DescribeNLBServerGroups",​
"Version": "2020-04-01",​
"Service": "clb",​
"Region": "cn-beijing"​
},​
"Result": {​
"NextToken": "caeba0bbb2be03f84eb48b699f0a****",​
"RequestId": "2024092952539010225146063030****",​
"ServerGroups": [​
{​
"Tags": [​
{​
"Key": "k1",​
"Value": "v1"​
}​
],​
"Type": "instance",​
"VpcId": "vpc-p2ed5i6eaefh****",​
"Status": "Active",​
"Protocol": "TCP",​
"AccountId": "2100066126",​
"Scheduler": "wrr",​
"CreateTime": "2024-08-11T16:37:37Z",​
"UpdateTime": "2024-08-11T16:37:37Z",​
"Description": "test",​
"HealthCheck": {​
"Uri": "/",​
"Port": 10,​
"Type": "HTTP",​
"Domain": "www.test",​
"Method": "GET",​
"Enabled": true,​
"Timeout": 2,​
"HttpCode": "http_2xx,http_3xx",​
"Interval": 2,​
"UdpExpect": "Expect123",​
"UdpRequest": "Request123",​
"HealthyThreshold": 3,​
"UnhealthyThreshold": 3​
},​
"ProjectName": "default",​
"ServerCount": 1,​
"ServerGroupId": "rsp-bp1o94dp5i6ea****",​
"AnyPortEnabled": true,​
"ServerGroupName": "myservergroup",​
"IpAddressVersion": "ipv4",​
"ProxyProtocolType": "off",​
"ConnectionDrainEnabled": true,​
"ConnectionDrainTimeout": 60,​
"RelatedLoadBalancerIds": [​
"nlb-qwdekht56fvb****",​
"nlb-wtglishtbg0oi****"​
],​
"TimestampRemoveEnabled": false,​
"PreserveClientIpEnabled": true,​
"SessionPersistenceEnabled": true,​
"SessionPersistenceTimeout": 60,​
"BypassSecurityGroupEnabled": true​
}​
]​
}​
}​
​
错误码​
此处仅展示当前API的错误码,更多错误码请参见公共错误码。​
​
状态码​
错误码​
错误信息​
说明​
400​
DryRunOperation​
Exception raised to indicate a successfully authorized action when the DryRun flag is set to true.​
该请求设置为DryRun操作,操作授权已获得许可,但未被实际执行。​
400​
IdempotentParameterMismatch​
Arguments on this idempotent request are inconsistent with arguments used in previous request(s).​
此幂等请求的参数与前一个请求中使用的参数不一致。​
400​
InvalidClientToken.Malformed​
The specified ClientToken is malformed.​
指定的 ClientToken 参数格式不合法。​
400​
InvalidIncorrectOrder.Malformed​
The specified index order is malformed.​
指定的索引顺序参数格式不合法。​
400​
InvalidMaxResult.Malformed​
The specified MaxResult is malformed.​
指定的 MaxResult 参数格式不合法。​
400​
InvalidMaxResults.Malformed​
The specified MaxResults is malformed.​
指定的 MaxResults 参数格式不合法。​
400​
InvalidNextToken.Malformed​
The specified NextToken is malformed.​
指定的 NextToken 参数格式不合法。​
400​
InvalidPaging.Malformed​
The specified PageNumber or PageSize is malformed.​
指定的分页参数格式不合法。​
400​
InvalidServerGroupName.Malformed​
The specified ServerGroupName is malformed.​
指定的 ServerGroupName 参数格式不合法。​
400​
InvalidServers.Ip.Malformed​
The specified Servers.Ip is malformed.​
指定的 Servers.Ip 参数格式不合法。​
400​
InvalidTagKey.Malformed​
The specified TagKey is malformed.​
指定的 TagKey 参数格式不合法。​
400​
InvalidTagValue.Malformed​
The specified TagValue is malformed.​
指定的 TagValue 参数格式不合法。​
400​
InvalidType.Malformed​
The specified Type is malformed.​
指定的 Type 参数格式不合法。​
400​
LimitExceeded.ServerGroupId​
You've reached the limit on the number of ServerGroupId that you can operate.​
已达到单次可操作后端服务器组的资源数量上限。​
400​
LimitExceeded.ServerInstanceIdNumber​
You've reached the limit on the number of description ServerInstanceId that you can operate.​
已达到单次可查询服务器 ID 的数量上限。​
400​
LimitExceeded.ServerIpNumber​
You've reached the limit on the number of description ServerIp that you can operate.​
已达到单次可查询服务器 IP 的数量上限。​
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.​
已达到单次可指定过滤标签键值数量的上限。​
412​
IdempotentProcessing​
The request uses the same client token as a previous one that is still in process.​
幂等请求处理中。​
​
​
最近更新时间:2026.03.11 14:59:13
这个页面对您有帮助吗?
有用
有用
无用
无用