Menambahkan server backend.
Deskripsi operasi
Jika Anda menambahkan beberapa instans ECS identik dalam satu permintaan, hanya instans pertama yang akan ditambahkan; instans duplikat diabaikan. Server backend yang ditambahkan tidak boleh sama dengan server backend yang sudah ada pada listener yang sama. Jika kondisi ini dilanggar, sistem akan mengembalikan 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 SLB ditempatkan. Anda dapat memanggil DescribeRegions untuk mengkueri ID wilayah. |
cn-beijing |
| LoadBalancerId |
string |
Yes |
ID instans Classic Load Balancer. |
lb-2ze7o5h52g02kkzz****** |
| BackendServers |
string |
No |
Daftar server backend yang akan ditambahkan. Daftar ini berisi parameter berikut:
Jika nilainya 0, tidak ada permintaan yang diteruskan ke server backend tersebut.
Catatan
Hanya instans dengan performa terjamin yang mendukung penambahan server backend jenis eni dan eci.
Contoh:
Catatan
Hanya server backend dalam status Running yang dapat ditambahkan ke instans SLB. Anda dapat menambahkan hingga 20 server backend dalam setiap pemanggilan. |
[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168.**.**", "Description":"test-112" },{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "172.166.**.**", "Description":"test-113" }] |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| LoadBalancerId |
string |
ID instans 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 dari server backend. Nilai yang valid:
|
ecs |
| Weight |
string |
Bobot server backend. Nilai yang valid: 0 hingga 100. Nilai default: 100. Jika nilainya 0, tidak ada permintaan yang diteruskan 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.