--- title: "createPlacementGroup" slug: "compute-vserver-server-placementgroup-createplacementgroup" updated: 2026-09-17T09:57:39Z published: 2026-09-17T09:57:39Z canonical: "api.ncloud-docs.com/compute-vserver-server-placementgroup-createplacementgroup" --- > ## Documentation Index > Fetch the complete documentation index at: https://api.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # createPlacementGroup VPC環境で利用できます。 サーバインスタンス(VM)が属する物理配置グループ(Placement Group)を作成します。 ## リクエスト リクエスト形式を説明します。リクエスト形式は次の通りです。 | メソッド | URI | | --- | --- | | GET \| POST | /vserver/v2/createPlacementGroup | 参考 ガイドは GETメソッドを基準に説明します。POSTメソッドの呼び出しテストは、NAVERクラウドプラットフォームコンソールの API Gatewayサービスの Swaggerで行えます。 ### リクエストヘッダ Server APIで共通して使用されるヘッダの詳細は、[Serverのリクエストヘッダ](/docs/ja/compute-vserver#%EC%9A%94%EC%B2%AD%ED%97%A4%EB%8D%94)をご参照ください。 ### リクエストクエリパラメータ リクエストクエリパラメータの説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `regionCode` | String | Optional | リージョンコード - [getRegionList](/docs/ja/compute-vserver-server-common-getregionlist)を参照 - 照会結果の最初のリージョン(デフォルト) | | `placementGroupName` | String | Optional | 物理配置グループ名 - 入力しないと自動作成 (デフォルト) - 英字の小文字、数字、記号の「-」を組み合わせて3~30文字以内で入力 | | `placementGroupTypeCode` | String | Optional | 物理配置グループタイプ - `AA`: Anti-Affinityタイプ (有効値) | | `responseFormatType` | String | Optional | レスポンスデータの形式 - `xml`(デフォルト) \| `json` | ### リクエスト例 リクエストのサンプルコードは次の通りです。 ``` curl --location --request GET 'https://ncloud.apigw.ntruss.com/vserver/v2/createPlacementGroup ?regionCode=KR &placementGroupName=test-*** &placementGroupTypeCode=AA &responseFormatType=json' \ --header 'x-ncp-apigw-timestamp: {Timestamp}' \ --header 'x-ncp-iam-access-key: {Access Key}' \ --header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' ``` ## レスポンス レスポンス形式を説明します。 ### レスポンスボディ レスポンスボディの説明は次の通りです。 | フィールド | タイプ | 必須の有無 | 説明 | | --- | --- | --- | --- | | `createPlacementGroupResponse` | Object | - | レスポンス結果 - [PlacementGroupList](/docs/ja/common-vapidatatype-placementgrouplist)を参照 | | `createPlacementGroupResponse.requestId` | String | - | リクエスト ID - UUID形式 | | `createPlacementGroupResponse.returnCode` | String | - | レスポンスコード | | `createPlacementGroupResponse.returnMessage` | String | - | レスポンスメッセージ | ### レスポンスステータスコード Server APIで共通して使用されるレスポンスステータスコードの詳細は、[Serverのレスポンスステータスコード](/docs/ja/compute-vserver#%EC%9D%91%EB%8B%B5%EC%83%81%ED%83%9C%EC%BD%94%EB%93%9C)をご参照ください。 ### レスポンス例 レスポンスのサンプルコードは次の通りです。 ``` { "createPlacementGroupResponse": { "totalRows": 1, "placementGroupList": [ { "placementGroupNo": "***61", "placementGroupName": "test-***", "placementGroupType": { "code": "AA", "codeName": "Anti-Affinity" } } ], "requestId": "ecf3470f-bb82-4843-b5d5-a606e52ecf53", "returnCode": "0", "returnMessage": "success" } } ```