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 Classic Load Balancers Guide.

Samples

import aws.sdk.kotlin.services.elasticloadbalancing.model.Listener
fun main() { 
   //sampleStart 
   // This example creates a listener for your load balancer at port 80 using the HTTP protocol.
elasticLoadBalancingClient.createLoadBalancerListeners {
    loadBalancerName = "my-load-balancer"
    listeners = listOf<Listener>(
        Listener {
            protocol = "HTTP"
            loadBalancerPort = 80
            instanceProtocol = "HTTP"
            instancePort = 80
        }            
    )
} 
   //sampleEnd
}