Protocol

class aws_cdk.aws_elasticloadbalancingv2.Protocol(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Backend protocol for network load balancers and health checks.

ExampleMetadata:

infused

Example:

# vpc: ec2.Vpc


lb = elbv2.NetworkLoadBalancer(self, "LB",
    vpc=vpc,
    ip_address_type=elbv2.IpAddressType.DUAL_STACK,
    enable_prefix_for_ipv6_source_nat=True
)

listener = lb.add_listener("Listener",
    port=1229,
    protocol=elbv2.Protocol.UDP
)

Attributes

HTTP

HTTP (ALB health checks and NLB health checks).

HTTPS

HTTPS (ALB health checks and NLB health checks).

TCP

TCP (NLB, NLB health checks).

TCP_UDP

Listen to both TCP and UDP on the same port (NLB).

TLS

TLS (NLB).

UDP

UDP (NLB).