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

********************************************
get_relational_database_master_user_password
********************************************



.. py:method:: Lightsail.Client.get_relational_database_master_user_password(**kwargs)

  

  Returns the current, previous, or pending versions of the master user password for a Lightsail database.

   

  The ``GetRelationalDatabaseMasterUserPassword`` operation supports tag-based access control via resource tags applied to the resource identified by relationalDatabaseName.

  

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


  **Request Syntax**
  ::

    response = client.get_relational_database_master_user_password(
        relationalDatabaseName='string',
        passwordVersion='CURRENT'|'PREVIOUS'|'PENDING'
    )
    
  :type relationalDatabaseName: string
  :param relationalDatabaseName: **[REQUIRED]** 

    The name of your database for which to get the master user password.

    

  
  :type passwordVersion: string
  :param passwordVersion: 

    The password version to return.

     

    Specifying ``CURRENT`` or ``PREVIOUS`` returns the current or previous passwords respectively. Specifying ``PENDING`` returns the newest version of the password that will rotate to ``CURRENT``. After the ``PENDING`` password rotates to ``CURRENT``, the ``PENDING`` password is no longer available.

     

    Default: ``CURRENT``

    

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

    
    ::

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

    

    - *(dict) --* 
      

      - **masterUserPassword** *(string) --* 

        The master user password for the ``password version`` specified.

        
      

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

        The timestamp when the specified version of the master user password 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`

  