调用DescribeMasterSlaveServerGroups查询主备服务器组列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeMasterSlaveServerGroups |
要执行的操作。 取值:DescribeMasterSlaveServerGroups。 |
LoadBalancerId | String | 是 | lb-bp14zi0n66zpg6o****** |
负载均衡实例ID。 |
RegionId | String | 是 | cn-hangzhou |
负载均衡实例的地域ID。 |
IncludeListener | Boolean | 否 | false |
是否返回关联的监听信息,默认值:false。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
MasterSlaveServerGroups | Array |
主备服务器组列表。 |
|
MasterSlaveServerGroup | |||
MasterSlaveServerGroupId | String | rsp-0bfuc****** |
主备服务器组ID。 |
MasterSlaveServerGroupName | String | Group3 |
主备服务器组的名称。 |
AssociatedObjects | Struct |
关联信息。 |
|
Listeners | Array |
监听列表。 |
|
Listener | |||
Port | Integer | 80 |
监听端口。 |
Protocol | String | tcp |
监听协议。 |
RequestId | String | 9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C |
请求ID。 |
示例
请求示例
http(s)://[Endpoint]/?Action=DescribeMasterSlaveServerGroups
&LoadBalancerId=lb-bp14zi0n66zpg6o******
&RegionId=cn-hangzhou
&<公共请求参数>
正常返回示例
XML
格式
<DescribeMasterSlaveServerGroupsResponse>
<RequestId>2631BB5E-B576-4925-BDED-07A66D23E5DE</RequestId>
<MasterSlaveServerGroups>
<MasterSlaveServerGroup>
<MasterSlaveServerGroupId>rsp-bp1ro3mw******</MasterSlaveServerGroupId>
<MasterSlaveServerGroupName>test</MasterSlaveServerGroupName>
</MasterSlaveServerGroup>
</MasterSlaveServerGroups>
</DescribeMasterSlaveServerGroupsResponse>
JSON
格式
{
"RequestId": "265989FE-136B-4D6A-B549-FD40E7",
"MasterSlaveServerGroups": {
"MasterSlaveServerGroup": [
{
"MasterSlaveServerGroupId": "rsp-bp1nly******",
"MasterSlaveServerGroupName": "主备1",
"AssociatedObjects": {
"Listeners": {
"Listener": [ ]
}
}
}
]
}
}
错误码
访问错误中心查看更多错误码。
在文档使用中是否遇到以下问题
更多建议
匿名提交