Class: AwsCftTools::Runbooks::Images

Inherits:
AwsCftTools::Runbook::Report show all
Defined in:
lib/aws_cft_tools/runbooks/images.rb

Overview

Images - report on available AMIs

Examples:

% aws-cli images              # list all known AMIs
% aws-cli images -e QA        # list all known AMIs tagged for the QA environment
% aws-cli images -e QA -r App # list all known AMIs tagged for the QA environment and App role

Instance Attribute Summary

Attributes inherited from AwsCftTools::Runbook

#client, #options

Instance Method Summary collapse

Methods inherited from AwsCftTools::Runbook::Report

#run

Methods inherited from AwsCftTools::Runbook

#_run, #checking, #debug, #detail, #doing, #initialize, #narrative, #operation, #run

Constructor Details

This class inherits a constructor from AwsCftTools::Runbook

Instance Method Details

#columnsArray<String>

Returns:

  • (Array<String>)


24
25
26
# File 'lib/aws_cft_tools/runbooks/images.rb', line 24

def columns
  environment_column + role_column + %w[created_at public type image_id]
end

#itemsArray<OpenStruct>

Returns:

  • (Array<OpenStruct>)


17
18
19
# File 'lib/aws_cft_tools/runbooks/images.rb', line 17

def items
  client.images.sort_by(&method(:sort_key))
end