INetworkLoadBalancer

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

Bases: aws_cdk.aws_elasticloadbalancingv2.ILoadBalancerV2, aws_cdk.aws_ec2.IVpcEndpointServiceLoadBalancer, 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) –

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

  • certificates (Optional[List[IListenerCertificate]]) – 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 the load balancer that hosts the VPC Endpoint Service.

Return type

str

load_balancer_canonical_hosted_zone_id

The canonical hosted zone ID of this load balancer.

attribute: :attribute:: true

Example:

# Example automatically generated without compilation. 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 automatically generated without compilation. 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]