Skip to content

LoadBalancer

This class encapsulates and extends the ROS resource type ALIYUN::NLB::LoadBalancer.

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.ListZoneMappingsProperty> 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 addresses used for the NLB instance.
bandwidthPackageId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property bandwidthPackageId: The ID of the Internet Shared Bandwidth instance that is associated with the Internet-facing NLB instance.
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 Server Load Balancer (SLB) 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.

scopeRequired

  • Type: com.aliyun.ros.cdk.core.Construct

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

addressTypeRequired

  • 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.


vpcIdRequired

  • 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.


zoneMappingsRequired

  • Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.ListZoneMappingsProperty>

Property zoneMappings: The zones and the vSwitches in the zones.

You must specify at least two zones.


addressIpVersionOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property addressIpVersion: The version of IP addresses used for the NLB instance.

Valid values:

  • ipv4 (default)
  • DualStack

bandwidthPackageIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property bandwidthPackageId: The ID of the Internet Shared Bandwidth instance that is associated with the Internet-facing NLB instance.


crossZoneEnabledOptional

  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property crossZoneEnabled: Whether enable cross zone.

Default: true


deletionProtectionConfigOptional

Property deletionProtectionConfig: The configuration of the deletion protection feature.


loadBalancerBillingConfigOptional

Property loadBalancerBillingConfig: The configuration of the billing method.


loadBalancerNameOptional

  • 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.


loadBalancerTypeOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property loadBalancerType: The type of the Server Load Balancer (SLB) instance.

Set the value to network, which indicates an NLB instance.


modificationProtectionConfigOptional

Property modificationProtectionConfig: The configuration of the configuration read-only mode.


resourceGroupIdOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property resourceGroupId: The ID of the resource group.


tagsOptional

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.


trafficAffinityEnabledOptional

  • 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.
fetchCondition No description.
fetchDependency No description.
fetchResourceDesc 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.

sessionRequired

  • Type: com.aliyun.ros.cdk.core.ISynthesisSession

The synthesis session.


addCondition

public void addCondition(RosCondition condition)

conditionRequired

  • Type: com.aliyun.ros.cdk.core.RosCondition

addCount

public void addCount(java.lang.Number OR IResolvable count)

countRequired

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

addDependency

public void addDependency(Resource resource)

resourceRequired

  • Type: com.aliyun.ros.cdk.core.Resource

addResourceDesc

public void addResourceDesc(java.lang.String desc)

descRequired

  • Type: java.lang.String

applyRemovalPolicy

public void applyRemovalPolicy(RemovalPolicy policy)

policyRequired

  • Type: com.aliyun.ros.cdk.core.RemovalPolicy

fetchCondition

public RosCondition fetchCondition()

fetchDependency

public java.util.List<java.lang.String> fetchDependency()

fetchResourceDesc

public java.lang.String fetchResourceDesc()

getAtt

public IResolvable getAtt(java.lang.String name)

nameRequired

  • Type: java.lang.String

setMetadata

public void setMetadata(java.lang.String key, java.lang.Object value)

keyRequired

  • Type: java.lang.String

valueRequired

  • 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.

xRequired

  • Type: java.lang.Object

Properties

Name Type Description
node com.aliyun.ros.cdk.core.ConstructNode The construct tree node associated with this construct.
env com.aliyun.ros.cdk.core.IResourceEnvironment The environment this resource belongs to.
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 java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute AddressIpVersion: The version of IP address that the NLB instance uses to provide services.
attrAddressType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute AddressType: The type of IP address that the NLB instance uses to provide services.
attrArn java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute Arn: The Alibaba Cloud Resource Name (ARN).
attrDnsName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute DNSName: The domain name of the NLB instance.
attrLoadBalancerId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute LoadBalancerId: The ID of the NLB instance.
attrLoadBalancerType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute LoadBalancerType: The type of the NLB instance.
attrVpcId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute VpcId: The ID of the virtual private cloud (VPC) where the NLB instance is deployed.
attrZoneMappings java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute ZoneMappings: The zones, vSwitches and addresses which are mapped to the zones.
props LoadBalancerProps No description.

nodeRequired

public ConstructNode getNode();
  • Type: com.aliyun.ros.cdk.core.ConstructNode

The construct tree node associated with this construct.


envRequired

public IResourceEnvironment getEnv();
  • Type: com.aliyun.ros.cdk.core.IResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


refRequired

public java.lang.String getRef();
  • Type: java.lang.String

stackRequired

public Stack getStack();
  • Type: com.aliyun.ros.cdk.core.Stack

The stack in which this resource is defined.


resourceOptional

public RosResource getResource();
  • Type: com.aliyun.ros.cdk.core.RosResource

attrAddressIpVersionRequired

public java.lang.Object getAttrAddressIpVersion();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute AddressIpVersion: The version of IP address that the NLB instance uses to provide services.


attrAddressTypeRequired

public java.lang.Object getAttrAddressType();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute AddressType: The type of IP address that the NLB instance uses to provide services.


attrArnRequired

public java.lang.Object getAttrArn();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute Arn: The Alibaba Cloud Resource Name (ARN).


attrDnsNameRequired

public java.lang.Object getAttrDnsName();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute DNSName: The domain name of the NLB instance.


attrLoadBalancerIdRequired

public java.lang.Object getAttrLoadBalancerId();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute LoadBalancerId: The ID of the NLB instance.


attrLoadBalancerTypeRequired

public java.lang.Object getAttrLoadBalancerType();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute LoadBalancerType: The type of the NLB instance.


attrVpcIdRequired

public java.lang.Object getAttrVpcId();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute VpcId: The ID of the virtual private cloud (VPC) where the NLB instance is deployed.


attrZoneMappingsRequired

public java.lang.Object getAttrZoneMappings();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Attribute ZoneMappings: The zones, vSwitches and addresses which are mapped to the zones.


propsRequired

public LoadBalancerProps getProps();