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"
  }
}