# ApplicationLoadBalancerProps

Properties to define an application load balancer.

- Source: [`aws-ecs-patterns/lib/base/application-multiple-target-groups-service-base.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-ecs-patterns/lib/base/application-multiple-target-groups-service-base.ts#L281)
- Type last changed: v2.35.0 · 2 Aug 2022

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_certificatemanager as certificatemanager } from 'aws-cdk-lib';
import { aws_ecs_patterns as ecs_patterns } from 'aws-cdk-lib';
import { aws_elasticloadbalancingv2 as elbv2 } from 'aws-cdk-lib';
import { aws_route53 as route53 } from 'aws-cdk-lib';

declare const certificate: certificatemanager.Certificate;
declare const hostedZone: route53.HostedZone;
const applicationLoadBalancerProps: ecs_patterns.ApplicationLoadBalancerProps = {
  listeners: [{
    name: 'name',

    // the properties below are optional
    certificate: certificate,
    port: 123,
    protocol: elbv2.ApplicationProtocol.HTTP,
    sslPolicy: elbv2.SslPolicy.RECOMMENDED_TLS,
  }],
  name: 'name',

  // the properties below are optional
  domainName: 'domainName',
  domainZone: hostedZone,
  idleTimeout: cdk.Duration.minutes(30),
  publicLoadBalancer: false,
};
```

## Properties

- `domainName`: string — The domain name for the service, e.g. "api.example.com.".

  **Default:** No domain name.

- `domainZone`: [IHostedZone](/cdk/api/v2/docs/aws-cdk-lib.aws_route53.IHostedZone.html) — The Route53 hosted zone for the domain, e.g. "example.com.".

  **Default:** No Route53 hosted domain zone.

- `idleTimeout`: [Duration](/cdk/api/v2/docs/aws-cdk-lib.Duration.html) — The load balancer idle timeout, in seconds.

  **Default:** CloudFormation sets idle timeout to 60 seconds

  Can be between 1 and 4000 seconds.

- `listeners`: [ApplicationListenerProps](/cdk/api/v2/docs/aws-cdk-lib.aws_ecs_patterns.ApplicationListenerProps.html)[] (required) — Listeners (at least one listener) attached to this load balancer.

- `name`: string (required) — Name of the load balancer.

- `publicLoadBalancer`: boolean = true — Determines whether the Load Balancer will be internet-facing.
