:doc:`Transfer <../../transfer>` / Client / list_certificates

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



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

  

  Returns a list of the current certificates that have been imported into Transfer Family. If you want to limit the results to a certain number, supply a value for the ``MaxResults`` parameter. If you ran the command previously and received a value for the ``NextToken`` parameter, you can supply that value to continue listing certificates from where you left off.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ListCertificates>`_  


  **Request Syntax**
  ::

    response = client.list_certificates(
        MaxResults=123,
        NextToken='string'
    )
    
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of items to return.

    

  
  :type NextToken: string
  :param NextToken: 

    When you can get additional results from the ``ListCertificates`` call, a ``NextToken`` parameter is returned in the output. You can then pass in a subsequent command to the ``NextToken`` parameter to continue listing additional certificates.

    

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

    
    ::

      {
          'NextToken': 'string',
          'Certificates': [
              {
                  'Arn': 'string',
                  'CertificateId': 'string',
                  'Usage': 'SIGNING'|'ENCRYPTION'|'TLS',
                  'Status': 'ACTIVE'|'PENDING_ROTATION'|'INACTIVE',
                  'ActiveDate': datetime(2015, 1, 1),
                  'InactiveDate': datetime(2015, 1, 1),
                  'Type': 'CERTIFICATE'|'CERTIFICATE_WITH_PRIVATE_KEY',
                  'Description': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        Returns the next token, which you can use to list the next certificate.

        
      

      - **Certificates** *(list) --* 

        Returns an array of the certificates that are specified in the ``ListCertificates`` call.

        
        

        - *(dict) --* 

          Describes the properties of a certificate.

          
          

          - **Arn** *(string) --* 

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

            
          

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

            An array of identifiers for the imported certificates. You use this identifier for working with profiles and partner profiles.

            
          

          - **Usage** *(string) --* 

            Specifies how this certificate is used. It can be used in the following ways:

             

            
            * ``SIGNING``: For signing AS2 messages
             
            * ``ENCRYPTION``: For encrypting AS2 messages
             
            * ``TLS``: For securing AS2 communications sent over HTTPS
            

            
          

          - **Status** *(string) --* 

            The certificate can be either ``ACTIVE``, ``PENDING_ROTATION``, or ``INACTIVE``. ``PENDING_ROTATION`` means that this certificate will replace the current certificate when it expires.

            
          

          - **ActiveDate** *(datetime) --* 

            An optional date that specifies when the certificate becomes active. If you do not specify a value, ``ActiveDate`` takes the same value as ``NotBeforeDate``, which is specified by the CA.

            
          

          - **InactiveDate** *(datetime) --* 

            An optional date that specifies when the certificate becomes inactive. If you do not specify a value, ``InactiveDate`` takes the same value as ``NotAfterDate``, which is specified by the CA.

            
          

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

            The type for the certificate. If a private key has been specified for the certificate, its type is ``CERTIFICATE_WITH_PRIVATE_KEY``. If there is no private key, the type is ``CERTIFICATE``.

            
          

          - **Description** *(string) --* 

            The name or short description that's used to identify the certificate.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`Transfer.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`Transfer.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`Transfer.Client.exceptions.InternalServiceError`

  
  *   :py:class:`Transfer.Client.exceptions.ServiceUnavailableException`

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

  