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

******************************
get_relational_database_events
******************************



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

  

  Returns a list of events for a specific database in Amazon Lightsail.

  

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


  **Request Syntax**
  ::

    response = client.get_relational_database_events(
        relationalDatabaseName='string',
        durationInMinutes=123,
        pageToken='string'
    )
    
  :type relationalDatabaseName: string
  :param relationalDatabaseName: **[REQUIRED]** 

    The name of the database from which to get events.

    

  
  :type durationInMinutes: integer
  :param durationInMinutes: 

    The number of minutes in the past from which to retrieve events. For example, to get all events from the past 2 hours, enter 120.

     

    Default: ``60``

     

    The minimum is 1 and the maximum is 14 days (20160 minutes).

    

  
  :type pageToken: string
  :param pageToken: 

    The token to advance to the next page of results from your request.

     

    To get a page token, perform an initial ``GetRelationalDatabaseEvents`` request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

    

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

    
    ::

      {
          'relationalDatabaseEvents': [
              {
                  'resource': 'string',
                  'createdAt': datetime(2015, 1, 1),
                  'message': 'string',
                  'eventCategories': [
                      'string',
                  ]
              },
          ],
          'nextPageToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **relationalDatabaseEvents** *(list) --* 

        An object describing the result of your get relational database events request.

        
        

        - *(dict) --* 

          Describes an event for a database.

          
          

          - **resource** *(string) --* 

            The database that the database event relates to.

            
          

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

            The timestamp when the database event was created.

            
          

          - **message** *(string) --* 

            The message of the database event.

            
          

          - **eventCategories** *(list) --* 

            The category that the database event belongs to.

            
            

            - *(string) --* 
        
      
    
      

      - **nextPageToken** *(string) --* 

        The token to advance to the next page of results from your request.

         

        A next page token is not returned if there are no more results to display.

         

        To get the next page of results, perform another ``GetRelationalDatabaseEvents`` request and specify the next page token using the ``pageToken`` parameter.

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

  