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.

unassignSecondaryIps

Prev Next

VPC環境で利用できます。

ネットワークインターフェースに割り当てられた Secondary IPアドレスを解除します。

構文

unassignSecondaryIps構文は次の通りです。

./ncloud vserver unassignSecondaryIps \
    --networkInterfaceNo <nic-no> \
    --secondaryIpList <secondary-ip-list> \
    [--regionCode <KR|SGN|JPN>] \
    [--output <json|xml>]

オプション

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

必須オプション

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

オプション タイプ 必須の有無 説明
--networkInterfaceNo String Required ネットワークインターフェース番号
--secondaryIpList List Required Secondary IPアドレスリスト
  • getNetworkInterfaceListを参照
  • スペースで区切って複数入力可能 (例: --secondaryIpList 192.168.0.1 192.168.0.2)

共通オプション

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

ネットワークインターフェースでの Secondary IPアドレスの解除リクエストが成功すると、ネットワークインターフェースの構成情報と Secondary IPアドレスリストが返されます。

コマンド

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

./ncloud vserver unassignSecondaryIps \
    --networkInterfaceNo 56789012 \
    --secondaryIpList 192.0.2.13 \
    --regionCode KR \
    --output json

出力

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

{
  "unassignSecondaryIpsResponse": {
    "totalRows": 1,
    "networkInterfaceList": [
      {
        "networkInterfaceNo": "56789012",
        "networkInterfaceName": "test-nic-01",
        "subnetNo": "23456789",
        "deleteOnTermination": false,
        "isDefault": false,
        "deviceName": "eth1",
        "networkInterfaceStatus": {
          "code": "SET",
          "codeName": "設定中"
        },
        "instanceType": {
          "code": "VSVR",
          "codeName": "Server (VPC)"
        },
        "instanceNo": "34567890",
        "ip": "192.0.2.10",
        "macAddress": "F2:20:AF:00:00:01",
        "enableFlowLog": false,
        "accessControlGroupNoList": [
          "67890123"
        ],
        "networkInterfaceDescription": "Test network interface",
        "secondaryIpList": [
          "192.0.2.14",
          "192.0.2.11"
        ]
      }
    ],
    "requestId": "28901234-5678-9012-2345-890123456789",
    "returnCode": "0",
    "returnMessage": "success"
  }
}