Interface ApplicationLoadBalancerProps
- All Superinterfaces:
BaseLoadBalancerProps
,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
ApplicationLoadBalancerProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-27T16:50:57.546Z")
@Stability(Stable)
public interface ApplicationLoadBalancerProps
extends software.amazon.jsii.JsiiSerializable, BaseLoadBalancerProps
Properties for defining an Application Load Balancer.
Example:
import software.amazon.awscdk.services.autoscaling.AutoScalingGroup; 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") .vpc(vpc) .internetFacing(true) .build(); // Add a listener and open up the load balancer's security group // to the world. ApplicationListener listener = lb.addListener("Listener", BaseApplicationListenerProps.builder() .port(80) // '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. .open(true) .build()); // Create an AutoScaling group and add it as a load balancing // target to the listener. listener.addTargets("ApplicationFleet", AddApplicationTargetsProps.builder() .port(8080) .targets(List.of(asg)) .build());
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forApplicationLoadBalancerProps
static final class
An implementation forApplicationLoadBalancerProps
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default Duration
The client keep alive duration.default DesyncMitigationMode
Determines how the load balancer handles requests that might pose a security risk to your application.default Boolean
Indicates whether HTTP headers with invalid header fields are removed by the load balancer (true) or routed to targets (false).default Boolean
Indicates whether HTTP/2 is enabled.default Duration
The load balancer idle timeout, in seconds.default IpAddressType
The type of IP addresses to use.default Boolean
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 Boolean
Indicates whether the X-Forwarded-For header should preserve the source port that the client used to connect to the load balancer.default ISecurityGroup
Security group to associate with this load balancer.default Boolean
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 Boolean
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.default 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.Methods inherited from interface software.amazon.awscdk.services.elasticloadbalancingv2.BaseLoadBalancerProps
getCrossZoneEnabled, getDeletionProtection, getDenyAllIgwTraffic, getInternetFacing, getLoadBalancerName, getVpc, getVpcSubnets
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getClientKeepAlive
The client keep alive duration.The valid range is 60 to 604800 seconds (1 minute to 7 days).
Default: - Duration.seconds(3600)
-
getDesyncMitigationMode
Determines how the load balancer handles requests that might pose a security risk to your application.Default: DesyncMitigationMode.DEFENSIVE
-
getDropInvalidHeaderFields
Indicates whether HTTP headers with invalid header fields are removed by the load balancer (true) or routed to targets (false).Default: false
-
getHttp2Enabled
Indicates whether HTTP/2 is enabled.Default: true
-
getIdleTimeout
The load balancer idle timeout, in seconds.Default: 60
-
getIpAddressType
The type of IP addresses to use.Default: IpAddressType.IPV4
-
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
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
Security group to associate with this load balancer.Default: A security group is created
-
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
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
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
-