public static final class CreateVServerGroupRequest.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
CreateVServerGroupRequest.Builder |
backendServers(String backendServers)
The backend servers that you want to add.
|
CreateVServerGroupRequest |
build() |
CreateVServerGroupRequest.Builder |
loadBalancerId(String loadBalancerId)
The ID of the Server Load Balancer (SLB) instance.
|
CreateVServerGroupRequest.Builder |
ownerAccount(String ownerAccount)
OwnerAccount.
|
CreateVServerGroupRequest.Builder |
ownerId(Long ownerId)
OwnerId.
|
CreateVServerGroupRequest.Builder |
regionId(String regionId)
The ID of the region where the SLB instance is deployed.
|
CreateVServerGroupRequest.Builder |
resourceOwnerAccount(String resourceOwnerAccount)
ResourceOwnerAccount.
|
CreateVServerGroupRequest.Builder |
resourceOwnerId(Long resourceOwnerId)
ResourceOwnerId.
|
CreateVServerGroupRequest.Builder |
tag(List<CreateVServerGroupRequest.Tag> tag)
The tags.
|
CreateVServerGroupRequest.Builder |
vServerGroupName(String vServerGroupName)
The name of the vServer group.
|
public CreateVServerGroupRequest.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 ID 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 description 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 SLB instances.
Examples:
Add an ECS instance:
[{ "ServerId": "i-xxxxxxxxx", "Weight": "100", "Type": "ecs", "Port":"80","Description":"test-112" }]
Add an ENI:
[{ "ServerId": "eni-xxxxxxxxx", "Weight": "100", "Type": "eni", "ServerIp": "192.168..", "Port":"80","Description":"test-112" }]
Add an 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" }]
Add an 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 SLB instances. You can specify at most 20 backend servers.
[{ "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" }]
public CreateVServerGroupRequest.Builder loadBalancerId(String loadBalancerId)
The ID of the Server Load Balancer (SLB) instance.
This parameter is required.
example:lb-bp1qjwo61pqz3ahl******
public CreateVServerGroupRequest.Builder ownerAccount(String ownerAccount)
public CreateVServerGroupRequest.Builder ownerId(Long ownerId)
public CreateVServerGroupRequest.Builder regionId(String regionId)
The ID of the region where the SLB instance is deployed.
This parameter is required.
example:cn-hangzhou
public CreateVServerGroupRequest.Builder resourceOwnerAccount(String resourceOwnerAccount)
public CreateVServerGroupRequest.Builder resourceOwnerId(Long resourceOwnerId)
public CreateVServerGroupRequest.Builder tag(List<CreateVServerGroupRequest.Tag> tag)
The tags.
public CreateVServerGroupRequest.Builder vServerGroupName(String vServerGroupName)
The name of the vServer group.
The name must be 1 to 80 characters in length, and can contain letters, digits, hyphens (-), forward slashes (/), periods (.),and underscores (_).
example:Group1
public CreateVServerGroupRequest build()
Copyright © 2026. All rights reserved.