Specifies weights for backend servers.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
slb:SetBackendServers |
update |
instance
*loadbalancer
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region ID of the Classic Load Balancer (CLB) instance. |
cn-hangzhou |
| LoadBalancerId |
string |
Yes |
The ID of the CLB instance. |
lb-bp1qjwo61pqz3a****** |
| BackendServers |
string |
No |
The backend servers that you want to add. Configure the following parameters:
Note
You can specify ENIs and elastic container instances as backend servers only for high-performance CLB instances.
Examples:
Note
You can add only running backend servers to a CLB instance. You can specify at most 20 backend servers in each call. |
[{ "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" }] |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| LoadBalancerId |
string |
The ID of the CLB instance. |
lb-bp1qjwo61pqz3a****** |
| RequestId |
string |
The request ID. |
365F4154-92F6-4AE4-92F8-7F****** |
| BackendServers |
object |
||
| BackendServer |
array<object> |
The backend servers. |
|
|
object |
|||
| Type |
string |
The type of backend server. Valid values:
|
eni |
| Weight |
string |
The weight of the backend server. |
100 |
| Description |
string |
The description of the backend server. |
The description of the backend server. |
| ServerId |
string |
The ID of the server group. |
eni-hhshhs**** |
Examples
Success response
JSON format
{
"LoadBalancerId": "lb-bp1qjwo61pqz3a******",
"RequestId": "365F4154-92F6-4AE4-92F8-7F******",
"BackendServers": {
"BackendServer": [
{
"Type": "eni",
"Weight": "100",
"Description": "The description of the backend server.",
"ServerId": "eni-hhshhs****"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Mismatched.ZoneId | The zone of the server is not matched with the cloud box loadbalancer. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.