Skip to content
v2.274.0

IpAddressType Enum ​

What kind of addresses to allocate to the load balancer.

Example ​

ts
declare const vpc: ec2.Vpc;

const lb = new elbv2.NetworkLoadBalancer(this, 'LB', {
  vpc,
  ipAddressType: elbv2.IpAddressType.DUAL_STACK,
  enablePrefixForIpv6SourceNat: true,
});

const listener = lb.addListener('Listener', {
  port: 1229,
  protocol: elbv2.Protocol.UDP,
});

Members ​

MemberDescription
IPV4Allocate IPv4 addresses.
DUAL_STACKAllocate both IPv4 and IPv6 addresses.
DUAL_STACK_WITHOUT_PUBLIC_IPV4IPv6 only public addresses, with private IPv4 and IPv6 addresses.

Referenced by ​