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
-
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()
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()
securityGroups
(List<? extends ISecurityGroup> securityGroups) Sets the value ofNetworkLoadBalancerProps.getSecurityGroups()
Sets the value ofBaseLoadBalancerProps.getVpc()
vpcSubnets
(SubnetSelection vpcSubnets) Sets the value ofBaseLoadBalancerProps.getVpcSubnets()
-
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
-
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
-
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
-
vpcSubnets
Sets the value ofBaseLoadBalancerProps.getVpcSubnets()
- Parameters:
vpcSubnets
- Which subnets place the load balancer in.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<NetworkLoadBalancerProps>
- Returns:
- a new instance of
NetworkLoadBalancerProps
- Throws:
NullPointerException
- if any required attribute was not provided
-