QuerySlbVmInstance

API Request

URLs
GET zstack/v1/load-balancers/slb/instances
GET zstack/v1/load-balancers/slb/instances/{uuid}
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/slb/instances?q=uuid=76efa7d6d9033af6b8b85c0d4050f725
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/load-balancers/slb/instances/bebda93d772c3ea8a16242cf8fb85e64

Queryable Fields

You can check all queryable fields and resource names that can be queried across tables by using zstack-cli, entering QuerySlbVmInstance, and pressing the Tab key.

API Response

Sample Response
{
  "inventories": [
    {
      "slbGroupUuid": "0643d154403b3f668cd86e632b839751",
      "configTasks": [
        {
          "vmInstanceUuid": "b44f739da7d03d1e8d746992bf1d0511",
          "configVersion": 101,
          "taskName": "taskA",
          "taskData": "Data",
          "retryNumber": 2,
          "lastFailedReason": "failed",
          "status": "Failed"
        }
      ],
      "configVersion": 100,
      "uuid": "b44f739da7d03d1e8d746992bf1d0511",
      "name": "SLB",
      "description": "SLB Instance VM",
      "zoneUuid": "1ddfa48e92d432219525e71710872fed",
      "clusterUuid": "fe266a478f7a3ee791d60ec8bf515107",
      "imageUuid": "7b76ac4b5d5338f7aa534dd6d2f651de",
      "hostUuid": "d3d2f05490d93a548da3975b9aef2b02",
      "lastHostUuid": "458e298932f13bf8970a49ab37eef4b2",
      "instanceOfferingUuid": "2cb51561bace3d9cbe0e1537ed5c8d87",
      "rootVolumeUuid": "a258b546210239239b6b007257b534dd",
      "platform": "Linux",
      "defaultL3NetworkUuid": "75d6d9c236a63240ba3de52babcddb4e",
      "type": "ApplianceVm",
      "hypervisorType": "KVM",
      "memorySize": 8589934592,
      "cpuNum": 1,
      "allocatorStrategy": "LastHostPreferredAllocatorStrategy",
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM",
      "state": "Running",
      "vmNics": [
        {
          "uuid": "e2ddf013a62d385f9ae7b3da274da83b",
          "vmInstanceUuid": "b44f739da7d03d1e8d746992bf1d0511",
          "usedIpUuid": "f190b722694839e2bbd1fa6f2cb1ded5",
          "l3NetworkUuid": "40ec403203343b738576fbf4b575bdec",
          "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,
          "state": "enable",
          "createDate": "Nov 14, 2017 10:20:57 PM",
          "lastOpDate": "Nov 14, 2017 10:20:57 PM"
        }
      ],
      "allVolumes": [
        {
          "uuid": "c5055efcc2323281add5f09787f73d15",
          "name": "Root-Volume-For-VM-b44f739da7d03d1e8d746992bf1d0511",
          "primaryStorageUuid": "9e0252991dcc3ae09e10b69aad9743be",
          "vmInstanceUuid": "b44f739da7d03d1e8d746992bf1d0511",
          "diskOfferingUuid": "17b973054ad83a9a99c2defce44731d2",
          "rootImageUuid": "7b76ac4b5d5338f7aa534dd6d2f651de",
          "installPath": "/zstack_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-fcdefa0ed8dc3cabbca631c8205d57cc/c63e2314a73f3182af05c14e7f3155c9.qcow2",
          "type": "Root",
          "format": "qcow2",
          "size": 107374182400,
          "actualSize": 21474836480,
          "deviceId": 0,
          "state": "Enabled",
          "status": "Ready",
          "createDate": "Nov 14, 2017 10:20:57 PM",
          "lastOpDate": "Nov 14, 2017 10:20:57 PM"
        }
      ]
    }
  ]
}
Name Type Description Starting Version
success boolean 5.1.0
inventories List See 5.1.0
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 5.1.0
#inventories
Name Type Description Starting Version
slbGroupUuid String 5.1.0
configVersion Long 5.1.0
publicNetworkUuid String 5.1.0
virtualRouterVips List 5.1.0
applianceVmType String 5.1.0
managementNetworkUuid String 5.1.0
defaultRouteL3NetworkUuid String 5.1.0
status String 5.1.0
agentPort Integer 5.1.0
haStatus String 5.1.0
uuid String The resource UUID. 5.1.0
name String The resource name. 5.1.0
description String The detailed description of the resource. 5.1.0
zoneUuid String The zone UUID. 5.1.0
clusterUuid String The cluster UUID. 5.1.0
imageUuid String The image UUID. 5.1.0
hostUuid String The host UUID. 5.1.0
lastHostUuid String 5.1.0
instanceOfferingUuid String The instance offering UUID. 5.1.0
rootVolumeUuid String The root volume UUID. 5.1.0
platform String 5.1.0
architecture String 5.1.0
defaultL3NetworkUuid String 5.1.0
type String 5.1.0
hypervisorType String 5.1.0
memorySize Long 5.1.0
reservedMemorySize Long 5.1.0
cpuNum Integer 5.1.0
cpuSpeed 5.1.0
allocatorStrategy Long 5.1.0
createDate Timestamp The creation date. 5.1.0
lastOpDate Timestamp The last operation date. 5.1.0
state String 5.1.0
guestOsType String 5.1.0
configTasks List See configTasks. 5.1.0
vmNics List See vmNics. 5.1.0
allVolumes List See allVolumes. 5.1.0
vmCdRoms List See vmCdRoms. 5.1.0
#configTasks
Name Type Description Starting Version
vmInstanceUuid String The VM instance UUID. 5.1.0
configVersion long 5.1.0
taskName String 5.1.0
taskData String 5.1.0
retryNumber long 5.1.0
lastFailedReason String 5.1.0
createDate Timestamp The creation date. 5.1.0
lastOpDate Timestamp The last operation date. 5.1.0
status SlbVmInstanceConfigTaskStatus See status 5.1.0
#status
Name Type Description Starting Version
Pending SlbVmInstanceConfigTaskStatus 5.1.0
Starting SlbVmInstanceConfigTaskStatus 5.1.0
Success SlbVmInstanceConfigTaskStatus 5.1.0
Failed SlbVmInstanceConfigTaskStatus 5.1.0
#vmNics
Name Type Description Starting Version
uuid String The resource UUID. 5.1.0
vmInstanceUuid String The VM instance UUID. 5.1.0
l3NetworkUuid String The L3 network UUID 5.1.0
ip String 5.1.0
mac String 5.1.0
hypervisorType String 5.1.0
netmask String 5.1.0
gateway String 5.1.0
metaData String 5.1.0
ipVersion 5.1.0
driverType String 5.1.0
internalName String 5.1.0
deviceId 5.1.0
type String 5.1.0
state String The vmNic state. 5.1.0
createDate Timestamp The creation date. 5.1.0
lastOpDate Timestamp The last operation date. 5.1.0
usedIps List See usedIps. 5.1.0
#usedIps
Name Type Description Starting Version
uuid String The resource UUID. 5.1.0
ipRangeUuid String The ip range UUID 5.1.0
l3NetworkUuid String The L3 network UUID. 5.1.0
ipVersion Integer 5.1.0
ip String 5.1.0
netmask String 5.1.0
gateway String 5.1.0
usedFor String 5.1.0
ipInLong long 5.1.0
vmNicUuid String The vmNic UUID. 5.1.0
createDate Timestamp The creation date. 5.1.0
lastOpDate Timestamp The last operation date. 5.1.0
#allVolumes
Name Type Description Starting Version
uuid String The resource UUID. 5.1.0
name String The resource name. 5.1.0
description String The detailed description of the resource. 5.1.0
primaryStorageUuid String The primary storage UUID. 5.1.0
vmInstanceUuid String The VM instance UUID. 5.1.0
diskOfferingUuid String The disk offering UUID. 5.1.0
rootImageUuid String 5.1.0
installPath String 5.1.0
type String 5.1.0
format String 5.1.0
size Long 5.1.0
actualSize Long 5.1.0
deviceId Integer 5.1.0
state String 5.1.0
status String 5.1.0
createDate Timestamp The creation date. 5.1.0
lastOpDate Timestamp The last operation date. 5.1.0
isShareable Boolean 5.1.0
volumeQos String 5.1.0
lastDetachDate Timestamp 5.1.0
lastVmInstanceUuid String 5.1.0
#vmCdRoms
Name Type Description Starting Version
uuid String The resource UUID. 5.1.0
vmInstanceUuid String The VM instance UUID. 5.1.0
deviceId Integer 5.1.0
isoUuid String 5.1.0
isoInstallPath String 5.1.0
name String The resource name. 5.1.0
description String The detailed description of the resource. 5.1.0
createDate Timestamp The creation date. 5.1.0
lastOpDate Timestamp The last operation date. 5.1.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. 5.1.0
description String The brief description of the error. 5.1.0
details String The details about the error. 5.1.0
elaboration String The reserved field. Default value: null. 5.1.0
opaque LinkedHashMap The reserved field. Default value: null. 5.1.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. 5.1.0

SDK Sample

Java SDK
QuerySlbVmInstanceAction action = new QuerySlbVmInstanceAction();
action.conditions = asList("uuid=f6fba7cb05293adc9afb013d01b7ad5b");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QuerySlbVmInstanceAction.Result res = action.call();
Python SDK
QuerySlbVmInstanceAction action = QuerySlbVmInstanceAction()
action.conditions = ["uuid=2c88152e016f37838064f644e2225968"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QuerySlbVmInstanceAction.Result res = action.call()
API Reference | 5.4.12 | ZStack Cloud · ZCF | ZStack Resource Center