LoadBalancer
This class encapsulates and extends the ROS resource type ALIYUN::SLB::LoadBalancer
, which is used to create a Server Load Balancer (SLB) instance.
Initializers
import ros_cdk_slb
ros_cdk_slb.LoadBalancer(
scope: Construct,
id: str,
address_ip_version: typing.Union[str, IResolvable] = None,
address_type: typing.Union[str, IResolvable] = None,
bandwidth: typing.Union[typing.Union[int, float], IResolvable] = None,
deletion_protection: typing.Union[bool, IResolvable] = None,
instance_charge_type: typing.Union[str, IResolvable] = None,
internet_charge_type: typing.Union[str, IResolvable] = None,
load_balancer_name: typing.Union[str, IResolvable] = None,
load_balancer_spec: typing.Union[str, IResolvable] = None,
master_zone_id: typing.Union[str, IResolvable] = None,
modification_protection_reason: typing.Union[str, IResolvable] = None,
modification_protection_status: typing.Union[str, IResolvable] = None,
resource_group_id: typing.Union[str, IResolvable] = None,
slave_zone_id: typing.Union[str, IResolvable] = None,
tags: typing.List[TagsProperty] = None,
vpc_id: typing.Union[str, IResolvable] = None,
v_switch_id: typing.Union[str, IResolvable] = None,
enable_resource_property_constraint: bool = None
)
Name | Type | Description |
---|---|---|
scope |
ros_cdk_core.Construct |
No description. |
id |
str |
No description. |
address_ip_version |
typing.Union[str, ros_cdk_core.IResolvable] |
Property addressIpVersion: IP version, support 'ipv4' or 'ipv6'. |
address_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property addressType: The network type of the CLB instance. |
bandwidth |
typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] |
Property bandwidth: The bandwidth for network, unit in Mbps(Mega bit per second). |
deletion_protection |
typing.Union[bool, ros_cdk_core.IResolvable] |
Property deletionProtection: Whether to enable deletion protection. |
instance_charge_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property instanceChargeType: Instance billing method. |
internet_charge_type |
typing.Union[str, ros_cdk_core.IResolvable] |
Property internetChargeType: The metering method of the Internet-facing CLB instance. |
load_balancer_name |
typing.Union[str, ros_cdk_core.IResolvable] |
Property loadBalancerName: Name of created load balancer. |
load_balancer_spec |
typing.Union[str, ros_cdk_core.IResolvable] |
Property loadBalancerSpec: The specification of the CLB instance. |
master_zone_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property masterZoneId: The master zone id to create load balancer instance. |
modification_protection_reason |
typing.Union[str, ros_cdk_core.IResolvable] |
Property modificationProtectionReason: Set the reason for modifying the protection status. |
modification_protection_status |
typing.Union[str, ros_cdk_core.IResolvable] |
Property modificationProtectionStatus: NonProtection or empty: means no restriction on modification protection ConsoleProtection: Modify instance protection status by console Default value is empty. |
resource_group_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property resourceGroupId: Resource group id. |
slave_zone_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property slaveZoneId: The slave zone id to create load balancer instance. |
tags |
typing.List[TagsProperty] |
Property tags: Tags to attach to slb. |
vpc_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property vpcId: The VPC id to create load balancer instance. |
v_switch_id |
typing.Union[str, ros_cdk_core.IResolvable] |
Property vSwitchId: The VSwitch id to create load balancer instance. |
enable_resource_property_constraint |
bool |
No description. |
scope
Required
- Type: ros_cdk_core.Construct
id
Required
- Type: str
address_ip_version
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property addressIpVersion: IP version, support 'ipv4' or 'ipv6'.
If 'ipv6' is selected, please note that the zone and the specification are supported.
address_type
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property addressType: The network type of the CLB instance.
Valid values:
- internet (default): After an internet-facing CLB instance is created, the system assigns a public IP address to the CLB instance. Then, the CLB instance can forward requests over the Internet.
- intranet: After an internal-facing CLB instance is created, the system assigns a private IP address to the CLB instance. Then, the CLB instance can forward requests only over the internal networks.
bandwidth
Optional
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
Property bandwidth: The bandwidth for network, unit in Mbps(Mega bit per second).
Default is 1. If InternetChargeType is specified as "paybytraffic", this property will be ignore and please specify the "Bandwidth" in ALIYUN::SLB::Listener.
deletion_protection
Optional
- Type: typing.Union[bool, ros_cdk_core.IResolvable]
Property deletionProtection: Whether to enable deletion protection.
instance_charge_type
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property instanceChargeType: Instance billing method.
Valid value:
- PayBySpec (default): Pay by spec.
- PayByCLCU: billed by usage.
internet_charge_type
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property internetChargeType: The metering method of the Internet-facing CLB instance.
Valid values:
- paybytraffic (default): If you set the value to paybytraffic, you do not need to specify Bandwidth. Even if you specify Bandwidth, the value does not take effect.
- paybybandwidth: pay-by-bandwidth. Note If you set PayType to PayOnDemand and set InstanceChargeType to PayByCLCU, you must set InternetChargeType to paybytraffic.
load_balancer_name
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property loadBalancerName: Name of created load balancer.
Length is limited to 1-80 characters, allowed to contain letters, numbers, '-, /, _,.' When not specified, a default name will be assigned.
load_balancer_spec
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property loadBalancerSpec: The specification of the CLB instance.
Valid values:
- slb.s1.small
- slb.s2.small
- slb.s2.medium
- slb.s3.small
- slb.s3.medium
- slb.s3.large Note If you do not specify this parameter, a shared-resource CLB instance is created. Shared-resource CLB instances are no longer available for purchase. Therefore, you must specify this parameter. If InstanceChargeType is set to PayByCLCU, this parameter is invalid and you do not need to specify this parameter.
master_zone_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property masterZoneId: The master zone id to create load balancer instance.
modification_protection_reason
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property modificationProtectionReason: Set the reason for modifying the protection status.
The length is 1-80 English or Chinese characters, must start with upper and lower letters or Chinese, and can include numbers, periods (.), underscores (_) and dashes (-). Only valid when ModificationProtectionStatus is ConsoleProtection.
modification_protection_status
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property modificationProtectionStatus: NonProtection or empty: means no restriction on modification protection ConsoleProtection: Modify instance protection status by console Default value is empty.
resource_group_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property resourceGroupId: Resource group id.
slave_zone_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property slaveZoneId: The slave zone id to create load balancer instance.
tags
Optional
- Type: typing.List[TagsProperty]
Property tags: Tags to attach to slb.
Max support 5 tags to add during create slb. Each tag with two properties Key and Value, and Key is required.
vpc_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property vpcId: The VPC id to create load balancer instance.
For VPC network only.
v_switch_id
Optional
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property vSwitchId: The VSwitch id to create load balancer instance.
For VPC network only.
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_slb
ros_cdk_slb.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: IP version. |
attr_address_type |
ros_cdk_core.IResolvable |
Attribute AddressType: The address type of the load balancer. |
attr_bandwidth |
ros_cdk_core.IResolvable |
Attribute Bandwidth: The bandwidth for network. |
attr_ip_address |
ros_cdk_core.IResolvable |
Attribute IpAddress: The ip address of the load balancer. |
attr_load_balancer_id |
ros_cdk_core.IResolvable |
Attribute LoadBalancerId: The id of load balance created. |
attr_load_balancer_name |
ros_cdk_core.IResolvable |
Attribute LoadBalancerName: Name of created load balancer. |
attr_load_balancer_spec |
ros_cdk_core.IResolvable |
Attribute LoadBalancerSpec: The specification of the Server Load Balancer instance. |
attr_master_zone_id |
ros_cdk_core.IResolvable |
Attribute MasterZoneId: The master zone id to create load balancer instance. |
attr_network_type |
ros_cdk_core.IResolvable |
Attribute NetworkType: The network type of the load balancer. |
attr_order_id |
ros_cdk_core.IResolvable |
Attribute OrderId: The order ID. |
attr_pay_type |
ros_cdk_core.IResolvable |
Attribute PayType: The billing method of the instance to be created. |
attr_resource_group_id |
ros_cdk_core.IResolvable |
Attribute ResourceGroupId: Resource group id. |
attr_slave_zone_id |
ros_cdk_core.IResolvable |
Attribute SlaveZoneId: The slave zone id to create load balancer instance. |
attr_vpc_id |
ros_cdk_core.IResolvable |
Attribute VpcId: Vpc id. |
attr_v_switch_id |
ros_cdk_core.IResolvable |
Attribute VSwitchId: VSwitch id. |
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: IP version.
attr_address_type
Required
attr_address_type: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute AddressType: The address type of the load balancer.
"intranet" or "internet".
attr_bandwidth
Required
attr_bandwidth: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute Bandwidth: The bandwidth for network.
attr_ip_address
Required
attr_ip_address: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute IpAddress: The ip address of the load balancer.
attr_load_balancer_id
Required
attr_load_balancer_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute LoadBalancerId: The id of load balance created.
attr_load_balancer_name
Required
attr_load_balancer_name: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute LoadBalancerName: Name of created load balancer.
attr_load_balancer_spec
Required
attr_load_balancer_spec: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute LoadBalancerSpec: The specification of the Server Load Balancer instance.
attr_master_zone_id
Required
attr_master_zone_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute MasterZoneId: The master zone id to create load balancer instance.
attr_network_type
Required
attr_network_type: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute NetworkType: The network type of the load balancer.
"vpc" or "classic" network.
attr_order_id
Required
attr_order_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute OrderId: The order ID.
attr_pay_type
Required
attr_pay_type: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute PayType: The billing method of the instance to be created.
attr_resource_group_id
Required
attr_resource_group_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute ResourceGroupId: Resource group id.
attr_slave_zone_id
Required
attr_slave_zone_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute SlaveZoneId: The slave zone id to create load balancer instance.
attr_vpc_id
Required
attr_vpc_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute VpcId: Vpc id.
attr_v_switch_id
Required
attr_v_switch_id: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute VSwitchId: VSwitch id.