interface NetworkLoadBalancerProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ElasticLoadBalancingV2.NetworkLoadBalancerProps |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awselasticloadbalancingv2#NetworkLoadBalancerProps |
Java | software.amazon.awscdk.services.elasticloadbalancingv2.NetworkLoadBalancerProps |
Python | aws_cdk.aws_elasticloadbalancingv2.NetworkLoadBalancerProps |
TypeScript (source) | aws-cdk-lib » aws_elasticloadbalancingv2 » NetworkLoadBalancerProps |
Properties for a network load balancer.
Example
import * as elbv2 from 'aws-cdk-lib/aws-elasticloadbalancingv2';
const vpc = new ec2.Vpc(this, 'VPC');
const nlb = new elbv2.NetworkLoadBalancer(this, 'NLB', {
vpc,
});
const link = new apigateway.VpcLink(this, 'link', {
targets: [nlb],
});
const integration = new apigateway.Integration({
type: apigateway.IntegrationType.HTTP_PROXY,
integrationHttpMethod: 'ANY',
options: {
connectionType: apigateway.ConnectionType.VPC_LINK,
vpcLink: link,
},
});
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. |
ip | Ip | The type of IP addresses to use. |
load | string | Name of the load balancer. |
security | ISecurity [] | Security groups to associate with this 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.
ipAddressType?
Type:
Ip
(optional, default: IpAddressType.IPV4)
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.
loadBalancerName?
Type:
string
(optional, default: Automatically generated name.)
Name of the load balancer.
securityGroups?
Type:
ISecurity
[]
(optional, default: No security groups associated with the load balancer.)
Security groups to associate with this load balancer.
vpcSubnets?
Type:
Subnet
(optional, default: the Vpc default strategy.)
Which subnets place the load balancer in.