LoadBalancer
This class encapsulates and extends the ROS resource type ALIYUN::NLB::LoadBalancer
, which is used to create a Network Load Balancer (NLB) instance.
Initializers
import com.aliyun.ros.cdk.nlb.LoadBalancer;
LoadBalancer.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
.addressType(java.lang.String)
.addressType(IResolvable)
.vpcId(java.lang.String)
.vpcId(IResolvable)
.zoneMappings(IResolvable)
.zoneMappings(java.util.List<IResolvable)
.zoneMappings(ZoneMappingsProperty>)
// .addressIpVersion(java.lang.String)
// .addressIpVersion(IResolvable)
// .bandwidthPackageId(java.lang.String)
// .bandwidthPackageId(IResolvable)
// .crossZoneEnabled(java.lang.Boolean)
// .crossZoneEnabled(IResolvable)
// .deletionProtectionConfig(IResolvable)
// .deletionProtectionConfig(DeletionProtectionConfigProperty)
// .loadBalancerBillingConfig(IResolvable)
// .loadBalancerBillingConfig(LoadBalancerBillingConfigProperty)
// .loadBalancerName(java.lang.String)
// .loadBalancerName(IResolvable)
// .loadBalancerType(java.lang.String)
// .loadBalancerType(IResolvable)
// .modificationProtectionConfig(IResolvable)
// .modificationProtectionConfig(ModificationProtectionConfigProperty)
// .resourceGroupId(java.lang.String)
// .resourceGroupId(IResolvable)
// .tags(java.util.List<TagsProperty>)
// .trafficAffinityEnabled(java.lang.Boolean)
// .trafficAffinityEnabled(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. |
addressType |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property addressType: The type of IP address that the NLB instance uses to provide services. |
vpcId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property vpcId: The ID of the virtual private cloud (VPC) where the NLB instance is deployed. |
zoneMappings |
com.aliyun.ros.cdk.core.IResolvable OR java.util.List |
Property zoneMappings: The zones and the vSwitches in the zones. |
addressIpVersion |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property addressIpVersion: The version of IP address that the NLB instance uses to provide services. |
bandwidthPackageId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property bandwidthPackageId: Attach common bandwidth package to load balancer. |
crossZoneEnabled |
java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable |
Property crossZoneEnabled: Whether enable cross zone. |
deletionProtectionConfig |
com.aliyun.ros.cdk.core.IResolvable OR DeletionProtectionConfigProperty |
Property deletionProtectionConfig: The configuration of the deletion protection feature. |
loadBalancerBillingConfig |
com.aliyun.ros.cdk.core.IResolvable OR LoadBalancerBillingConfigProperty |
Property loadBalancerBillingConfig: The configuration of the billing method. |
loadBalancerName |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property loadBalancerName: The name of the NLB instance. |
loadBalancerType |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property loadBalancerType: The type of the NLB instance. |
modificationProtectionConfig |
com.aliyun.ros.cdk.core.IResolvable OR ModificationProtectionConfigProperty |
Property modificationProtectionConfig: The configuration of the configuration read-only mode. |
resourceGroupId |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property resourceGroupId: The ID of the resource group. |
tags |
java.util.List<TagsProperty> |
Property tags: Tags to attach to instance. |
trafficAffinityEnabled |
java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable |
Property trafficAffinityEnabled: Whether enable traffic affinity. |
scope
Required
- Type: com.aliyun.ros.cdk.core.Construct
id
Required
- Type: java.lang.String
enableResourcePropertyConstraint
Optional
- Type: java.lang.Boolean
addressType
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property addressType: The type of IP address that the NLB instance uses to provide services.
Valid values: Internet: The NLB instance uses a public IP address. The domain name of the NLB instance is resolved to the public IP address. Therefore, the NLB instance can be accessed over the Internet. Intranet: The NLB instance uses a private IP address. The domain name of the NLB instance is resolved to the private IP address. Therefore, the NLB instance can be accessed over the VPC where the NLB instance is deployed.
vpcId
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property vpcId: The ID of the virtual private cloud (VPC) where the NLB instance is deployed.
zoneMappings
Required
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
ZoneMappingsProperty>
Property zoneMappings: The zones and the vSwitches in the zones.
You must specify at least two zones.
addressIpVersion
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property addressIpVersion: The version of IP address that the NLB instance uses to provide services.
bandwidthPackageId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property bandwidthPackageId: Attach common bandwidth package to load balancer.
crossZoneEnabled
Optional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property crossZoneEnabled: Whether enable cross zone.
Default: true
deletionProtectionConfig
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR DeletionProtectionConfigProperty
Property deletionProtectionConfig: The configuration of the deletion protection feature.
loadBalancerBillingConfig
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR LoadBalancerBillingConfigProperty
Property loadBalancerBillingConfig: The configuration of the billing method.
loadBalancerName
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property loadBalancerName: The name of the NLB instance.
The name must be 2 to 128 characters in length, and can contain letters, digits, periods(.), underscores (_), and hyphens (-). The name must start with a letter.
loadBalancerType
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property loadBalancerType: The type of the NLB instance.
modificationProtectionConfig
Optional
- Type: com.aliyun.ros.cdk.core.IResolvable OR ModificationProtectionConfigProperty
Property modificationProtectionConfig: The configuration of the configuration read-only mode.
resourceGroupId
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property resourceGroupId: The ID of the resource group.
tags
Optional
- Type: java.util.List<TagsProperty>
Property tags: Tags to attach to instance.
Max support 20 tags to add during create instance. Each tag with two properties Key and Value, and Key is required.
trafficAffinityEnabled
Optional
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property trafficAffinityEnabled: Whether enable traffic affinity.
Default: false
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.nlb.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: The version of IP address that the NLB instance uses to provide services. |
attrAddressType |
com.aliyun.ros.cdk.core.IResolvable |
Attribute AddressType: The type of IP address that the NLB instance uses to provide services. |
attrDnsName |
com.aliyun.ros.cdk.core.IResolvable |
Attribute DNSName: The domain name of the NLB instance. |
attrLoadBalancerId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute LoadBalancerId: The ID of the NLB instance. |
attrLoadBalancerType |
com.aliyun.ros.cdk.core.IResolvable |
Attribute LoadBalancerType: The type of the NLB instance. |
attrVpcId |
com.aliyun.ros.cdk.core.IResolvable |
Attribute VpcId: The ID of the virtual private cloud (VPC) where the NLB instance is deployed. |
attrZoneMappings |
com.aliyun.ros.cdk.core.IResolvable |
Attribute ZoneMappings: The zones, vSwitches and addresses which are mapped to the zones. |
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: The version of IP address that the NLB instance uses to provide services.
attrAddressType
Required
public IResolvable getAttrAddressType();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute AddressType: The type of IP address that the NLB instance uses to provide services.
attrDnsName
Required
public IResolvable getAttrDnsName();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute DNSName: The domain name of the NLB instance.
attrLoadBalancerId
Required
public IResolvable getAttrLoadBalancerId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute LoadBalancerId: The ID of the NLB instance.
attrLoadBalancerType
Required
public IResolvable getAttrLoadBalancerType();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute LoadBalancerType: The type of the NLB instance.
attrVpcId
Required
public IResolvable getAttrVpcId();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute VpcId: The ID of the virtual private cloud (VPC) where the NLB instance is deployed.
attrZoneMappings
Required
public IResolvable getAttrZoneMappings();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute ZoneMappings: The zones, vSwitches and addresses which are mapped to the zones.