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.

detachNetworkInterface

Prev Next

Available in VPC

It releases the network interface assigned to the server instance. The default network interface of server instance cannot be released.

Syntax

The detachNetworkInterface syntax is as follows:

./ncloud vserver detachNetworkInterface \
    --subnetNo <subnet-no> \
    --networkInterfaceNo <nic-no> \
    --serverInstanceNo <server-instance-no> \
    [--regionCode <KR|SGN|JPN>] \
    [--output <json|xml>]

Options

This section describes the options available when running detachNetworkInterface.

Required options

The following options are required for detachNetworkInterface.

Options Type Required Description
--subnetNo String Required Subnet number
--networkInterfaceNo String Required Network interface number
--serverInstanceNo String Required Server instance number

Common options

For information about the options common to all vserver subcommands, see Server (VPC) options.

Examples

If the request to release the network interface is successful, the latest information about the network interface is returned.

Command

The command example is as follows:

./ncloud vserver detachNetworkInterface \
    --subnetNo 23456789 \
    --networkInterfaceNo 56789012 \
    --serverInstanceNo 34567890 \    
    --regionCode KR \
    --output json

Output

The output example is as follows:

{
  "detachNetworkInterfaceResponse": {
    "totalRows": 1,
    "networkInterfaceList": [
      {
        "networkInterfaceNo": "56789012",
        "networkInterfaceName": "test-nic-01",
        "subnetNo": "23456789",
        "deleteOnTermination": false,
        "isDefault": false,
        "deviceName": "eth1",
        "networkInterfaceStatus": {
          "code": "UNSET",
          "codeName": "Removing"
        },
        "instanceNo": "34567890",
        "ip": "192.0.2.10",
        "macAddress": "F2:20:AF:00:00:01",
        "enableFlowLog": false,
        "accessControlGroupNoList": [],
        "networkInterfaceDescription": "Test network interface",
        "secondaryIpList": [
          "192.0.2.14",
          "192.0.2.11"
        ]
      }
    ],
    "requestId": "6c345678-9012-3456-6789-234567890123",
    "returnCode": "0",
    "returnMessage": "success"
  }
}