LoadBalancer
This class encapsulates and extends the ROS resource type ALIYUN::SLB::LoadBalancer
, which is used to create a Server Load Balancer (SLB) instance.
Initializers
import com.aliyun.ros.cdk.slb.LoadBalancer;
LoadBalancer.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
// .addressIpVersion(java.lang.String)
// .addressIpVersion(IResolvable)
// .addressType(java.lang.String)
// .addressType(IResolvable)
// .autoPay(java.lang.Boolean)
// .autoPay(IResolvable)
// .autoRenew(java.lang.Boolean)
// .autoRenew(IResolvable)
// .autoRenewPeriod(java.lang.Number)
// .autoRenewPeriod(IResolvable)
// .bandwidth(java.lang.Number)
// .bandwidth(IResolvable)
// .deletionProtection(java.lang.Boolean)
// .deletionProtection(IResolvable)
// .duration(java.lang.Number)
// .duration(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)
// .payType(java.lang.String)
// .payType(IResolvable)
// .pricingCycle(java.lang.String)
// .pricingCycle(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();
Name | Type | Description |
---|---|---|
scope |
com.aliyun.ros.cdk.core.Construct |
No description. |
id |
java.lang.String |
No description. |
enableResourcePropertyConstraint |
java.lang.Boolean |
No description. |
addressIpVersion |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property addressIpVersion: IP version, support 'ipv4' or 'ipv6'. |
addressType |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property addressType: The network type of the CLB instance. |
autoPay |
java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable |
Property autoPay: Specifies whether to automatically pay for the subscription Internet-facing CLB instance. |
autoRenew |
java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable |
Property autoRenew: Indicates whether automatic renewal is enabled for the instance. |
autoRenewPeriod |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property autoRenewPeriod: Automatic renewal cycle, which takes effect when AutoRenew is true, and is required: When PricingCycle = month, the value range is 1 to 9 or 12, 24, 36. |
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. |
duration |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property duration: Optional. |
instanceChargeType |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property instanceChargeType: Instance billing method. |
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: Name of created load balancer. |
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: Set the reason for modifying the protection status. |
modificationProtectionStatus |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property modificationProtectionStatus: NonProtection or empty: means no restriction on modification protection ConsoleProtection: Modify instance protection status by console Default value is empty. |
payType |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property payType: Optional. |
pricingCycle |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property pricingCycle: Optional. |
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 VSwitch id to create load balancer instance. |
scope
Required
- Type: com.aliyun.ros.cdk.core.Construct
id
Required
- Type: java.lang.String
enableResourcePropertyConstraint
Optional
- Type: java.lang.Boolean
addressIpVersion
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property addressIpVersion: IP version, support 'ipv4' or 'ipv6'.
If 'ipv6' is selected, please note that the zone and the specification are supported.
addressType
Optional
- 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.
autoPay
Optional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property autoPay: Specifies whether to automatically pay for the subscription Internet-facing CLB instance.
Valid values:
- true: automatically pays for the CLB instance. After you call this operation, the system automatically completes the payment and creates the CLB instance.- false (default): After you call the operation, the order is created but the payment is not completed. You can view the pending order in the console. The CLB instance will not be created until you complete the payment.Note This parameter is supported only by subscription instances created on the Alibaba Cloud China site.
autoRenew
Optional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property autoRenew: Indicates whether automatic renewal is enabled for the instance.
Valid values:- true: Automatic renewal is enabled.- false (default): Automatic renewal is not enabled. You must renew the instance manually.
autoRenewPeriod
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property autoRenewPeriod: Automatic renewal cycle, which takes effect when AutoRenew is true, and is required: When PricingCycle = month, the value range is 1 to 9 or 12, 24, 36.
When PeriodUnit = year, the value range is 1-3.
bandwidth
Optional
- 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.
deletionProtection
Optional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property deletionProtection: Whether to enable deletion protection.
duration
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property duration: Optional.
The subscription duration of a Subscription Internet instance. Valid values: If PricingCycle is month, the valid range is 1 to 9 or 12, 24, 36, 48, 60. If PricingCycle is year, the value range is 1 to 5.
instanceChargeType
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property instanceChargeType: Instance billing method.
Valid value:
- PayBySpec (default): Pay by spec.
- PayByCLCU: billed by usage.
internetChargeType
Optional
- 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.
loadBalancerName
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property loadBalancerName: Name of created load balancer.
Length is limited to 1-80 characters, allowed to contain letters, numbers, '-, /, _,.' When not specified, a default name will be assigned.
loadBalancerSpec
Optional
- 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 Note 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.
masterZoneId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property masterZoneId: The master zone id to create load balancer instance.
modificationProtectionReason
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property modificationProtectionReason: Set the reason for modifying the protection status.
The length is 1-80 English or Chinese characters, must start with upper and lower letters or Chinese, and can include numbers, periods (.), underscores (_) and dashes (-). Only valid when ModificationProtectionStatus is ConsoleProtection.
modificationProtectionStatus
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property modificationProtectionStatus: NonProtection or empty: means no restriction on modification protection ConsoleProtection: Modify instance protection status by console Default value is empty.
payType
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property payType: Optional.
The billing method of the instance to be created. Valid value: PayOnDemand (Pay-As-You-Go) | PrePay (Subscription)
pricingCycle
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property pricingCycle: Optional.
The duration of the Subscription-billed Internet instance to be created. Valid values: month | year.
resourceGroupId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: Resource group id.
slaveZoneId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property slaveZoneId: The slave zone id to create load balancer instance.
tags
Optional
- 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.
vpcId
Optional
- 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.
vSwitchId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vSwitchId: The VSwitch id to create load balancer instance.
For VPC network only.
Methods
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
synthesize |
Allows this construct to emit artifacts into the cloud assembly during synthesis. |
addCondition |
No description. |
addCount |
No description. |
addDependency |
No description. |
addResourceDesc |
No description. |
applyRemovalPolicy |
No description. |
getAtt |
No description. |
setMetadata |
No description. |
toString
public java.lang.String toString()
Returns a string representation of this construct.
synthesize
public void synthesize(ISynthesisSession session)
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack
and Asset
as they participate in synthesizing the cloud assembly.
- Type: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- Type: java.lang.Object
Static Functions
Name | Description |
---|---|
isConstruct |
Return whether the given object is a Construct. |
isConstruct
import com.aliyun.ros.cdk.slb.LoadBalancer;
LoadBalancer.isConstruct(java.lang.Object x)
Return whether the given object is a Construct.
- Type: java.lang.Object
Properties
Name | Type | Description |
---|---|---|
node |
com.aliyun.ros.cdk.core.ConstructNode |
The construct tree node associated with this construct. |
ref |
java.lang.String |
No description. |
stack |
com.aliyun.ros.cdk.core.Stack |
The stack in which this resource is defined. |
resource |
com.aliyun.ros.cdk.core.RosResource |
No description. |
attrAddressIpVersion |
com.aliyun.ros.cdk.core.IResolvable |
Attribute AddressIPVersion: IP version. |
attrAddressType |
com.aliyun.ros.cdk.core.IResolvable |
Attribute AddressType: The address type of the load balancer. |
attrBandwidth |
com.aliyun.ros.cdk.core.IResolvable |
Attribute Bandwidth: The bandwidth for network. |
attrIpAddress |
com.aliyun.ros.cdk.core.IResolvable |
Attribute IpAddress: The ip address of the load balancer. |
attrLoadBalancerId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute LoadBalancerId: The id of load balance created. |
attrLoadBalancerName |
com.aliyun.ros.cdk.core.IResolvable |
Attribute LoadBalancerName: Name of created load balancer. |
attrLoadBalancerSpec |
com.aliyun.ros.cdk.core.IResolvable |
Attribute LoadBalancerSpec: The specification of the Server Load Balancer instance. |
attrMasterZoneId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute MasterZoneId: The master zone id to create load balancer instance. |
attrNetworkType |
com.aliyun.ros.cdk.core.IResolvable |
Attribute NetworkType: The network type of the load balancer. |
attrOrderId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute OrderId: The order ID. |
attrPayType |
com.aliyun.ros.cdk.core.IResolvable |
Attribute PayType: The billing method of the instance to be created. |
attrResourceGroupId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ResourceGroupId: Resource group id. |
attrSlaveZoneId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute SlaveZoneId: The slave zone id to create load balancer instance. |
attrVpcId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute VpcId: Vpc id. |
attrVSwitchId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute VSwitchId: VSwitch id. |
node
Required
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
ref
Required
public java.lang.String getRef();
- Type: java.lang.String
stack
Required
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resource
Optional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrAddressIpVersion
Required
public IResolvable getAttrAddressIpVersion();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute AddressIPVersion: IP version.
attrAddressType
Required
public IResolvable getAttrAddressType();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute AddressType: The address type of the load balancer.
"intranet" or "internet".
attrBandwidth
Required
public IResolvable getAttrBandwidth();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute Bandwidth: The bandwidth for network.
attrIpAddress
Required
public IResolvable getAttrIpAddress();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute IpAddress: The ip address of the load balancer.
attrLoadBalancerId
Required
public IResolvable getAttrLoadBalancerId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute LoadBalancerId: The id of load balance created.
attrLoadBalancerName
Required
public IResolvable getAttrLoadBalancerName();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute LoadBalancerName: Name of created load balancer.
attrLoadBalancerSpec
Required
public IResolvable getAttrLoadBalancerSpec();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute LoadBalancerSpec: The specification of the Server Load Balancer instance.
attrMasterZoneId
Required
public IResolvable getAttrMasterZoneId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute MasterZoneId: The master zone id to create load balancer instance.
attrNetworkType
Required
public IResolvable getAttrNetworkType();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute NetworkType: The network type of the load balancer.
"vpc" or "classic" network.
attrOrderId
Required
public IResolvable getAttrOrderId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute OrderId: The order ID.
attrPayType
Required
public IResolvable getAttrPayType();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute PayType: The billing method of the instance to be created.
attrResourceGroupId
Required
public IResolvable getAttrResourceGroupId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute ResourceGroupId: Resource group id.
attrSlaveZoneId
Required
public IResolvable getAttrSlaveZoneId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute SlaveZoneId: The slave zone id to create load balancer instance.
attrVpcId
Required
public IResolvable getAttrVpcId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute VpcId: Vpc id.
attrVSwitchId
Required
public IResolvable getAttrVSwitchId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute VSwitchId: VSwitch id.