Membuat kelompok server primary/secondary yang terdiri dari dua server backend: satu berfungsi sebagai server primary dan satu lagi sebagai server secondary.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
slb:CreateMasterSlaveServerGroup |
create |
Instance
*LoadBalancer
|
|
None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
ID wilayah instans Classic Load Balancer (CLB). |
cn-hangzhou |
| LoadBalancerId |
string |
Yes |
ID instans CLB. |
lb-bp1hv944r69al4j****** |
| MasterSlaveServerGroupName |
string |
No |
Nama kelompok server primary/secondary. |
Group1 |
| MasterSlaveBackendServers |
string |
No |
Server backend dalam kelompok server primary/secondary. Setiap kelompok server primary/secondary terdiri dari dua server backend. Konfigurasikan parameter berikut:
Catatan
Anda hanya dapat menentukan ENI dan elastic container instance sebagai server backend untuk instans CLB berkinerja-tinggi.
|
[{ "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> |
No |
Tag. |
|
|
object |
No |
|||
| Key |
string |
No |
Kunci tag N. Nilai N yang valid: 1 hingga 20. Kunci tag tidak boleh berupa string kosong. Panjang kunci tag maksimal 64 karakter, dan tidak boleh mengandung |
test |
| Value |
string |
No |
Nilai tag N. Nilai N yang valid: 1 hingga 20. Nilai tag boleh berupa string kosong. Panjang nilai tag maksimal 128 karakter, dan tidak boleh mengandung |
1 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| MasterSlaveServerGroupId |
string |
ID kelompok server active/standby. |
rsp-bp19au4****** |
| RequestId |
string |
ID permintaan. |
7CA4DB76-4D32-523B-822E-5C9494613D46 |
| MasterSlaveBackendServers |
object |
||
| MasterSlaveBackendServer |
array<object> |
Server backend dalam kelompok server primary/secondary. |
|
|
object |
|||
| Type |
string |
Jenis server backend. Nilai yang valid:
|
ecs |
| Weight |
integer |
Bobot server backend. |
100 |
| Description |
string |
Deskripsi kelompok server primary/secondary. |
test-112 |
| Port |
integer |
Port yang digunakan oleh server backend. |
82 |
| ServerId |
string |
ID server backend yang ingin Anda tambahkan. |
i-bp1fq61enf4loa5i**** |
| ServerType |
string |
Jenis server backend. Nilai yang valid: Master dan Slave. |
Master |
Contoh
Respons sukses
JSONformat
{
"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"
}
]
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 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. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.