:doc:`DirectoryService <../../ds>` / Client / register_certificate

********************
register_certificate
********************



.. py:method:: DirectoryService.Client.register_certificate(**kwargs)

  

  Registers a certificate for a secure LDAP or client certificate authentication.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/RegisterCertificate>`_  


  **Request Syntax**
  ::

    response = client.register_certificate(
        DirectoryId='string',
        CertificateData='string',
        Type='ClientCertAuth'|'ClientLDAPS',
        ClientCertAuthSettings={
            'OCSPUrl': 'string'
        }
    )
    
  :type DirectoryId: string
  :param DirectoryId: **[REQUIRED]** 

    The identifier of the directory.

    

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

    The certificate PEM string that needs to be registered.

    

  
  :type Type: string
  :param Type: 

    The function that the registered certificate performs. Valid values include ``ClientLDAPS`` or ``ClientCertAuth``. The default value is ``ClientLDAPS``.

    

  
  :type ClientCertAuthSettings: dict
  :param ClientCertAuthSettings: 

    A ``ClientCertAuthSettings`` object that contains client certificate authentication settings.

    

  
    - **OCSPUrl** *(string) --* 

      Specifies the URL of the default OCSP server used to check for revocation status. A secondary value to any OCSP address found in the AIA extension of the user certificate.

      

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

    
    ::

      {
          'CertificateId': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **CertificateId** *(string) --* 

        The identifier of the certificate.

        
  
  **Exceptions**
  
  *   :py:class:`DirectoryService.Client.exceptions.DirectoryUnavailableException`

  
  *   :py:class:`DirectoryService.Client.exceptions.DirectoryDoesNotExistException`

  
  *   :py:class:`DirectoryService.Client.exceptions.InvalidCertificateException`

  
  *   :py:class:`DirectoryService.Client.exceptions.CertificateLimitExceededException`

  
  *   :py:class:`DirectoryService.Client.exceptions.CertificateAlreadyExistsException`

  
  *   :py:class:`DirectoryService.Client.exceptions.UnsupportedOperationException`

  
  *   :py:class:`DirectoryService.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`DirectoryService.Client.exceptions.ClientException`

  
  *   :py:class:`DirectoryService.Client.exceptions.ServiceException`

  