All Products
Search
Document Center

Server Load Balancer:DescribeVServerGroups

Last Updated:Oct 11, 2024

Queries vServer groups.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
slb:DescribeVServerGroupsget
  • loadbalancer
    acs:slb:{#regionId}:{#accountId}:loadbalancer/{#loadbalancerId}
  • slb:tag
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the Classic Load Balancer (CLB) instance.

You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
LoadBalancerIdstringYes

The ID of the CLB instance.

lb-bp1o94dp5i6ea*******
IncludeRulebooleanNo

Specifies whether to return the forwarding rules associated with the vServer groups. Valid values:

  • true: yes
  • false (default): no
false
IncludeListenerbooleanNo

Specifies whether to return information about the associated listeners. Valid values:

  • true: yes
  • false (default): no
false
Tagarray<object>No

The tags.

objectNo

The tags.

KeystringNo

The key of tag N. Valid values of N: 1 to 20. The tag key cannot be an empty string.

The tag key can be up to 64 characters in length, and cannot contain http:// or https://. The tag key cannot start with aliyun or acs:.

TestKey
ValuestringNo

The tag value. Valid values of N: 1 to 20. The tag value can be an empty string.

The tag value can be up to 128 characters in length and cannot start with acs: or aliyun. The tag value cannot contain http:// or https://.

TestValue
DescriptionstringNo

The name of the vServer group.

Group3

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C
VServerGroupsarray<object>

The backend servers.

VServerGroupobject

Details of the vServer groups.

VServerGroupIdstring

The server group ID.

rsp-0bfuc*****
VServerGroupNamestring

The server group name.

Group3
AssociatedObjectsobject

The associated resources.

Listenersarray<object>

The listeners.

Listenerobject

The listener.

Portinteger

The listener port.

80
Protocolstring

The listener protocol. Valid values: tcp, udp, http, and https.

tcp
Rulesarray<object>

The forwarding rules.

Ruleobject

The forwarding rules.

Urlstring

The request URL.

/example
Domainstring

The requested domain name.

www.example.com
RuleNamestring

The name of the forwarding rule.

test
RuleIdstring

The ID of the forwarding rule.

rule-a3x3pg1yohq3lq****
ServerCountlong

The number of servers.

This parameter is unavailable by default. To use this parameter, submit a ticket or contact your account manager.

1
CreateTimestring

The time when the CLB instance was created. The time follows the YYYY-MM-DDThh:mm:ssZ format.

2022-08-31T02:49:05Z
Tagsarray<object>

The tags.

Tagobject

Tag objects.

TagKeystring

The tag key.

TestKey
TagValuestring

The tag value.

TestValue

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError message
400MissingParam.TagKeyThe param of TagKey is missing.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-10-25The Error code has changed. The request parameters of the API has changedView Change Details
2023-07-04The Error code has changedView Change Details