ElasticLoadBalancing / Client / set_load_balancer_listener_ssl_certificate

set_load_balancer_listener_ssl_certificate#

ElasticLoadBalancing.Client.set_load_balancer_listener_ssl_certificate(**kwargs)#

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

See also: AWS API Documentation

Request Syntax

response = client.set_load_balancer_listener_ssl_certificate(
    LoadBalancerName='string',
    LoadBalancerPort=123,
    SSLCertificateId='string'
)
Parameters:
  • LoadBalancerName (string) –

    [REQUIRED]

    The name of the load balancer.

  • LoadBalancerPort (integer) –

    [REQUIRED]

    The port that uses the specified SSL certificate.

  • SSLCertificateId (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of the SSL certificate.

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

    Contains the output of SetLoadBalancerListenerSSLCertificate.

Exceptions

Examples

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

response = client.set_load_balancer_listener_ssl_certificate(
    LoadBalancerName='my-load-balancer',
    LoadBalancerPort=443,
    SSLCertificateId='arn:aws:iam::123456789012:server-certificate/new-server-cert',
)

print(response)

Expected Output:

{
    'ResponseMetadata': {
        '...': '...',
    },
}