Interface LoadBalancerProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
LoadBalancerProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:40.178Z") @Stability(Stable) public interface LoadBalancerProps extends software.amazon.jsii.JsiiSerializable
Construction properties for a LoadBalancer.

Example:

 Cluster cluster;
 TaskDefinition taskDefinition;
 Vpc vpc;
 Ec2Service service = Ec2Service.Builder.create(this, "Service").cluster(cluster).taskDefinition(taskDefinition).build();
 LoadBalancer lb = LoadBalancer.Builder.create(this, "LB").vpc(vpc).build();
 lb.addListener(LoadBalancerListener.builder().externalPort(80).build());
 lb.addTarget(service);
 
  • Method Details

    • getVpc

      @Stability(Stable) @NotNull IVpc getVpc()
      VPC network of the fleet instances.
    • getAccessLoggingPolicy

      @Stability(Stable) @Nullable default CfnLoadBalancer.AccessLoggingPolicyProperty getAccessLoggingPolicy()
      Enable Loadbalancer access logs Can be used to avoid manual work as aws console Required S3 bucket name , enabled flag Can add interval for pushing log Can set bucket prefix in order to provide folder name inside bucket.

      Default: - disabled

    • getCrossZone

      @Stability(Stable) @Nullable default Boolean getCrossZone()
      Whether cross zone load balancing is enabled.

      This controls whether the load balancer evenly distributes requests across each availability zone

      Default: true

    • getHealthCheck

      @Stability(Stable) @Nullable default HealthCheck getHealthCheck()
      Health check settings for the load balancing targets.

      Not required but recommended.

      Default: - None.

    • getInternetFacing

      @Stability(Stable) @Nullable default Boolean getInternetFacing()
      Whether this is an internet-facing Load Balancer.

      This controls whether the LB has a public IP address assigned. It does not open up the Load Balancer's security groups to public internet access.

      Default: false

    • getListeners

      @Stability(Stable) @Nullable default List<LoadBalancerListener> getListeners()
      What listeners to set up for the load balancer.

      Can also be added by .addListener()

      Default: -

    • getSubnetSelection

      @Stability(Stable) @Nullable default SubnetSelection getSubnetSelection()
      Which subnets to deploy the load balancer.

      Can be used to define a specific set of subnets to deploy the load balancer to. Useful multiple public or private subnets are covering the same availability zone.

      Default: - Public subnets if internetFacing, Private subnets otherwise

    • getTargets

      @Stability(Stable) @Nullable default List<ILoadBalancerTarget> getTargets()
      What targets to load balance to.

      Can also be added by .addTarget()

      Default: - None.

    • builder

      @Stability(Stable) static LoadBalancerProps.Builder builder()
      Returns:
      a LoadBalancerProps.Builder of LoadBalancerProps