Tambahkan server backend.
Deskripsi operasi
Jika Anda menambahkan beberapa instans ECS identik dalam satu permintaan, sistem hanya memproses instans pertama dan mengabaikan instans identik berikutnya. Anda tidak dapat menambahkan server backend baru yang menduplikasi server yang sudah ada di bawah Pendengar (listener) yang sama karena akan menyebabkan error.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
slb:AddBackendServers |
update |
*LoadBalancer
*Instance
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
ID wilayah tempat instans Server Load Balancer (SLB) berada. Panggil DescribeRegions untuk menanyakan ID wilayah. |
cn-beijing |
| LoadBalancerId |
string |
Yes |
ID instans Classic Load Balancer (CLB). |
lb-2ze7o5h52g02kkzz****** |
| BackendServers |
string |
No |
Daftar server backend yang akan ditambahkan. Parameter ini mencakup parameter berikut:
Jika nilainya 0, sistem tidak meneruskan permintaan ke server backend tersebut.
Catatan
Hanya instans dengan performa terjamin yang mendukung penambahan server backend berupa ENI dan ECI.
Contoh:
Catatan
Hanya server backend yang sedang Berjalan (running) yang dapat ditambahkan ke instans Server Load Balancer (SLB). Setiap panggilan dapat menambahkan maksimal 20 server backend. |
[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.**.**", "Port":"80","Description":"test-112" },{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "172.166.**.**", "Port":"80","Description":"test-113" }] |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| LoadBalancerId |
string |
ID instans Server Load Balancer (SLB). |
lb-2ze7o5h52g02kkzz**** |
| RequestId |
string |
ID permintaan. |
34B82C81-F13B-4EEB-99F6-A048C67CC830 |
| BackendServers |
object |
||
| BackendServer |
array<object> |
Daftar server backend. |
|
|
object |
|||
| Type |
string |
Jenis server backend. Nilai yang valid:
|
ecs |
| Weight |
string |
Bobot server backend. Nilai yang valid: 0 hingga 100. Nilai default: 100. Jika nilainya 0, sistem tidak meneruskan permintaan ke server backend tersebut. |
100 |
| Description |
string |
Deskripsi server backend. Catatan
Jika Anda tidak mengatur Description, parameter ini tidak dikembalikan. |
The description of the backend server. |
| ServerId |
string |
ID instans ECS, ENI, atau ECI. |
i-2zej4lxhjoq1icu***** |
Contoh
Respons sukses
JSONformat
{
"LoadBalancerId": "lb-2ze7o5h52g02kkzz****",
"RequestId": "34B82C81-F13B-4EEB-99F6-A048C67CC830",
"BackendServers": {
"BackendServer": [
{
"Type": "ecs",
"Weight": "100",
"Description": "The description of the backend server.",
"ServerId": "i-2zej4lxhjoq1icu*****"
}
]
}
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | The specified load balancer does not support the network type of the ECS instance. | |
| 400 | Mismatched.ZoneId | The zone of the server is not matched with the cloud box loadbalancer. | |
| 400 | BackendServerProcessing | Backend Server is adding, please try again later. | |
| 400 | InvalidBackendServers.ServerIpConflict | %s. | |
| 400 | OperationUnsupported.AddBackendServers | 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 | NetworkConflict | %s. | |
| 400 | SystemBusy | The system is busy. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.