Class ApplicationLoadBalancerProps.Builder
java.lang.Object
software.amazon.awscdk.services.elasticloadbalancingv2.ApplicationLoadBalancerProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ApplicationLoadBalancerProps>
- Enclosing interface:
ApplicationLoadBalancerProps
@Stability(Stable)
public static final class ApplicationLoadBalancerProps.Builder
extends Object
implements software.amazon.jsii.Builder<ApplicationLoadBalancerProps>
A builder for
ApplicationLoadBalancerProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.clientKeepAlive
(Duration clientKeepAlive) Sets the value ofApplicationLoadBalancerProps.getClientKeepAlive()
crossZoneEnabled
(Boolean crossZoneEnabled) Sets the value ofBaseLoadBalancerProps.getCrossZoneEnabled()
deletionProtection
(Boolean deletionProtection) Sets the value ofBaseLoadBalancerProps.getDeletionProtection()
denyAllIgwTraffic
(Boolean denyAllIgwTraffic) Sets the value ofBaseLoadBalancerProps.getDenyAllIgwTraffic()
desyncMitigationMode
(DesyncMitigationMode desyncMitigationMode) Sets the value ofApplicationLoadBalancerProps.getDesyncMitigationMode()
dropInvalidHeaderFields
(Boolean dropInvalidHeaderFields) Sets the value ofApplicationLoadBalancerProps.getDropInvalidHeaderFields()
http2Enabled
(Boolean http2Enabled) Sets the value ofApplicationLoadBalancerProps.getHttp2Enabled()
idleTimeout
(Duration idleTimeout) Sets the value ofApplicationLoadBalancerProps.getIdleTimeout()
internetFacing
(Boolean internetFacing) Sets the value ofBaseLoadBalancerProps.getInternetFacing()
ipAddressType
(IpAddressType ipAddressType) Sets the value ofApplicationLoadBalancerProps.getIpAddressType()
loadBalancerName
(String loadBalancerName) Sets the value ofBaseLoadBalancerProps.getLoadBalancerName()
preserveHostHeader
(Boolean preserveHostHeader) Sets the value ofApplicationLoadBalancerProps.getPreserveHostHeader()
preserveXffClientPort
(Boolean preserveXffClientPort) Sets the value ofApplicationLoadBalancerProps.getPreserveXffClientPort()
securityGroup
(ISecurityGroup securityGroup) Sets the value ofApplicationLoadBalancerProps.getSecurityGroup()
Sets the value ofBaseLoadBalancerProps.getVpc()
vpcSubnets
(SubnetSelection vpcSubnets) Sets the value ofBaseLoadBalancerProps.getVpcSubnets()
wafFailOpen
(Boolean wafFailOpen) Sets the value ofApplicationLoadBalancerProps.getWafFailOpen()
xAmznTlsVersionAndCipherSuiteHeaders
(Boolean xAmznTlsVersionAndCipherSuiteHeaders) Sets the value ofApplicationLoadBalancerProps.getXAmznTlsVersionAndCipherSuiteHeaders()
xffHeaderProcessingMode
(XffHeaderProcessingMode xffHeaderProcessingMode) Sets the value ofApplicationLoadBalancerProps.getXffHeaderProcessingMode()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
clientKeepAlive
@Stability(Stable) public ApplicationLoadBalancerProps.Builder clientKeepAlive(Duration clientKeepAlive) Sets the value ofApplicationLoadBalancerProps.getClientKeepAlive()
- Parameters:
clientKeepAlive
- The client keep alive duration. The valid range is 60 to 604800 seconds (1 minute to 7 days).- Returns:
this
-
desyncMitigationMode
@Stability(Stable) public ApplicationLoadBalancerProps.Builder desyncMitigationMode(DesyncMitigationMode desyncMitigationMode) Sets the value ofApplicationLoadBalancerProps.getDesyncMitigationMode()
- Parameters:
desyncMitigationMode
- Determines how the load balancer handles requests that might pose a security risk to your application.- Returns:
this
-
dropInvalidHeaderFields
@Stability(Stable) public ApplicationLoadBalancerProps.Builder dropInvalidHeaderFields(Boolean dropInvalidHeaderFields) Sets the value ofApplicationLoadBalancerProps.getDropInvalidHeaderFields()
- Parameters:
dropInvalidHeaderFields
- Indicates whether HTTP headers with invalid header fields are removed by the load balancer (true) or routed to targets (false).- Returns:
this
-
http2Enabled
Sets the value ofApplicationLoadBalancerProps.getHttp2Enabled()
- Parameters:
http2Enabled
- Indicates whether HTTP/2 is enabled.- Returns:
this
-
idleTimeout
Sets the value ofApplicationLoadBalancerProps.getIdleTimeout()
- Parameters:
idleTimeout
- The load balancer idle timeout, in seconds.- Returns:
this
-
ipAddressType
@Stability(Stable) public ApplicationLoadBalancerProps.Builder ipAddressType(IpAddressType ipAddressType) Sets the value ofApplicationLoadBalancerProps.getIpAddressType()
- Parameters:
ipAddressType
- The type of IP addresses to use.- Returns:
this
-
preserveHostHeader
@Stability(Stable) public ApplicationLoadBalancerProps.Builder preserveHostHeader(Boolean preserveHostHeader) Sets the value ofApplicationLoadBalancerProps.getPreserveHostHeader()
- Parameters:
preserveHostHeader
- Indicates whether the Application Load Balancer should preserve the host header in the HTTP request and send it to the target without any change.- Returns:
this
-
preserveXffClientPort
@Stability(Stable) public ApplicationLoadBalancerProps.Builder preserveXffClientPort(Boolean preserveXffClientPort) Sets the value ofApplicationLoadBalancerProps.getPreserveXffClientPort()
- Parameters:
preserveXffClientPort
- Indicates whether the X-Forwarded-For header should preserve the source port that the client used to connect to the load balancer.- Returns:
this
-
securityGroup
@Stability(Stable) public ApplicationLoadBalancerProps.Builder securityGroup(ISecurityGroup securityGroup) Sets the value ofApplicationLoadBalancerProps.getSecurityGroup()
- Parameters:
securityGroup
- Security group to associate with this load balancer.- Returns:
this
-
wafFailOpen
Sets the value ofApplicationLoadBalancerProps.getWafFailOpen()
- Parameters:
wafFailOpen
- Indicates whether to allow a WAF-enabled load balancer to route requests to targets if it is unable to forward the request to AWS WAF.- Returns:
this
-
xAmznTlsVersionAndCipherSuiteHeaders
@Stability(Stable) public ApplicationLoadBalancerProps.Builder xAmznTlsVersionAndCipherSuiteHeaders(Boolean xAmznTlsVersionAndCipherSuiteHeaders) Sets the value ofApplicationLoadBalancerProps.getXAmznTlsVersionAndCipherSuiteHeaders()
- Parameters:
xAmznTlsVersionAndCipherSuiteHeaders
- Indicates whether the two headers (x-amzn-tls-version and x-amzn-tls-cipher-suite), which contain information about the negotiated TLS version and cipher suite, are added to the client request before sending it to the target. The x-amzn-tls-version header has information about the TLS protocol version negotiated with the client, and the x-amzn-tls-cipher-suite header has information about the cipher suite negotiated with the client.Both headers are in OpenSSL format.
- Returns:
this
-
xffHeaderProcessingMode
@Stability(Stable) public ApplicationLoadBalancerProps.Builder xffHeaderProcessingMode(XffHeaderProcessingMode xffHeaderProcessingMode) Sets the value ofApplicationLoadBalancerProps.getXffHeaderProcessingMode()
- Parameters:
xffHeaderProcessingMode
- Enables you to modify, preserve, or remove the X-Forwarded-For header in the HTTP request before the Application Load Balancer sends the request to the target.- 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 ApplicationLoadBalancerProps.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 ApplicationLoadBalancerProps.Builder deletionProtection(Boolean deletionProtection) Sets the value ofBaseLoadBalancerProps.getDeletionProtection()
- Parameters:
deletionProtection
- Indicates whether deletion protection is enabled.- Returns:
this
-
denyAllIgwTraffic
@Stability(Stable) public ApplicationLoadBalancerProps.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
@Stability(Stable) public ApplicationLoadBalancerProps.Builder internetFacing(Boolean internetFacing) Sets the value ofBaseLoadBalancerProps.getInternetFacing()
- Parameters:
internetFacing
- Whether the load balancer has an internet-routable address.- Returns:
this
-
loadBalancerName
@Stability(Stable) public ApplicationLoadBalancerProps.Builder loadBalancerName(String loadBalancerName) Sets the value ofBaseLoadBalancerProps.getLoadBalancerName()
- Parameters:
loadBalancerName
- Name of the load balancer.- Returns:
this
-
vpcSubnets
@Stability(Stable) public ApplicationLoadBalancerProps.Builder vpcSubnets(SubnetSelection 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<ApplicationLoadBalancerProps>
- Returns:
- a new instance of
ApplicationLoadBalancerProps
- Throws:
NullPointerException
- if any required attribute was not provided
-