SetBackendServers

Last Updated: Aug 28, 2017

Description

Set weight for the backend ECS instances and return the backend server list.

Request parameter

Name Type Required Description
Action String Yes Name of the operating interface, which is specified in the system. Value:SetBackendServers
RegionId String Yes The ID of the region.
LoadBalancerId String Yes The unique ID of a Server Load Balancer instance.
BackendServers String Yes The backend servers list which need to be added. Value: a Json string,the structure is a JsonList. The number of backend servers contained in a list must be less than 20. The structure of the list elements is shown in the following table.

Backend server list

Name Type Description
ServerId String Backend server ID (ECS instance ID).
Weight Integer Backend server Weight. Value: 0-100. Default: 100.

Return parameter

Name Type Description
Common Parameter See Common parameters for details.
LoadBalancerId String The unique ID of a Server Load Balancer instance.
BackendServers List Information of multiple backend servers in the Server Load Balancer instance is returned in the array format. See the following table for details.

Backend server information

Name Type Description
ServerId String Backend server ID (ECS instance ID).
Weight Integer Backend server Weight. Value: 0-100.

Example

Request example

  1. https://slb.aliyuncs.com/
  2. &Action=SetBackendServers
  3. &LoadBalancerId=139a00604ad-cn-east-hangzhou-01
  4. &BackendServers=[{"ServerId":"vm-233","Weight":"0"},{"ServerId":"vm-234","Weight":"0"}]
  5. &<common request parameter>

Return example

  • XML format
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <AddBackendServersResponse>
    3. <RequestId>365F4154-92F6-4AE4-92F8-7FF34B540710</RequestId>
    4. <LoadBalancerId>139a00604ad-cn-east-hangzhou-01</LoadBalancerId>
    5. <BackendServers>
    6. <BackendServer>
    7. <ServerId>vm-233</ServerId>
    8. <Weight>0</Weight>
    9. </BackendServer>
    10. <BackendServer>
    11. <ServerId>vm-234</ServerId>
    12. <Weight>0</Weight>
    13. </BackendServer>
    14. </BackendServers>
    15. </AddBackendServersResponse>
  • JSON format
    1. {
    2. "RequestId":"365F4154-92F6-4AE4-92F8-7FF34B540710",
    3. "LoadBalancerId":"139a00604ad-cn-east-hangzhou-01",
    4. "BackendServers":{
    5. BackendServer”: [
    6. {"ServerId":"vm-233",
    7. "Weight":0},
    8. {"ServerId":"vm-234",
    9. "Weight":0}] }
    10. }
Thank you! We've received your feedback.