You can call the DescribeVServerGroups API to query the list of VServer groups.

Debug

Click here to perform a debug operation in OpenAPI Explorer and automatically generate an SDK code example.

Request parameters

Name Type Required? Example value Description
Action String Yes DescribeVServerGroups

The operation you want to perform. The value is DescribeVServerGroups.

LoadBalancerId String Yes lb-bp1o94dp5i6earr9g6d1l

The ID of the SLB instance

RegionId String Yes cn-hangzhou

The ID of the region to which the SLB instance belongs

IncludeListener Boolean No false

The associated listener information is returned, with the default value of false.

IncludeRule Boolean No false

The associated forwarding rule information is returned, with the default value of false.

Response Parameters

Name Type Example value Description
VServerGroups

A list of backend servers

  └VServerGroupId String rsp-0bfucwuotx

The ID of the VServer group

  └VServerGroupName String Group3

The name of the VServer group

  └AssociatedObjects

Associated information

    └Listeners

A list of associated listeners

      └Port Integer 80

The listening port

      └Protocol String tcp

The protocol used by the listener

    └Rules

A list of forwarding rules

      └Domain String www.example.com

The request domain name

      └RuleId String 123

The ID of the forwarding rule

      └RuleName String test

The name of the forwarding rule

      └Url String /example

The access path

RequestId String 9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C

The ID of the request

Examples

Request example


/? Action=DescribeVServerGroups
&LoadBalancerId=152a602e315-cn-hangzhou-a01
&RegionId=cn-hangzhou
&<Common request parameters>

Normal response examples

XML format

<DescribeVServerGroups>
  <VServerGroups>
    <VServerGroup>
      <VServerGroupId>rsp-bp12bjrnykyp0</VServerGroupId>
      <VServerGroupName>6</VServerGroupName>
      <AssociatedObjects>
        <Listeners/>
        <Rules/>
      </AssociatedObjects>
    </VServerGroup>
    <VServerGroup>
      <VServerGroupId>rsp-bp16rt0dzbm23</VServerGroupId>
      <VServerGroupName>text2</VServerGroupName>
      <AssociatedObjects>
        <Listeners/>
        <Rules/>
      </AssociatedObjects>
    </VServerGroup>
  </VServerGroups>
  <RequestId>E3F94C66-5DDD-4A6B-B37D-FD237FB31FE6</RequestId>
</DescribeVServerGroups>

JSON format

{
	"VServerGroups":[
		{
			"VServerGroupId":"rsp-cige6j5e7p",
			"VServerGroupName":"Group1"
		},
		{
			"VServerGroupId":"rsp-6cejjzlld7",
			"VServerGroupName":"Group2"
		},
		{
			"VServerGroupId":"rsp-0bfucwuotx",
			"VServerGroupName":"Group3"
		}
	],
	"RequestId":"9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C"
}

Error response example

JSON format

{
	"Message":"The specified parameter is not valid.",
	"RequestId":"0669D684-69D8-408E-A4FA-B9011E0F4E66",
	"HostId":"slb-pop.aliyuncs.com",
	"Code":"InvalidParameter"
}

Error codes

Click here to view the error codes.