:doc:`Lightsail <../../lightsail>` / Client / download_default_key_pair

*************************
download_default_key_pair
*************************



.. py:method:: Lightsail.Client.download_default_key_pair()

  

  Downloads the regional Amazon Lightsail default key pair.

   

  This action also creates a Lightsail default key pair if a default key pair does not currently exist in the Amazon Web Services Region.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/DownloadDefaultKeyPair>`_  


  **Request Syntax**
  ::

    response = client.download_default_key_pair()
    
    
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'publicKeyBase64': 'string',
          'privateKeyBase64': 'string',
          'createdAt': datetime(2015, 1, 1)
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **publicKeyBase64** *(string) --* 

        A base64-encoded public key of the ``ssh-rsa`` type.

        
      

      - **privateKeyBase64** *(string) --* 

        A base64-encoded RSA private key.

        
      

      - **createdAt** *(datetime) --* 

        The timestamp when the default key pair was created.

        
  
  **Exceptions**
  
  *   :py:class:`Lightsail.Client.exceptions.ServiceException`

  
  *   :py:class:`Lightsail.Client.exceptions.InvalidInputException`

  
  *   :py:class:`Lightsail.Client.exceptions.NotFoundException`

  
  *   :py:class:`Lightsail.Client.exceptions.OperationFailureException`

  
  *   :py:class:`Lightsail.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`Lightsail.Client.exceptions.AccountSetupInProgressException`

  
  *   :py:class:`Lightsail.Client.exceptions.RegionSetupInProgressException`

  
  *   :py:class:`Lightsail.Client.exceptions.UnauthenticatedException`

  