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

*****************
list_certificates
*****************



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

  

  For the specified directory, lists all the certificates registered for a secure LDAP or client certificate authentication.

  

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


  **Request Syntax**
  ::

    response = client.list_certificates(
        DirectoryId='string',
        NextToken='string',
        Limit=123
    )
    
  :type DirectoryId: string
  :param DirectoryId: **[REQUIRED]** 

    The identifier of the directory.

    

  
  :type NextToken: string
  :param NextToken: 

    A token for requesting another page of certificates if the ``NextToken`` response element indicates that more certificates are available. Use the value of the returned ``NextToken`` element in your request until the token comes back as ``null``. Pass ``null`` if this is the first call.

    

  
  :type Limit: integer
  :param Limit: 

    The number of items that should show up on one page

    

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

    
    ::

      {
          'NextToken': 'string',
          'CertificatesInfo': [
              {
                  'CertificateId': 'string',
                  'CommonName': 'string',
                  'State': 'Registering'|'Registered'|'RegisterFailed'|'Deregistering'|'Deregistered'|'DeregisterFailed',
                  'ExpiryDateTime': datetime(2015, 1, 1),
                  'Type': 'ClientCertAuth'|'ClientLDAPS'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **NextToken** *(string) --* 

        Indicates whether another page of certificates is available when the number of available certificates exceeds the page limit.

        
      

      - **CertificatesInfo** *(list) --* 

        A list of certificates with basic details including certificate ID, certificate common name, certificate state.

        
        

        - *(dict) --* 

          Contains general information about a certificate.

          
          

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

            The identifier of the certificate.

            
          

          - **CommonName** *(string) --* 

            The common name for the certificate.

            
          

          - **State** *(string) --* 

            The state of the certificate.

            
          

          - **ExpiryDateTime** *(datetime) --* 

            The date and time when the certificate will expire.

            
          

          - **Type** *(string) --* 

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

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

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

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

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

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

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

  