GetCandidateInterfaceVlanIds
API Request
URLs
GET zstack/v1/host/network-interface-vlan-idsHeaders
Authorization: OAuth the-session-uuidCurl示例
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/host/network-interface-vlan-ids?interfaceUuids=d25e83af6ccf3d9ca8baa1702861a0c8&limit=1000&start=0参数列表
| Name | Type | Location | Description | Optional Value | Starting Version |
|---|---|---|---|---|---|
| interfaceUuids | List | query | The NIC port UUIDs | 4.7.11 | |
| limit | Integer | query | 4.7.11 | ||
| start | Integer | query | 4.7.11 | ||
| systemTags | List | query | Optional. The system tags. | 4.7.11 | |
| userTags | List | query | Optional. The user tags. | 4.7.11 |
API Response
Sample
Response
{
"vlanIds": [
1010,
1011,
10,
11,
2000,
1101,
1110,
1108,
1107,
1109,
1106,
1103,
1102,
1105,
1104,
0
],
"success": true
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| vlanIds | List | The Vlan interface ID list. | 4.7.11 |
| success | boolean | 4.7.11 | |
| error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error | 4.7.11 |
#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. | 4.7.11 |
| description | String | The brief description of the error. | 4.7.11 |
| details | String | The details about the error. | 4.7.11 |
| elaboration | String | The reserved field. Default value: null. | 4.7.11 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 4.7.11 |
| cause | ErrorCode | The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. | 4.7.11 |
SDK Sample
Java
SDK
GetCandidateInterfaceVlanIdsAction action = new GetCandidateInterfaceVlanIdsAction();
action.interfaceUuids = asList("d25e83af6ccf3d9ca8baa1702861a0c8");
action.limit = 1000;
action.start = 0;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetCandidateInterfaceVlanIdsAction.Result res = action.call();Python
SDK
GetCandidateInterfaceVlanIdsAction action = GetCandidateInterfaceVlanIdsAction()
action.interfaceUuids = [d25e83af6ccf3d9ca8baa1702861a0c8]
action.limit = 1000
action.start = 0
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetCandidateInterfaceVlanIdsAction.Result res = action.call()