説明
マスター/スレーブサーバーグループを作成します。
マスタスレーブには 2 つの ECS インスタンスのみが含まれます。1 つはプライマリバックエンドサーバで、もう 1 つはスタンバイバックエンドサーバで、プライマリバックエンドサーバが転送リクエストを処理できない場合に引き継ぎます。
リクエストパラメータ
名前 | 型 | 必須かどうか | 説明 |
---|---|---|---|
Action | String | はい | 実行するアクション。有効な値: |
RegionId | String | はい | SLB インスタンスが配置されているリージョンの ID 。 |
LoadBalancerId | String | はい | SLB インスタンスの ID。 |
MasterSlaveServerGroupName | String | はい | マスター・スレーブ・サーバー・グループの名前。 |
MasterSlaveBackendServers | JSON String | はい | 追加するマスター/スレーブ・サーバー・グループのリスト。 各グループには、次の形式で 2 つの ECS インスタンスしか追加できません。 こちらで:
|
レスポンスパラメータ
名前 | 型 | 説明 |
---|---|---|
RequestId | String | リクエストの ID。 |
MasterSlaveServerGroupId | String | マスター/スレーブサーバーグループの ID。 |
MasterSlaveBackendServers | JSON String | マスター・スレーブ・サーバー・グループのリスト。 各マスタースレーブサーバーグループには、次の情報を含む 2 つの ECS インスタンスが含まれています。
|
例
リクエストの例
https://slb.aliyuncs.com/?Action=CreateMasterSlaveServerGroup
&RegionId=cn-east-hangzhou-01
&LoadBalancerId=152a602e315-cn-hangzhou-a01
&MasterSlaveServerGroupName=Group1
&MasterSlaveBackendServers=[
{'ServerId':'vm-233','Port':'80','Weight':'100','ServerType':'Master'},
{'ServerId':'vm-232','Port':'90','Weight':'100''ServerType':'Slave'}]
&<CommonParameters>
レスポンスの例
XML 形式
<?xml version="1.0" encoding="utf-8"?>
<CreateMasterSlaveServerGroup>
<RequestId>9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C</RequestId>
<MasterSlaveServerGroupId>rsp-cige6j5e7p</MasterSlaveServerGroupId>
<MasterSlaveBackendServers>
<MasterSlaveBackendServers>
<ServerId>vm-233</ServerId>
<Port>80</Port>
<Weight>100</Weight>
<ServerType>Master</ServerType>
</MasterSlaveBackendServers>
<MasterSlaveBackendServers>
<ServerId>vm-232</ServerId>
<Port>90</Port>
<Weight>100</Weight>
<ServerType>Slave</ServerType>
</MasterSlaveBackendServers>
</MasterSlaveBackendServers>
</CreateMasterSlaveServerGroup>
JSON 形式
{
"RequestId": "9DEC9C28-AB05-4DDF-9A78-6B08EC9CE18C",
"MasterSlaveServerGroupId": "rsp-cige6j5e7p",
"MasterSlaveBackendServers": {
"MasterSlaveBackendServers": [
{
"ServerId": "vm-233",
"Port": "80",
"Weight": "100",
"ServerType": "Master"
},
{
"ServerId": "vm-232",
"Port": "90",
"Weight": "100",
"ServerType": "Slave"
}
]
}
}