BaseLoadBalancerProps

class aws_cdk.aws_elasticloadbalancingv2.BaseLoadBalancerProps(*, vpc, cross_zone_enabled=None, deletion_protection=None, deny_all_igw_traffic=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.

  • cross_zone_enabled (Optional[bool]) – Indicates whether cross-zone load balancing is enabled. Default: - false for Network Load Balancers and true for Application Load Balancers. This can not be false for Application Load Balancers.

  • deletion_protection (Optional[bool]) – Indicates whether deletion protection is enabled. Default: false

  • deny_all_igw_traffic (Optional[bool]) – Indicates whether the load balancer blocks traffic through the Internet Gateway (IGW). Default: - false for internet-facing load balancers and true for internal load balancers

  • internet_facing (Optional[bool]) – Whether the load balancer has an internet-routable address. Default: false

  • load_balancer_name (Optional[str]) – Name of the load balancer. Default: - Automatically generated name.

  • vpc_subnets (Union[SubnetSelection, Dict[str, Any], None]) – 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.
from aws_cdk import aws_ec2 as ec2
from aws_cdk import 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
    cross_zone_enabled=False,
    deletion_protection=False,
    deny_all_igw_traffic=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",
        subnets=[subnet],
        subnet_type=ec2.SubnetType.PRIVATE_ISOLATED
    )
)

Attributes

cross_zone_enabled

Indicates whether cross-zone load balancing is enabled.

Default:

  • false for Network Load Balancers and true for Application Load Balancers.

This can not be false for Application Load Balancers.

See:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-loadbalancer-loadbalancerattribute.html

deletion_protection

Indicates whether deletion protection is enabled.

Default:

false

deny_all_igw_traffic

Indicates whether the load balancer blocks traffic through the Internet Gateway (IGW).

Default:
  • false for internet-facing load balancers and true for internal load balancers

internet_facing

Whether the load balancer has an internet-routable address.

Default:

false

load_balancer_name

Name of the load balancer.

Default:
  • Automatically generated name.

vpc

The VPC network to place the load balancer in.

vpc_subnets

Which subnets place the load balancer in.

Default:
  • the Vpc default strategy.