Menambahkan server backend.
Deskripsi operasi
Jika beberapa instans Elastic Compute Service (ECS) yang identik ditentukan dalam satu permintaan, hanya instans ECS pertama yang ditambahkan; instans lainnya diabaikan. Jika server backend yang akan ditambahkan sudah terkait dengan listener, sistem akan mengembalikan pesan 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 Classic Load Balancer (CLB) ditempatkan. Anda dapat memanggil operasi DescribeRegions untuk mengambil daftar wilayah terbaru. |
cn-beijing |
| LoadBalancerId |
string |
Yes |
ID instans CLB. |
lb-2ze7o5h52g02kkzz****** |
| BackendServers |
string |
No |
Daftar server backend yang ingin Anda tambahkan. Tetapkan parameter berikut:
Catatan
Anda hanya dapat menentukan ENI dan elastic container instance sebagai server backend untuk instans CLB berkinerja-tinggi.
Contoh:
Catatan
Server backend yang Anda tambahkan ke instans CLB harus berada dalam status Running. Anda dapat menambahkan maksimal 20 server backend ke instans CLB dalam setiap permintaan. |
[{ "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 CLB. |
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 nilai diatur ke 0, tidak ada permintaan yang diteruskan ke server backend tersebut. |
100 |
| Description |
string |
Deskripsi server backend. |
backend server |
| ServerId |
string |
ID instans ECS, ENI, atau elastic container instance. |
i-2zej4lxhjoq1icu***** |
Contoh
Respons sukses
JSONformat
{
"LoadBalancerId": "lb-2ze7o5h52g02kkzz****",
"RequestId": "34B82C81-F13B-4EEB-99F6-A048C67CC830",
"BackendServers": {
"BackendServer": [
{
"Type": "ecs",
"Weight": "100",
"Description": "后端服务器",
"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.