BaseLoadBalancerProps¶
-
class
aws_cdk.aws_elasticloadbalancingv2.
BaseLoadBalancerProps
(*, vpc, deletion_protection=None, internet_facing=None, load_balancer_name=None, vpc_subnets=None)¶ Bases:
object
Shared properties of both Application and Network Load Balancers.
- Parameters
vpc (
IVpc
) – The VPC network to place the load balancer in.deletion_protection (
Optional
[bool
]) – Indicates whether deletion protection is enabled. Default: falseinternet_facing (
Optional
[bool
]) – Whether the load balancer has an internet-routable address. Default: falseload_balancer_name (
Optional
[str
]) – Name of the load balancer. Default: - Automatically generated name.vpc_subnets (
Optional
[SubnetSelection
]) – Which subnets place the load balancer in. Default: - the Vpc default strategy.
- ExampleMetadata
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_ec2 as ec2 import aws_cdk.aws_elasticloadbalancingv2 as elbv2 # subnet: ec2.Subnet # subnet_filter: ec2.SubnetFilter # vpc: ec2.Vpc base_load_balancer_props = elbv2.BaseLoadBalancerProps( vpc=vpc, # the properties below are optional deletion_protection=False, internet_facing=False, load_balancer_name="loadBalancerName", vpc_subnets=ec2.SubnetSelection( availability_zones=["availabilityZones"], one_per_az=False, subnet_filters=[subnet_filter], subnet_group_name="subnetGroupName", subnet_name="subnetName", subnets=[subnet], subnet_type=ec2.SubnetType.ISOLATED ) )
Attributes
-
deletion_protection
¶ Indicates whether deletion protection is enabled.
- Default
false
- Return type
Optional
[bool
]
-
internet_facing
¶ Whether the load balancer has an internet-routable address.
- Default
false
- Return type
Optional
[bool
]
-
load_balancer_name
¶ Name of the load balancer.
- Default
Automatically generated name.
- Return type
Optional
[str
]
-
vpc_subnets
¶ Which subnets place the load balancer in.
- Default
the Vpc default strategy.
- Return type
Optional
[SubnetSelection
]