Class: DynamoDB
Overview
Collect DynamodDB resources
Constant Summary
Constants inherited from Mapper
Mapper::SINGLE_REGION_SERVICES
Instance Method Summary collapse
-
#collect ⇒ Object
Returns an array of resources.
Methods inherited from Mapper
Constructor Details
This class inherits a constructor from Mapper
Instance Method Details
#collect ⇒ Object
Returns an array of resources.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/aws_recon/collectors/dynamodb.rb', line 10 def collect resources = [] # # describe_limits # @client.describe_limits.each_with_index do |response, page| log(response.context.operation_name, page) struct = OpenStruct.new(response) struct.type = 'limits' struct.arn = "arn:aws:dynamodb:#{@region}:#{@account}/limits" resources.push(struct.to_h) end # # list_tables # @client.list_tables.each_with_index do |response, page| log(response.context.operation_name, page) # describe_table response.table_names.each do |table_name| struct = OpenStruct.new(@client.describe_table({ table_name: table_name }).table.to_h) struct.type = 'table' struct.arn = struct.table_arn struct.continuous_backups_description = @client.describe_continuous_backups({ table_name: table_name }).continuous_backups_description.to_h resources.push(struct.to_h) end end resources end |