AWS::ElasticLoadBalancingV2::ListenerSpecifies a listener for an Application Load Balancer, Network Load Balancer, or Gateway Load Balancer.
import { CfnListener } from 'aws-cdk-lib/aws-elasticloadbalancingv2';Or use the module namespace:
import * as elasticloadbalancingv2 from 'aws-cdk-lib/aws-elasticloadbalancingv2';
// elasticloadbalancingv2.CfnListenerConfiguration passed to the constructor as CfnListenerProps.
defaultActionsRequiredIResolvable | IResolvable | ActionProperty[]The actions for the default rule. You cannot define a condition for a default rule. To create additional rules for an Application Load Balancer, use [AWS::ElasticLoadBalancingV2::ListenerRule](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listenerrule.html) .
loadBalancerArnRequiredstring | ILoadBalancerRefThe Amazon Resource Name (ARN) of the load balancer.
alpnPolicyOptionalstring[][TLS listener] The name of the Application-Layer Protocol Negotiation (ALPN) policy.
certificatesOptionalIResolvable | IResolvable | CertificateProperty[]The default SSL server certificate for a secure listener. You must provide exactly one certificate if the listener protocol is HTTPS or TLS. For an HTTPS listener, update requires some interruptions. For a TLS listener, update requires no interruption. To create a certificate list for a secure listener, use [AWS::ElasticLoadBalancingV2::ListenerCertificate](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listenercertificate.html) .
listenerAttributesOptionalIResolvable | IResolvable | ListenerAttributeProperty[]The listener attributes. Attributes that you do not modify retain their current values.
mutualAuthenticationOptionalIResolvable | MutualAuthenticationPropertyThe mutual authentication configuration information.
portOptionalnumberThe port on which the load balancer is listening. You can't specify a port for a Gateway Load Balancer.
protocolOptionalstringThe protocol for connections from clients to the load balancer. For Application Load Balancers, the supported protocols are HTTP and HTTPS. For Network Load Balancers, the supported protocols are TCP, TLS, UDP, TCP_UDP, QUIC, and TCP_QUIC. You can’t specify the UDP, TCP_UDP, QUIC, or TCP_QUIC protocol if dual-stack mode is enabled. You can't specify a protocol for a Gateway Load Balancer.
sslPolicyOptionalstring[HTTPS and TLS listeners] The security policy that defines which protocols and ciphers are supported. For more information, see [Security policies](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/describe-ssl-policies.html) in the *Application Load Balancers Guide* and [Security policies](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/describe-ssl-policies.html) in the *Network Load Balancers Guide* . [HTTPS listeners] Updating the security policy can result in interruptions if the load balancer is handling a high volume of traffic. To decrease the possibility of an interruption if your load balancer is handling a high volume of traffic, create an additional load balancer or request an LCU reservation.
This L1 construct maps directly to the following CloudFormation resource type.
Everything you need to know about Elastic Load Balancing V2 on one page. HD quality, print-friendly.
Download Free Infographicaws-elasticloadbalancingv2AWS::ElasticLoadBalancingV2::Listener