Skip to content

describe_db_log_files async

describe_db_log_files(
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    db_instance_identifier: Optional[String] = None,
    filename_contains: Optional[String] = None,
    file_last_written: Optional[Long] = None,
    file_size: Optional[Long] = None,
    filters: Optional[FilterList] = None,
    max_records: Optional[IntegerOptional] = None,
    marker: Optional[String] = None,
) -> DescribeDBLogFilesResponse

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

This command doesn't apply to RDS Custom.

Parameters:

  • db_instance_identifier (Optional[String], default: None ) –

    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.

  • filename_contains (Optional[String], default: None ) –

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

  • file_last_written (Optional[Long], default: None ) –

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

  • file_size (Optional[Long], default: None ) –

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

  • filters (Optional[FilterList], default: None ) –

    This parameter isn't currently supported.

  • max_records (Optional[IntegerOptional], default: None ) –

    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.

  • marker (Optional[String], default: None ) –

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

Raises:

Examples:

To describe the log files for a DB instance The following example retrieves details about the log files for the specified DB instance.

>>> await client.describe_db_log_files(db_instance_identifier='test-instance')
Source code in docs_src/capo_rds/_services/async_rds.py
async def describe_db_log_files(
    self,
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    db_instance_identifier: Optional["capo_rds.types.string.String"] = None,
    filename_contains: Optional["capo_rds.types.string.String"] = None,
    file_last_written: Optional["capo_rds.types.long.Long"] = None,
    file_size: Optional["capo_rds.types.long.Long"] = None,
    filters: Optional["capo_rds.types.filter_list.FilterList"] = None,
    max_records: Optional["capo_rds.types.integer_optional.IntegerOptional"] = None,
    marker: Optional["capo_rds.types.string.String"] = None,
) -> "capo_rds.types.describe_db_log_files_response.DescribeDBLogFilesResponse":
    """<p>Returns a list of DB log files for the DB instance.</p> <p>This command doesn't apply to RDS Custom.</p>

    Args:
        db_instance_identifier: <p>The customer-assigned name of the DB instance that contains the log files you want to list.</p> <p>Constraints:</p> <ul> <li> <p>Must match the identifier of an existing DBInstance.</p> </li> </ul>
        filename_contains: <p>Filters the available log files for log file names that contain the specified string.</p>
        file_last_written: <p>Filters the available log files for files written since the specified date, in POSIX timestamp format with milliseconds.</p>
        file_size: <p>Filters the available log files for files larger than the specified size.</p>
        filters: <p>This parameter isn't currently supported.</p>
        max_records: <p>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.</p>
        marker: <p>The pagination token provided in the previous request. If this parameter is specified the response includes only records beyond the marker, up to MaxRecords.</p>

    Raises:
        capo_rds.errors.db_instance_not_found_fault.DBInstanceNotFoundFault: <p> <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.</p>
        capo_rds.errors.db_instance_not_ready_fault.DBInstanceNotReadyFault: <p>An attempt to download or examine log files didn't succeed because an Aurora Serverless v2 instance was paused.</p>
        capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To describe the log files for a DB instance
        The following example retrieves details about the log files for the specified DB instance.

        >>> await client.describe_db_log_files(db_instance_identifier='test-instance')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_rds.types.describe_db_log_files_message.DescribeDBLogFilesMessage]",
    ) -> AsyncOperationResponse[
        "capo_rds.types.describe_db_log_files_response.DescribeDBLogFilesResponse"
    ]:
        import capo_rds._operations.amazon_rd_sv19.describe_db_log_files

        (
            output,
            http_response,
        ) = await capo_rds._operations.amazon_rd_sv19.describe_db_log_files.async_describe_db_log_files(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeDBLogFiles")
    )
    input_: capo_rds.types.describe_db_log_files_message.DescribeDBLogFilesMessage = {}
    if db_instance_identifier is not None:
        input_["db_instance_identifier"] = db_instance_identifier
    if filename_contains is not None:
        input_["filename_contains"] = filename_contains
    if file_last_written is not None:
        input_["file_last_written"] = file_last_written
    if file_size is not None:
        input_["file_size"] = file_size
    if filters is not None:
        input_["filters"] = filters
    if max_records is not None:
        input_["max_records"] = max_records
    if marker is not None:
        input_["marker"] = marker

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output