AWS SDK Version 3 for .NET
API Reference

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.

Sets the certificate that terminates the specified listener's SSL connections. The specified certificate replaces any prior certificate that was used on the same load balancer and port.

For more information about updating your SSL certificate, see Replace the SSL Certificate for Your Load Balancer in the Classic Load Balancer Guide.

Note:

For PCL this operation is only available in asynchronous form. Please refer to SetLoadBalancerListenerSSLCertificateAsync.

Namespace: Amazon.ElasticLoadBalancing
Assembly: AWSSDK.ElasticLoadBalancing.dll
Version: 3.x.y.z

Syntax

C#
public virtual SetLoadBalancerListenerSSLCertificateResponse SetLoadBalancerListenerSSLCertificate(
         SetLoadBalancerListenerSSLCertificateRequest request
)
Parameters
request
Type: Amazon.ElasticLoadBalancing.Model.SetLoadBalancerListenerSSLCertificateRequest

Container for the necessary parameters to execute the SetLoadBalancerListenerSSLCertificate service method.

Return Value
The response from the SetLoadBalancerListenerSSLCertificate service method, as returned by ElasticLoadBalancing.

Exceptions

ExceptionCondition
AccessPointNotFoundException The specified load balancer does not exist.
CertificateNotFoundException 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.
InvalidConfigurationRequestException The requested configuration change is not valid.
ListenerNotFoundException The load balancer does not have a listener configured at the specified port.
UnsupportedProtocolException The specified protocol or signature version is not supported.

Examples

This example replaces the existing SSL certificate for the specified HTTPS listener.

To update the SSL certificate for an HTTPS listener


var response = client.SetLoadBalancerListenerSSLCertificate(new SetLoadBalancerListenerSSLCertificateRequest 
{
    LoadBalancerName = "my-load-balancer",
    LoadBalancerPort = 443,
    SSLCertificateId = "arn:aws:iam::123456789012:server-certificate/new-server-cert"
});


            

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms

See Also