Network ServicesSecurity Group

GetCandidateVmNicForSecurityGroup

GET/zstack/v1/security-groups/{securityGroupUuid}/vm-instances/candidate-nics

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth aec584233a724de089d05b8090e5a296" \
-X GET http://localhost:8080/zstack/v1/security-groups/584e70f6d3504c7a811df5eeba61839c/vm-instances/candidate-nics

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
securityGroupUuidStringurlThe security group UUID 0.6
systemTags (Optional)ListquerySystem tags 0.6
userTags (Optional)ListqueryUser tags 0.6

API Response

Response Example

{
  "inventories": [
    {
      "uuid": "80d2eab0354c329b8257e8f9fcd76d43",
      "vmInstanceUuid": "e8af62992ec5343facac7c5fc164ddd0",
      "l3NetworkUuid": "738cc18ef5003a00937c0e17e6c67a2d",
      "ip": "192.168.0.123",
      "mac": "fa:ef:34:5c:6c:00",
      "hypervisorType": "KVM",
      "netmask": "255.255.255.0",
      "gateway": "192.168.0.1",
      "internalName": "eth0",
      "deviceId": 0.0
    }
  ]
}
NameTypeDescriptionStarting Version
successboolean 0.6
errorErrorCodeError code. If not null, the operation failed. If null, the operation succeeded. See error0.6
inventoriesListSee inventories0.6

error

NameTypeDescriptionStarting Version
codeStringError code number, a globally unique identifier for the error, for example SYS.1000, HOST.10010.6
descriptionStringBrief description of the error0.6
detailsStringDetailed error information0.6
elaborationStringReserved field, defaults to null0.6
opaqueLinkedHashMapReserved field, defaults to null0.6
causeErrorCodeRoot error: the source error that caused the current error. If there is no original error, this field is null0.6

inventories

NameTypeDescriptionStarting Version
uuidStringThe UUID of the resource, uniquely identifying the resource0.6
vmInstanceUuidStringThe VM instance UUID0.6
l3NetworkUuidStringThe Distributed Port Group UUID0.6
ipString 0.6
macString 0.6
hypervisorTypeString 0.6
netmaskString 0.6
gatewayString 0.6
metaDataString 0.6
ipVersionIntegerThe IP version number3.1.0
driverTypeString 0.6
internalNameString 0.6
deviceIdInteger 0.6
typeString 0.6
stateStringThe NIC state0.6
createDateTimestampThe creation time0.6
lastOpDateTimestampThe last modification time0.6
usedIpsListSee usedIps0.6

usedIps

NameTypeDescriptionStarting Version
uuidStringThe UUID of the resource, uniquely identifying the resource0.6
ipRangeUuidStringThe IP range UUID0.6
l3NetworkUuidStringThe Distributed Port Group UUID0.6
ipVersionIntegerThe IP version number3.1.0
ipStringThe IP address0.6
netmaskStringThe netmask0.6
gatewayStringThe gateway address0.6
usedForString 0.6
ipInLonglong 0.6
vmNicUuidStringThe VM NIC UUID3.1.0
createDateTimestampThe creation time0.6
lastOpDateTimestampThe last modification time0.6

SDK Examples

Java SDK

GetCandidateVmNicForSecurityGroupAction action = new GetCandidateVmNicForSecurityGroupAction();
action.securityGroupUuid = "d11a80c9d7ba32ad97e2bca9c0dba6a9";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetCandidateVmNicForSecurityGroupAction.Result res = action.call();

Python SDK

action = GetCandidateVmNicForSecurityGroupAction()
action.securityGroupUuid = "d11a80c9d7ba32ad97e2bca9c0dba6a9"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()