Class NetworkLoadBalancer.Builder
java.lang.Object
software.amazon.awscdk.services.elasticloadbalancingv2.NetworkLoadBalancer.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<NetworkLoadBalancer>
- Enclosing class:
NetworkLoadBalancer
@Stability(Stable)
public static final class NetworkLoadBalancer.Builder
extends Object
implements software.amazon.jsii.Builder<NetworkLoadBalancer>
A fluent builder for
NetworkLoadBalancer
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
clientRoutingPolicy
(ClientRoutingPolicy clientRoutingPolicy) The AZ affinity routing policy.static NetworkLoadBalancer.Builder
crossZoneEnabled
(Boolean crossZoneEnabled) Indicates whether cross-zone load balancing is enabled.deletionProtection
(Boolean deletionProtection) Indicates whether deletion protection is enabled.denyAllIgwTraffic
(Boolean denyAllIgwTraffic) Indicates whether the load balancer blocks traffic through the Internet Gateway (IGW).enablePrefixForIpv6SourceNat
(Boolean enablePrefixForIpv6SourceNat) Indicates whether to use an IPv6 prefix from each subnet for source NAT.enforceSecurityGroupInboundRulesOnPrivateLinkTraffic
(Boolean enforceSecurityGroupInboundRulesOnPrivateLinkTraffic) Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through AWS PrivateLink.internetFacing
(Boolean internetFacing) Whether the load balancer has an internet-routable address.ipAddressType
(IpAddressType ipAddressType) The type of IP addresses to use.loadBalancerName
(String loadBalancerName) Name of the load balancer.securityGroups
(List<? extends ISecurityGroup> securityGroups) Security groups to associate with this load balancer.The VPC network to place the load balancer in.vpcSubnets
(SubnetSelection vpcSubnets) Which subnets place the load balancer in.zonalShift
(Boolean zonalShift) Indicates whether zonal shift is enabled.
-
Method Details
-
create
@Stability(Stable) public static NetworkLoadBalancer.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
NetworkLoadBalancer.Builder
.
-
vpc
The VPC network to place the load balancer in.- Parameters:
vpc
- The VPC network to place the load balancer in. This parameter is required.- Returns:
this
-
crossZoneEnabled
Indicates whether cross-zone load balancing is enabled.Default: - false for Network Load Balancers and true for Application Load Balancers. This can not be `false` for Application Load Balancers.
- Parameters:
crossZoneEnabled
- Indicates whether cross-zone load balancing is enabled. This parameter is required.- Returns:
this
- See Also:
-
deletionProtection
@Stability(Stable) public NetworkLoadBalancer.Builder deletionProtection(Boolean deletionProtection) Indicates whether deletion protection is enabled.Default: false
- Parameters:
deletionProtection
- Indicates whether deletion protection is enabled. This parameter is required.- Returns:
this
-
denyAllIgwTraffic
Indicates whether the load balancer blocks traffic through the Internet Gateway (IGW).Default: - false for internet-facing load balancers and true for internal load balancers
- Parameters:
denyAllIgwTraffic
- Indicates whether the load balancer blocks traffic through the Internet Gateway (IGW). This parameter is required.- Returns:
this
-
internetFacing
Whether the load balancer has an internet-routable address.Default: false
- Parameters:
internetFacing
- Whether the load balancer has an internet-routable address. This parameter is required.- Returns:
this
-
loadBalancerName
Name of the load balancer.Default: - Automatically generated name.
- Parameters:
loadBalancerName
- Name of the load balancer. This parameter is required.- Returns:
this
-
vpcSubnets
Which subnets place the load balancer in.Default: - the Vpc default strategy.
- Parameters:
vpcSubnets
- Which subnets place the load balancer in. This parameter is required.- Returns:
this
-
clientRoutingPolicy
@Stability(Stable) public NetworkLoadBalancer.Builder clientRoutingPolicy(ClientRoutingPolicy clientRoutingPolicy) The AZ affinity routing policy.Default: - AZ affinity is disabled.
- Parameters:
clientRoutingPolicy
- The AZ affinity routing policy. This parameter is required.- Returns:
this
- See Also:
-
enablePrefixForIpv6SourceNat
@Stability(Stable) public NetworkLoadBalancer.Builder enablePrefixForIpv6SourceNat(Boolean enablePrefixForIpv6SourceNat) Indicates whether to use an IPv6 prefix from each subnet for source NAT.The IP address type must be IpAddressType.DUALSTACK.
Default: undefined - NLB default behavior is false
- Parameters:
enablePrefixForIpv6SourceNat
- Indicates whether to use an IPv6 prefix from each subnet for source NAT. This parameter is required.- Returns:
this
-
enforceSecurityGroupInboundRulesOnPrivateLinkTraffic
@Stability(Stable) public NetworkLoadBalancer.Builder enforceSecurityGroupInboundRulesOnPrivateLinkTraffic(Boolean enforceSecurityGroupInboundRulesOnPrivateLinkTraffic) Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through AWS PrivateLink.Default: true
- Parameters:
enforceSecurityGroupInboundRulesOnPrivateLinkTraffic
- Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through AWS PrivateLink. This parameter is required.- Returns:
this
-
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.IPV4
- Parameters:
ipAddressType
- The type of IP addresses to use. This parameter is required.- Returns:
this
-
securityGroups
@Stability(Stable) public NetworkLoadBalancer.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Security groups to associate with this load balancer.Default: - No security groups associated with the load balancer.
- Parameters:
securityGroups
- Security groups to associate with this load balancer. This parameter is required.- Returns:
this
-
zonalShift
Indicates whether zonal shift is enabled.Default: false
- Parameters:
zonalShift
- Indicates whether zonal shift is enabled. This parameter is required.- Returns:
this
- See Also:
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<NetworkLoadBalancer>
- Returns:
- a newly built instance of
NetworkLoadBalancer
.
-