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.

getServerProductList

Prev Next

VPC環境で利用できます。

Serverが提供するサーバスペックコードリストを照会します。

構文

getServerProductList構文は次の通りです。

./ncloud vserver getServerProductList \
    --serverImageProductCode <server-product-code> | --memberServerImageInstanceNo <member-server-instance-no> \
    [--zoneCode <zone-code>] \
    [--productCode <product-code>] \
    [--exclusionProductCode <exclusion-product-code>] \    
    [--generationCode <G1|G2>] \
    [--regionCode <KR|SGN|JPN>] \
    [--output <json|xml>]

オプション

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

必須オプション

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

オプション タイプ 必須の有無 説明
--serverImageProductCode String Conditional サーバイメージ商品コード
  • serverImageProductCodeまたはmemberServerImageInstanceNoのいずれかは必ず入力 (両方入力するとmemberServerImageInstanceNoを優先して適用)
  • getServerImageProductListを参照
--memberServerImageInstanceNo String Conditional マイサーバイメージインスタンス番号
  • serverImageProductCodeまたはmemberServerImageInstanceNoのいずれかは必ず入力 (両方入力するとmemberServerImageInstanceNoを優先して適用)
  • getMemberServerImageInstanceListを参照

任意オプション

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

オプション タイプ 必須の有無 説明
--zoneCode String Optional ゾーンコード
--productCode String Optional 照会する Serverスペックコード
--exclusionProductCode String Optional 除外する Serverスペックコード
--generationCode String Optional 世代コード
  • G1 | G2

共通オプション

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

サーバ商品リストの照会リクエストが成功すると、各商品の識別情報とスペックが返されます。

コマンド

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

./ncloud vserver getServerProductList \
    --serverImageProductCode SW.VSVR.OS.LNX64.ROCKY.0810.B050 \
    --zoneCode KR-1 \
    --productCode SVR.VSVR.STAND.C002.M008.NET.SSD.B050.G002 \
    --exclusionProductCode SVR.VSVR.HICPU.C002.M004.NET.HDD.B050.G002 \    
    --generationCode G2 \
    --regionCode KR \
    --output json

出力

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

{
  "getServerProductListResponse": {
    "totalRows": 1,
    "productList": [
      {
        "productCode": "SVR.VSVR.STAND.C002.M008.NET.SSD.B050.G002",
        "productName": "vCPU 2EA, Memory 8GB, [SSD]Disk 50GB",
        "productType": {
          "code": "STAND",
          "codeName": "Standard"
        },
        "productDescription": "vCPU 2EA, Memory 8GB, [SSD]Disk 50GB",
        "infraResourceType": {
          "code": "VSVR",
          "codeName": "Server (VPC)"
        },
        "cpuCount": 2,
        "memorySize": 8589934592,
        "baseBlockStorageSize": 53687091200,
        "diskType": {
          "code": "NET",
          "codeName": "ネットワークストレージ"
        },
        "generationCode": "G2"
      }
    ],
    "requestId": "e5f6a7b8-c9d0-1234-efab-567890123456",
    "returnCode": "0",
    "returnMessage": "success"
  }
}