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, ip_address_type=None, security_groups=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: falseip_address_type (
Optional
[IpAddressType
]) – The type of IP addresses to use. If you want to add a UDP or TCP_UDP listener to the load balancer, you must choose IPv4. Default: IpAddressType.IPV4security_groups (
Optional
[Sequence
[ISecurityGroup
]]) – Security groups to associate with this load balancer. Default: - No security groups associated with the load balancer.
- ExampleMetadata:
infused
Example:
import aws_cdk.aws_elasticloadbalancingv2 as elbv2 vpc = ec2.Vpc(self, "VPC") nlb = elbv2.NetworkLoadBalancer(self, "NLB", vpc=vpc ) link = apigateway.VpcLink(self, "link", targets=[nlb] ) integration = apigateway.Integration( type=apigateway.IntegrationType.HTTP_PROXY, integration_http_method="ANY", options=apigateway.IntegrationOptions( connection_type=apigateway.ConnectionType.VPC_LINK, vpc_link=link ) )
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
- ip_address_type
The type of IP addresses to use.
If you want to add a UDP or TCP_UDP listener to the load balancer, you must choose IPv4.
- Default:
IpAddressType.IPV4
- load_balancer_name
Name of the load balancer.
- Default:
Automatically generated name.
- security_groups
Security groups to associate with this load balancer.
- Default:
No security groups associated with the load balancer.
- vpc
The VPC network to place the load balancer in.
- vpc_subnets
Which subnets place the load balancer in.
- Default:
the Vpc default strategy.