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