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

**************
list_host_keys
**************



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

  

  Returns a list of host keys for the server that's specified by the ``ServerId`` parameter.

  

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


  **Request Syntax**
  ::

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

    The maximum number of items to return.

    

  
  :type NextToken: string
  :param NextToken: 

    When there are additional results that were not returned, a ``NextToken`` parameter is returned. You can use that value for a subsequent call to ``ListHostKeys`` to continue listing results.

    

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

    The identifier of the server that contains the host keys that you want to view.

    

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

    
    ::

      {
          'NextToken': 'string',
          'ServerId': 'string',
          'HostKeys': [
              {
                  'Arn': 'string',
                  'HostKeyId': 'string',
                  'Fingerprint': 'string',
                  'Description': 'string',
                  'Type': 'string',
                  'DateImported': datetime(2015, 1, 1)
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

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

        Returns a token that you can use to call ``ListHostKeys`` again and receive additional results, if there are any.

        
      

      - **ServerId** *(string) --* 

        Returns the server identifier that contains the listed host keys.

        
      

      - **HostKeys** *(list) --* 

        Returns an array, where each item contains the details of a host key.

        
        

        - *(dict) --* 

          Returns properties of the host key that's specified.

          
          

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

            The unique Amazon Resource Name (ARN) of the host key.

            
          

          - **HostKeyId** *(string) --* 

            A unique identifier for the host key.

            
          

          - **Fingerprint** *(string) --* 

            The public key fingerprint, which is a short sequence of bytes used to identify the longer public key.

            
          

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

            The current description for the host key. You can change it by calling the ``UpdateHostKey`` operation and providing a new description.

            
          

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

            The encryption algorithm that is used for the host key. The ``Type`` parameter is specified by using one of the following values:

             

            
            * ``ssh-rsa``
             
            * ``ssh-ed25519``
             
            * ``ecdsa-sha2-nistp256``
             
            * ``ecdsa-sha2-nistp384``
             
            * ``ecdsa-sha2-nistp521``
            

            
          

          - **DateImported** *(datetime) --* 

            The date on which the host key was added to the server.

            
      
    
  
  **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`

  