ClientRoutingPolicy

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

Bases: Enum

Indicates how traffic is distributed among the load balancer Availability Zones.

See:

https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#zonal-dns-affinity

ExampleMetadata:

infused

Example:

# vpc: ec2.Vpc


lb = elbv2.NetworkLoadBalancer(self, "LB",
    vpc=vpc,
    # Whether deletion protection is enabled.
    deletion_protection=True,

    # Whether cross-zone load balancing is enabled.
    cross_zone_enabled=True,

    # Whether the load balancer blocks traffic through the Internet Gateway (IGW).
    deny_all_igw_traffic=False,

    # Indicates how traffic is distributed among the load balancer Availability Zones.
    client_routing_policy=elbv2.ClientRoutingPolicy.AVAILABILITY_ZONE_AFFINITY
)

Attributes

ANY_AVAILABILITY_ZONE

No zonal affinity.

AVAILABILITY_ZONE_AFFINITY

100 percent zonal affinity.

PARTIAL_AVAILABILITY_ZONE_AFFINITY

85 percent zonal affinity.