Class: S3Secure::Policy::Show
- Inherits:
-
Base
- Object
- AbstractBase
- Base
- S3Secure::Policy::Show
- Defined in:
- lib/s3_secure/policy/show.rb
Instance Method Summary collapse
Methods inherited from AbstractBase
Methods included from AwsServices
#new_s3_regional_client, #s3_client, #s3_regional_client
Constructor Details
This class inherits a constructor from S3Secure::AbstractBase
Instance Method Details
#run ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/s3_secure/policy/show.rb', line 3 def run @s3 = s3_regional_client(@bucket) list = S3Secure::Policy::List.new(@options) list.set_s3(@s3) policy = list.get_policy(@bucket) if policy puts "Bucket #{@bucket} is configured with this policy:" puts policy # puts policy.map(&:to_h) else puts "Bucket #{@bucket} is not configured bucket policy" end end |