LoadBalancerProps
Properties for defining a LoadBalancer.
See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-slb-loadbalancer
Initializer
import com.aliyun.ros.cdk.slb.LoadBalancerProps;
LoadBalancerProps.builder()
// .addressIpVersion(java.lang.String)
// .addressIpVersion(IResolvable)
// .addressType(java.lang.String)
// .addressType(IResolvable)
// .bandwidth(java.lang.Number)
// .bandwidth(IResolvable)
// .deletionProtection(java.lang.Boolean)
// .deletionProtection(IResolvable)
// .instanceChargeType(java.lang.String)
// .instanceChargeType(IResolvable)
// .internetChargeType(java.lang.String)
// .internetChargeType(IResolvable)
// .loadBalancerName(java.lang.String)
// .loadBalancerName(IResolvable)
// .loadBalancerSpec(java.lang.String)
// .loadBalancerSpec(IResolvable)
// .masterZoneId(java.lang.String)
// .masterZoneId(IResolvable)
// .modificationProtectionReason(java.lang.String)
// .modificationProtectionReason(IResolvable)
// .modificationProtectionStatus(java.lang.String)
// .modificationProtectionStatus(IResolvable)
// .resourceGroupId(java.lang.String)
// .resourceGroupId(IResolvable)
// .slaveZoneId(java.lang.String)
// .slaveZoneId(IResolvable)
// .tags(java.util.List<TagsProperty>)
// .vpcId(java.lang.String)
// .vpcId(IResolvable)
// .vSwitchId(java.lang.String)
// .vSwitchId(IResolvable)
.build();
Properties
| Name | Type | Description |
|---|---|---|
addressIpVersion | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property addressIpVersion: The IP version of the CLB instance. |
addressType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property addressType: The network type of the CLB instance. |
bandwidth | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property bandwidth: The bandwidth for network, unit in Mbps(Mega bit per second). |
deletionProtection | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property deletionProtection: Whether to enable deletion protection. |
instanceChargeType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property instanceChargeType: The resource metering method for the CLB instance. |
internetChargeType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property internetChargeType: The metering method of the Internet-facing CLB instance. |
loadBalancerName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property loadBalancerName: The CLB instance name. |
loadBalancerSpec | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property loadBalancerSpec: The specification of the CLB instance. |
masterZoneId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property masterZoneId: The master zone id to create load balancer instance. |
modificationProtectionReason | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property modificationProtectionReason: The reason for enabling the configuration read-only mode. |
modificationProtectionStatus | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property modificationProtectionStatus: Specifies whether to enable the configuration read-only mode. |
resourceGroupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property resourceGroupId: Resource group id. |
slaveZoneId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property slaveZoneId: The slave zone id to create load balancer instance. |
tags | java.util.List<TagsProperty> | Property tags: Tags to attach to slb. |
vpcId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property vpcId: The VPC id to create load balancer instance. |
vSwitchId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property vSwitchId: The ID of the vSwitch to which the CLB instance belongs. |
addressIpVersionOptional
public java.lang.Object getAddressIpVersion();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property addressIpVersion: The IP version of the CLB instance.
Valid values: ipv4 and ipv6.
addressTypeOptional
public java.lang.Object getAddressType();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property addressType: The network type of the CLB instance.
Valid values:
- internet (default): After an internet-facing CLB instance is created, the system assigns a public IP address to the CLB instance. Then, the CLB instance can forward requests over the Internet.
- intranet: After an internal-facing CLB instance is created, the system assigns a private IP address to the CLB instance. Then, the CLB instance can forward requests only over the internal networks.
bandwidthOptional
public java.lang.Object getBandwidth();
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property bandwidth: The bandwidth for network, unit in Mbps(Mega bit per second).
Default is 1. If InternetChargeType is specified as "paybytraffic", this property will be ignore and please specify the "Bandwidth" in ALIYUN::SLB::Listener.
deletionProtectionOptional
public java.lang.Object getDeletionProtection();
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property deletionProtection: Whether to enable deletion protection.
instanceChargeTypeOptional
public java.lang.Object getInstanceChargeType();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property instanceChargeType: The resource metering method for the CLB instance.
Valid value:
- PayByCLCU: pay-by-data-transfer
As of 00:00:00 (UTC+8) on June 1, 2025, pay-by-specification CLB instances are no longer available for purchase. For more details, see .
internetChargeTypeOptional
public java.lang.Object getInternetChargeType();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property internetChargeType: The metering method of the Internet-facing CLB instance.
Valid values:
- paybytraffic (default): If you set the value to paybytraffic, you do not need to specify Bandwidth. Even if you specify Bandwidth, the value does not take effect.
- paybybandwidth: pay-by-bandwidth. Note If you set PayType to PayOnDemand and set InstanceChargeType to PayByCLCU, you must set InternetChargeType to paybytraffic.
loadBalancerNameOptional
public java.lang.Object getLoadBalancerName();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property 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.
loadBalancerSpecOptional
public java.lang.Object getLoadBalancerSpec();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property 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
masterZoneIdOptional
public java.lang.Object getMasterZoneId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property masterZoneId: The master zone id to create load balancer instance.
modificationProtectionReasonOptional
public java.lang.Object getModificationProtectionReason();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property 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 (-).
This parameter takes effect only when ModificationProtectionStatus is set to ConsoleProtection.
modificationProtectionStatusOptional
public java.lang.Object getModificationProtectionStatus();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property modificationProtectionStatus: Specifies whether to enable the configuration read-only mode.
Valid values:
- NonProtection: disables the configuration read-only mode. After you disable the configuration read-only mode, the value of ModificationProtectionReason is cleared.
- ConsoleProtection: enables the configuration read-only mode.
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.
resourceGroupIdOptional
public java.lang.Object getResourceGroupId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: Resource group id.
slaveZoneIdOptional
public java.lang.Object getSlaveZoneId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property slaveZoneId: The slave zone id to create load balancer instance.
tagsOptional
public java.util.List<TagsProperty> getTags();
- Type: java.util.List<TagsProperty>
Property tags: Tags to attach to slb.
Max support 5 tags to add during create slb. Each tag with two properties Key and Value, and Key is required.
vpcIdOptional
public java.lang.Object getVpcId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vpcId: The VPC id to create load balancer instance.
For VPC network only.
vSwitchIdOptional
public java.lang.Object getVSwitchId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property 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.
The vSwitch must be in the primary zone.