Class: Aws::RDS::DBLogFile
- Inherits:
-
Object
- Object
- Aws::RDS::DBLogFile
- Extended by:
- Deprecations
- Defined in:
- lib/aws-sdk-rds/db_log_file.rb
Defined Under Namespace
Classes: Collection
Read-Only Attributes collapse
- #instance_id ⇒ String
-
#last_written ⇒ Integer
A POSIX timestamp when the last log entry was written.
- #name ⇒ String (also: #log_file_name)
-
#size ⇒ Integer
The size, in bytes, of the log file for the specified DB instance.
Actions collapse
- #download(options = {}) ⇒ Types::DownloadDBLogFilePortionDetails
- #identifiers ⇒ Object deprecated private Deprecated.
Instance Method Summary collapse
- #client ⇒ Client
-
#data ⇒ Types::DescribeDBLogFilesDetails
Returns the data for this DBLogFile.
-
#data_loaded? ⇒ Boolean
Returns ‘true` if this resource is loaded.
-
#initialize(*args) ⇒ DBLogFile
constructor
A new instance of DBLogFile.
- #load ⇒ Object (also: #reload) private
Constructor Details
#initialize(instance_id, name, options = {}) ⇒ DBLogFile #initialize(options = {}) ⇒ DBLogFile
Returns a new instance of DBLogFile.
21 22 23 24 25 26 27 |
# File 'lib/aws-sdk-rds/db_log_file.rb', line 21 def initialize(*args) = Hash === args.last ? args.pop.dup : {} @instance_id = extract_instance_id(args, ) @name = extract_name(args, ) @data = .delete(:data) @client = .delete(:client) || Client.new() end |
Instance Method Details
#data ⇒ Types::DescribeDBLogFilesDetails
Returns the data for this Aws::RDS::DBLogFile.
72 73 74 75 |
# File 'lib/aws-sdk-rds/db_log_file.rb', line 72 def data load unless @data @data end |
#data_loaded? ⇒ Boolean
80 81 82 |
# File 'lib/aws-sdk-rds/db_log_file.rb', line 80 def data_loaded? !!@data end |
#download(options = {}) ⇒ Types::DownloadDBLogFilePortionDetails
123 124 125 126 127 128 129 130 |
# File 'lib/aws-sdk-rds/db_log_file.rb', line 123 def download( = {}) = .merge( db_instance_identifier: @instance_id, log_file_name: @name ) resp = @client.download_db_log_file_portion() resp.data end |
#identifiers ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Deprecated.
134 135 136 137 138 139 |
# File 'lib/aws-sdk-rds/db_log_file.rb', line 134 def identifiers { instance_id: @instance_id, name: @name } end |
#instance_id ⇒ String
32 33 34 |
# File 'lib/aws-sdk-rds/db_log_file.rb', line 32 def instance_id @instance_id end |
#last_written ⇒ Integer
A POSIX timestamp when the last log entry was written.
44 45 46 |
# File 'lib/aws-sdk-rds/db_log_file.rb', line 44 def last_written data.last_written end |
#load ⇒ Object Also known as: reload
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
63 64 65 66 |
# File 'lib/aws-sdk-rds/db_log_file.rb', line 63 def load msg = "#load is not implemented, data only available via enumeration" raise NotImplementedError, msg end |
#name ⇒ String Also known as: log_file_name
37 38 39 |
# File 'lib/aws-sdk-rds/db_log_file.rb', line 37 def name @name end |
#size ⇒ Integer
The size, in bytes, of the log file for the specified DB instance.
50 51 52 |
# File 'lib/aws-sdk-rds/db_log_file.rb', line 50 def size data.size end |