プライマリ/セカンダリサーバーグループを作成します。各プライマリ/セカンダリサーバーグループは 2 台のバックエンドサーバーで構成されます。1 台のバックエンドサーバーはプライマリサーバーとして機能し、もう 1 台はセカンダリサーバーとして機能します。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
slb:CreateMasterSlaveServerGroup |
create |
Instance
*LoadBalancer
|
|
なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| RegionId |
string |
必須 |
Classic Load Balancer (CLB) インスタンスのリージョン ID。 |
cn-hangzhou |
| LoadBalancerId |
string |
必須 |
CLB インスタンスの ID。 |
lb-bp1hv944r69al4j****** |
| MasterSlaveServerGroupName |
string |
任意 |
プライマリ/セカンダリサーバーグループの名前。 |
Group1 |
| MasterSlaveBackendServers |
string |
任意 |
プライマリ/セカンダリサーバーグループ内のバックエンドサーバー。各プライマリ/セカンダリサーバーグループは 2 台のバックエンドサーバーで構成されます。 次のパラメーターを設定します。
説明
ENI と Elastic Container Instance は、パフォーマンス専有型 CLB インスタンスのバックエンドサーバーとしてのみ指定できます。
|
[{ "ServerId": "i-xxxxxxxxx", "Weight": "100", "Type": "ecs", "Port":"82","ServerType":"Master","Description":"test-112" }, { "ServerId": "i-xxxxxxxxx", "Weight": "100", "Type": "ecs", "Port":"84","ServerType":"Slave","Description":"test-112" }] |
| Tag |
array<object> |
任意 |
タグ。 |
|
|
object |
任意 |
|||
| Key |
string |
任意 |
タグ N のキー。N の有効値:1~20。タグキーは空の文字列にできません。 タグキーは最大 64 文字で、 |
test |
| Value |
string |
任意 |
タグ N の値。N の有効値:1~20。タグ値は空の文字列にできます。タグ値は最大 128 文字で、 |
1 |
レスポンスフィールド
|
フィールド |
型 |
説明 |
例 |
|
object |
|||
| MasterSlaveServerGroupId |
string |
プライマリ/セカンダリサーバーグループの ID。 |
rsp-bp19au4****** |
| RequestId |
string |
リクエスト ID。 |
7CA4DB76-4D32-523B-822E-5C9494613D46 |
| MasterSlaveBackendServers |
object |
||
| MasterSlaveBackendServer |
array<object> |
プライマリ/セカンダリサーバーグループ内のバックエンドサーバー。 |
|
|
object |
|||
| Type |
string |
バックエンドサーバーのタイプ。有効な値は次のとおりです。
|
ecs |
| Weight |
integer |
バックエンドサーバーの重み。 |
100 |
| Description |
string |
プライマリ/セカンダリサーバーグループの説明。 |
test-112 |
| Port |
integer |
バックエンドサーバーが使用するポート。 |
82 |
| ServerId |
string |
追加するバックエンドサーバーの ID。 |
i-bp1fq61enf4loa5i**** |
| ServerType |
string |
バックエンドサーバーのタイプ。 有効な値:Master および Slave。 |
Master |
例
成功レスポンス
JSONJSON
{
"MasterSlaveServerGroupId": "rsp-bp19au4******",
"RequestId": "7CA4DB76-4D32-523B-822E-5C9******",
"MasterSlaveBackendServers": {
"MasterSlaveBackendServer": [
{
"Type": "ecs",
"Weight": 100,
"Description": "test-112",
"Port": 82,
"ServerId": "i-bp1fq61enf4loa5i****",
"ServerType": "Master"
}
]
}
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 400 | BACKEND_SERVERS_NUM_MUST_BE_TWO | Backend servers num must be 2. | |
| 400 | Mismatched.ZoneId | The zone of the server is not matched with the cloud box loadbalancer. | |
| 400 | BACKEND_SERVERS_HAVE_SAME_PORT_AND_SERVERID | Backend servers have same port and serverId. | |
| 400 | BACKEND_SERVERS_CAN_ONLY_CONTAIN_ONE_MASTER_AND_ONE_SLAVE | Backend servers can only contain one master and one slave. | |
| 400 | BACKEND_SERVER_ID_CAN_NOT_EMPTY | Backend server id can not empty. | |
| 400 | INVALID_SERVER_TYPE | Invalid server type. | |
| 400 | BACKEND_SERVER_PORT_CAN_NOT_EMPTY | Backend server port can not empty. | |
| 400 | RealServerPortNotSupport | Real server port not support. | |
| 400 | OperationUnsupported.CreateMasterSlaveServerGroup | This type of backend server is not allowed to attached to singleTunnel or anyTunnel lb. | |
| 400 | IncorrectStatus.RSByPassToas | %s. | |
| 400 | OperationFailed.ActionNotSupport | The loadbalancer does not support such action. | |
| 400 | RsTunnelIp2VmNameConflict | %s. | |
| 400 | NetworkConflict | %s. | |
| 400 | InvalidParam.TagValue | %s. | |
| 400 | InvalidParam.TagKey | %s. | |
| 400 | SizeLimitExceeded.Tag | %s. | |
| 400 | MissingParam.TagKey | The param MissingParam.TagKey is missing. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。