查詢已建立的主備伺服器組。
請求參數
名稱 | 類型 | 是否必須 | 描述 |
---|---|---|---|
Action | String | 是 | 要執行的操作,取值:
DescribeMasterSlaveServerGroups |
RegionId | String | 是 | 負載平衡地域。
您可以通過調用 DescribeRegions介面獲取地域ID。 |
LoadBalancerId | String | 是 | Server Load Balancer執行個體ID。 |
返回參數
名稱 | 類型 | 描述 |
---|---|---|
RequestId | String | 請求ID。 |
MasterSlaveServerGroupId | String | 主備伺服器組ID。 |
MasterSlaveServerGroupName | String | 主備伺服器組名稱。 |
MasterSlaveBackendServers | String
JSON格式的List |
主備伺服器組列表。 |
名稱 | 類型 | 描述 |
---|---|---|
ServerId | String | ECS執行個體ID。 |
Port | String | 後端伺服器使用的通信埠。
取值範圍:1-65535 |
Weight | String |
後端伺服器的權重,取值:[0,100] 預設值為100。如果值為0,則不會將請求轉寄給該後端伺服器。 |
ServerType | String | 伺服器類型,取值:
Master(預設值) | Slave |
樣本
請求樣本
https://slb.aliyuncs.com/?Action=DescribeMasterSlaveServerGroups
&RegionId=cn-hangzhou
&LoadBalancerId=lb-t4nj5vuz8ish9emfk1f20
&公共請求參數
返回樣本
- XML格式
<?xml version="1.0" encoding="utf-8"?> <DescribeMasterSlaveServerGroupsResponse> <RequestId>2631BB5E-B576-4925-BDED-07A66D23E5DE</RequestId> <MasterSlaveServerGroups> <MasterSlaveServerGroup> <MasterSlaveServerGroupId>rsp-bp1ro3mwp2x2m</MasterSlaveServerGroupId> <MasterSlaveServerGroupName>test</MasterSlaveServerGroupName> </MasterSlaveServerGroup> </MasterSlaveServerGroups> </DescribeMasterSlaveServerGroupsResponse>
- JSON格式
{ "RequestId": "2631BB5E-B576-4925-BDED-07A66D23E5DE", "MasterSlaveServerGroups": { "MasterSlaveServerGroup": [ { "MasterSlaveServerGroupId": "rsp-bp1ro3mwp2x2m", "MasterSlaveServerGroupName": "test" } ] } }