aws-cdk-lib.aws_elasticloadbalancing.CfnLoadBalancer.ListenersProperty

interface ListenersProperty

LanguageType name
.NETAmazon.CDK.AWS.ElasticLoadBalancing.CfnLoadBalancer.ListenersProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awselasticloadbalancing#CfnLoadBalancer_ListenersProperty
Javasoftware.amazon.awscdk.services.elasticloadbalancing.CfnLoadBalancer.ListenersProperty
Pythonaws_cdk.aws_elasticloadbalancing.CfnLoadBalancer.ListenersProperty
TypeScript aws-cdk-lib » aws_elasticloadbalancing » CfnLoadBalancer » ListenersProperty

Specifies a listener for your Classic Load Balancer.

Modifying any property replaces the listener.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_elasticloadbalancing as elb } from 'aws-cdk-lib';
const listenersProperty: elb.CfnLoadBalancer.ListenersProperty = {
  instancePort: 'instancePort',
  loadBalancerPort: 'loadBalancerPort',
  protocol: 'protocol',

  // the properties below are optional
  instanceProtocol: 'instanceProtocol',
  policyNames: ['policyNames'],
  sslCertificateId: 'sslCertificateId',
};

Properties

NameTypeDescription
instancePortstringThe port on which the instance is listening.
loadBalancerPortstringThe port on which the load balancer is listening.
protocolstringThe load balancer transport protocol to use for routing: HTTP, HTTPS, TCP, or SSL.
instanceProtocol?stringThe protocol to use for routing traffic to instances: HTTP, HTTPS, TCP, or SSL.
policyNames?string[]The names of the policies to associate with the listener.
sslCertificateId?stringThe Amazon Resource Name (ARN) of the server certificate.

instancePort

Type: string

The port on which the instance is listening.


loadBalancerPort

Type: string

The port on which the load balancer is listening.

On EC2-VPC, you can specify any port from the range 1-65535. On EC2-Classic, you can specify any port from the following list: 25, 80, 443, 465, 587, 1024-65535.


protocol

Type: string

The load balancer transport protocol to use for routing: HTTP, HTTPS, TCP, or SSL.


instanceProtocol?

Type: string (optional)

The protocol to use for routing traffic to instances: HTTP, HTTPS, TCP, or SSL.

If the front-end protocol is TCP or SSL, the back-end protocol must be TCP or SSL. If the front-end protocol is HTTP or HTTPS, the back-end protocol must be HTTP or HTTPS.

If there is another listener with the same InstancePort whose InstanceProtocol is secure, (HTTPS or SSL), the listener's InstanceProtocol must also be secure.

If there is another listener with the same InstancePort whose InstanceProtocol is HTTP or TCP, the listener's InstanceProtocol must be HTTP or TCP.


policyNames?

Type: string[] (optional)

The names of the policies to associate with the listener.


sslCertificateId?

Type: string (optional)

The Amazon Resource Name (ARN) of the server certificate.