Document navigation

GetLoadBalancerServerGroupBackendServer

API Request

URLs

GET zstack/v1/load-balancers/listeners/{listenerUuid}/backendservers

Headers

Authorization: OAuth the-session-uuid

Curl Sample

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET \
http://localhost:8080/zstack/v1/load-balancers/listeners/423a88e5945d3d3eb42f5494433d0c51/backendservers?serverGroupUuid=9b8175f2e71232acaca1e1453d3071d8&name=web&state=Enabled&sortBy=serverName&sortDirection=asc&limit=1000&start=0

Request Parameters

Name Type Location Description Optional Values Starting Version
listenerUuid String url The listener UUID. Backend servers of all server groups under the listener are returned. 5.5.38
serverGroupUuid String query Optional. The server group UUID. Optional filter. If not specified, backend servers of all server groups under the listener are returned. 5.5.38
limit Integer query Optional. The page size. Default: 1000. 5.5.38
start Integer query Optional. The starting offset of the page. Default: 0. 5.5.38
name String query Optional. The server name. Fuzzy match. If not specified, all are returned. 5.5.38
state String query Optional. The enabling state filter. Enabled indicates enabled, and Disabled indicates disabled. If not specified, all are returned.
  • Enabled
  • Disabled
5.5.38
sortBy String query Optional. The field used for sorting. Default: createDate.
  • serverName
  • ip
  • weight
  • state
  • createDate
5.5.38
sortDirection String query Optional. The sort direction. Default: asc.
  • asc
  • desc
5.5.38
systemTags List query Optional. The system tags. 0.6
userTags List query Optional. The user tags. 0.6

API Response

Sample Response

{
  "inventories": [
    {
      "uuid": "55c32cf9b7f23d899355f3ea42a33c42",
      "serverGroupUuid": "b9a476e29cca31b99c73e6f6929261e3",
      "loadBalancerUuid": "6a27a4a5e90c39448232e355e06733a8",
      "serverType": "VmInstance",
      "vmNicUuid": "0bc562b8247631bbab05c4efb8842367",
      "vmInstanceUuid": "7fd397dc15f637dfb672d3b80c8665e0",
      "serverName": "vm-1",
      "ip": "192.168.1.10",
      "l3NetworkUuid": "95fbe8f3ee0f30c4a17d09043fd95376",
      "weight": 100,
      "ipVersion": 4,
      "state": "Enabled",
      "runtimeStatus": "Active",
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM"
    }
  ],
  "total": 1
}
Name Type Description Starting Version
success boolean Whether the request succeeds. 0.6
error ErrorCode The error code. If not null, the operation fails, or vice versa. See error. 0.6
total Long The total number of backend servers after filtering. 5.5.38
inventories List See inventories. 5.5.38

#error

Name Type Description Starting Version
code String The error code, which is a globally unique identifier of the error, for example, SYS.1000 or HOST.1001. 5.3.20
description String The brief description of the error. 5.3.20
details String The details about the error. 5.3.20
elaboration String The reserved field. Default: null. 5.3.20
opaque LinkedHashMap The reserved field. Default: null. 5.3.20
cause ErrorCode The root error, which is the source error that causes the current error. If there is no source error, this field is null. 5.3.20

#inventories

Name Type Description Starting Version
uuid String The unique UUID of the backend server, deterministically generated from the server type and record ID and stable across requests. 5.5.38
serverGroupName String The server group name. 5.5.38
listenerUuid String The listener UUID. The state is the enabling state from the perspective of this listener. 5.5.38
serverGroupUuid String The server group UUID. 5.5.38
loadBalancerUuid String The load balancer UUID. 5.5.38
serverType String The backend server type. VmInstance for VM NICs, and ServerIp for external IPs. 5.5.38
vmNicUuid String The VM NIC UUID. Null when serverType is ServerIp. 5.5.38
vmInstanceUuid String The VM instance UUID. Null when serverType is ServerIp. 5.5.38
serverName String The server name. For VM instance backends, it is the VM instance name. For external IP backends, it is the IP address. 5.5.38
ip String The IP address of the backend server. 5.5.38
l3NetworkUuid String The UUID of the L3 network where the NIC resides. Null when serverType is ServerIp. 5.5.38
weight Long The weight. 5.5.38
ipVersion Integer The version of the IP protocol. Null when serverType is ServerIp. 5.5.38
state String The enabling state. Enabled indicates enabled, and Disabled indicates disabled. If listenerUuid is not specified, the value is an aggregated result. 5.5.38
runtimeStatus String The running status of the VM instance. Active indicates running, Inactive indicates stopped, and Pending indicates pending. 5.5.38
createDate Timestamp The creation time. 5.5.38
lastOpDate Timestamp The last operation time. 5.5.38

SDK Sample

Java SDK

GetLoadBalancerServerGroupBackendServerAction action = new GetLoadBalancerServerGroupBackendServerAction();
action.listenerUuid = "423a88e5945d3d3eb42f5494433d0c51";
action.serverGroupUuid = "9b8175f2e71232acaca1e1453d3071d8";
action.name = "web";
action.state = "Enabled";
action.sortBy = "serverName";
action.sortDirection = "asc";
action.limit = 1000;
action.start = 0;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetLoadBalancerServerGroupBackendServerAction.Result res = action.call();

Python SDK

action = GetLoadBalancerServerGroupBackendServerAction()
action.listenerUuid = "423a88e5945d3d3eb42f5494433d0c51"
action.serverGroupUuid = "9b8175f2e71232acaca1e1453d3071d8"
action.name = "web"
action.state = "Enabled"
action.sortBy = "serverName"
action.sortDirection = "asc"
action.limit = 1000
action.start = 0
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()