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 ros_cdk_nlb
ros_cdk_nlb.LoadBalancer(
scope: Construct,
id: str,
address_type: typing.Union[str, IResolvable],
vpc_id: typing.Union[str, IResolvable],
zone_mappings: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, ZoneMappingsProperty]]],
address_ip_version: typing.Union[str, IResolvable] = None,
bandwidth_package_id: typing.Union[str, IResolvable] = None,
cross_zone_enabled: typing.Union[bool, IResolvable] = None,
deletion_protection_config: typing.Union[IResolvable, DeletionProtectionConfigProperty] = None,
load_balancer_billing_config: typing.Union[IResolvable, LoadBalancerBillingConfigProperty] = None,
load_balancer_name: typing.Union[str, IResolvable] = None,
load_balancer_type: typing.Union[str, IResolvable] = None,
modification_protection_config: typing.Union[IResolvable, ModificationProtectionConfigProperty] = None,
resource_group_id: typing.Union[str, IResolvable] = None,
tags: typing.List[TagsProperty] = None,
traffic_affinity_enabled: typing.Union[bool, IResolvable] = None,
enable_resource_property_constraint: bool = None
)
Name | Type | Description |
---|---|---|
scope |
ros_cdk_core.Construct |
No description. |
id |
str |
No description. |
address_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property addressType: The type of IP address that the NLB instance uses to provide services. |
vpc_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property vpcId: The ID of the virtual private cloud (VPC) where the NLB instance is deployed. |
zone_mappings |
typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, ZoneMappingsProperty]]] |
Property zoneMappings: The zones and the vSwitches in the zones. |
address_ip_version |
typing.Union[str, ros_cdk_core.IResolvable] |
Property addressIpVersion: The version of IP address that the NLB instance uses to provide services. |
bandwidth_package_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property bandwidthPackageId: Attach common bandwidth package to load balancer. |
cross_zone_enabled |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property crossZoneEnabled: Whether enable cross zone. |
deletion_protection_config |
typing.Union[ros_cdk_core.IResolvable, DeletionProtectionConfigProperty] |
Property deletionProtectionConfig: The configuration of the deletion protection feature. |
load_balancer_billing_config |
typing.Union[ros_cdk_core.IResolvable, LoadBalancerBillingConfigProperty] |
Property loadBalancerBillingConfig: The configuration of the billing method. |
load_balancer_name |
typing.Union[str, ros_cdk_core.IResolvable] |
Property loadBalancerName: The name of the NLB instance. |
load_balancer_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property loadBalancerType: The type of the NLB instance. |
modification_protection_config |
typing.Union[ros_cdk_core.IResolvable, ModificationProtectionConfigProperty] |
Property modificationProtectionConfig: The configuration of the configuration read-only mode. |
resource_group_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property resourceGroupId: The ID of the resource group. |
tags |
typing.List[TagsProperty] |
Property tags: Tags to attach to instance. |
traffic_affinity_enabled |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property trafficAffinityEnabled: Whether enable traffic affinity. |
enable_resource_property_constraint |
bool |
No description. |
scope
Required
- Type: ros_cdk_core.Construct
id
Required
- Type: str
address_type
Required
- Type: typing.Union[str, 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.
vpc_id
Required
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property vpcId: The ID of the virtual private cloud (VPC) where the NLB instance is deployed.
zone_mappings
Required
- Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, ZoneMappingsProperty]]]
Property zoneMappings: The zones and the vSwitches in the zones.
You must specify at least two zones.
address_ip_version
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property addressIpVersion: The version of IP address that the NLB instance uses to provide services.
bandwidth_package_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property bandwidthPackageId: Attach common bandwidth package to load balancer.
cross_zone_enabled
Optional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property crossZoneEnabled: Whether enable cross zone.
Default: true
deletion_protection_config
Optional
- Type: typing.Union[ros_cdk_core.IResolvable, DeletionProtectionConfigProperty]
Property deletionProtectionConfig: The configuration of the deletion protection feature.
load_balancer_billing_config
Optional
- Type: typing.Union[ros_cdk_core.IResolvable, LoadBalancerBillingConfigProperty]
Property loadBalancerBillingConfig: The configuration of the billing method.
load_balancer_name
Optional
- Type: typing.Union[str, 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.
load_balancer_type
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property loadBalancerType: The type of the NLB instance.
modification_protection_config
Optional
- Type: typing.Union[ros_cdk_core.IResolvable, ModificationProtectionConfigProperty]
Property modificationProtectionConfig: The configuration of the configuration read-only mode.
resource_group_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property resourceGroupId: The ID of the resource group.
tags
Optional
- Type: typing.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.
traffic_affinity_enabled
Optional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property trafficAffinityEnabled: Whether enable traffic affinity.
Default: false
enable_resource_property_constraint
Optional
- Type: bool
Methods
Name | Description |
---|---|
to_string |
Returns a string representation of this construct. |
synthesize |
Allows this construct to emit artifacts into the cloud assembly during synthesis. |
add_condition |
No description. |
add_count |
No description. |
add_dependency |
No description. |
add_resource_desc |
No description. |
apply_removal_policy |
No description. |
get_att |
No description. |
set_metadata |
No description. |
to_string
def to_string() -> str
Returns a string representation of this construct.
synthesize
def synthesize(
session: ISynthesisSession
) -> None
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: ros_cdk_core.ISynthesisSession
The synthesis session.
add_condition
def add_condition(
condition: RosCondition
) -> None
- Type: ros_cdk_core.RosCondition
add_count
def add_count(
count: typing.Union[typing.Union[int, float], IResolvable]
) -> None
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
add_dependency
def add_dependency(
resource: Resource
) -> None
- Type: ros_cdk_core.Resource
add_resource_desc
def add_resource_desc(
desc: str
) -> None
- Type: str
apply_removal_policy
def apply_removal_policy(
policy: RemovalPolicy
) -> None
- Type: ros_cdk_core.RemovalPolicy
get_att
def get_att(
name: str
) -> IResolvable
- Type: str
set_metadata
def set_metadata(
key: str,
value: typing.Any
) -> None
- Type: str
- Type: typing.Any
Static Functions
Name | Description |
---|---|
is_construct |
Return whether the given object is a Construct. |
is_construct
import ros_cdk_nlb
ros_cdk_nlb.LoadBalancer.is_construct(
x: typing.Any
)
Return whether the given object is a Construct.
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node |
ros_cdk_core.ConstructNode |
The construct tree node associated with this construct. |
ref |
str |
No description. |
stack |
ros_cdk_core.Stack |
The stack in which this resource is defined. |
resource |
ros_cdk_core.RosResource |
No description. |
attr_address_ip_version |
ros_cdk_core.IResolvable |
Attribute AddressIpVersion: The version of IP address that the NLB instance uses to provide services. |
attr_address_type |
ros_cdk_core.IResolvable |
Attribute AddressType: The type of IP address that the NLB instance uses to provide services. |
attr_dns_name |
ros_cdk_core.IResolvable |
Attribute DNSName: The domain name of the NLB instance. |
attr_load_balancer_id |
ros_cdk_core.IResolvable |
Attribute LoadBalancerId: The ID of the NLB instance. |
attr_load_balancer_type |
ros_cdk_core.IResolvable |
Attribute LoadBalancerType: The type of the NLB instance. |
attr_vpc_id |
ros_cdk_core.IResolvable |
Attribute VpcId: The ID of the virtual private cloud (VPC) where the NLB instance is deployed. |
attr_zone_mappings |
ros_cdk_core.IResolvable |
Attribute ZoneMappings: The zones, vSwitches and addresses which are mapped to the zones. |
node
Required
node: ConstructNode
- Type: ros_cdk_core.ConstructNode
The construct tree node associated with this construct.
ref
Required
ref: str
- Type: str
stack
Required
stack: Stack
- Type: ros_cdk_core.Stack
The stack in which this resource is defined.
resource
Optional
resource: RosResource
- Type: ros_cdk_core.RosResource
attr_address_ip_version
Required
attr_address_ip_version: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute AddressIpVersion: The version of IP address that the NLB instance uses to provide services.
attr_address_type
Required
attr_address_type: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute AddressType: The type of IP address that the NLB instance uses to provide services.
attr_dns_name
Required
attr_dns_name: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute DNSName: The domain name of the NLB instance.
attr_load_balancer_id
Required
attr_load_balancer_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute LoadBalancerId: The ID of the NLB instance.
attr_load_balancer_type
Required
attr_load_balancer_type: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute LoadBalancerType: The type of the NLB instance.
attr_vpc_id
Required
attr_vpc_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute VpcId: The ID of the virtual private cloud (VPC) where the NLB instance is deployed.
attr_zone_mappings
Required
attr_zone_mappings: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute ZoneMappings: The zones, vSwitches and addresses which are mapped to the zones.