开发者社区 问答 正文

主备服务器组相关API:DescribeMasterSlaveServerGroups


描述


查询该请求用户在指定负载均衡实例下的所有主备虚拟服务器组。

请求参数

名称类型是否必须描述
ActionString操作接口名,系统规定参数。
取值:DescribeMasterSlaveServerGroups。
RegionIdString负载均衡实例所在Region。
LoadBalancerIdString负载均衡实例 ID。


返回参数

名称类型描述
<公共参数>详见 <公共返回参数>
MasterSlaveBackendServersList数组格式,虚拟服务器组列表,列表中元素结构如下表所示。
名称类型描述
MasterSlaveServerGroupIdString虚拟服务器组的唯一标识。
MasterSlaveServerGroupNameString虚拟服务器组的名称。


示例



请求示例

  1. https://slb.aliyuncs.com/?<公共请求参数>
  2. &Action=DescribeMasterSlaveServerGroups
  3. &RegionId=cn-east-hangzhou-01
  4. &LoadBalancerId=152a602e315-cn-beijing-btc-a01


返回示例


  • XML 格式
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <DescribeMasterSlaveServerGroups>
    3.   <RequestId>9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C</RequestId>
    4.   <MasterSlaveServerGroups>
    5.       <MasterSlaveServerGroupId>rsp-cige6j5e7p<MasterSlaveServerGroupId>
    6.       <MasterSlaveServerGroupName>Group1<MasterSlaveServerGroupName>
    7.       <MasterSlaveServerGroupId>rsp-6cejjzlld7<MasterSlaveServerGroupId>
    8.       <MasterSlaveServerGroupName>Group2<MasterSlaveServerGroupName>
    9.       <MasterSlaveServerGroupId>rsp-0bfucwuotx<MasterSlaveServerGroupId>
    10.       <MasterSlaveServerGroupName>Group3<MasterSlaveServerGroupName>
    11.   </MasterSlaveServerGroups>
    12. </DescribeMasterSlaveServerGroups>

  • JSON格式
    1. {
    2. "RequestId":"9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C",
    3. "MasterSlaveServerGroups":{
    4.   [
    5.   {'MasterSlaveServerGroupId':'rsp-cige6j5e7p','MasterSlaveServerGroupName':'Group1'},
    6.   {'MasterSlaveServerGroupId':'rsp-6cejjzlld7','MasterSlaveServerGroupName':'Group2'},
    7.   {'MasterSlaveServerGroupId':'rsp-0bfucwuotx','MasterSlaveServerGroupName':'Group3'}
    8.   ]}
    9. }

展开
收起
行者武松 2017-10-18 14:43:44 1484 分享 版权
阿里云 AI 助理回答

Action=DescribeMasterSlaveServerGroups&RegionId=cn-hangzhou&LoadBalancerId=lb-12345678

响应示例

{
    "RequestId": "1234567890ABCDEF",
    "MasterSlaveServerGroups": [
        {
            "MasterSlaveServerGroupId": "ms-12345678",
            "MasterSlaveServerGroupName": "test-group-1"
        },
        {
            "MasterSlaveServerGroupId": "ms-87654321",
            "MasterSlaveServerGroupName": "production-group-2"
        }
    ]
}

在这个示例中,用户通过发送一个HTTP GET请求到阿里云SLB(负载均衡)API的指定端点,请求查询指定负载均衡实例(通过LoadBalancerId标识)下的所有主备虚拟服务器组。请求中必须包含的操作接口名ActionDescribeMasterSlaveServerGroups,以及负载均衡实例所在的RegionId

响应中,阿里云返回了一个JSON格式的数据包,其中包含了请求的ID(RequestId)以及一个名为MasterSlaveServerGroups的数组,数组里是该负载均衡实例下所有主备虚拟服务器组的信息。每个虚拟服务器组信息包括其唯一标识MasterSlaveServerGroupId和名称MasterSlaveServerGroupName

有帮助
无帮助
AI 助理回答生成答案可能存在不准确,仅供参考
0 条回答
写回答
取消 提交回答