QueryLoadBalancerServerGroup
API Request
URLs
GET zstack/v1/load-balancers/servergroupsGET zstack/v1/load-balancers/servergroups/{uuid}Headers
Authorization: OAuth the-session-uuidCurl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/load-balancers/servergroupscurl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/load-balancers/servergroups/3d12c68915bd391ca7cea7a95249b47bQueryable Fields
You can check all queryable fields and resource names that can be queried across tables by using zstack-cli, entering QueryLoadBalancerServerGroup, and pressing the Tab key.
API Response
Sample Response
{
"inventories": [
{
"uuid": "f523d90c41b136279b523052149c9690",
"name": "Test-LbServerGroup"
}
]
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 4.0.0 |
| inventories | List | See inventories. | 4.0.0 |
#error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. | 4.0.0 |
| description | String | The brief description of the error. | 4.0.0 |
| details | String | The details about the error. | 4.0.0 |
| elaboration | String | The reserved field. Default value: null. | 4.0.0 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 4.0.0 |
| cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 4.0.0 |
#inventories
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The UUID of the server group. | 4.0.0 |
| name | String | The name of the server group. | 4.0.0 |
| description | String | The detailed description of the server group. | 4.0.0 |
| loadBalancerUuid | String | The load balancer UUID. | 4.0.0 |
| createDate | Timestamp | The time when the server group was created. | 4.0.0 |
| lastOpDate | Timestamp | The time when the server group was last modified. | 4.0.0 |
| listenerServerGroupRefs | List | See listenerServerGroupRefs. | 4.0.0 |
| serverIps | List | See serverIps. | 4.0.0 |
| vmNicRefs | List | See vmNicRefs. | 4.0.0 |
#listenerServerGroupRefs
| Name | Type | Description | Starting Version |
|---|---|---|---|
| id | long | 4.0.0 | |
| listenerUuid | String | 4.0.0 | |
| serverGroupUuid | String | 4.0.0 | |
| createDate | Timestamp | The time when the listener was created. | 4.0.0 |
| lastOpDate | Timestamp | The time when the listener was last modified. | 4.0.0 |
#serverIps
| Name | Type | Description | Starting Version |
|---|---|---|---|
| id | long | 4.0.0 | |
| description | String | The detailed description of the IP address. | 4.0.0 |
| serverGroupUuid | String | 4.0.0 | |
| ipAddress | String | 4.0.0 | |
| weight | Long | 4.0.0 | |
| status | String | 4.0.0 | |
| createDate | Timestamp | The time when the was used. | 4.0.0 |
| lastOpDate | Timestamp | The time when the was last modified. | 4.0.0 |
#vmNicRefs
| Name | Type | Description | Starting Version |
|---|---|---|---|
| id | Long | 4.0.0 | |
| serverGroupUuid | String | 4.0.0 | |
| vmNicUuid | String | The VM NIC UUID. | 4.0.0 |
| weight | Long | 4.0.0 | |
| status | String | 4.0.0 | |
| createDate | Timestamp | The time when the NIC was added to the VM instance. | 4.0.0 |
| lastOpDate | Timestamp | The time when the NIC was last modified. | 4.0.0 |
SDK Sample
Java
SDK
QueryLoadBalancerServerGroupAction action = new QueryLoadBalancerServerGroupAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryLoadBalancerServerGroupAction.Result res = action.call();Python
SDK
QueryLoadBalancerServerGroupAction action = QueryLoadBalancerServerGroupAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryLoadBalancerServerGroupAction.Result res = action.call()