class Fog::AWS::Support::TrustedAdvisorCheck

Public Instance Methods

category_specific_summary(lazy=true) click to toggle source
# File lib/fog/aws/models/support/trusted_advisor_check.rb, line 41
def category_specific_summary(lazy=true)
  populate_extended_attributes(lazy) if attributes[:category_specific_summary].nil?
  attributes[:category_stecific_summary]
end
flagged_resources(lazy=true) click to toggle source
# File lib/fog/aws/models/support/trusted_advisor_check.rb, line 23
def flagged_resources(lazy=true)
  if attributes[:flagged_resources].nil?
    populate_extended_attributes(lazy)

    if attributes[:flagged_resources]
      map_flagged_resources!
      service.flagged_resources.load(attributes[:flagged_resources])
    else
      nil
    end
  else
    if attributes[:flagged_resources].first['metadata'].is_a?(Array)
      map_flagged_resources!
    end
    service.flagged_resources.load(attributes[:flagged_resources])
  end
end
populate_extended_attributes(lazy=false) click to toggle source
# File lib/fog/aws/models/support/trusted_advisor_check.rb, line 17
def populate_extended_attributes(lazy=false)
  return if lazy == true
  data = service.describe_trusted_advisor_check_result(:id => self.identity).body["result"]
  merge_attributes(data)
end
resources_summary(lazy=true) click to toggle source
# File lib/fog/aws/models/support/trusted_advisor_check.rb, line 46
def resources_summary(lazy=true)
  populate_extended_attributes(lazy) if attributes[:resources_summary].nil?
  attributes[:resources_summary]
end

Private Instance Methods

map_flagged_resources!() click to toggle source
# File lib/fog/aws/models/support/trusted_advisor_check.rb, line 53
def map_flagged_resources!
  attributes[:flagged_resources].map! do |fr|
    fr['metadata'] = fr['metadata'].each_with_index.inject({}) do |hash,(data,index)|
      hash[self.metadata[index]] = data
      hash
    end
    fr
  end
end