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.

getCloudMssqlTargetSubnetList

Prev Next

VPC環境で利用できます。

Cloud DB for MSSQLで使用可能な Subnetリストを照会します。

構文

getCloudMssqlTargetSubnetList構文は次の通りです。

./ncloud vmssql getCloudMssqlTargetSubnetList \
    --vpcNo <vpc-no> \
    --cloudMssqlImageProductCode <image-product-code> \
    [--isPublic <true|false>] \
    [--regionCode <KR|SGN|JPN>] \
    [--output <json|xml>]

オプション

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

必須オプション

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

オプション タイプ 必須の有無 説明
--vpcNo String Required VPC番号
--cloudMssqlImageProductCode String Required Cloud DB for MSSQLイメージ商品コード

任意オプション

getCloudMssqlTargetSubnetListの任意オプションです。指定しない場合、オプションにはデフォルト値が適用されます。

オプション タイプ 必須の有無 説明
--isPublic Boolean Optional Public Subnetかどうか
  • true | false
  • 指定しないと全 Subnetを返す
  • true: Public Subnetのみ照会
  • false: Private Subnetのみ照会

共通オプション

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

Cloud DB for MSSQL Subnetリストの照会リクエストが成功すると、各 Subnetの番号と名前、IPアドレス範囲情報が返されます。

コマンド

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

./ncloud vmssql getCloudMssqlTargetSubnetList \
    --vpcNo 12345678 \
    --cloudMssqlImageProductCode SW.VMSSL.OS.WND64.WINNT.SVR2016.MSSQL.15044401.SE.B100 \
    --isPublic false \
    --regionCode KR \
    --output json

出力

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

{
  "getCloudMssqlTargetSubnetListResponse": {
    "totalRows": 1,
    "targetSubnetList": [
      {
        "subnetNo": "23456789",
        "subnetName": "private-subnet",
        "vpcNo": "12345678",
        "vpcName": "vpc-01",
        "zoneCode": "KR-1",
        "subnet": "10.0.0.0/24",
        "isPublic": false,
        "createdDate": "2026-04-28T13:00:34+0900"
      }
    ],
    "requestId": "d4e5f6a7-b8c9-0123-defa-456789012345",
    "returnCode": "0",
    "returnMessage": "success"
  }
}