Sha256: f421551506cddcd0ff166dbc5ba22d427d778b2c752a12520277c9074f5a2aa7

Contents?: true

Size: 881 Bytes

Versions: 178

Compression:

Stored size: 881 Bytes

Contents

module Awspec::Helper
  module Finder
    module Ami
      def find_ami(image_id)
        res = ec2_client.describe_images({
                                           filters: [{ name: 'image-id', values: [image_id] }]
                                         })
        resource = res.images.single_resource(image_id)
        return resource if resource
        res = ec2_client.describe_images({
                                           filters: [{ name: 'name', values: [image_id] }]
                                         })
        resource = res.images.single_resource(image_id)
        return resource if resource
        res = ec2_client.describe_images({
                                           filters: [{ name: 'tag:Name', values: [image_id] }]
                                         })
        res.images.single_resource(image_id)
      end
    end
  end
end

Version data entries

178 entries across 178 versions & 4 rubygems

Version Path
awspec-1.6.0 lib/awspec/helper/finder/ami.rb
awspec-1.5.4 lib/awspec/helper/finder/ami.rb
awspec-1.5.3 lib/awspec/helper/finder/ami.rb
awspec-1.5.2 lib/awspec/helper/finder/ami.rb
awspec-1.5.1 lib/awspec/helper/finder/ami.rb
awspec-1.5.0 lib/awspec/helper/finder/ami.rb
awspec-1.4.3 lib/awspec/helper/finder/ami.rb
awspec-1.4.2 lib/awspec/helper/finder/ami.rb
awspec-1.4.1 lib/awspec/helper/finder/ami.rb
awspec-1.4.0 lib/awspec/helper/finder/ami.rb
awspec-1.3.1 lib/awspec/helper/finder/ami.rb
awspec-1.3.0 lib/awspec/helper/finder/ami.rb
awspec-1.2.0 lib/awspec/helper/finder/ami.rb
awspec-1.1.0 lib/awspec/helper/finder/ami.rb
awspec-1.0.0 lib/awspec/helper/finder/ami.rb
awspec-1.0.0.rc lib/awspec/helper/finder/ami.rb
awspec-0.88.2 lib/awspec/helper/finder/ami.rb
awspec-0.88.1 lib/awspec/helper/finder/ami.rb
awspec-0.88.0 lib/awspec/helper/finder/ami.rb
awspec-0.87.1 lib/awspec/helper/finder/ami.rb