Class: Formatter
- Inherits:
-
Object
- Object
- Formatter
- Defined in:
- lib/aws_recon/lib/formatter.rb
Overview
Customize resource format/shape
Instance Method Summary collapse
-
#aws(account_id, region, service, resource) ⇒ Object
Standard AWS.
-
#custom(account_id, region, service, resource) ⇒ Object
Custom.
Instance Method Details
#aws(account_id, region, service, resource) ⇒ Object
Standard AWS
23 24 25 26 27 28 29 30 31 |
# File 'lib/aws_recon/lib/formatter.rb', line 23 def aws(account_id, region, service, resource) { account: account_id, service: service.name, region: region, resource: resource, timestamp: Time.now.utc } end |
#custom(account_id, region, service, resource) ⇒ Object
Custom
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/aws_recon/lib/formatter.rb', line 8 def custom(account_id, region, service, resource) { account: account_id, name: resource[:arn], service: service.name, region: region, asset_type: resource[:type], resource: { data: resource, version: 'v1' }, timestamp: Time.now.utc } end |