Interface BaseNetworkListenerProps

All Superinterfaces:
All Known Subinterfaces:
All Known Implementing Classes:
BaseNetworkListenerProps.Jsii$Proxy, NetworkListenerProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.92.0 (build db7f27d)", date="2023-12-06T04:49:38.561Z") @Stability(Stable) public interface BaseNetworkListenerProps extends
Basic properties for a Network Listener.


 Vpc vpc = new Vpc(this, "VPC");
 NetworkLoadBalancer lb = NetworkLoadBalancer.Builder.create(this, "lb").vpc(vpc).build();
 NetworkListener listener = lb.addListener("listener", BaseNetworkListenerProps.builder().port(80).build());
 listener.addTargets("target", AddNetworkTargetsProps.builder()
 HttpApi httpEndpoint = HttpApi.Builder.create(this, "HttpProxyPrivateApi")
         .defaultIntegration(new HttpNlbIntegration("DefaultIntegration", listener))
  • Method Details

    • getPort

      @Stability(Stable) @NotNull Number getPort()
      The port on which the listener listens for requests.
    • getAlpnPolicy

      @Stability(Stable) @Nullable default AlpnPolicy getAlpnPolicy()
      Application-Layer Protocol Negotiation (ALPN) is a TLS extension that is sent on the initial TLS handshake hello messages.

      ALPN enables the application layer to negotiate which protocols should be used over a secure connection, such as HTTP/1 and HTTP/2.

      Can only be specified together with Protocol TLS.

      Default: - None

    • getCertificates

      @Stability(Stable) @Nullable default List<IListenerCertificate> getCertificates()
      Certificate list of ACM cert ARNs.

      You must provide exactly one certificate if the listener protocol is HTTPS or TLS.

      Default: - No certificates.

    • getDefaultAction

      @Stability(Stable) @Nullable default NetworkListenerAction getDefaultAction()
      Default action to take for requests to this listener.

      This allows full control of the default Action of the load balancer, including weighted forwarding. See the NetworkListenerAction class for all options.

      Cannot be specified together with defaultTargetGroups.

      Default: - None.

    • getDefaultTargetGroups

      @Stability(Stable) @Nullable default List<INetworkTargetGroup> getDefaultTargetGroups()
      Default target groups to load balance to.

      All target groups will be load balanced to with equal weight and without stickiness. For a more complex configuration than that, use either defaultAction or addAction().

      Cannot be specified together with defaultAction.

      Default: - None.

    • getProtocol

      @Stability(Stable) @Nullable default Protocol getProtocol()
      Protocol for listener, expects TCP, TLS, UDP, or TCP_UDP.

      Default: - TLS if certificates are provided. TCP otherwise.

    • getSslPolicy

      @Stability(Stable) @Nullable default SslPolicy getSslPolicy()
      SSL Policy.

      Default: - Current predefined security policy.

    • builder

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