GetEipAttachableVmNics
API Request
URLs
GET zstack/v1/eips/{eipUuid}/vm-instances/candidate-nics
Headers
Authorization: OAuth the-session-uuid
Curl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth dd4a7d40a7e246879ea53fff9fb6dc02" \
-X GET http://localhost:8080/zstack/v1/eips/6bd0a6a4e5dd4f618ff314289acc112f/vm-instances/candidate-nics
Request Parameters
Name | Type | Location | Description | Optional Value | Starting Version |
---|---|---|---|---|---|
eipUuid | String | url | Optional. The EIP UUID. | 0.6 | |
vipUuid | String | query | Optional. The VIP 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": "b9d15f91920738cb9c1d3d54c543da87",
"vmInstanceUuid": "426e0bf3909c3049be70e9f621d69cae",
"usedIpUuid": "74f3ce37130c386f8b79d1656285a41b",
"l3NetworkUuid": "cad25a3e482d39e8b428a4f25db07b41",
"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. | 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
GetEipAttachableVmNicsAction action = new GetEipAttachableVmNicsAction();
action.eipUuid = "281f3fe6c8bc42d7a2b7911db8bc8a9b";
action.sessionId = "05d5744919984e6680655fcfc85e6dd9";
GetEipAttachableVmNicsAction.Result res = action.call();
Python
SDK
GetEipAttachableVmNicsAction action = GetEipAttachableVmNicsAction()
action.eipUuid = "998c40730b1b4dd19ca464d7d30f432c"
action.sessionId = "7682cccdd2c74324b1a82232cd730657"
GetEipAttachableVmNicsAction.Result res = action.call()