サーバーグループ内のバックエンドサーバーを置き換えます。
操作説明
ReplaceServersInServerGroup 操作は非同期です。この操作を呼び出した後、システムはリクエスト ID を返しますが、バックエンドサーバーはまだ置き換えられていません。置換タスクはバックグラウンドで実行され続けます。
-
ListServerGroups を呼び出して、サーバーグループのステータスをクエリできます。
サーバーグループが 設定中 状態の場合、サーバーグループが変更中であることを示します。
サーバーグループが 利用可能 状態の場合、サーバーグループが実行中であることを示します。
-
ListServerGroupServers を呼び出して、バックエンドサーバーのステータスをクエリできます。
バックエンドサーバーが 置換中 状態の場合、サーバーグループがサーバーを削除し、新しいサーバーを追加中であることを示します。
バックエンドサーバーが 利用可能 状態の場合、サーバーが実行中であることを示します。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
alb:ReplaceServersInServerGroup |
update |
*ServerGroup
NetworkInterface
Instance
ContainerGroup
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| ServerGroupId |
string |
必須 |
サーバーグループの ID。 説明
Fc タイプのサーバーグループではこの操作を実行できません。 |
sgp-5114d593o96qxy**** |
| AddedServers |
array<object> |
必須 |
追加するバックエンドサーバー。各呼び出しで最大 200 台のサーバーを指定できます。 |
|
|
object |
任意 |
バックエンドサーバーの構成。 |
||
| Description |
string |
任意 |
バックエンドサーバーの説明。説明は 2~256 文字で、http:// または https:// で始めることはできません。 |
test |
| Port |
integer |
必須 |
サーバーグループで使用するポートです。値の範囲は 1~65535 です。1 回の呼び出しで最大 200 台のサーバーを指定できます。 |
80 |
| ServerId |
string |
必須 |
バックエンドサーバー ID。
説明
Fc タイプのサーバーグループではこの操作を実行できません。ListServerGroups 操作を呼び出して、サーバーグループのタイプをクエリできます。 |
i-bp1f9kdprbgy9uiu**** |
| ServerIp |
string |
任意 |
バックエンドサーバーの IP アドレス。 ServerType が Eni に設定されている場合、ENI (Elastic Network Interface) のプライマリまたはセカンダリプライベート IP アドレスを指定できます。 |
192.168.1.1 |
| ServerType |
string |
必須 |
サーバーグループに追加するバックエンドサーバーのタイプ。有効な値:
|
Ecs |
| Weight |
integer |
任意 |
バックエンドサーバーの重み。 有効な値:0~100。デフォルト値:100。重みが 0 に設定されている場合、リクエストはバックエンドサーバーに転送されません。 |
100 |
| RemovedServers |
array<object> |
必須 |
削除するバックエンドサーバー。 |
|
|
object |
任意 |
削除するバックエンドサーバーの構成。 |
||
| ServerId |
string |
必須 |
バックエンドサーバー ID。
説明
Fc タイプのサーバーグループではこの操作を実行できません。ListServerGroups 操作を呼び出して、サーバーグループのタイプをクエリできます。 |
i-bp1f9kdprbgy9uiu**** |
| ServerIp |
string |
任意 |
バックエンドサーバーの IP アドレス。 ServerType が Eni に設定されている場合、ENI (Elastic Network Interface) のプライマリまたはセカンダリプライベート IP アドレスを指定できます。 |
192.168.1.12 |
| ServerType |
string |
必須 |
バックエンドサーバーのタイプ。有効な値:
|
ecs |
| Port |
integer |
必須 |
バックエンドサーバーのポート。有効な値:1~65535。 |
81 |
| ClientToken |
string |
任意 |
リクエストのべき等性を保証するために使用されるクライアントトークン。 クライアントを使用してトークンを生成できますが、異なるリクエスト間でトークンが一意であることを確認する必要があります。トークンには ASCII 文字のみを含めることができます。 説明
このパラメーターを指定しない場合、システムは自動的に 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. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。