download_db_log_file_portion
(**kwargs)¶Downloads all or a portion of the specified log file, up to 1 MB in size.
This command doesn't apply to RDS Custom.
See also: AWS API Documentation
Request Syntax
response = client.download_db_log_file_portion(
DBInstanceIdentifier='string',
LogFileName='string',
Marker='string',
NumberOfLines=123
)
[REQUIRED]
The customer-assigned name of the DB instance that contains the log files you want to list.
Constraints:
[REQUIRED]
The name of the log file to be downloaded.
The number of lines to download. If the number of lines specified results in a file over 1 MB in size, the file is truncated at 1 MB in size.
If the NumberOfLines parameter is specified, then the block of lines returned can be from the beginning or the end of the log file, depending on the value of the Marker parameter.
dict
Response Syntax
{
'LogFileData': 'string',
'Marker': 'string',
'AdditionalDataPending': True|False
}
Response Structure
(dict) --
This data type is used as a response element to DownloadDBLogFilePortion
.
LogFileData (string) --
Entries from the specified log file.
Marker (string) --
A pagination token that can be used in a later DownloadDBLogFilePortion
request.
AdditionalDataPending (boolean) --
Boolean value that if true, indicates there is more data to be downloaded.
Exceptions
RDS.Client.exceptions.DBInstanceNotFoundFault
RDS.Client.exceptions.DBLogFileNotFoundFault
Examples
This example lists information for the specified log file for the specified DB instance.
response = client.download_db_log_file_portion(
DBInstanceIdentifier='mymysqlinstance',
LogFileName='mysqlUpgrade',
)
print(response)
Expected Output:
{
'ResponseMetadata': {
'...': '...',
},
}