Documentation Index

Fetch the complete documentation index at: https://cli.ncloud-docs.com/llms.txt

Use this file to discover all available pages before exploring further.

getNetworkInterfaceList

Prev Next

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
  • 1-1000 (default: 1)
  • Required when entering pageNo

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
  • You can enter multiple items separated by spaces. (e.g., --networkInterfaceNoList 1234 2345)
--networkInterfaceName String Optional Network interface name
--networkInterfaceStatusCode String Optional Network interface status code.
  • SET | UNSET | USED | NOTUSED
    • SET: Configuring
    • UNSET: Removing
    • USED: In use
    • NOTUSED: Not used
--ip String Optional IP address
--secondaryIpList List Optional Secondary IP address list
  • You can enter multiple items separated by spaces. (e.g., --secondaryIpList 192.168.0.1 192.168.0.2)
--isDefault Boolean Optional Whether it is a default network interface
  • true | false
    • true: Default network interface
    • false: Not a default network interface
--deviceName String Optional Device name
  • eth0 | eth1 | eth2
--instanceNo String Optional Instance ID
--serverName String Optional Assigned server name
--pageNo Integer Optional Page number
  • 0-N (default: 0)
  • First page: Enter 0 or 1.

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"
  }
}