You can call the DescribeMasterSlaveServerGroups API to query the created active/standby server 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 DescribeMasterSlaveServerGroups

The action to perform. Valid value: DescribeMasterSlaveServerGroups

LoadBalancerId String Yes lb-bp14zi0n66zpg6ohffzaa

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

Whether to return the associated listener information. Default value: false.

Response parameters

Name Type Example value Description
MasterSlaveServerGroups

A list of active/standby server groups

  └MasterSlaveServerGroupId String rsp-0bfucwuotx

The ID of the active/standby server group

  └MasterSlaveServerGroupName String Group3

The name of the active/standby server 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

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

The ID of the request

Examples

Request example


/? LoadBalancerId=lb-bp14zi0n66zpg6ohffzaa
&RegionId=cn-hangzhou
&Action=DescribeMasterSlaveServerGroups
&IncludeListener=
&Tags={"tagKey":"Key1","tagValue":"Value1"}
&<CommonParameters>

Normal response examples

XML format

<DescribeMasterSlaveServerGroupsResponse>
  <RequestId>2631BB5E-B576-4925-BDED-07A66D23E5DE</RequestId>
  <MasterSlaveServerGroups>
    <MasterSlaveServerGroup>
      <MasterSlaveServerGroupId>rsp-bp1ro3mwp2x2m</MasterSlaveServerGroupId>
      <MasterSlaveServerGroupName>test</MasterSlaveServerGroupName>
    </MasterSlaveServerGroup>
  </MasterSlaveServerGroups>
</DescribeMasterSlaveServerGroupsResponse>

JSON format

{
	"RequestId":"265989FE-136B-4D6A-B549-FD40E7A6692D",
	"MasterSlaveServerGroups":{
		"MasterSlaveServerGroup":[
			{
				"MasterSlaveServerGroupId":"rsp-bp1nlyu1366z7",
				"MasterSlaveServerGroupName":"Group3",
				"AssociatedObjects":{
					"Listeners":{
						"Listener":[]
					}
				}
			}
		]
	}
}

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.