class AwsCftTools::Runbooks::Images
Images
- report on available AMIs
@example
% 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
Public Instance Methods
columns()
click to toggle source
@return [Array<String>]
# File lib/aws_cft_tools/runbooks/images.rb, line 24 def columns environment_column + role_column + %w[created_at public type image_id] end
items()
click to toggle source
@return [Array<OpenStruct>]
# File lib/aws_cft_tools/runbooks/images.rb, line 17 def items client.images.sort_by(&method(:sort_key)) end
Private Instance Methods
environment_column()
click to toggle source
# File lib/aws_cft_tools/runbooks/images.rb, line 34 def environment_column options[:environment] ? [] : ['environment'] end
role_column()
click to toggle source
# File lib/aws_cft_tools/runbooks/images.rb, line 38 def role_column options[:role] ? [] : ['role'] end
sort_key(image)
click to toggle source
# File lib/aws_cft_tools/runbooks/images.rb, line 30 def sort_key(image) [image.environment, image.role, image.created_at].compact end