Skip to content

LoadBalancer

This class encapsulates and extends the ROS resource type ALIYUN::ALB::LoadBalancer, which is used to create an Application Load Balancer (ALB) instance.

Initializers

import com.aliyun.ros.cdk.alb.LoadBalancer;
LoadBalancer.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
    .addressType(java.lang.String)
    .addressType(IResolvable)
    .loadBalancerBillingConfig(IResolvable)
    .loadBalancerBillingConfig(LoadBalancerBillingConfigProperty)
    .loadBalancerEdition(java.lang.String)
    .loadBalancerEdition(IResolvable)
    .loadBalancerName(java.lang.String)
    .loadBalancerName(IResolvable)
    .vpcId(java.lang.String)
    .vpcId(IResolvable)
    .zoneMappings(IResolvable)
    .zoneMappings(java.util.List<IResolvable)
    .zoneMappings(ZoneMappingsProperty>)
//  .accessLogConfig(IResolvable)
//  .accessLogConfig(AccessLogConfigProperty)
//  .addressAllocatedMode(java.lang.String)
//  .addressAllocatedMode(IResolvable)
//  .addressIpVersion(java.lang.String)
//  .addressIpVersion(IResolvable)
//  .bandwidthPackageId(java.lang.String)
//  .bandwidthPackageId(IResolvable)
//  .deletionProtectionEnabled(java.lang.Boolean)
//  .deletionProtectionEnabled(IResolvable)
//  .modificationProtectionConfig(IResolvable)
//  .modificationProtectionConfig(ModificationProtectionConfigProperty)
//  .resourceGroupId(java.lang.String)
//  .resourceGroupId(IResolvable)
//  .securityGroupIds(IResolvable)
//  .securityGroupIds(java.util.List<java.lang.String)
//  .securityGroupIds(IResolvable>)
//  .tags(java.util.List<TagsProperty>)
    .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 ALB instance uses to provide services.
loadBalancerBillingConfig com.aliyun.ros.cdk.core.IResolvable OR LoadBalancerBillingConfigProperty Property loadBalancerBillingConfig: The configuration of the billing method.
loadBalancerEdition java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property loadBalancerEdition: The edition of the ALB instance.
loadBalancerName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property loadBalancerName: The name of the ALB instance.
vpcId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property vpcId: The ID of the virtual private cloud (VPC) where the ALB instance is deployed.
zoneMappings com.aliyun.ros.cdk.core.IResolvable OR java.util.ListZoneMappingsProperty> Property zoneMappings: The zones and the vSwitches in the zones.
accessLogConfig com.aliyun.ros.cdk.core.IResolvable OR AccessLogConfigProperty Property accessLogConfig:.
addressAllocatedMode java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property addressAllocatedMode: The mode in which IP addresses are assigned.
addressIpVersion java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property addressIpVersion: The protocol version.
bandwidthPackageId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property bandwidthPackageId: Attach common bandwidth package to load balancer.
deletionProtectionEnabled java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property deletionProtectionEnabled: Specifies whether to enable deletion protection.
modificationProtectionConfig com.aliyun.ros.cdk.core.IResolvable OR ModificationProtectionConfigProperty Property modificationProtectionConfig: The configuration of modification protection.
resourceGroupId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property resourceGroupId: The ID of the resource group.
securityGroupIds com.aliyun.ros.cdk.core.IResolvable OR java.util.List Property securityGroupIds: The IDs of the security group to which the ALB instance join.
tags java.util.List<TagsProperty> Property tags: Tags to attach to instance.

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 ALB instance uses to provide services.

Valid values: Internet: The ALB instance uses a public IP address. The domain name of the ALB instance is resolved to the public IP address. Therefore, the ALB instance can be accessed over the Internet. Intranet: The ALB instance uses a private IP address. The domain name of the ALB instance is resolved to the private IP address. Therefore, the ALB instance can be accessed over the VPC where the ALB instance is deployed.


loadBalancerBillingConfigRequired

Property loadBalancerBillingConfig: The configuration of the billing method.


loadBalancerEditionRequired

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

Property loadBalancerEdition: The edition of the ALB instance.

Different editions have different limits and billing methods. Valid values: Basic: Basic Edition Standard: Standard Edition StandardWithWaf: Standard Edition with WAF


loadBalancerNameRequired

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

Property loadBalancerName: The name of the ALB 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.


vpcIdRequired

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

Property vpcId: The ID of the virtual private cloud (VPC) where the ALB 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.


accessLogConfigOptional

Property accessLogConfig:.


addressAllocatedModeOptional

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

Property addressAllocatedMode: The mode in which IP addresses are assigned.

Valid values: Fixed: The ALB instance uses a static IP address. Dynamic: An IP address is dynamically assigned to the ALB instance in each zone. This is the default value.


addressIpVersionOptional

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

Property addressIpVersion: The protocol version.

Valid values: IPv4: IPv4 DualStack: dual stack


bandwidthPackageIdOptional

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

Property bandwidthPackageId: Attach common bandwidth package to load balancer.

It only takes effect when AddressType=Internet.


deletionProtectionEnabledOptional

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

Property deletionProtectionEnabled: Specifies whether to enable deletion protection.

Default value: false.


modificationProtectionConfigOptional

Property modificationProtectionConfig: The configuration of modification protection.


resourceGroupIdOptional

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

Property resourceGroupId: The ID of the resource group.


securityGroupIdsOptional

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

Property securityGroupIds: The IDs of the security group to which the ALB instance join.


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.


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.

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

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.alb.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.
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.
attrAddressType com.aliyun.ros.cdk.core.IResolvable Attribute AddressType: The type of IP address that the ALB instance uses to provide services.
attrDnsName com.aliyun.ros.cdk.core.IResolvable Attribute DNSName: The domain name of the ALB instance.
attrLoadBalancerEdition com.aliyun.ros.cdk.core.IResolvable Attribute LoadBalancerEdition: The edition of the ALB instance.
attrLoadBalancerId com.aliyun.ros.cdk.core.IResolvable Attribute LoadBalancerId: The ID of the ALB instance.
attrVpcId com.aliyun.ros.cdk.core.IResolvable Attribute VpcId: The ID of the virtual private cloud (VPC) where the ALB instance is deployed.
attrZoneMappings com.aliyun.ros.cdk.core.IResolvable Attribute ZoneMappings: The zones, vSwitches and addresses which are mapped to the zones.

nodeRequired

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

The construct tree node associated with this construct.


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

attrAddressTypeRequired

public IResolvable getAttrAddressType();
  • Type: com.aliyun.ros.cdk.core.IResolvable

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


attrDnsNameRequired

public IResolvable getAttrDnsName();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute DNSName: The domain name of the ALB instance.


attrLoadBalancerEditionRequired

public IResolvable getAttrLoadBalancerEdition();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute LoadBalancerEdition: The edition of the ALB instance.


attrLoadBalancerIdRequired

public IResolvable getAttrLoadBalancerId();
  • Type: com.aliyun.ros.cdk.core.IResolvable

Attribute LoadBalancerId: The ID of the ALB instance.


attrVpcIdRequired

public IResolvable getAttrVpcId();
  • Type: com.aliyun.ros.cdk.core.IResolvable

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


attrZoneMappingsRequired

public IResolvable getAttrZoneMappings();
  • Type: com.aliyun.ros.cdk.core.IResolvable

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