指定されたリージョンにサーバーグループを作成します。
操作説明
CreateServerGroup は非同期操作です。リクエストを送信すると、システムはリクエスト ID を返します。Network Load Balancer (NLB) インスタンスのサーバーグループはバックグラウンドで作成されます。GetJobStatus 操作を呼び出して、サーバーグループの作成ステータスをクエリできます。
タスクステータスが Succeeded の場合、サーバーグループは作成済みです。
タスクステータスが Processing の場合、サーバーグループは作成中です。この状態では、クエリ操作のみ実行できます。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
nlb:CreateServerGroup |
create |
*ServerGroup
*VPC
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| ServerGroupType |
string |
任意 |
サーバーグループのタイプ。有効値:
|
Instance |
| ServerGroupName |
string |
必須 |
サーバーグループの名前。 名前は長さが 2~128 文字で、先頭は英字である必要があります。数字、ピリオド (.)、アンダースコア (_)、ハイフン (-) を使用できます。 |
NLB_ServerGroup |
| AddressIPVersion |
string |
任意 |
IP バージョン。有効値:
|
ipv4 |
| Protocol |
string |
任意 |
デュアルスタックモードのトラフィックスケジューリングポリシー。有効値:
説明
このパラメーターは、AddressIPVersion が DualStack に設定されている場合にのみ適用されます。 |
TCP |
| VpcId |
string |
必須 |
バックエンドサーバーにリクエストを転送するためのプロトコル。有効値:
説明
|
vpc-bp15zckdt37pq72zv**** |
| AnyPortEnabled |
boolean |
任意 |
サーバーグループが配置されている VPC の ID。 説明
ServerGroupType が Instance に設定されている場合、この VPC 内のサーバーのみをサーバーグループに追加できます。 |
false |
| ConnectionDrainEnabled |
boolean |
任意 |
全ポート転送を有効にするかどうかを指定します。有効値:
|
false |
| ConnectionDrainTimeout |
integer |
任意 |
接続ドレインを有効にするかどうかを指定します。有効値:
|
10 |
| Scheduler |
string |
任意 |
接続ドレインのタイムアウト時間 (秒単位)。有効値は 0~900 です。 |
Wrr |
| PreserveClientIpEnabled |
boolean |
任意 |
スケジューリングアルゴリズム。有効値:
説明
QUIC ID ハッシュは、バックエンドプロトコルが UDP の場合にのみサポートされます。 |
true |
| HealthCheckConfig |
object |
任意 |
クライアント IP の永続化を有効にするかどうかを指定します。有効値:
説明
Protocol が TCP に設定され、このパラメーターが true に設定されている場合、サーバーグループは TCPSSL リスナーに関連付けることはできません。 |
|
| HealthCheckEnabled |
boolean |
任意 |
|
true |
| HealthCheckType |
string |
任意 |
|
TCP |
| HealthCheckConnectPort |
integer |
任意 |
|
0 |
| HealthyThreshold |
integer |
任意 |
|
2 |
| UnhealthyThreshold |
integer |
任意 |
|
2 |
| HealthCheckConnectTimeout |
integer |
任意 |
|
5 |
| HealthCheckInterval |
integer |
任意 |
|
5 |
| HealthCheckDomain |
string |
任意 |
|
$SERVER_IP |
| HealthCheckUrl |
string |
任意 |
|
/test/index.html |
| HealthCheckHttpCode |
array |
任意 |
|
|
|
string |
任意 |
|
http_2xx |
|
| HttpCheckMethod |
string |
任意 |
|
GET |
| HealthCheckReq |
string |
任意 |
|
hello |
| HealthCheckExp |
string |
任意 |
|
ok |
| HealthCheckHttpVersion |
string |
任意 |
|
HTTP1.0 |
| ResourceGroupId |
string |
任意 |
ヘルスチェックの設定。 |
rg-atstuj3rtop**** |
| DryRun |
boolean |
任意 |
サーバーグループが属するリソースグループの ID。 |
true |
| ClientToken |
string |
任意 |
ドライランを実行するかどうかを指定します。有効値:
|
123e4567-e89b-12d3-a456-426655440000 |
| RegionId |
string |
任意 |
リクエストのべき等性を保証するために使用されるクライアントトークン。 クライアント側で値を生成します。各リクエストで値が一意であることを確認してください。ClientToken パラメーターは ASCII 文字のみをサポートします。 説明 このパラメーターを指定しない場合、システムは API リクエストの RequestId を ClientToken として使用します。RequestId は API リクエストごとに一意です。 |
cn-hangzhou |
| Tag |
array<object> |
任意 |
Network Load Balancer (NLB) インスタンスがデプロイされているリージョンの ID。 DescribeRegions 操作を呼び出してリージョン ID を取得します。 |
|
|
object |
任意 |
|
||
| Key |
string |
任意 |
|
env |
| Value |
string |
任意 |
|
product |
| IpVersionAffinityMode |
string |
任意 |
タグ。 |
Affinity |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
サーバーグループが作成されました。 |
||
| RequestId |
string |
リクエスト ID。 |
54B48E3D-DF70-471B-AA93-08E683A1B45 |
| ServerGroupId |
string |
サーバーグループ ID。 |
sgp-atstuj3rtoptyui**** |
| JobId |
string |
非同期タスクの ID。 |
72dcd26b-f12d-4c27-b3af-18f6aed5**** |
例
成功レスポンス
JSONJSON
{
"RequestId": "54B48E3D-DF70-471B-AA93-08E683A1B45",
"ServerGroupId": "sgp-atstuj3rtoptyui****",
"JobId": "72dcd26b-f12d-4c27-b3af-18f6aed5****"
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | IllegalParam.AnyPortServerGroupConflictWithHealthCheckConfig | The param of AnyPortServerGroupConflictWithHealthCheckConfig is illegal. | |
| 400 | IllegalParamFormat.ParseCreateRsPoolRequestFailed | The param format of CreateRsPoolRequest is illegal. | |
| 400 | IllegalParam.PreserveClientIpSwitch | The param of PreserveClientIpSwitch is illegal. | |
| 400 | OperationDenied.VpcNotSupportIpv6 | The operation is not allowed because of VpcNotSupportIpv6. | |
| 400 | IllegalParam.healthCheckDomain | The parameter of healthCheckConfig.healthCheckDomain is illegal. | |
| 400 | OperationDenied.UidNotAllowQuic29 | The operation is not allowed because of uid not allow quic29 version. | |
| 400 | IlleagalParam.healthCheckUrl | The parameter of healthCheckUrl in healthCheckConfig is illegal. | |
| 400 | IllegalParam.ServerGroupName | The param of ServerGroupName is illegal. | |
| 400 | DryRunOperation | Request validation has been passed with DryRun flag set. | 日文说明6 |
| 400 | MissingParam.%s | The parameter of %s is missing. | |
| 400 | IllegalParam.ConnectionDrainTimeout | The param of ConnectionDrainTimeout is illegal. | |
| 400 | IllegalParam | The param of %s is illegal. | |
| 400 | SystemBusy | System is busy, please try again later. | |
| 400 | QuotaExceeded.QuotaInsufficient | The quota of %s is exceeded, usage %s/%s. | |
| 403 | Forbidden.NoPermission | Authentication is failed for NoPermission. | |
| 404 | ResourceNotFound.Vpc | The specified resource of Vpc is not found. | |
| 404 | ResourceNotFound.ResourceGroup | The param of resourceGroup not existed. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。