NetworkLoadBalancerProps
- class aws_cdk.aws_elasticloadbalancingv2.NetworkLoadBalancerProps(*, vpc, deletion_protection=None, internet_facing=None, load_balancer_name=None, vpc_subnets=None, cross_zone_enabled=None)
Bases:
BaseLoadBalancerProps
Properties for a network load balancer.
- Parameters:
vpc (
IVpc
) – The VPC network to place the load balancer in.deletion_protection (
Optional
[bool
]) – Indicates whether deletion protection is enabled. Default: falseinternet_facing (
Optional
[bool
]) – Whether the load balancer has an internet-routable address. Default: falseload_balancer_name (
Optional
[str
]) – Name of the load balancer. Default: - Automatically generated name.vpc_subnets (
Union
[SubnetSelection
,Dict
[str
,Any
],None
]) – Which subnets place the load balancer in. Default: - the Vpc default strategy.cross_zone_enabled (
Optional
[bool
]) – Indicates whether cross-zone load balancing is enabled. Default: false
- ExampleMetadata:
infused
Example:
from aws_cdk.aws_apigatewayv2_integrations import HttpNlbIntegration vpc = ec2.Vpc(self, "VPC") lb = elbv2.NetworkLoadBalancer(self, "lb", vpc=vpc) listener = lb.add_listener("listener", port=80) listener.add_targets("target", port=80 ) http_endpoint = apigwv2.HttpApi(self, "HttpProxyPrivateApi", default_integration=HttpNlbIntegration("DefaultIntegration", listener) )
Attributes
- cross_zone_enabled
Indicates whether cross-zone load balancing is enabled.
- Default:
false
- deletion_protection
Indicates whether deletion protection is enabled.
- Default:
false
- internet_facing
Whether the load balancer has an internet-routable address.
- Default:
false
- load_balancer_name
Name of the load balancer.
- Default:
Automatically generated name.
- vpc
The VPC network to place the load balancer in.
- vpc_subnets
Which subnets place the load balancer in.
- Default:
the Vpc default strategy.