AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Container for the parameters to the CreateLoadBalancerListeners operation. 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.
Namespace: Amazon.ElasticLoadBalancing.Model
Assembly: AWSSDK.ElasticLoadBalancing.dll
Version: 3.x.y.z
public class CreateLoadBalancerListenersRequest : AmazonElasticLoadBalancingRequest IAmazonWebServiceRequest
The CreateLoadBalancerListenersRequest type exposes the following members
Name | Description | |
---|---|---|
CreateLoadBalancerListenersRequest() |
Empty constructor used to set properties independently even when a simple constructor is available |
|
CreateLoadBalancerListenersRequest(string, List<Listener>) |
Instantiates CreateLoadBalancerListenersRequest with the parameterized properties |
Name | Type | Description | |
---|---|---|---|
Listeners | System.Collections.Generic.List<Amazon.ElasticLoadBalancing.Model.Listener> |
Gets and sets the property Listeners. The listeners. |
|
LoadBalancerName | System.String |
Gets and sets the property LoadBalancerName. The name of the load balancer. |
This example creates a listener for your load balancer at port 80 using the HTTP protocol.
var client = new AmazonElasticLoadBalancingClient(); var response = client.CreateLoadBalancerListeners(new CreateLoadBalancerListenersRequest { Listeners = new List<Listener> { new Listener { InstancePort = 80, InstanceProtocol = "HTTP", LoadBalancerPort = 80, Protocol = "HTTP" } }, LoadBalancerName = "my-load-balancer" });
This example creates a listener for your load balancer at port 443 using the HTTPS protocol.
var client = new AmazonElasticLoadBalancingClient(); var response = client.CreateLoadBalancerListeners(new CreateLoadBalancerListenersRequest { Listeners = new List<Listener> { new Listener { InstancePort = 80, InstanceProtocol = "HTTP", LoadBalancerPort = 443, Protocol = "HTTPS", SSLCertificateId = "arn:aws:iam::123456789012:server-certificate/my-server-cert" } }, LoadBalancerName = "my-load-balancer" });
.NET Core App:
Supported in: 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5, 4.0, 3.5