DirectoryService / Client / list_certificates



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

See also: AWS API Documentation

Request Syntax

response = client.list_certificates(
  • DirectoryId (string) –


    The identifier of the directory.

  • NextToken (string) – 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.

  • Limit (integer) – The number of items that should show up on one page

Return type:



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.


  • DirectoryService.Client.exceptions.DirectoryDoesNotExistException

  • DirectoryService.Client.exceptions.UnsupportedOperationException

  • DirectoryService.Client.exceptions.InvalidParameterException

  • DirectoryService.Client.exceptions.InvalidNextTokenException

  • DirectoryService.Client.exceptions.ClientException

  • DirectoryService.Client.exceptions.ServiceException