GetCandidateVmNicForSecurityGroup
API Request
URLs
GET zstack/v1/security-groups/{securityGroupUuid}/vm-instances/candidate-nics
Headers
Authorization: OAuth the-session-uuid
Curl
Sample
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
Request Parameters
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
securityGroupUuid | String | url | The security group UUID. | 0.6 | |
systemTags | List | query | Optional. The system tags. | 0.6 | |
userTags | List | query | Optional. The user tags. | 0.6 |
API Response
Sample
Response
{
"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
}
]
}
Name | Type | Description | Starting Version |
---|---|---|---|
error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 0.6 |
inventories | List | See inventories. | 0.6 |
#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. | 0.6 |
description | String | The brief description of the error. | 0.6 |
details | String | The details about the error. | 0.6 |
elaboration | String | The reserved field. Default value: null. | 0.6 |
opaque | LinkedHashMap | The reserved field. Default value: null. | 0.6 |
cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 0.6 |
#inventories
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The resource UUID. | 0.6 |
vmInstanceUuid | String | The VM instance UUID. | 0.6 |
l3NetworkUuid | String | The L3 network UUID. | 0.6 |
ip | String | 0.6 | |
mac | String | 0.6 | |
netmask | String | 0.6 | |
gateway | String | 0.6 | |
metaData | String | 0.6 | |
ipVersion | Integer | The IP version. | 3.1.0 |
deviceId | Integer | 0.6 | |
createDate | Timestamp | The creation date. | 0.6 |
lastOpDate | Timestamp | The last operation date. | 0.6 |
usedIps | List | See usedIps. | 0.6 |
#usedIps
Name | Type | Description | Starting Version |
---|---|---|---|
uuid | String | The resource UUID. | 0.6 |
ipRangeUuid | String | The IP range UUID. | 0.6 |
l3NetworkUuid | String | The L3 network UUID. | 0.6 |
ipVersion | Integer | The IP version. | 3.1.0 |
ip | String | The IP address. | 0.6 |
netmask | String | The netmask. | 0.6 |
gateway | String | The gateway. | 0.6 |
usedFor | String | 0.6 | |
ipInLong | long | 0.6 | |
vmNicUuid | String | The VM NIC UUID. | 3.1.0 |
createDate | Timestamp | The creation date. | 0.6 |
lastOpDate | Timestamp | The last operation date. | 0.6 |
SDK Sample
Java
SDK
GetCandidateVmNicForSecurityGroupAction action = new GetCandidateVmNicForSecurityGroupAction();
action.securityGroupUuid = "4060760487504ea3b1ad25bcbabacff5";
action.sessionId = "488b3f4cc8ea4868ab0a7874c4d6358e";
GetCandidateVmNicForSecurityGroupAction.Result res = action.call();
Python
SDK
GetCandidateVmNicForSecurityGroupAction action = GetCandidateVmNicForSecurityGroupAction()
action.securityGroupUuid = "c30e353b2fe0408ca3ee09a5495b5fa4"
action.sessionId = "acaa2edf939e47b1a399b413f6b26400"
GetCandidateVmNicForSecurityGroupAction.Result res = action.call()