バックエンドサーバーグループ内のバックエンドサーバーを置き換えます。
操作説明
ReplaceServersInServerGroup 操作は非同期です。リクエスト ID が返された後、バックエンドサーバーの置き換えタスクはバックグラウンドで引き続き処理されます。
-
ListServerGroups を呼び出して、サーバーグループのステータスをクエリできます。
サーバーグループが Configuring 状態の場合、サーバーグループは変更済みです。
サーバーグループが Available 状態の場合、サーバーグループは実行中です。
-
ListServerGroupServers を呼び出して、バックエンドサーバーのステータスをクエリできます。
バックエンドサーバーが Replacing 状態の場合、サーバーグループはサーバーを削除し、新しいサーバーを追加しています。
バックエンドサーバーが Available 状態の場合、バックエンドサーバーは実行中です。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
alb:ReplaceServersInServerGroup |
update |
*ServerGroup
NetworkInterface
Instance
ContainerGroup
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| ServerGroupId |
string |
必須 |
サーバーグループの ID。 説明
Function Compute タイプのサーバーグループでは、バックエンドサーバーの置き換えはサポートされていません。 |
sgp-5114d593o96qxy**** |
| AddedServers |
array<object> |
必須 |
追加するバックエンドサーバーのリスト。1 回のリクエストで最大 200 台のサーバーを指定できます。 |
|
|
object |
任意 |
バックエンドサーバーの構造体。 |
||
| Description |
string |
任意 |
バックエンドサーバーの説明。説明の長さは 2~256 文字で、http:// または https:// で始まることはできません。 |
test |
| Port |
integer |
必須 |
バックエンドサーバーグループで使用されるポート。有効な値: 1~65535。1 回のリクエストで最大 200 台のサーバーを指定できます。 |
80 |
| ServerId |
string |
任意 |
バックエンドサーバーの ID。1 回のリクエストで最大 200 台のサーバーを指定できます。
説明
Function Compute タイプのサーバーグループでは、バックエンドサーバーの置き換えはサポートされていません。 ListServerGroups を呼び出して、サーバーグループタイプをクエリできます。 |
i-bp1f9kdprbgy9uiu**** |
| ServerIp |
string |
任意 |
IP アドレス。 ServerType が Eni にセットされている場合、ENI のプライマリ非公開 IP アドレスまたはセカンダリ非公開 IP アドレスを指定できます。 |
192.168.1.1 |
| ServerType |
string |
必須 |
バックエンドサーバーのサーバータイプ。1 回の呼び出しで最大 200 台のサーバーを指定できます。有効な値:
|
Ecs |
| Weight |
integer |
任意 |
バックエンドサーバーの重み。1 回のリクエストで最大 200 台のサーバーを指定できます。 有効な値: 0~100。デフォルト値: 100。重みが 0 に設定されている場合、リクエストはバックエンドサーバーに転送されません。 |
100 |
| RemovedServers |
array<object> |
必須 |
削除するバックエンドサーバー。 |
|
|
object |
任意 |
削除するバックエンドサーバーの構造体。 |
||
| ServerId |
string |
必須 |
バックエンドサーバーの ID。1 回のリクエストで最大 200 台のサーバーを指定できます。
説明
Function Compute タイプのサーバーグループでは、バックエンドサーバーの置き換えはサポートされていません。 ListServerGroups を呼び出して、サーバーグループタイプをクエリできます。 |
i-bp1f9kdprbgy9uiu**** |
| ServerIp |
string |
任意 |
IP アドレス。 ServerType が Eni にセットされている場合、ENI のプライマリ非公開 IP アドレスまたはセカンダリ非公開 IP アドレスを指定できます。 |
192.168.1.12 |
| ServerType |
string |
必須 |
バックエンドサーバーのサーバータイプ。1 回の呼び出しで最大 200 台のサーバーを指定できます。有効な値:
|
ecs |
| Port |
integer |
必須 |
バックエンドサーバーで使用されるポート。有効な値: 1~65535。1 回のリクエストで最大 200 台のサーバーを指定できます。 |
81 |
| ClientToken |
string |
任意 |
リクエストのべき等性を確保するために使用されるクライアントトークン。 異なるリクエスト間で一意性を確保するため、クライアントからパラメーター値を生成してください。ClientToken は ASCII 文字のみをサポートします。 説明
このパラメーターを指定しない場合、システムは API リクエストの RequestId を ClientToken として使用します。RequestId は API リクエストごとに異なる場合があります。 |
593B0448-D13E-4C56-AC0D-FDF0FDE0E9A3 |
| DryRun |
boolean |
任意 |
ドライランを実行するかどうかを指定します。有効な値:
|
true |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
レスポンス構造体。 |
||
| JobId |
string |
非同期タスクの ID。 |
72dcd26b-f12d-4c27-b3af-18f6aed5**** |
| RequestId |
string |
リクエストの ID。 |
365F4154-92F6-4AE4-92F8-7FF34B540710 |
例
成功レスポンス
JSONJSON
{
"JobId": "72dcd26b-f12d-4c27-b3af-18f6aed5****",
"RequestId": "365F4154-92F6-4AE4-92F8-7FF34B540710"
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | ResourceQuotaExceeded.ServerAddedNum | The quota of %s is exceeded for resource %s, usage %s/%s. | |
| 400 | IncorrectStatus.ServerGroup | The status of %s [%s] is incorrect. | |
| 400 | Conflict.BackendServer | There is already %s having the same configuration with %s. | |
| 400 | DuplicatedParam.BackendServer | The param of %s is duplicated. | |
| 400 | OperationDenied.EciNotSupportJobType | The operation is not allowed because of eci not support job type. | |
| 400 | Mismatch.ServerType | The %s is mismatched for %s and %s. | |
| 400 | ResourceInConfiguring | The specified resource of %s is being configured. Please try again later. | |
| 400 | ResourceQuotaExceeded.LoadBalancerServersNum | The quota of %s is exceeded for resource %s, usage %s/%s. | |
| 400 | ResourceInConfiguring.BackendServer | The specified resource of %s is being configured, please try again later. | |
| 400 | IdempotentParameterMismatch | The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical. | |
| 404 | ResourceNotFound.ServerGroup | The specified resource %s is not found. | |
| 404 | ResourceNotFound.Ecs | The specified resource %s is not found. | |
| 404 | ResourceNotFound.Eci | The specified resource %s is not found. | |
| 404 | ResourceNotFound.Eni | The specified resource %s is not found. | |
| 404 | ResourceNotFound.BackendServer | The specified resource %s is not found. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。