LoadBalancerProps

class aws_cdk.aws_elasticloadbalancing.LoadBalancerProps(*, vpc, cross_zone=None, health_check=None, internet_facing=None, listeners=None, subnet_selection=None, targets=None)

Bases: object

Construction properties for a LoadBalancer.

Parameters
  • vpc (IVpc) – VPC network of the fleet instances.

  • cross_zone (Optional[bool]) – Whether cross zone load balancing is enabled. This controls whether the load balancer evenly distributes requests across each availability zone Default: true

  • health_check (Optional[HealthCheck]) – Health check settings for the load balancing targets. Not required but recommended. Default: - None.

  • internet_facing (Optional[bool]) – Whether this is an internet-facing Load Balancer. This controls whether the LB has a public IP address assigned. It does not open up the Load Balancer’s security groups to public internet access. Default: false

  • listeners (Optional[List[LoadBalancerListener]]) – What listeners to set up for the load balancer. Can also be added by .addListener() Default: -

  • subnet_selection (Optional[SubnetSelection]) – Which subnets to deploy the load balancer. Can be used to define a specific set of subnets to deploy the load balancer to. Useful multiple public or private subnets are covering the same availability zone. Default: - Public subnets if internetFacing, Private subnets otherwise

  • targets (Optional[List[ILoadBalancerTarget]]) – What targets to load balance to. Can also be added by .addTarget() Default: - None.

Attributes

cross_zone

Whether cross zone load balancing is enabled.

This controls whether the load balancer evenly distributes requests across each availability zone

Default

true

Return type

Optional[bool]

health_check

Health check settings for the load balancing targets.

Not required but recommended.

Default
  • None.

Return type

Optional[HealthCheck]

internet_facing

Whether this is an internet-facing Load Balancer.

This controls whether the LB has a public IP address assigned. It does not open up the Load Balancer’s security groups to public internet access.

Default

false

Return type

Optional[bool]

listeners

What listeners to set up for the load balancer.

Can also be added by .addListener()

Default
Return type

Optional[List[LoadBalancerListener]]

subnet_selection

Which subnets to deploy the load balancer.

Can be used to define a specific set of subnets to deploy the load balancer to. Useful multiple public or private subnets are covering the same availability zone.

Default
  • Public subnets if internetFacing, Private subnets otherwise

Return type

Optional[SubnetSelection]

targets

What targets to load balance to.

Can also be added by .addTarget()

Default
  • None.

Return type

Optional[List[ILoadBalancerTarget]]

vpc

VPC network of the fleet instances.

Return type

IVpc