指定されたサーバーグループにバックエンドサーバーを追加します。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
nlb:AddServersToServerGroup |
create |
*ServerGroup
Instance
NetworkInterface
ContainerGroup
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| ServerGroupId |
string |
必須 |
サーバーグループの ID。 |
sgp-atstuj3rtoptyui**** |
| Servers |
array<object> |
必須 |
追加するバックエンドサーバー。 説明
1 回の呼び出しで最大 200 台のバックエンドサーバーを追加できます。 |
|
|
object |
任意 |
追加するバックエンドサーバー。 説明
1 回の呼び出しで最大 200 台のバックエンドサーバーを追加できます。 |
||
| ServerId |
string |
必須 |
バックエンドサーバーの ID。
|
i-bp67acfmxazb4p**** |
| ServerType |
string |
必須 |
バックエンドサーバーのタイプ。有効な値:
|
Ecs |
| ServerIp |
string |
任意 |
バックエンドサーバーの IP アドレス。サーバーグループのタイプが Ip の場合、ServerId パラメーターを IP アドレスに設定します。 |
192.168.6.6 |
| Port |
integer |
任意 |
バックエンドサーバーがサービスを提供するために使用するポート。有効な値:0~65535。このパラメーターを設定しない場合、デフォルト値の 0 が使用されます。 マルチポートフォワーディングが有効になっている場合、このパラメーターを設定する必要はありません。デフォルト値の 0 が使用されます。NLB はリクエストを要求されたポートに転送します。マルチポートフォワーディングが有効になっているかどうかを確認するには、ListServerGroups 操作を呼び出して、AnyPortEnabled パラメーターの値を確認します。 |
443 |
| Weight |
integer |
任意 |
バックエンドサーバーの重み。有効な値:0~100。デフォルト値:100。このパラメーターを 0 に設定すると、リクエストはサーバーに転送されません。 |
100 |
| Description |
string |
任意 |
バックエンドサーバーの説明。 説明は、長さが 2~256 文字で、文字、数字、コンマ (,)、ピリオド (.)、セミコロン (;)、スラッシュ (/)、アットマーク (@)、アンダースコア (_)、ハイフン (-) を使用できます。 |
ECS |
| RegionId |
string |
任意 |
NLB インスタンスがデプロイされているリージョンの ID。 DescribeRegions 操作を呼び出して、最新のリージョンリストをクエリできます。 |
cn-hangzhou |
| DryRun |
boolean |
任意 |
ドライランを実行するかどうかを指定します。有効な値:
|
false |
| ClientToken |
string |
任意 |
リクエストのべき等性を保証するために使用されるクライアントトークン。 クライアントを使用してトークンを生成できます。トークンが異なるリクエスト間で一意であることを確認してください。ASCII 文字のみが許可されます。 説明
このパラメーターを設定しない場合、RequestId の値が使用されます。RequestId の値はリクエストごとに異なります。 |
123e4567-e89b-12d3-a456-426655440000 |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
RpcResponse |
||
| 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 | Conflict.Lock | The Lock [%s] is conflict. | 日文说明1 |
| 400 | IllegalParam.IP | The param of IP is illegal. | |
| 400 | QuotaExceeded.QuotaInsufficient | The quota of %s is exceeded, usage %s/%s. | |
| 400 | SystemBusy | System is busy, please try again later. | |
| 400 | DuplicatedParam.Server | The param of Server is duplicated. | 日文说明7 |
| 400 | IncorrectStatus.serverGroup | The status of servergroup [%s] is incorrect. | |
| 400 | Mismatch.VpcId | The VpcId is mismatched for %s and %s. | |
| 400 | Mismatch.ServerType | The ServerType is mismatched for %s and %s. | |
| 400 | IllegalParam.RSPortConflictWithServerGroup | The param of RSPortConflictWithServerGroup is illegal. | |
| 400 | TagInvokeError | listTagsByResourceIds: InvalidResourceId.NotFound : The specified ResourceIds are not found in our records. | |
| 400 | ResourceInUse.IP | The specified resource of IP is in use. | |
| 400 | IllegalParam | The param of %s is illegal. | |
| 400 | MissingParam.%s | The parameter of %s is missing. | |
| 400 | IllegalParam.description | The parameter description of server is illegal. | |
| 400 | MissingParam.IP | The param of IP is missing. | |
| 400 | OperationDenied.ServerGroupNotSupportIpv6 | The operation is not allowed because of ServerGroupNotSupportIpv6. | |
| 400 | IncorrectStatus.Eni | Eni status is invalid. | |
| 400 | IdempotenceSignatureMismatch | The idempotence token of request is same with the prev one, but the signature is different. | |
| 400 | Throttling.User | Request was denied due to api flow control. | 日文说明2 |
| 403 | Forbidden.NoPermission | Authentication is failed for NoPermission. | |
| 404 | ResourceNotFound.serverGroup | The specified resource of serverGroup is not found. | |
| 404 | ResourceNotFound.Eci | The specified resource of Eci is not found. | |
| 404 | ResourceNotFound.Ecs | The specified resource of Ecs is not found. | |
| 404 | ResourceNotFound.Eni | The specified resource Eni is not found. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。