Interface LoadBalancerListener

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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:40.177Z") @Stability(Stable) public interface LoadBalancerListener extends software.amazon.jsii.JsiiSerializable
Add a backend to the load balancer.

Example:

 IVpc vpc;
 AutoScalingGroup myAutoScalingGroup;
 LoadBalancer lb = LoadBalancer.Builder.create(this, "LB")
         .vpc(vpc)
         .internetFacing(true)
         .healthCheck(HealthCheck.builder()
                 .port(80)
                 .build())
         .build();
 lb.addTarget(myAutoScalingGroup);
 lb.addListener(LoadBalancerListener.builder()
         .externalPort(80)
         .build());
 
  • Method Details

    • getExternalPort

      @Stability(Stable) @NotNull Number getExternalPort()
      External listening port.
    • getAllowConnectionsFrom

      @Stability(Stable) @Nullable default List<IConnectable> getAllowConnectionsFrom()
      Allow connections to the load balancer from the given set of connection peers.

      By default, connections will be allowed from anywhere. Set this to an empty list to deny connections, or supply a custom list of peers to allow connections from (IP ranges or security groups).

      Default: Anywhere

    • getExternalProtocol

      @Stability(Stable) @Nullable default LoadBalancingProtocol getExternalProtocol()
      What public protocol to use for load balancing.

      Either 'tcp', 'ssl', 'http' or 'https'.

      May be omitted if the external port is either 80 or 443.

    • getInternalPort

      @Stability(Stable) @Nullable default Number getInternalPort()
      Instance listening port.

      Same as the externalPort if not specified.

      Default: externalPort

    • getInternalProtocol

      @Stability(Stable) @Nullable default LoadBalancingProtocol getInternalProtocol()
      What public protocol to use for load balancing.

      Either 'tcp', 'ssl', 'http' or 'https'.

      May be omitted if the internal port is either 80 or 443.

      The instance protocol is 'tcp' if the front-end protocol is 'tcp' or 'ssl', the instance protocol is 'http' if the front-end protocol is 'https'.

    • getPolicyNames

      @Stability(Stable) @Nullable default List<String> getPolicyNames()
      SSL policy names.
    • getSslCertificateArn

      @Stability(Stable) @Nullable default String getSslCertificateArn()
      the ARN of the SSL certificate.

      Default: - none

    • getSslCertificateId

      @Stability(Deprecated) @Deprecated @Nullable default String getSslCertificateId()
      Deprecated.
      • use sslCertificateArn instead
      (deprecated) the ARN of the SSL certificate.

    • builder

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