Interface ApplicationLoadBalancerProps

All Superinterfaces:
All Known Implementing Classes:

@Generated(value="jsii-pacmak/1.99.0 (build 8f757e4)", date="2024-06-13T18:49:18.815Z") @Stability(Stable) public interface ApplicationLoadBalancerProps extends, BaseLoadBalancerProps
Properties for defining an Application Load Balancer.


 AutoScalingGroup asg;
 Vpc vpc;
 // Create the load balancer in a VPC. 'internetFacing' is 'false'
 // by default, which creates an internal load balancer.
 ApplicationLoadBalancer lb = ApplicationLoadBalancer.Builder.create(this, "LB")
 // Add a listener and open up the load balancer's security group
 // to the world.
 ApplicationListener listener = lb.addListener("Listener", BaseApplicationListenerProps.builder()
         // 'open: true' is the default, you can leave it out if you want. Set it
         // to 'false' and use `listener.connections` if you want to be selective
         // about who can access the load balancer.
 // Create an AutoScaling group and add it as a load balancing
 // target to the listener.
 listener.addTargets("ApplicationFleet", AddApplicationTargetsProps.builder()

See Also:
  • Method Details

    • getClientKeepAlive

      @Stability(Stable) @Nullable default Duration getClientKeepAlive()
      The client keep alive duration.

      The valid range is 60 to 604800 seconds (1 minute to 7 days).

      Default: - Duration.seconds(3600)

    • getDesyncMitigationMode

      @Stability(Stable) @Nullable default DesyncMitigationMode getDesyncMitigationMode()
      Determines how the load balancer handles requests that might pose a security risk to your application.

      Default: DesyncMitigationMode.DEFENSIVE

    • getDropInvalidHeaderFields

      @Stability(Stable) @Nullable default Boolean getDropInvalidHeaderFields()
      Indicates whether HTTP headers with invalid header fields are removed by the load balancer (true) or routed to targets (false).

      Default: false

    • getHttp2Enabled

      @Stability(Stable) @Nullable default Boolean getHttp2Enabled()
      Indicates whether HTTP/2 is enabled.

      Default: true

    • getIdleTimeout

      @Stability(Stable) @Nullable default Duration getIdleTimeout()
      The load balancer idle timeout, in seconds.

      Default: 60

    • getIpAddressType

      @Stability(Stable) @Nullable default IpAddressType getIpAddressType()
      The type of IP addresses to use.

      Default: IpAddressType.IPV4

    • getPreserveHostHeader

      @Stability(Stable) @Nullable default Boolean getPreserveHostHeader()
      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

    • getPreserveXffClientPort

      @Stability(Stable) @Nullable default Boolean getPreserveXffClientPort()
      Indicates whether the X-Forwarded-For header should preserve the source port that the client used to connect to the load balancer.

      Default: false

    • getSecurityGroup

      @Stability(Stable) @Nullable default ISecurityGroup getSecurityGroup()
      Security group to associate with this load balancer.

      Default: A security group is created

    • getWafFailOpen

      @Stability(Stable) @Nullable default Boolean getWafFailOpen()
      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

    • getXAmznTlsVersionAndCipherSuiteHeaders

      @Stability(Stable) @Nullable default Boolean getXAmznTlsVersionAndCipherSuiteHeaders()
      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

    • getXffHeaderProcessingMode

      @Stability(Stable) @Nullable default XffHeaderProcessingMode getXffHeaderProcessingMode()
      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

    • builder

      @Stability(Stable) static ApplicationLoadBalancerProps.Builder builder()
      a ApplicationLoadBalancerProps.Builder of ApplicationLoadBalancerProps