public static final class CreateLoadBalancerRequest.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
CreateLoadBalancerRequest.Builder |
address(String address)
The private IP address of the CLB instance.
|
CreateLoadBalancerRequest.Builder |
addressIPVersion(String addressIPVersion)
The IP version of the CLB instance.
|
CreateLoadBalancerRequest.Builder |
addressType(String addressType)
The network type of the CLB instance.
|
CreateLoadBalancerRequest.Builder |
autoPay(Boolean autoPay)
Specifies whether to automatically pay the subscription fee of the Internet-facing CLB instance.
|
CreateLoadBalancerRequest.Builder |
bandwidth(Integer bandwidth)
The maximum bandwidth of the listener.
|
CreateLoadBalancerRequest |
build() |
CreateLoadBalancerRequest.Builder |
clientToken(String clientToken)
The client token that is used to ensure the idempotence of the request.
|
CreateLoadBalancerRequest.Builder |
deleteProtection(String deleteProtection)
Specifies whether to enable deletion protection for the CLB instance.
|
CreateLoadBalancerRequest.Builder |
duration(Integer duration)
The subscription duration of the Internet-facing CLB instance.
|
CreateLoadBalancerRequest.Builder |
instanceChargeType(String instanceChargeType)
The metering method of the CLB instance.
|
CreateLoadBalancerRequest.Builder |
internetChargeType(String internetChargeType)
The metering method of the Internet-facing CLB instance.
|
CreateLoadBalancerRequest.Builder |
loadBalancerName(String loadBalancerName)
The CLB instance name.
|
CreateLoadBalancerRequest.Builder |
loadBalancerSpec(String loadBalancerSpec)
The specification of the CLB instance.
|
CreateLoadBalancerRequest.Builder |
masterZoneId(String masterZoneId)
The ID of the primary zone to which the CLB instance belongs.
|
CreateLoadBalancerRequest.Builder |
modificationProtectionReason(String modificationProtectionReason)
The reason for enabling the configuration read-only mode.
|
CreateLoadBalancerRequest.Builder |
modificationProtectionStatus(String modificationProtectionStatus)
Specifies whether to enable the configuration read-only mode.
|
CreateLoadBalancerRequest.Builder |
ownerAccount(String ownerAccount)
OwnerAccount.
|
CreateLoadBalancerRequest.Builder |
ownerId(Long ownerId)
OwnerId.
|
CreateLoadBalancerRequest.Builder |
payType(String payType)
The billing method of the CLB instance.
|
CreateLoadBalancerRequest.Builder |
pricingCycle(String pricingCycle)
The billing cycle of the subscription Internet-facing CLB instance.
|
CreateLoadBalancerRequest.Builder |
regionId(String regionId)
The region ID of the CLB instance.
|
CreateLoadBalancerRequest.Builder |
resourceGroupId(String resourceGroupId)
The ID of the resource group.
|
CreateLoadBalancerRequest.Builder |
resourceOwnerAccount(String resourceOwnerAccount)
ResourceOwnerAccount.
|
CreateLoadBalancerRequest.Builder |
resourceOwnerId(Long resourceOwnerId)
ResourceOwnerId.
|
CreateLoadBalancerRequest.Builder |
slaveZoneId(String slaveZoneId)
The ID of the secondary zone to which the CLB instance belongs.
|
CreateLoadBalancerRequest.Builder |
tag(List<CreateLoadBalancerRequest.Tag> tag)
The tags.
|
CreateLoadBalancerRequest.Builder |
vpcId(String vpcId)
The ID of the virtual private cloud (VPC) to which the CLB instance belongs.
|
CreateLoadBalancerRequest.Builder |
vSwitchId(String vSwitchId)
The ID of the vSwitch to which the CLB instance belongs.
|
public CreateLoadBalancerRequest.Builder address(String address)
The private IP address of the CLB instance. The private IP address must belong to the destination CIDR block of the vSwitch.
example:192.168.XX.XX
public CreateLoadBalancerRequest.Builder addressIPVersion(String addressIPVersion)
The IP version of the CLB instance. Valid values: ipv4 and ipv6.
example:ipv4
public CreateLoadBalancerRequest.Builder addressType(String addressType)
The network type of the CLB instance. Valid values:
internet
public CreateLoadBalancerRequest.Builder autoPay(Boolean autoPay)
Specifies whether to automatically pay the subscription fee of the Internet-facing CLB instance. Valid values:
example:This parameter takes effect only for subscription CLB instances created on the Alibaba Cloud China site.
true
public CreateLoadBalancerRequest.Builder bandwidth(Integer bandwidth)
The maximum bandwidth of the listener. Unit: Mbit/s.
Valid values: 1 to 5120. For a pay-by-bandwidth Internet-facing CLB instance, you can specify a maximum bandwidth for each listener. The sum of the maximum bandwidth of all listeners cannot exceed the maximum bandwidth of the CLB instance.
example:10
public CreateLoadBalancerRequest.Builder clientToken(String clientToken)
The client token that is used to ensure the idempotence of the request.
You can use the client to generate the token, but you must make sure that the token is unique among different requests.
example:If you do not specify this parameter, the system uses the request ID as the client token. The request ID may be different for each request.
593B0448-D13E-4C56-AC0D-FDF0FDE0E9A3
public CreateLoadBalancerRequest.Builder deleteProtection(String deleteProtection)
Specifies whether to enable deletion protection for the CLB instance. Valid values:
on
public CreateLoadBalancerRequest.Builder duration(Integer duration)
The subscription duration of the Internet-facing CLB instance. Valid values:
example:This parameter is supported only by subscription instances created on the Alibaba Cloud China site.
1
public CreateLoadBalancerRequest.Builder instanceChargeType(String instanceChargeType)
The metering method of the CLB instance. Valid values:
example:This parameter is supported only by instances created on the Alibaba Cloud China site and only when PayType is set to PayOnDemand.
PayBySpec
public CreateLoadBalancerRequest.Builder internetChargeType(String internetChargeType)
The metering method of the Internet-facing CLB instance. Valid values:
paybytraffic (default): pay-by-data-transfer
If you set InternetChargeType to paybytraffic, you do not need to configure the Bandwidth parameter. The value of Bandwidth does not take effect even if you specify one.
paybybandwidth: pay-by-bandwidth
example:If you set PayType to PayOnDemand and InstanceChargeType to PayByCLCU, the only valid value for InternetChargeType is paybytraffic.
paybytraffic
public CreateLoadBalancerRequest.Builder loadBalancerName(String loadBalancerName)
The CLB instance name.
The name must be 1 to 80 characters in length, and can contain digits, periods (.), underscores (_), and hyphens (-). It must start with a letter.
If you do not specify this parameter, the system automatically assigns a name to the CLB instance.
example:lb-bp1o94dp5i6ea****
public CreateLoadBalancerRequest.Builder loadBalancerSpec(String loadBalancerSpec)
The specification of the CLB instance. Valid values:
slb.s1.small
slb.s2.small
slb.s2.medium
slb.s3.small
slb.s3.medium
slb.s3.large
If you do not specify this parameter, a shared-resource CLB instance is created. Shared-resource CLB instances are no longer available for purchase. Therefore, you must specify this parameter.
If InstanceChargeType is set to PayByCLCU, this parameter is invalid and you do not need to specify this parameter.
example:slb.s1.small
public CreateLoadBalancerRequest.Builder masterZoneId(String masterZoneId)
The ID of the primary zone to which the CLB instance belongs.
You can call the DescribeZone operation to query the primary and secondary zones in the region where you want to create the CLB instance.
example:cn-hangzhou-b
public CreateLoadBalancerRequest.Builder modificationProtectionReason(String modificationProtectionReason)
The reason for enabling the configuration read-only mode. The reason must be 1 to 80 characters in length. It must start with a letter and can contain letters, digits, periods (.), underscores (_), and hyphens (-).
example:This parameter takes effect only when ModificationProtectionStatus is set to ConsoleProtection.
Managed instance
public CreateLoadBalancerRequest.Builder modificationProtectionStatus(String modificationProtectionStatus)
Specifies whether to enable the configuration read-only mode. Valid values:
example:If you set this parameter to ConsoleProtection, you cannot modify instance configurations in the CLB console. However, you can modify instance configurations by calling API operations.
ConsoleProtection
public CreateLoadBalancerRequest.Builder ownerAccount(String ownerAccount)
public CreateLoadBalancerRequest.Builder ownerId(Long ownerId)
public CreateLoadBalancerRequest.Builder payType(String payType)
The billing method of the CLB instance. Valid values:
PayOnDemand: pay-as-you-go.
example:The Alibaba Cloud International site supports only pay-as-you-go CLB instances.
PayOnDemand
public CreateLoadBalancerRequest.Builder pricingCycle(String pricingCycle)
The billing cycle of the subscription Internet-facing CLB instance. Valid values:
example:This parameter is supported only by subscription instances created on the Alibaba Cloud China site.
month
public CreateLoadBalancerRequest.Builder regionId(String regionId)
The region ID of the CLB instance.
You can call the DescribeRegions operation to query the most recent region list.
This parameter is required.
example:cn-hangzhou
public CreateLoadBalancerRequest.Builder resourceGroupId(String resourceGroupId)
The ID of the resource group.
example:rg-atstuj3rtopt****
public CreateLoadBalancerRequest.Builder resourceOwnerAccount(String resourceOwnerAccount)
public CreateLoadBalancerRequest.Builder resourceOwnerId(Long resourceOwnerId)
public CreateLoadBalancerRequest.Builder slaveZoneId(String slaveZoneId)
The ID of the secondary zone to which the CLB instance belongs.
You can call the DescribeZone operation to query the primary and secondary zones in the region where you want to create the CLB instance.
example:cn-hangzhou-d
public CreateLoadBalancerRequest.Builder tag(List<CreateLoadBalancerRequest.Tag> tag)
The tags.
public CreateLoadBalancerRequest.Builder vSwitchId(String vSwitchId)
The ID of the vSwitch to which the CLB instance belongs.
If you want to deploy the CLB instance in a VPC, this parameter is required. If this parameter is specified, AddessType is set to intranet by default.
example:vsw-bp12mw1f8k3jgy****
public CreateLoadBalancerRequest.Builder vpcId(String vpcId)
The ID of the virtual private cloud (VPC) to which the CLB instance belongs.
example:vpc-bp1aevy8sofi8mh1****
public CreateLoadBalancerRequest build()
Copyright © 2026. All rights reserved.