Class ApplicationLoadBalancer.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ApplicationLoadBalancer>
- Enclosing class:
ApplicationLoadBalancer
ApplicationLoadBalancer
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
clientKeepAlive
(Duration clientKeepAlive) The client keep alive duration.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).desyncMitigationMode
(DesyncMitigationMode desyncMitigationMode) Determines how the load balancer handles requests that might pose a security risk to your application.dropInvalidHeaderFields
(Boolean dropInvalidHeaderFields) Indicates whether HTTP headers with invalid header fields are removed by the load balancer (true) or routed to targets (false).http2Enabled
(Boolean http2Enabled) Indicates whether HTTP/2 is enabled.idleTimeout
(Duration idleTimeout) The load balancer idle timeout, in seconds.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.preserveHostHeader
(Boolean 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.preserveXffClientPort
(Boolean preserveXffClientPort) Indicates whether the X-Forwarded-For header should preserve the source port that the client used to connect to the load balancer.securityGroup
(ISecurityGroup securityGroup) Security group 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.wafFailOpen
(Boolean 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.xAmznTlsVersionAndCipherSuiteHeaders
(Boolean 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.xffHeaderProcessingMode
(XffHeaderProcessingMode 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.
-
Method Details
-
create
@Stability(Stable) public static ApplicationLoadBalancer.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
ApplicationLoadBalancer.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
@Stability(Stable) public ApplicationLoadBalancer.Builder crossZoneEnabled(Boolean 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 ApplicationLoadBalancer.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
@Stability(Stable) public ApplicationLoadBalancer.Builder denyAllIgwTraffic(Boolean 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
-
clientKeepAlive
The client keep alive duration.The valid range is 60 to 604800 seconds (1 minute to 7 days).
Default: - Duration.seconds(3600)
- Parameters:
clientKeepAlive
- The client keep alive duration. This parameter is required.- Returns:
this
-
desyncMitigationMode
@Stability(Stable) public ApplicationLoadBalancer.Builder desyncMitigationMode(DesyncMitigationMode desyncMitigationMode) Determines how the load balancer handles requests that might pose a security risk to your application.Default: DesyncMitigationMode.DEFENSIVE
- Parameters:
desyncMitigationMode
- Determines how the load balancer handles requests that might pose a security risk to your application. This parameter is required.- Returns:
this
-
dropInvalidHeaderFields
@Stability(Stable) public ApplicationLoadBalancer.Builder dropInvalidHeaderFields(Boolean dropInvalidHeaderFields) Indicates whether HTTP headers with invalid header fields are removed by the load balancer (true) or routed to targets (false).Default: false
- Parameters:
dropInvalidHeaderFields
- Indicates whether HTTP headers with invalid header fields are removed by the load balancer (true) or routed to targets (false). This parameter is required.- Returns:
this
-
http2Enabled
Indicates whether HTTP/2 is enabled.Default: true
- Parameters:
http2Enabled
- Indicates whether HTTP/2 is enabled. This parameter is required.- Returns:
this
-
idleTimeout
The load balancer idle timeout, in seconds.Default: 60
- Parameters:
idleTimeout
- The load balancer idle timeout, in seconds. This parameter is required.- Returns:
this
-
ipAddressType
@Stability(Stable) public ApplicationLoadBalancer.Builder ipAddressType(IpAddressType ipAddressType) The type of IP addresses to use.Default: IpAddressType.IPV4
- Parameters:
ipAddressType
- The type of IP addresses to use. This parameter is required.- Returns:
this
-
preserveHostHeader
@Stability(Stable) public ApplicationLoadBalancer.Builder preserveHostHeader(Boolean 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.Default: false
- 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. This parameter is required.- Returns:
this
-
preserveXffClientPort
@Stability(Stable) public ApplicationLoadBalancer.Builder preserveXffClientPort(Boolean preserveXffClientPort) Indicates whether the X-Forwarded-For header should preserve the source port that the client used to connect to the load balancer.Default: false
- Parameters:
preserveXffClientPort
- Indicates whether the X-Forwarded-For header should preserve the source port that the client used to connect to the load balancer. This parameter is required.- Returns:
this
-
securityGroup
@Stability(Stable) public ApplicationLoadBalancer.Builder securityGroup(ISecurityGroup securityGroup) Security group to associate with this load balancer.Default: A security group is created
- Parameters:
securityGroup
- Security group to associate with this load balancer. This parameter is required.- Returns:
this
-
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.Default: false
- 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. This parameter is required.- Returns:
this
-
xAmznTlsVersionAndCipherSuiteHeaders
@Stability(Stable) public ApplicationLoadBalancer.Builder xAmznTlsVersionAndCipherSuiteHeaders(Boolean 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.
Default: false
- 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. This parameter is required.- Returns:
this
-
xffHeaderProcessingMode
@Stability(Stable) public ApplicationLoadBalancer.Builder xffHeaderProcessingMode(XffHeaderProcessingMode 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.Default: XffHeaderProcessingMode.APPEND
- 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. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ApplicationLoadBalancer>
- Returns:
- a newly built instance of
ApplicationLoadBalancer
.
-