Sha256: 73327cd6b609d767e33d12b04f7f08a46cbcf370c4283ea74fa158d5d74ebde1
Contents?: true
Size: 1019 Bytes
Versions: 5
Compression:
Stored size: 1019 Bytes
Contents
# frozen_string_literal: true module AwsCftTools module Runbooks ## # 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 # class Images < Runbook::Report ### # @return [Array<OpenStruct>] # def items client.images.sort_by(&method(:sort_key)) end ### # @return [Array<String>] # def columns environment_column + role_column + %w[created_at public type image_id] end private def sort_key(image) [image.environment, image.role, image.created_at].compact end def environment_column options[:environment] ? [] : ['environment'] end def role_column options[:role] ? [] : ['role'] end end end end
Version data entries
5 entries across 5 versions & 1 rubygems