Sha256: 7045078792ecd4935147257a08b437b15ddccd224016c1ecd6e232142631260c

Contents?: true

Size: 669 Bytes

Versions: 28

Compression:

Stored size: 669 Bytes

Contents

module Awspec::Helper
  module Finder
    module Cloudfront
      def find_cloudfront_distribution(id)
        selected = []
        res = cloudfront_client.list_distributions
        loop do
          selected += res.distribution_list.items.select do |item|
            item.id == id || item.domain_name == id
          end
          break unless res.distribution_list.is_truncated
          res = cloudfront_client.list_distributions({
                                                       marker: res.distribution_list.next_marker
                                                     })
        end

        selected.single_resource(id)
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 3 rubygems

Version Path
awspec-1.25.1 lib/awspec/helper/finder/cloudfront.rb
awspec-1.25.0 lib/awspec/helper/finder/cloudfront.rb
awspec-1.24.4 lib/awspec/helper/finder/cloudfront.rb
awspec-1.24.3 lib/awspec/helper/finder/cloudfront.rb
awspec-1.24.2 lib/awspec/helper/finder/cloudfront.rb
awspec-1.24.1 lib/awspec/helper/finder/cloudfront.rb
awspec-1.24.0 lib/awspec/helper/finder/cloudfront.rb
awspec-1.23.0 lib/awspec/helper/finder/cloudfront.rb
awspec-1.22.1 lib/awspec/helper/finder/cloudfront.rb
awspec-1.22.0 lib/awspec/helper/finder/cloudfront.rb
awspec-1.21.1 lib/awspec/helper/finder/cloudfront.rb
awspec-1.21.0 lib/awspec/helper/finder/cloudfront.rb
awspec-1.20.0 lib/awspec/helper/finder/cloudfront.rb
awspec-1.19.2 lib/awspec/helper/finder/cloudfront.rb
awspec-1.19.1 lib/awspec/helper/finder/cloudfront.rb
awspec-1.19.0 lib/awspec/helper/finder/cloudfront.rb
cthiesfork-awspec-1.2.4 lib/awspec/helper/finder/cloudfront.rb
awspec-api_gateway_extended-1.2.4 lib/awspec/helper/finder/cloudfront.rb
awspec-api_gateway_extended-1.2.3 lib/awspec/helper/finder/cloudfront.rb
awspec-1.18.6 lib/awspec/helper/finder/cloudfront.rb