INetworkLoadBalancer

class aws_cdk.aws_elasticloadbalancingv2.INetworkLoadBalancer(*args, **kwargs)

Bases: aws_cdk.aws_elasticloadbalancingv2.ILoadBalancerV2, typing_extensions.Protocol

A network load balancer.

__init__(*args, **kwargs)

Methods

add_listener(id, *, port, certificates=None, default_target_groups=None, protocol=None, ssl_policy=None)

Add a listener to this load balancer.

Parameters
  • id (str) –

  • props

  • port (Union[int, float]) – The port on which the listener listens for requests.

  • certificates (Optional[List[INetworkListenerCertificateProps]]) – Certificate list of ACM cert ARNs. Default: - No certificates.

  • default_target_groups (Optional[List[INetworkTargetGroup]]) – Default target groups to load balance to. Default: - None.

  • protocol (Optional[Protocol]) – Protocol for listener, expects TCP or TLS. Default: - TLS if certificates are provided. TCP otherwise.

  • ssl_policy (Optional[SslPolicy]) – SSL Policy. Default: - Current predefined security policy.

return :rtype: NetworkListener :return: The newly created listener

Attributes

load_balancer_arn

The ARN of this load balancer.

Return type

str

load_balancer_canonical_hosted_zone_id

The canonical hosted zone ID of this load balancer.

attribute: :attribute:: true

Example::

# Example may have issues. See https://github.com/aws/jsii/issues/826 Z2P70J7EXAMPLE

Return type

str

load_balancer_dns_name

The DNS name of this load balancer.

attribute: :attribute:: true

Example::

# Example may have issues. See https://github.com/aws/jsii/issues/826 my - load - balancer - 424835706.us - west - 2.elb.amazonaws.com

Return type

str

node

The construct node in the tree.

Return type

ConstructNode

stack

The stack in which this resource is defined.

Return type

Stack

vpc

The VPC this load balancer has been created in (if available).

Return type

Optional[IVpc]