サーバーグループにバックエンドサーバーを追加します。
操作説明
AddServersToServerGroup は非同期操作です。リクエストを送信すると、システムはリクエスト ID を返しますが、バックエンドサーバーはすぐには追加されません。システムはバックグラウンドでサーバーを追加します。
ListServerGroups を呼び出して、サーバーグループのステータスをクエリします:
サーバーグループが Configuring 状態の場合、サーバーグループの構成が変更されています。
サーバーグループが Available 状態の場合、サーバーグループは実行中です。
ListServerGroupServers を呼び出して、バックエンドサーバーのステータスをクエリします:
バックエンドサーバーが Adding 状態の場合、サーバーグループに追加されています。
バックエンドサーバーが Available 状態の場合、実行中です。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
alb:AddServersToServerGroup |
create |
*ServerGroup
Instance
NetworkInterface
ContainerGroup
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| ServerGroupId |
string |
必須 |
サーバーグループの ID。 |
sgp-atstuj3rtop**** |
| Servers |
array<object> |
必須 |
バックエンドサーバーのリスト。1 回の呼び出しで最大 200 台のサーバーを追加できます。 |
|
|
object |
任意 |
バックエンドサーバー。 |
||
| Description |
string |
任意 |
バックエンドサーバーの説明。説明は 2~256 文字で、http:// または https:// で始めることはできません。 |
test |
| Port |
integer |
任意 |
バックエンドサーバーが使用するポート。有効な値: 1~65535。1 回の呼び出しで最大 200 台のサーバーを追加できます。 説明
このパラメーターは、ServerType が Ecs、Eni、Eci、または Ip に設定されている場合に必須です。ServerType が Fc に設定されている場合、このパラメーターを設定する必要はありません。 |
80 |
| ServerId |
string |
必須 |
バックエンドサーバーの ID。1 回の呼び出しで最大 200 台のサーバーを追加できます。
|
i-uf616vu8me****** |
| ServerIp |
string |
任意 |
バックエンドサーバーの IP アドレス。1 回の呼び出しで最大 200 台のサーバーを追加できます。 ServerType が Eni に設定されている場合、ENI のプライマリプライベート IP アドレスまたはセカンダリプライベート IP アドレスを指定できます。 説明
ServerType が Fc に設定されている場合、このパラメーターを設定する必要はありません。 |
192.168.1.1 |
| ServerType |
string |
必須 |
バックエンドサーバーのタイプ。1 回の呼び出しで最大 200 台のサーバーを追加できます。有効な値:
|
Ecs |
| Weight |
integer |
任意 |
バックエンドサーバーの重み。有効な値: 0~100。デフォルト値: 100。重みを 0 に設定した場合、リクエストはバックエンドサーバーに転送されません。1 回の呼び出しで最大 200 台のサーバーを追加できます。 説明
ServerType が Fc に設定されている場合、このパラメーターを設定する必要はありません。 |
100 |
| RemoteIpEnabled |
boolean |
任意 |
リモート IP 機能を有効にするかどうかを指定します。1 回の呼び出しで最大 200 台のサーバーを追加できます。有効な値:
説明
このパラメーターは、ServerType が Ip に設定されている場合にのみ有効です。 |
false |
| ClientToken |
string |
任意 |
リクエストのべき等性を保証するために使用されるクライアントトークン。 クライアントでトークンを生成して、異なるリクエスト間でトークンが一意であることを確認します。トークンには ASCII 文字のみを含めることができます。 説明
このパラメーターを指定しない場合、システムは自動的にリクエストの RequestId を ClientToken として使用します。各 API リクエストの RequestId は異なる場合があります。 |
593B0448-D13E-4C56-AC0D-FDF0****** |
| DryRun |
boolean |
任意 |
ドライランを実行するかどうかを指定します。有効な値:
|
false |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
返されたデータ。 |
||
| JobId |
string |
非同期タスクの ID。 |
72dcd26b-f12d-4c27-b3af-18f6aed5**** |
| RequestId |
string |
リクエスト ID。 |
365F4154-92F6-4AE4-92F8-7FF34****** |
例
成功レスポンス
JSONJSON
{
"JobId": "72dcd26b-f12d-4c27-b3af-18f6aed5****",
"RequestId": "365F4154-92F6-4AE4-92F8-7FF34******"
}
エラーコード
|
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 | OperationDenied.VpcVportNotFound | The operation is not allowed because of %s. | |
| 400 | IncorrectStatus.Eni | The status of %s [%s] is incorrect. | |
| 400 | ResourceInUse.IP | The specified resource %s is in use. | |
| 400 | OperationDenied.NoAvailableVSwitch | The operation is not allowed because of %s. | |
| 400 | OperationDenied.VgwVipNotFound | The operation is not allowed because of %s. | |
| 400 | OperationDenied.CloudBox | The operation is not allowed because of %s. | |
| 400 | Mismatch.Type | The %s is mismatched for %s and %s. | |
| 400 | Mismatch.VpcId | The %s is mismatched for %s and %s. | |
| 400 | ResourceQuotaExceeded.LoadBalancerServersNum | The quota of %s is exceeded for resource %s, usage %s/%s. | |
| 400 | ResourceInConfiguring | The specified resource of %s is being configured. Please try again later. | |
| 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 | IllegalParam.ServerIp | The param of ServerIp is illegal. | |
| 400 | Mismatch.ServerType | The %s is mismatched for %s and %s. | |
| 400 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | |
| 403 | Forbidden.ServerGroup | Authentication has failed for ServerGroup. | |
| 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. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。