:doc:`ElasticLoadBalancing <../../elb>` / Client / set_load_balancer_listener_ssl_certificate

******************************************
set_load_balancer_listener_ssl_certificate
******************************************



.. py:method:: 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 <https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-update-ssl-cert.html>`__ in the *Classic Load Balancers Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/SetLoadBalancerListenerSSLCertificate>`_  


  **Request Syntax**
  ::

    response = client.set_load_balancer_listener_ssl_certificate(
        LoadBalancerName='string',
        LoadBalancerPort=123,
        SSLCertificateId='string'
    )
    
  :type LoadBalancerName: string
  :param LoadBalancerName: **[REQUIRED]** 

    The name of the load balancer.

    

  
  :type LoadBalancerPort: integer
  :param LoadBalancerPort: **[REQUIRED]** 

    The port that uses the specified SSL certificate.

    

  
  :type SSLCertificateId: string
  :param SSLCertificateId: **[REQUIRED]** 

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

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 

      Contains the output of SetLoadBalancerListenerSSLCertificate.

      
  
  **Exceptions**
  
  *   :py:class:`ElasticLoadBalancing.Client.exceptions.CertificateNotFoundException`

  
  *   :py:class:`ElasticLoadBalancing.Client.exceptions.AccessPointNotFoundException`

  
  *   :py:class:`ElasticLoadBalancing.Client.exceptions.ListenerNotFoundException`

  
  *   :py:class:`ElasticLoadBalancing.Client.exceptions.InvalidConfigurationRequestException`

  
  *   :py:class:`ElasticLoadBalancing.Client.exceptions.UnsupportedProtocolException`

  

  **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': {
            '...': '...',
        },
    }

  