LoadBalancerListener

class aws_cdk.aws_elasticloadbalancing.LoadBalancerListener(*, external_port, allow_connections_from=None, external_protocol=None, internal_port=None, internal_protocol=None, policy_names=None, ssl_certificate_id=None)

Bases: object

Add a backend to the load balancer.

Parameters
  • external_port (Union[int, float]) – External listening port.

  • allow_connections_from (Optional[List[IConnectable]]) – Allow connections to the load balancer from the given set of connection peers. By default, connections will be allowed from anywhere. Set this to an empty list to deny connections, or supply a custom list of peers to allow connections from (IP ranges or security groups). Default: Anywhere

  • external_protocol (Optional[LoadBalancingProtocol]) – What public protocol to use for load balancing. Either ‘tcp’, ‘ssl’, ‘http’ or ‘https’. May be omitted if the external port is either 80 or 443.

  • internal_port (Union[int, float, None]) – Instance listening port. Same as the externalPort if not specified. Default: externalPort

  • internal_protocol (Optional[LoadBalancingProtocol]) – What public protocol to use for load balancing. Either ‘tcp’, ‘ssl’, ‘http’ or ‘https’. May be omitted if the internal port is either 80 or 443. The instance protocol is ‘tcp’ if the front-end protocol is ‘tcp’ or ‘ssl’, the instance protocol is ‘http’ if the front-end protocol is ‘https’.

  • policy_names (Optional[List[str]]) – SSL policy names.

  • ssl_certificate_id (Optional[str]) – ID of SSL certificate.

Attributes

allow_connections_from

Allow connections to the load balancer from the given set of connection peers.

By default, connections will be allowed from anywhere. Set this to an empty list to deny connections, or supply a custom list of peers to allow connections from (IP ranges or security groups).

Default

Anywhere

Return type

Optional[List[IConnectable]]

external_port

External listening port.

Return type

Union[int, float]

external_protocol

What public protocol to use for load balancing.

Either ‘tcp’, ‘ssl’, ‘http’ or ‘https’.

May be omitted if the external port is either 80 or 443.

Return type

Optional[LoadBalancingProtocol]

internal_port

Instance listening port.

Same as the externalPort if not specified.

Default

externalPort

Return type

Union[int, float, None]

internal_protocol

What public protocol to use for load balancing.

Either ‘tcp’, ‘ssl’, ‘http’ or ‘https’.

May be omitted if the internal port is either 80 or 443.

The instance protocol is ‘tcp’ if the front-end protocol is ‘tcp’ or ‘ssl’, the instance protocol is ‘http’ if the front-end protocol is ‘https’.

Return type

Optional[LoadBalancingProtocol]

policy_names

SSL policy names.

Return type

Optional[List[str]]

ssl_certificate_id

ID of SSL certificate.

Return type

Optional[str]