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

VPC環境で利用できます。

サーバインスタンスに割り当てられたネットワークインターフェースを解除します。サーバインスタンスの基本ネットワークインターフェースは解除できません。

構文

detachNetworkInterface構文は次の通りです。

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

オプション

detachNetworkInterfaceの実行時に指定できるオプションについて説明します。

必須オプション

detachNetworkInterfaceの必須オプションです。

オプション タイプ 必須の有無 説明
--subnetNo String Required Subnet番号
--networkInterfaceNo String Required ネットワークインターフェース番号
--serverInstanceNo String Required サーバインスタンス番号

共通オプション

vserverコマンドで共通して使用するオプションについては、Server (VPC)のオプションをご参照ください。

ネットワークインターフェースの解除リクエストが成功すると、ネットワークインターフェースの最新情報が返されます。

コマンド

コマンドの例は次の通りです。

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

出力

出力の例は次の通りです。

{
  "detachNetworkInterfaceResponse": {
    "totalRows": 1,
    "networkInterfaceList": [
      {
        "networkInterfaceNo": "56789012",
        "networkInterfaceName": "test-nic-01",
        "subnetNo": "23456789",
        "deleteOnTermination": false,
        "isDefault": false,
        "deviceName": "eth1",
        "networkInterfaceStatus": {
          "code": "UNSET",
          "codeName": "解除中"
        },
        "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"
  }
}