Interface BaseNetworkListenerProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
NetworkListenerProps
All Known Implementing Classes:
BaseNetworkListenerProps.Jsii$Proxy, NetworkListenerProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.95.0 (build f1ff514)", date="2024-03-26T18:09:23.675Z") @Stability(Stable) public interface BaseNetworkListenerProps extends software.amazon.jsii.JsiiSerializable
Basic properties for a Network Listener.

Example:

 import software.amazon.awscdk.services.elasticloadbalancing.*;
 import software.amazon.awscdk.services.elasticloadbalancingv2.*;
 LoadBalancer clb;
 ApplicationLoadBalancer alb;
 NetworkLoadBalancer nlb;
 ApplicationListener albListener = alb.addListener("ALBListener", BaseApplicationListenerProps.builder().port(80).build());
 ApplicationTargetGroup albTargetGroup = albListener.addTargets("ALBFleet", AddApplicationTargetsProps.builder().port(80).build());
 NetworkListener nlbListener = nlb.addListener("NLBListener", BaseNetworkListenerProps.builder().port(80).build());
 NetworkTargetGroup nlbTargetGroup = nlbListener.addTargets("NLBFleet", AddNetworkTargetsProps.builder().port(80).build());
 ServerDeploymentGroup deploymentGroup = ServerDeploymentGroup.Builder.create(this, "DeploymentGroup")
         .loadBalancers(List.of(LoadBalancer.classic(clb), LoadBalancer.application(albTargetGroup), LoadBalancer.network(nlbTargetGroup)))
         .build();
 
  • 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()
      Returns:
      a BaseNetworkListenerProps.Builder of BaseNetworkListenerProps