interface NetworkLoadBalancerProps
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.ElasticLoadBalancingV2.NetworkLoadBalancerProps |
Java | software.amazon.awscdk.services.elasticloadbalancingv2.NetworkLoadBalancerProps |
Python | aws_cdk.aws_elasticloadbalancingv2.NetworkLoadBalancerProps |
TypeScript (source) | @aws-cdk/aws-elasticloadbalancingv2 » NetworkLoadBalancerProps |
Properties for a network load balancer.
Example
import { HttpNlbIntegration } from '@aws-cdk/aws-apigatewayv2-integrations';
const vpc = new ec2.Vpc(this, 'VPC');
const lb = new elbv2.NetworkLoadBalancer(this, 'lb', { vpc });
const listener = lb.addListener('listener', { port: 80 });
listener.addTargets('target', {
port: 80,
});
const httpEndpoint = new apigwv2.HttpApi(this, 'HttpProxyPrivateApi', {
defaultIntegration: new HttpNlbIntegration('DefaultIntegration', listener),
});
Properties
| Name | Type | Description |
|---|---|---|
| vpc | IVpc | The VPC network to place the load balancer in. |
| cross | boolean | Indicates whether cross-zone load balancing is enabled. |
| deletion | boolean | Indicates whether deletion protection is enabled. |
| internet | boolean | Whether the load balancer has an internet-routable address. |
| load | string | Name of the load balancer. |
| vpc | Subnet | Which subnets place the load balancer in. |
vpc
Type:
IVpc
The VPC network to place the load balancer in.
crossZoneEnabled?
Type:
boolean
(optional, default: false)
Indicates whether cross-zone load balancing is enabled.
deletionProtection?
Type:
boolean
(optional, default: false)
Indicates whether deletion protection is enabled.
internetFacing?
Type:
boolean
(optional, default: false)
Whether the load balancer has an internet-routable address.
loadBalancerName?
Type:
string
(optional, default: Automatically generated name.)
Name of the load balancer.
vpcSubnets?
Type:
Subnet
(optional, default: the Vpc default strategy.)
Which subnets place the load balancer in.

.NET
Java
Python
TypeScript (