createNetworkInterface

Prev Next

Available in VPC

Overview

Create a network interface.

Request

Request parameters

Parameter name Requirement status Type Restrictions Description
regionCode No String - Region code
You can decide the region in which the network interface will be created.
You can obtain regionCode through the getRegionList action
Default: select the first region of the getRegionList query results
vpcNo Yes String - VPC number
Determines the VPC where the network interface will be created
vpcNo can be obtained via the getVpcList action
subnetNo Yes String - Subnet number
Determines the subnet where the network interface will be created
subnetNo can be obtained via the getSubnetList action
networkInterfaceName No String Min : 3, Max : 30
Only lowercase English letters, numbers, and "-" are allowed, and it must start with an English letter
It must end with an English letter or number
- The name of the network interface to be created
Default: automatically granted by the NAVER Cloud Platform
accessControlGroupNoList.N Yes List<String> Min: 1, Max: 3 - List of ACG numbers to be applied to a network interface
Up to 3 ACGs can be applied
accessControlGroupNo can be obtained via the getAccessControlGroupList action
ex) --accessControlGroupNoList 1234 2345
serverInstanceNo No String - The instance number of server to which the network interface will be assigned
It can only be assigned to a server when the network interface to be created is a network interface of a private subnet
serverInstanceNo can be obtained via the getServerInstanceList action
ip No String - IP Address
You can manually enter the IP address to assign to the network interface
It must be within the IP address range of the subnet where the network interface will be created
The 0–5th and last IP addresses of the subnet cannot be used, and duplicate IP addresses cannot be used in the subnet range
Default: the IP addresses that satisfy the conditions are assigned sequentially
ex) 192.168.0.6
isBareMetal No Boolean - Whether the network interface is for bare metal servers
If it is set to true, a network interface for bare metal is created, and in this case, it can be created when the server is specified. (serverInstanceNo parameter is required)
If it is set to false, a general network interface is created
In a general subnet, it is impossible to create a network interface for bare metal servers
Default: create a general network interface
secondaryIpList.N No List<String> Min: 0, Max: 5 - List of secondary IPs
You can add private IPs that are included in the IP address range of the selected subnet as secondary IPs
Up to 5 secondary IPs including the number of secondaryIpCount can be added
IP addresses already in use in the selected subnet can't be used
You can use the explicit reassignment function through the assignSecondaryIps action after creating a network interface
ex) secondaryIpList.1=192.168.0.1&secondaryIpList.2=192.168.0.2
secondaryIpCount No Integer Min : 0, Max : 5 - Number of automatically assigned secondary IPs
A specified number of secondary IPs can be assigned automatically
Private IPs that are not being used in the selected subnet get assigned sequentially
Up to 5 secondary IPs including the number of secondaryIpList can be added
networkInterfaceDescription No String Min : 0, Max : 1000 Bytes The description of the network interface to be created

Response

Response data type

  • NetworkInterfaceList type
NetworkInterfaceList extends CommonResponse
private Integer totalRows;
private List<NetworkInterface> networkInterfaceList = new ArrayList<>();
NetworkInterface
private String networkInterfaceNo;
private String networkInterfaceName;
private String subnetNo;
private Boolean deleteOnTermination;
private Boolean isDefault;
private String deviceName;
private CommonCode networkInterfaceStatus;
private CommonCode instanceType;
private String instanceNo;
private String ip;
private String macAddress;
private AccessControlGroupNoList accessControlGroupNoList;
private String networkInterfaceDescription;
private SecondaryIpList secondaryIpList;
SecondaryIpList
private List<String> secondaryIpList = new ArrayList<>();

Examples

Request examples

ncloud vserver createNetworkInterface --regionCode KR --vpcNo ***04 --subnetNo ***43 --networkInterfaceName test-*** --accessControlGroupNoList ***63 ***64 --serverInstanceNo ***4299 --ip ***.***.1.7 --secondaryIpList ***.***.1.8 --secondaryIpCount 1

Response examples

<createNetworkInterfaceResponse>
  <requestId>18e8b085-c6bc-4953-9ec7-9cdf43236c59</requestId>
  <returnCode>0</returnCode>
  <returnMessage>success</returnMessage>
  <totalRows>1</totalRows>
  <networkInterfaceList>
    <networkInterface>
      <networkInterfaceNo>***87</networkInterfaceNo>
      <networkInterfaceName>test-***</networkInterfaceName>
      <subnetNo>***43</subnetNo>
      <deleteOnTermination>false</deleteOnTermination>
      <isDefault>false</isDefault>
      <deviceName>eth1</deviceName>
      <networkInterfaceStatus>
        <code>USED</code>
        <codeName>used </codeName>
      </networkInterfaceStatus>
      <instanceType>
        <code>VSVR</code>
        <codeName>Server (VPC)</codeName>
      </instanceType>
      <instanceNo>***4299</instanceNo>
      <ip>***.***.1.7</ip>
      <macAddress>F2:20:***:***:8A:F5</macAddress>
      <accessControlGroupNoList>
        <accessControlGroupNo>***63</accessControlGroupNo>
      </accessControlGroupNoList>
      <networkInterfaceDescription></networkInterfaceDescription>
      <secondaryIpList>
        <secondaryIp>***.***.1.8</secondaryIp>
        <secondaryIp>***.***.1.9</secondaryIp>
      </secondaryIpList>
    </networkInterface>
  </networkInterfaceList>
</createNetworkInterfaceResponse>