public static final class SetBackendServersRequest.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
SetBackendServersRequest.Builder |
backendServers(String backendServers)
The backend servers that you want to add.
|
SetBackendServersRequest |
build() |
SetBackendServersRequest.Builder |
loadBalancerId(String loadBalancerId)
The ID of the CLB instance.
|
SetBackendServersRequest.Builder |
ownerAccount(String ownerAccount)
OwnerAccount.
|
SetBackendServersRequest.Builder |
ownerId(Long ownerId)
OwnerId.
|
SetBackendServersRequest.Builder |
regionId(String regionId)
The region ID of the Classic Load Balancer (CLB) instance.
|
SetBackendServersRequest.Builder |
resourceOwnerAccount(String resourceOwnerAccount)
ResourceOwnerAccount.
|
SetBackendServersRequest.Builder |
resourceOwnerId(Long resourceOwnerId)
ResourceOwnerId.
|
public SetBackendServersRequest.Builder backendServers(String backendServers)
The backend servers that you want to add. Configure the following parameters:
ServerId: Required. The ID of the backend server. Specify the value in a string. You can specify the ID of an Elastic Compute Service (ECS) instance, an elastic network interface (ENI), or an elastic container instance. If you set ServerId to the ID of an ENI or an elastic container instance, you must configure the Type parameter.
Weight: the weight of the backend server. Valid values: 0 to 100. Default value: 100. If you set the weight of a backend server to 0, no requests are forwarded to the backend server.
Description: Optional. The description of the backend server. Specify the value in a string. The description must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).
Type: the type of the backend server. Valid values:
You can specify ENIs and elastic container instances as backend servers only for high-performance CLB instances.
Examples:
ECS instance:
[{ "ServerId": "i-xxxxxxxxx", "Weight": "100", "Type": "ecs", "Port":"80","Description":"test-112" }]
ENI:
[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168..", "Port":"80","Description":"test-112" }]
ENI with multiple IP addresses:
[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168..", "Port":"80","Description":"test-113" },{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "172.166..", "Port":"80","Description":"test-113" }]
Elastic container instance:
[{ "ServerId": "eci-xxxxxxxxx", "Weight": "100", "Type": "eci", "ServerIp": "192.168..", "Port":"80","Description":"test-114" }]
example:You can add only running backend servers to a CLB instance. You can specify at most 20 backend servers in each call.
[{ "ServerId": "ecs-******FmYAXG", "Weight": "100", "Type": "ecs", "Port":"80","Description":"test-112" }]
public SetBackendServersRequest.Builder loadBalancerId(String loadBalancerId)
The ID of the CLB instance.
This parameter is required.
example:lb-bp1qjwo61pqz3a******
public SetBackendServersRequest.Builder ownerAccount(String ownerAccount)
public SetBackendServersRequest.Builder ownerId(Long ownerId)
public SetBackendServersRequest.Builder regionId(String regionId)
The region ID of the Classic Load Balancer (CLB) instance.
example:cn-hangzhou
public SetBackendServersRequest.Builder resourceOwnerAccount(String resourceOwnerAccount)
public SetBackendServersRequest.Builder resourceOwnerId(Long resourceOwnerId)
public SetBackendServersRequest build()
Copyright © 2026. All rights reserved.