# ApplicationListenerProps

Properties for defining a standalone ApplicationListener.

Extends: ApplicationListenerProps
Extends: BaseApplicationListenerProps
Used as props by: ApplicationListener

- Source: [`aws-elasticloadbalancingv2/lib/alb/application-listener.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-elasticloadbalancingv2/lib/alb/application-listener.ts#L186)

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_elasticloadbalancingv2 as elbv2 } from 'aws-cdk-lib';
import { aws_elasticloadbalancingv2 as interfaces_elasticloadbalancingv2 } from 'aws-cdk-lib/interfaces';

declare const applicationLoadBalancer: elbv2.ApplicationLoadBalancer;
declare const applicationTargetGroup: elbv2.ApplicationTargetGroup;
declare const listenerAction: elbv2.ListenerAction;
declare const listenerCertificate: elbv2.ListenerCertificate;
declare const trustStoreRef: interfaces_elasticloadbalancingv2.ITrustStoreRef;
const applicationListenerProps: elbv2.ApplicationListenerProps = {
  loadBalancer: applicationLoadBalancer,

  // the properties below are optional
  certificates: [listenerCertificate],
  defaultAction: listenerAction,
  defaultTargetGroups: [applicationTargetGroup],
  mutualAuthentication: {
    advertiseTrustStoreCaNames: false,
    ignoreClientCertificateExpiry: false,
    mutualAuthenticationMode: elbv2.MutualAuthenticationMode.OFF,
    trustStore: trustStoreRef,
  },
  open: false,
  port: 123,
  protocol: elbv2.ApplicationProtocol.HTTP,
  sslPolicy: elbv2.SslPolicy.RECOMMENDED_TLS,
};
```

## Properties

- `certificates`: [IListenerCertificate](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.IListenerCertificate.html)[] — Certificate list of ACM cert ARNs.

  **Default:** No certificates.

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

- `defaultAction`: [ListenerAction](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.ListenerAction.html) = None. — 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`.

- `defaultTargetGroups`: [IApplicationTargetGroup](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.IApplicationTargetGroup.html)[] = None. — 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`.

- `loadBalancer`: [IApplicationLoadBalancer](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.IApplicationLoadBalancer.html) (required) — The load balancer to attach this listener to.

- `mutualAuthentication`: [MutualAuthentication](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.MutualAuthentication.html) — The mutual authentication configuration information.

  **Default:** No mutual authentication configuration

- `open`: boolean = true — 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.

- `port`: number — The port on which the listener listens for requests.

  **Default:** Determined from protocol if known.

- `protocol`: [ApplicationProtocol](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.ApplicationProtocol.html) — The protocol to use.

  **Default:** Determined from port if known.

- `sslPolicy`: [SslPolicy](/cdk/api/v2/docs/aws-cdk-lib.aws_elasticloadbalancingv2.SslPolicy.html) — The security policy that defines which ciphers and protocols are supported.

  **Default:** The current predefined security policy.
