aws-cdk-lib.aws_ecs_patterns.ApplicationListenerProps

interface ApplicationListenerProps

LanguageType name
.NETAmazon.CDK.AWS.ECS.Patterns.ApplicationListenerProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsecspatterns#ApplicationListenerProps
Javasoftware.amazon.awscdk.services.ecs.patterns.ApplicationListenerProps
Pythonaws_cdk.aws_ecs_patterns.ApplicationListenerProps
TypeScript (source)aws-cdk-lib » aws_ecs_patterns » ApplicationListenerProps

Properties to define an application listener.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
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';

declare const certificate: certificatemanager.Certificate;
const applicationListenerProps: ecs_patterns.ApplicationListenerProps = {
  name: 'name',

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

Properties

NameTypeDescription
namestringName of the listener.
certificate?ICertificateCertificate Manager certificate to associate with the load balancer.
port?numberThe port on which the listener listens for requests.
protocol?ApplicationProtocolThe protocol for connections from clients to the load balancer.
sslPolicy?SslPolicyThe security policy that defines which ciphers and protocols are supported by the ALB Listener.

name

Type: string

Name of the listener.


certificate?

Type: ICertificate (optional, default: No certificate associated with the load balancer, if using the HTTP protocol. For HTTPS, a DNS-validated certificate will be created for the load balancer's specified domain name.)

Certificate Manager certificate to associate with the load balancer.

Setting this option will set the load balancer protocol to HTTPS.


port?

Type: number (optional, default: Determined from protocol if known.)

The port on which the listener listens for requests.


protocol?

Type: ApplicationProtocol (optional, default: ApplicationProtocol.HTTP. If a certificate is specified, the protocol will be set by default to ApplicationProtocol.HTTPS.)

The protocol for connections from clients to the load balancer.

The load balancer port is determined from the protocol (port 80 for HTTP, port 443 for HTTPS). A domain name and zone must be also be specified if using HTTPS.


sslPolicy?

Type: SslPolicy (optional, default: The recommended elastic load balancing security policy)

The security policy that defines which ciphers and protocols are supported by the ALB Listener.