调用DescribeVServerGroups接口查询传统型负载均衡的服务器组列表。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String DescribeVServerGroups

系统规定参数。取值:DescribeVServerGroups

RegionId String cn-hangzhou

传统型负载均衡实例的地域ID。

您可以通过调用DescribeRegions接口获取地域ID。

LoadBalancerId String lb-bp1o94dp5i6ea*******

传统型负载均衡实例ID。

IncludeRule Boolean false

是否返回关联的转发规则信息。取值:

  • true:是。
  • false(默认值):否。
IncludeListener Boolean false

是否返回关联的监听信息。取值:

  • true:是。
  • false(默认值):否。

返回数据

名称 类型 示例值 描述
RequestId String 9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C

请求ID。

VServerGroups Array of VServerGroup

后端服务器列表。

VServerGroup
VServerGroupId String rsp-0bfucwuotx

服务器组ID。

VServerGroupName String Group3

服务器组名称。

AssociatedObjects Object

关联信息。

Listeners Array of Listener

监听列表。

Listener
Port Integer 80

监听端口。

Protocol String tcp

监听协议。取值:tcpudphttphttps

Rules Array of Rule

转发规则列表。

Rule
Url String /example

访问路径。

Domain String www.example.com

请求域名。

RuleName String test

转发规则名称。

RuleId String rule-a3x3pg1yohq3lq****

转发规则ID。

ServerCount Long 1

服务器个数。

说明 该参数对应的功能默认不开放,如需使用,请提交工单
CreateTime String 2022-08-31T02:49:05Z

传统型负载均衡实例的创建时间,格式:YYYY-MM-DDThh:mm:ssZ

示例

请求示例

http(s)://[Endpoint]/?Action=DescribeVServerGroups
&RegionId=cn-hangzhou
&LoadBalancerId=lb-bp1o94dp5i6ea*******
&IncludeRule=false
&IncludeListener=false
&公共请求参数

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeVServerGroupsResponse>
    <RequestId>9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C</RequestId>
    <VServerGroups>
        <VServerGroupId>rsp-0bfucwuotx</VServerGroupId>
        <VServerGroupName>Group3</VServerGroupName>
        <AssociatedObjects>
            <Listeners>
                <Port>80</Port>
                <Protocol>tcp</Protocol>
            </Listeners>
            <Rules>
                <Url>/example</Url>
                <Domain>www.example.com</Domain>
                <RuleName>test</RuleName>
                <RuleId>rule-a3x3pg1yohq3lq****</RuleId>
            </Rules>
        </AssociatedObjects>
        <ServerCount>1</ServerCount>
        <CreateTime>2022-08-31T02:49:05Z</CreateTime>
    </VServerGroups>
</DescribeVServerGroupsResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C",
  "VServerGroups" : [ {
    "VServerGroupId" : "rsp-0bfucwuotx",
    "VServerGroupName" : "Group3",
    "AssociatedObjects" : {
      "Listeners" : [ {
        "Port" : 80,
        "Protocol" : "tcp"
      } ],
      "Rules" : [ {
        "Url" : "/example",
        "Domain" : "www.example.com",
        "RuleName" : "test",
        "RuleId" : "rule-a3x3pg1yohq3lq****"
      } ]
    },
    "ServerCount" : 1,
    "CreateTime" : "2022-08-31T02:49:05Z"
  } ]
}

错误码

访问错误中心查看更多错误码。