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 ModifyListener operation. Replaces the specified properties of the specified listener. Any properties that you do not specify remain unchanged.
Changing the protocol from HTTPS to HTTP, or from TLS to TCP, removes the security policy and default certificate properties. If you change the protocol from HTTP to HTTPS, or from TCP to TLS, you must add the security policy and default certificate properties.
To add an item to a list, remove an item from a list, or update an item in a list, you must provide the entire list. For example, to add an action, specify a list with the current actions plus the new action.
Namespace: Amazon.ElasticLoadBalancingV2.Model
Assembly: AWSSDK.ElasticLoadBalancingV2.dll
Version: 3.x.y.z
public class ModifyListenerRequest : AmazonElasticLoadBalancingV2Request IAmazonWebServiceRequest
The ModifyListenerRequest type exposes the following members
Name | Description | |
---|---|---|
ModifyListenerRequest() |
Name | Type | Description | |
---|---|---|---|
AlpnPolicy | System.Collections.Generic.List<System.String> |
Gets and sets the property AlpnPolicy. [TLS listeners] The name of the Application-Layer Protocol Negotiation (ALPN) policy. You can specify one policy name. The following are the possible values:
For more information, see ALPN policies in the Network Load Balancers Guide. |
|
Certificates | System.Collections.Generic.List<Amazon.ElasticLoadBalancingV2.Model.Certificate> |
Gets and sets the property Certificates.
[HTTPS and TLS listeners] The default certificate for the listener. You must provide
exactly one certificate. Set |
|
DefaultActions | System.Collections.Generic.List<Amazon.ElasticLoadBalancingV2.Model.Action> |
Gets and sets the property DefaultActions. The actions for the default rule. |
|
ListenerArn | System.String |
Gets and sets the property ListenerArn. The Amazon Resource Name (ARN) of the listener. |
|
MutualAuthentication | Amazon.ElasticLoadBalancingV2.Model.MutualAuthenticationAttributes |
Gets and sets the property MutualAuthentication. The mutual authentication configuration information. |
|
Port | System.Int32 |
Gets and sets the property Port. The port for connections from clients to the load balancer. You cannot specify a port for a Gateway Load Balancer. |
|
Protocol | Amazon.ElasticLoadBalancingV2.ProtocolEnum |
Gets and sets the property Protocol. The protocol for connections from clients to the load balancer. Application Load Balancers support the HTTP and HTTPS protocols. Network Load Balancers support the TCP, TLS, UDP, and TCP_UDP protocols. You can’t change the protocol to UDP or TCP_UDP if dual-stack mode is enabled. You cannot specify a protocol for a Gateway Load Balancer. |
|
SslPolicy | System.String |
Gets and sets the property SslPolicy. [HTTPS and TLS listeners] The security policy that defines which protocols and ciphers are supported. For more information, see Security policies in the Application Load Balancers Guide or Security policies in the Network Load Balancers Guide. |
This example changes the default action for the specified listener.
var client = new AmazonElasticLoadBalancingV2Client(); var response = client.ModifyListener(new ModifyListenerRequest { DefaultActions = new List<Action> { new Action { TargetGroupArn = "arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-new-targets/2453ed029918f21f", Type = "forward" } }, ListenerArn = "arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2" }); List<Listener> listeners = response.Listeners;
This example changes the server certificate for the specified HTTPS listener.
var client = new AmazonElasticLoadBalancingV2Client(); var response = client.ModifyListener(new ModifyListenerRequest { Certificates = new List<Certificate> { new Certificate { CertificateArn = "arn:aws:iam::123456789012:server-certificate/my-new-server-cert" } }, ListenerArn = "arn:aws:elasticloadbalancing:us-west-2:123456789012:listener/app/my-load-balancer/50dc6c495c0c9188/0467ef3c8400ae65" }); List<Listener> listeners = response.Listeners;
.NET Core App:
Supported in: 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5, 4.0, 3.5