Class: S3Secure::Encryption::Show

Inherits:
Base show all
Defined in:
lib/s3_secure/encryption/show.rb

Instance Method Summary collapse

Methods inherited from AbstractBase

#buckets, #initialize

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

#runObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/s3_secure/encryption/show.rb', line 3

def run
  @s3 = s3_regional_client(@bucket)

  list = S3Secure::Encryption::List.new(@options)
  list.set_s3(@s3)

  rules = list.get_encryption_rules(@bucket)
  if rules
    puts "Bucket #{@bucket} is configured with these encryption rules:"
    puts rules.map(&:to_h)
  else
    puts "Bucket #{@bucket} is not configured with encryption at the bucket level"
  end
end