GetCandidateVmNicsForLoadBalancerServerGroup

API Request

URLs
GET zstack/v1/load-balancers/servergroups/candidate-nics
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/servergroups/candidate-nics?servergroupUuid=8e19c3c1227635b39799ff85cd2e01b4&loadBalancerUuid=786271b7eea63f0785ed67e3a36bfe35
Request Parameters
Name Type Location Description Valid Value Starting Version
servergroupUuid String query Optional. The UUID of the server group. 4.0.0
loadBalancerUuid String query Optional. The load balancer UUID. 4.0.0
systemTags List query Optional. The system tags. 4.0.0
userTags List query Optional. The user tags. 4.0.0

API Response

Sample Response
{
  "inventories": [
    {
      "uuid": "798c7b209b34303aa9a48593594bccee",
      "vmInstanceUuid": "c158c92bdda63bbb97c8dea6d284350a",
      "usedIpUuid": "702b0b20aebe3d4a880abe851940462d",
      "l3NetworkUuid": "a1cebc14f5b236578049889964686822",
      "ip": "192.168.1.10",
      "mac": "00:0c:29:bd:99:fc",
      "hypervisorType": "KVM",
      "netmask": "255.255.255.0",
      "gateway": "192.168.1.1",
      "deviceId": 0.0,
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM"
    }
  ]
}
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 NIC UUID. 4.0.0
vmInstanceUuid String The VM instance UUID. 4.0.0
l3NetworkUuid String The L3 network UUID. 4.0.0
ip String The IP address of the NIC. 4.0.0
mac String The MAC address of the NIC. 4.0.0
hypervisorType String The virtualization type. 4.0.0
netmask String The netmask. 4.0.0
gateway String The gateway IP address. 4.0.0
metaData String 4.0.0
ipVersion Integer The IP version. 4.0.0
deviceId Integer The device ID. 4.0.0
type String The NIC type. 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
usedIps List See usedIps. 4.0.0
#usedIps
Name Type Description Starting Version
uuid String The IP address UUID. 4.0.0
ipRangeUuid String The IP range UUID. 4.0.0
l3NetworkUuid String The L3 network UUID. 4.0.0
ipVersion Integer The IP version. 4.0.0
ip String The IP address. 4.0.0
netmask String The netmask. 4.0.0
gateway String The gateway IP address. 4.0.0
usedFor String 4.0.0
ipInLong long 4.0.0
vmNicUuid String The VM NIC UUID. 4.0.0
createDate Timestamp The time when the IP address was used. 4.0.0
lastOpDate Timestamp The time when the was last modified. 4.0.0

SDK Sample

Java SDK
GetCandidateVmNicsForLoadBalancerServerGroupAction action = new GetCandidateVmNicsForLoadBalancerServerGroupAction();
action.servergroupUuid = "8e19c3c1227635b39799ff85cd2e01b4";
action.loadBalancerUuid = "786271b7eea63f0785ed67e3a36bfe35";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetCandidateVmNicsForLoadBalancerServerGroupAction.Result res = action.call();
Python SDK
GetCandidateVmNicsForLoadBalancerServerGroupAction action = GetCandidateVmNicsForLoadBalancerServerGroupAction()
action.servergroupUuid = "8e19c3c1227635b39799ff85cd2e01b4"
action.loadBalancerUuid = "786271b7eea63f0785ed67e3a36bfe35"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetCandidateVmNicsForLoadBalancerServerGroupAction.Result res = action.call()