Class NetworkLoadBalancerProps.Builder
java.lang.Object
software.amazon.awscdk.services.elasticloadbalancingv2.NetworkLoadBalancerProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<NetworkLoadBalancerProps>
- Enclosing interface:
NetworkLoadBalancerProps
@Stability(Stable)
public static final class NetworkLoadBalancerProps.Builder
extends Object
implements software.amazon.jsii.Builder<NetworkLoadBalancerProps>
A builder for
NetworkLoadBalancerProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.clientRoutingPolicy(ClientRoutingPolicy clientRoutingPolicy) Sets the value ofNetworkLoadBalancerProps.getClientRoutingPolicy()crossZoneEnabled(Boolean crossZoneEnabled) Sets the value ofBaseLoadBalancerProps.getCrossZoneEnabled()deletionProtection(Boolean deletionProtection) Sets the value ofBaseLoadBalancerProps.getDeletionProtection()denyAllIgwTraffic(Boolean denyAllIgwTraffic) Sets the value ofBaseLoadBalancerProps.getDenyAllIgwTraffic()disableSecurityGroups(Boolean disableSecurityGroups) Sets the value ofNetworkLoadBalancerProps.getDisableSecurityGroups()enablePrefixForIpv6SourceNat(Boolean enablePrefixForIpv6SourceNat) Sets the value ofNetworkLoadBalancerProps.getEnablePrefixForIpv6SourceNat()enforceSecurityGroupInboundRulesOnPrivateLinkTraffic(Boolean enforceSecurityGroupInboundRulesOnPrivateLinkTraffic) internetFacing(Boolean internetFacing) Sets the value ofBaseLoadBalancerProps.getInternetFacing()ipAddressType(IpAddressType ipAddressType) Sets the value ofNetworkLoadBalancerProps.getIpAddressType()loadBalancerName(String loadBalancerName) Sets the value ofBaseLoadBalancerProps.getLoadBalancerName()minimumCapacityUnit(Number minimumCapacityUnit) Sets the value ofBaseLoadBalancerProps.getMinimumCapacityUnit()securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofNetworkLoadBalancerProps.getSecurityGroups()subnetMappings(List<? extends SubnetMapping> subnetMappings) Sets the value ofNetworkLoadBalancerProps.getSubnetMappings()Sets the value ofBaseLoadBalancerProps.getVpc()vpcSubnets(SubnetSelection vpcSubnets) Sets the value ofBaseLoadBalancerProps.getVpcSubnets()zonalShift(Boolean zonalShift) Sets the value ofNetworkLoadBalancerProps.getZonalShift()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
clientRoutingPolicy
@Stability(Stable) public NetworkLoadBalancerProps.Builder clientRoutingPolicy(ClientRoutingPolicy clientRoutingPolicy) Sets the value ofNetworkLoadBalancerProps.getClientRoutingPolicy()- Parameters:
clientRoutingPolicy- The AZ affinity routing policy.- Returns:
this
-
disableSecurityGroups
@Stability(Stable) public NetworkLoadBalancerProps.Builder disableSecurityGroups(Boolean disableSecurityGroups) Sets the value ofNetworkLoadBalancerProps.getDisableSecurityGroups()- Parameters:
disableSecurityGroups- Create a Network Load Balancer without security groups. When true, creates an NLB that cannot have security groups attached. This is useful when you need to create a traditional NLB without security group associations.This property only takes effect when the feature flag
@aws-cdk/aws-elasticloadbalancingv2:networkLoadBalancerWithSecurityGroupByDefaultis enabled.- Returns:
this
-
enablePrefixForIpv6SourceNat
@Stability(Stable) public NetworkLoadBalancerProps.Builder enablePrefixForIpv6SourceNat(Boolean enablePrefixForIpv6SourceNat) Sets the value ofNetworkLoadBalancerProps.getEnablePrefixForIpv6SourceNat()- Parameters:
enablePrefixForIpv6SourceNat- Indicates whether to use an IPv6 prefix from each subnet for source NAT. The IP address type must be IpAddressType.DUALSTACK.- Returns:
this
-
enforceSecurityGroupInboundRulesOnPrivateLinkTraffic
@Stability(Stable) public NetworkLoadBalancerProps.Builder enforceSecurityGroupInboundRulesOnPrivateLinkTraffic(Boolean enforceSecurityGroupInboundRulesOnPrivateLinkTraffic) Sets the value ofNetworkLoadBalancerProps.getEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic()- Parameters:
enforceSecurityGroupInboundRulesOnPrivateLinkTraffic- Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through AWS PrivateLink.- Returns:
this
-
ipAddressType
@Stability(Stable) public NetworkLoadBalancerProps.Builder ipAddressType(IpAddressType ipAddressType) Sets the value ofNetworkLoadBalancerProps.getIpAddressType()- Parameters:
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.- Returns:
this
-
securityGroups
@Stability(Stable) public NetworkLoadBalancerProps.Builder securityGroups(List<? extends ISecurityGroup> securityGroups) Sets the value ofNetworkLoadBalancerProps.getSecurityGroups()- Parameters:
securityGroups- Security groups to associate with this load balancer.- Returns:
this
-
subnetMappings
@Stability(Stable) public NetworkLoadBalancerProps.Builder subnetMappings(List<? extends SubnetMapping> subnetMappings) Sets the value ofNetworkLoadBalancerProps.getSubnetMappings()- Parameters:
subnetMappings- Subnet information for the load balancer.- Returns:
this
-
zonalShift
Sets the value ofNetworkLoadBalancerProps.getZonalShift()- Parameters:
zonalShift- Indicates whether zonal shift is enabled.- Returns:
this
-
vpc
Sets the value ofBaseLoadBalancerProps.getVpc()- Parameters:
vpc- The VPC network to place the load balancer in. This parameter is required.- Returns:
this
-
crossZoneEnabled
@Stability(Stable) public NetworkLoadBalancerProps.Builder crossZoneEnabled(Boolean crossZoneEnabled) Sets the value ofBaseLoadBalancerProps.getCrossZoneEnabled()- Parameters:
crossZoneEnabled- Indicates whether cross-zone load balancing is enabled.- Returns:
this
-
deletionProtection
@Stability(Stable) public NetworkLoadBalancerProps.Builder deletionProtection(Boolean deletionProtection) Sets the value ofBaseLoadBalancerProps.getDeletionProtection()- Parameters:
deletionProtection- Indicates whether deletion protection is enabled.- Returns:
this
-
denyAllIgwTraffic
@Stability(Stable) public NetworkLoadBalancerProps.Builder denyAllIgwTraffic(Boolean denyAllIgwTraffic) Sets the value ofBaseLoadBalancerProps.getDenyAllIgwTraffic()- Parameters:
denyAllIgwTraffic- Indicates whether the load balancer blocks traffic through the Internet Gateway (IGW).- Returns:
this
-
internetFacing
Sets the value ofBaseLoadBalancerProps.getInternetFacing()- Parameters:
internetFacing- Whether the load balancer has an internet-routable address.- Returns:
this
-
loadBalancerName
@Stability(Stable) public NetworkLoadBalancerProps.Builder loadBalancerName(String loadBalancerName) Sets the value ofBaseLoadBalancerProps.getLoadBalancerName()- Parameters:
loadBalancerName- Name of the load balancer.- Returns:
this
-
minimumCapacityUnit
@Stability(Stable) public NetworkLoadBalancerProps.Builder minimumCapacityUnit(Number minimumCapacityUnit) Sets the value ofBaseLoadBalancerProps.getMinimumCapacityUnit()- Parameters:
minimumCapacityUnit- The minimum capacity (LCU) for a load balancer.- Returns:
this
-
vpcSubnets
Sets the value ofBaseLoadBalancerProps.getVpcSubnets()- Parameters:
vpcSubnets- Which subnets place the load balancer in.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<NetworkLoadBalancerProps>- Returns:
- a new instance of
NetworkLoadBalancerProps - Throws:
NullPointerException- if any required attribute was not provided
-