Available in VPC
Get the list of network interfaces.
Syntax
The getNetworkInterfaceList syntax is as follows:
./ncloud vserver getNetworkInterfaceList \
[--subnetName <subnet-name>] \
[--networkInterfaceNoList <nic-no-list>] \
[--networkInterfaceName <nic-name>] \
[--networkInterfaceStatusCode <SET|UNSET|USED|NOTUSED>] \
[--ip <ip>] \
[--secondaryIpList <secondary-ip-list>] \
[--isDefault <true|false>] \
[--deviceName <eth0|eth1|eth2>] \
[--instanceNo <instance-no>] \
[--serverName <server-name>] \
[--pageNo <page-no>] \
[--pageSize <page-size>] \
[--regionCode <KR|SGN|JPN>] \
[--output <json|xml>]
Options
This section describes the options available when running getNetworkInterfaceList.
Required options
The following options are required for getNetworkInterfaceList.
| Options | Type | Required | Description |
|---|---|---|---|
--pageSize |
Integer | Conditional | Number of items per page
|
Optional options
These are the optional options for getNetworkInterfaceList. Options that are not specified will use their default values.
| Options | Type | Required | Description |
|---|---|---|---|
--subnetName |
String | Optional | Subnet name
|
--networkInterfaceNoList |
List | Optional | Network interface number list
|
--networkInterfaceName |
String | Optional | Network interface name |
--networkInterfaceStatusCode |
String | Optional | Network interface status code.
|
--ip |
String | Optional | IP address |
--secondaryIpList |
List | Optional | Secondary IP address list
|
--isDefault |
Boolean | Optional | Whether it is a default network interface
|
--deviceName |
String | Optional | Device name
|
--instanceNo |
String | Optional | Instance ID |
--serverName |
String | Optional | Assigned server name |
--pageNo |
Integer | Optional | Page number
|
Common options
For information about the options common to all vserver subcommands, see Server (VPC) options.
Examples
If the request to retrieve the list of network interfaces is successful, the identification information and network configuration for each network interface are returned.
Command
The command example is as follows:
./ncloud vserver getNetworkInterfaceList \
--subnetName private-subnet \
--networkInterfaceNoList 56789013 56789014 \
--networkInterfaceStatusCode USED \
--isDefault true \
--deviceName eth0 \
--pageNo 1 \
--pageSize 10 \
--regionCode KR \
--output json
Output
The output example is as follows:
{
"getNetworkInterfaceListResponse": {
"totalRows": 2,
"networkInterfaceList": [
{
"networkInterfaceNo": "56789013",
"networkInterfaceName": "nic-56789013",
"subnetNo": "23456789",
"deleteOnTermination": true,
"isDefault": true,
"deviceName": "eth0",
"networkInterfaceStatus": {
"code": "USED",
"codeName": "In use"
},
"instanceType": {
"code": "VSVR",
"codeName": "Server (VPC)"
},
"instanceNo": "34567891",
"ip": "192.0.2.12",
"macAddress": "F2:20:AF:00:00:02",
"enableFlowLog": false,
"accessControlGroupNoList": [
"67890123"
],
"networkInterfaceDescription": "",
"secondaryIpList": []
},
{
"networkInterfaceNo": "56789014",
"networkInterfaceName": "nic-56789014",
"subnetNo": "23456789",
"deleteOnTermination": true,
"isDefault": true,
"deviceName": "eth0",
"networkInterfaceStatus": {
"code": "USED",
"codeName": "In use"
},
"instanceType": {
"code": "VSVR",
"codeName": "Server (VPC)"
},
"instanceNo": "34567890",
"ip": "192.0.2.6",
"macAddress": "F2:20:AF:00:00:03",
"enableFlowLog": false,
"accessControlGroupNoList": [
"67890123"
],
"networkInterfaceDescription": "",
"secondaryIpList": []
}
],
"requestId": "c2d3e4f5-6789-0123-cdef-234567890123",
"returnCode": "0",
"returnMessage": "success"
}
}