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.

createPlacementGroup

Prev Next

VPC環境で利用できます。

サーバインスタンス(VM)が属する物理配置グループ(Placement Group)を作成します。

構文

createPlacementGroup構文は次の通りです。

./ncloud vserver createPlacementGroup \
    [--placementGroupName <placement-group-name>] \
    [--placementGroupTypeCode <AA>] \
    [--regionCode <KR|SGN|JPN>] \
    [--output <json|xml>]

オプション

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

任意オプション

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

オプション タイプ 必須の有無 説明
--placementGroupName String Optional 物理配置グループ名
  • 入力しないと自動作成
  • 英字の小文字、数字、記号の-を組み合わせて3~30文字以内で入力
--placementGroupTypeCode String Optional 物理配置グループタイプ
  • AA: Anti-Affinityタイプ

共通オプション

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

物理配置グループの作成リクエストが成功すると、作成されたグループの識別情報とタイプが返されます。

コマンド

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

./ncloud vserver createPlacementGroup \
    --placementGroupName test-pg-01 \
    --placementGroupTypeCode AA \
    --regionCode KR \
    --output json

出力

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

{
  "createPlacementGroupResponse": {
    "totalRows": 1,
    "placementGroupList": [
      {
        "placementGroupNo": "91234567",
        "placementGroupName": "test-pg-01",
        "placementGroupType": {
          "code": "AA",
          "codeName": "Anti-Affinity"
        }
      }
    ],
    "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "returnCode": "0",
    "returnMessage": "success"
  }
}