@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:39.059Z") @Stability(value=Stable) public interface ApplicationLoadBalancerProps extends software.amazon.jsii.JsiiSerializable, BaseLoadBalancerProps
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());
| Modifier and Type | Interface and Description |
|---|---|
static class |
ApplicationLoadBalancerProps.Builder
A builder for
ApplicationLoadBalancerProps |
static class |
ApplicationLoadBalancerProps.Jsii$Proxy
An implementation for
ApplicationLoadBalancerProps |
| Modifier and Type | Method and Description |
|---|---|
static ApplicationLoadBalancerProps.Builder |
builder() |
default Boolean |
getHttp2Enabled()
Indicates whether HTTP/2 is enabled.
|
default Duration |
getIdleTimeout()
The load balancer idle timeout, in seconds.
|
default IpAddressType |
getIpAddressType()
The type of IP addresses to use.
|
default ISecurityGroup |
getSecurityGroup()
Security group to associate with this load balancer.
|
getDeletionProtection, getInternetFacing, getLoadBalancerName, getVpc, getVpcSubnets@Stability(value=Stable) @Nullable default Boolean getHttp2Enabled()
Default: true
@Stability(value=Stable) @Nullable default Duration getIdleTimeout()
Default: 60
@Stability(value=Stable) @Nullable default IpAddressType getIpAddressType()
Only applies to application load balancers.
Default: IpAddressType.Ipv4
@Stability(value=Stable) @Nullable default ISecurityGroup getSecurityGroup()
Default: A security group is created
@Stability(value=Stable) static ApplicationLoadBalancerProps.Builder builder()
builder in interface BaseLoadBalancerPropsApplicationLoadBalancerProps.Builder of ApplicationLoadBalancerPropsCopyright © 2022. All rights reserved.