LoadBalancer
- Implements: ILoadBalancer
This class encapsulates and extends the ROS resource type ALIYUN::ALB::LoadBalancer.
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)
.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)
// .ipv6AddressType(java.lang.String)
// .ipv6AddressType(IResolvable)
// .loadBalancerName(java.lang.String)
// .loadBalancerName(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. |
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.List | 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: Address allocation mode. |
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. |
ipv6AddressType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property ipv6AddressType: The type of IPv6 address that the ALB instance uses to provide services. |
loadBalancerName | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property loadBalancerName: The name of the Application Load Balancer (ALB) instance. |
modificationProtectionConfig | com.aliyun.ros.cdk.core.IResolvable OR ModificationProtectionConfigProperty | Property modificationProtectionConfig: The modification protection configuration. |
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
- Type: com.aliyun.ros.cdk.core.IResolvable OR LoadBalancerBillingConfigProperty
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
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.List
ZoneMappingsProperty>
Property zoneMappings: The zones and the vSwitches in the zones.
You must specify at least two zones.
accessLogConfigOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR AccessLogConfigProperty
Property accessLogConfig:.
addressAllocatedModeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property addressAllocatedMode: Address allocation mode.
Valid values:
- Fixed (Default): A fixed IP address is allocated to each zone.
- Dynamic: Dynamic IP mode. IP addresses are dynamically allocated for each zone.
Starting from , when you create a new instance by using this interface, it is created as an upgraded ALB instance regardless of the mode you specify. The distinction between IP modes is removed, and the allocated IP addresses are automatically elastic. ALB instances created before the upgrade are not affected.
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.
ipv6AddressTypeOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property ipv6AddressType: The type of IPv6 address that the ALB instance uses to provide services.
Valid values: Internet: The ALB instance uses a public IPv6 address. The domain name of the ALB instance is resolved to the public IPv6 address. Intranet: The ALB instance uses a private IPv6 address. The domain name of the ALB instance is resolved to the private IP address.
loadBalancerNameOptional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property loadBalancerName: The name of the Application Load Balancer (ALB) instance.
The name must be 2 to 128 characters long, must start with a letter, digit, or Chinese character, and can contain digits, periods (.), underscores (_), hyphens (-), and spaces.
modificationProtectionConfigOptional
- Type: com.aliyun.ros.cdk.core.IResolvable OR ModificationProtectionConfigProperty
Property modificationProtectionConfig: The modification protection configuration.
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
- 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.
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.
- 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
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)
- 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.alb.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. |
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. |
attrAddressType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute AddressType: The type of IP address that the ALB 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 ALB instance. |
attrLoadBalancerEdition | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute LoadBalancerEdition: The edition of the ALB instance. |
attrLoadBalancerId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute LoadBalancerId: The ID of the ALB instance. |
attrVpcId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Attribute VpcId: The ID of the virtual private cloud (VPC) where the ALB 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
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 ALB 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 ALB instance.
attrLoadBalancerEditionRequired
public java.lang.Object getAttrLoadBalancerEdition();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute LoadBalancerEdition: The edition of the ALB instance.
attrLoadBalancerIdRequired
public java.lang.Object getAttrLoadBalancerId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Attribute LoadBalancerId: The ID of the ALB 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 ALB 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();
- Type: LoadBalancerProps