CreateLoadBalancerListeners - Elastic Load Balancing

CreateLoadBalancerListeners

Creates one or more listeners for the specified load balancer. If a listener with the specified port does not already exist, it is created; otherwise, the properties of the new listener must match the properties of the existing listener.

For more information, see Listeners for your Classic Load Balancer in the User Guide for Classic Load Balancers.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

Listeners.member.N

The listeners.

Type: Array of Listener objects

Required: Yes

LoadBalancerName

The name of the load balancer.

Type: String

Required: Yes

Errors

For information about the errors that are common to all actions, see Common Errors.

CertificateNotFound

The specified ARN does not refer to a valid SSL certificate in AWS Identity and Access Management (IAM) or AWS Certificate Manager (ACM). Note that if you recently uploaded the certificate to IAM, this error might indicate that the certificate is not fully available yet.

HTTP Status Code: 400

DuplicateListener

A listener already exists for the specified load balancer name and port, but with a different instance port, protocol, or SSL certificate.

HTTP Status Code: 400

InvalidConfigurationRequest

The requested configuration change is not valid.

HTTP Status Code: 409

LoadBalancerNotFound

The specified load balancer does not exist.

HTTP Status Code: 400

UnsupportedProtocol

The specified protocol or signature version is not supported.

HTTP Status Code: 400

Examples

Create an HTTPS listener

This example creates a listener for the specified load balancer using port 443 and the HTTPS protocol.

Sample Request

https://elasticloadbalancing.amazonaws.com/?Action=CreateLoadBalancerListeners &LoadBalancerName=my-https-loadbalancer &Listeners.member.1.Protocol=https &Listeners.member.1.LoadBalancerPort=443 &Listeners.member.1.InstancePort=443 &Listeners.member.1.InstanceProtocol=https &Listeners.member.1.SSLCertificateId=arn:aws:iam::123456789012:server-certificate/my-server-cert &Version=2012-06-01 &AUTHPARAMS

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: