Class: Fog::Parsers::AWS::RDS::DescribeDBLogFiles

Inherits:
Base
  • Object
show all
Defined in:
lib/fog/aws/parsers/rds/describe_db_log_files.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rds_id) ⇒ DescribeDBLogFiles

Returns a new instance of DescribeDBLogFiles.



8
9
10
11
# File 'lib/fog/aws/parsers/rds/describe_db_log_files.rb', line 8

def initialize(rds_id)
  @rds_id = rds_id
  super()
end

Instance Attribute Details

#rds_idObject (readonly)

Returns the value of attribute rds_id.



6
7
8
# File 'lib/fog/aws/parsers/rds/describe_db_log_files.rb', line 6

def rds_id
  @rds_id
end

Instance Method Details

#end_element(name) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/fog/aws/parsers/rds/describe_db_log_files.rb', line 26

def end_element(name)
  case name
  when 'LastWritten' then @db_log_file[name] = Time.at(value.to_i / 1000)
  when 'LogFileName' then @db_log_file[name] = value
  when 'Size' then @db_log_file[name] = value.to_i
  when 'DescribeDBLogFilesDetails'
    @response['DescribeDBLogFilesResult']['DBLogFiles'] << @db_log_file
    fresh_log_file
  when 'Marker' then @response['DescribeDBLogFilesResult'][name] = value
  when 'RequestId' then @response['ResponseMetadata'][name] = value
  end
end

#fresh_log_fileObject



18
19
20
# File 'lib/fog/aws/parsers/rds/describe_db_log_files.rb', line 18

def fresh_log_file
  @db_log_file = {'DBInstanceIdentifier' => @rds_id}
end

#resetObject



13
14
15
16
# File 'lib/fog/aws/parsers/rds/describe_db_log_files.rb', line 13

def reset
  @response = { 'DescribeDBLogFilesResult' => {'DBLogFiles' => []}, 'ResponseMetadata' => {} }
  fresh_log_file
end

#start_element(name, attrs = []) ⇒ Object



22
23
24
# File 'lib/fog/aws/parsers/rds/describe_db_log_files.rb', line 22

def start_element(name, attrs = [])
  super
end