Interface BaseApplicationListenerProps

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

@Generated(value="jsii-pacmak/1.95.0 (build f1ff514)", date="2024-03-26T18:09:23.672Z") @Stability(Stable) public interface BaseApplicationListenerProps extends software.amazon.jsii.JsiiSerializable
Basic properties for an ApplicationListener.

Example:

 Cluster cluster;
 TaskDefinition taskDefinition;
 Vpc vpc;
 FargateService service = FargateService.Builder.create(this, "Service").cluster(cluster).taskDefinition(taskDefinition).build();
 ApplicationLoadBalancer lb = ApplicationLoadBalancer.Builder.create(this, "LB").vpc(vpc).internetFacing(true).build();
 ApplicationListener listener = lb.addListener("Listener", BaseApplicationListenerProps.builder().port(80).build());
 service.registerLoadBalancerTargets(EcsTarget.builder()
         .containerName("web")
         .containerPort(80)
         .newTargetGroupId("ECS")
         .listener(ListenerConfig.applicationListener(listener, AddApplicationTargetsProps.builder()
                 .protocol(ApplicationProtocol.HTTPS)
                 .build()))
         .build());
 
  • Method Details

    • 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 ListenerAction getDefaultAction()
      Default action to take for requests to this listener.

      This allows full control of the default action of the load balancer, including Action chaining, fixed responses and redirect responses.

      See the ListenerAction class for all options.

      Cannot be specified together with defaultTargetGroups.

      Default: - None.

    • getDefaultTargetGroups

      @Stability(Stable) @Nullable default List<IApplicationTargetGroup> 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.

    • getOpen

      @Stability(Stable) @Nullable default Boolean getOpen()
      Allow anyone to connect to the load balancer on the listener port.

      If this is specified, the load balancer will be opened up to anyone who can reach it. For internal load balancers this is anyone in the same VPC. For public load balancers, this is anyone on the internet.

      If you want to be more selective about who can access this load balancer, set this to false and use the listener's connections object to selectively grant access to the load balancer on the listener port.

      Default: true

    • getPort

      @Stability(Stable) @Nullable default Number getPort()
      The port on which the listener listens for requests.

      Default: - Determined from protocol if known.

    • getProtocol

      @Stability(Stable) @Nullable default ApplicationProtocol getProtocol()
      The protocol to use.

      Default: - Determined from port if known.

    • getSslPolicy

      @Stability(Stable) @Nullable default SslPolicy getSslPolicy()
      The security policy that defines which ciphers and protocols are supported.

      Default: - The current predefined security policy.

    • builder

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