QueryEip
API Request
URLs
GET zstack/v1/eips
GET zstack/v1/eips/{uuid}
Headers
Authorization: OAuth the-session-uuid
Curl
Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth ecbf8328397545a890cb7f299016ff65" \
-X GET http://localhost:8080/zstack/v1/eips
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 58e98c60b171447b8c1940b5a8a1ad0f" \
-X GET http://localhost:8080/zstack/v1/eips/66803656d159456dacda9c074945e40d
Queryable Fields
You can check all queryable fields and resource names that can be queried across
tables by using zstack-cli, entering QueryEip
,
and pressing the Tab key.
API Response
Sample
Response
{
"inventories": [
{
"name": "Test-EIP",
"vmNicUuid": "67dfb04014b64489addb9ff7db5c7eb8",
"vipUuid": "e5bafce543e044419a8ffad7d416201e"
}
]
}
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 |
name | String | The resource name. | 0.6 |
description | String | The detailed description of the resource. | 0.6 |
vmNicUuid | String | The VM NIC UUID. | 0.6 |
vipUuid | String | The VIP UUID. | 0.6 |
createDate | Timestamp | The creation date. | 0.6 |
lastOpDate | Timestamp | The last operation date. | 0.6 |
state | String | 0.6 | |
vipIp | String | 0.6 | |
guestIp | String | 0.6 |
SDK Sample
Java SDK
QueryEipAction action = new QueryEipAction();
action.conditions = asList();
action.sessionId = "02a7bb80af0a43ea8cecb01e8361f4a3";
QueryEipAction.Result res = action.call();
Python
SDK
QueryEipAction action = QueryEipAction()
action.conditions = []
action.sessionId = "84b2e52f0e2a41d09b428627b6266f28"
QueryEipAction.Result res = action.call()