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

Attributes inherited from Base

#response

Instance Method Summary collapse

Methods inherited from Base

#attr_value, #characters, #end_element_namespace, #start_element_namespace, #value

Constructor Details

#initialize(rds_id) ⇒ DescribeDBLogFiles

Returns a new instance of DescribeDBLogFiles.



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

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

Instance Attribute Details

#rds_idObject (readonly)

Returns the value of attribute rds_id.



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

def rds_id
  @rds_id
end

Instance Method Details

#end_element(name) ⇒ Object



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

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



20
21
22
# File 'lib/fog/aws/parsers/rds/describe_db_log_files.rb', line 20

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

#resetObject



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

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

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



24
25
26
# File 'lib/fog/aws/parsers/rds/describe_db_log_files.rb', line 24

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