:doc:`RDS <../../rds>` / Client / describe_db_log_files

*********************
describe_db_log_files
*********************



.. py:method:: RDS.Client.describe_db_log_files(**kwargs)

  

  Returns a list of DB log files for the DB instance.

   

  This command doesn't apply to RDS Custom.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/rds-2014-10-31/DescribeDBLogFiles>`_  


  **Request Syntax**
  ::

    response = client.describe_db_log_files(
        DBInstanceIdentifier='string',
        FilenameContains='string',
        FileLastWritten=123,
        FileSize=123,
        Filters=[
            {
                'Name': 'string',
                'Values': [
                    'string',
                ]
            },
        ],
        MaxRecords=123,
        Marker='string'
    )
    
  :type DBInstanceIdentifier: string
  :param DBInstanceIdentifier: **[REQUIRED]** 

    The customer-assigned name of the DB instance that contains the log files you want to list.

     

    Constraints:

     

    
    * Must match the identifier of an existing DBInstance.
    

    

  
  :type FilenameContains: string
  :param FilenameContains: 

    Filters the available log files for log file names that contain the specified string.

    

  
  :type FileLastWritten: integer
  :param FileLastWritten: 

    Filters the available log files for files written since the specified date, in POSIX timestamp format with milliseconds.

    

  
  :type FileSize: integer
  :param FileSize: 

    Filters the available log files for files larger than the specified size.

    

  
  :type Filters: list
  :param Filters: 

    This parameter isn't currently supported.

    

  
    - *(dict) --* 

      A filter name and value pair that is used to return a more specific list of results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as IDs. The filters supported by a describe operation are documented with the describe operation.

       

      .. note::

        

        Currently, wildcards are not supported in filters.

        

       

      The following actions can be filtered:

       

      
      * ``DescribeDBClusterBacktracks``
       
      * ``DescribeDBClusterEndpoints``
       
      * ``DescribeDBClusters``
       
      * ``DescribeDBInstances``
       
      * ``DescribeDBRecommendations``
       
      * ``DescribeDBShardGroups``
       
      * ``DescribePendingMaintenanceActions``
      

      

    
      - **Name** *(string) --* **[REQUIRED]** 

        The name of the filter. Filter names are case-sensitive.

        

      
      - **Values** *(list) --* **[REQUIRED]** 

        One or more filter values. Filter values are case-sensitive.

        

      
        - *(string) --* 

        
    
    

  :type MaxRecords: integer
  :param MaxRecords: 

    The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so you can retrieve the remaining results.

    

  
  :type Marker: string
  :param Marker: 

    The pagination token provided in the previous request. If this parameter is specified the response includes only records beyond the marker, up to MaxRecords.

    

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

    
    ::

      {
          'DescribeDBLogFiles': [
              {
                  'LogFileName': 'string',
                  'LastWritten': 123,
                  'Size': 123
              },
          ],
          'Marker': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      The response from a call to ``DescribeDBLogFiles``.

      
      

      - **DescribeDBLogFiles** *(list) --* 

        The DB log files returned.

        
        

        - *(dict) --* 

          This data type is used as a response element to ``DescribeDBLogFiles``.

          
          

          - **LogFileName** *(string) --* 

            The name of the log file for the specified DB instance.

            
          

          - **LastWritten** *(integer) --* 

            A POSIX timestamp when the last log entry was written.

            
          

          - **Size** *(integer) --* 

            The size, in bytes, of the log file for the specified DB instance.

            
      
    
      

      - **Marker** *(string) --* 

        A pagination token that can be used in a later ``DescribeDBLogFiles`` request.

        
  
  **Exceptions**
  
  *   :py:class:`RDS.Client.exceptions.DBInstanceNotFoundFault`

  
  *   :py:class:`RDS.Client.exceptions.DBInstanceNotReadyFault`

  

  **Examples**

  This example lists matching log file names for the specified DB instance, file name pattern, last write date in POSIX time with milleseconds, and minimum file size.
  ::

    response = client.describe_db_log_files(
        DBInstanceIdentifier='mymysqlinstance',
        FileLastWritten=1470873600000,
        FileSize=0,
        FilenameContains='error',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'ResponseMetadata': {
            '...': '...',
        },
    }

  