Sha256: c005d9e6dd5bb3eb20f59da1cc40a0827a53b56bc3a28a48a61c8f8ef312dfad

Contents?: true

Size: 757 Bytes

Versions: 27

Compression:

Stored size: 757 Bytes

Contents

module Awspec::Helper
  module Finder
    module S3
      def find_bucket(id)
        res = s3_client.list_buckets
        ret = s3_client.list_buckets[:buckets].find do |bucket|
          bucket.name == id
        end
      end

      def find_bucket_acl(id)
        s3_client.get_bucket_acl(bucket: id)
      rescue Aws::S3::Errors::NoSuchBucket
        nil
      end

      def find_bucket_cors(id)
        s3_client.get_bucket_cors(bucket: id)
      rescue Aws::S3::Errors::NoSuchBucket
        nil
      end

      def find_bucket_policy(id)
        s3_client.get_bucket_policy(bucket: id)
      rescue Aws::S3::Errors::NoSuchBucket
        nil
      end

      def select_all_buckets
        s3_client.list_buckets.buckets
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
awspec-0.41.0 lib/awspec/helper/finder/s3.rb
awspec-0.40.0 lib/awspec/helper/finder/s3.rb
awspec-0.39.0 lib/awspec/helper/finder/s3.rb
awspec-0.38.0 lib/awspec/helper/finder/s3.rb
awspec-0.37.8 lib/awspec/helper/finder/s3.rb
awspec-0.37.7 lib/awspec/helper/finder/s3.rb
awspec-0.37.6 lib/awspec/helper/finder/s3.rb
awspec-0.37.5 lib/awspec/helper/finder/s3.rb
awspec-0.37.4 lib/awspec/helper/finder/s3.rb
awspec-0.37.3 lib/awspec/helper/finder/s3.rb
awspec-0.37.2 lib/awspec/helper/finder/s3.rb
awspec-0.37.1 lib/awspec/helper/finder/s3.rb
awspec-0.37.0 lib/awspec/helper/finder/s3.rb
awspec-0.36.1 lib/awspec/helper/finder/s3.rb
awspec-0.36.0 lib/awspec/helper/finder/s3.rb
awspec-0.35.0 lib/awspec/helper/finder/s3.rb
awspec-0.34.0 lib/awspec/helper/finder/s3.rb
awspec-0.33.0 lib/awspec/helper/finder/s3.rb
awspec-0.32.0 lib/awspec/helper/finder/s3.rb
awspec-0.31.0 lib/awspec/helper/finder/s3.rb