Class: S3Secure::Encryption::Disable

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

Instance Method Summary collapse

Methods inherited from CLI::Base

#buckets, #initialize

Methods included from CLI::Say

#say

Methods included from AwsServices

#sts

Methods included from AwsServices::S3

#check_bucket!, #new_s3_regional_client, #region, #region_map, #s3, #s3_client, #s3_regional_client

Constructor Details

This class inherits a constructor from S3Secure::CLI::Base

Instance Method Details

#runObject



3
4
5
6
7
8
9
10
11
12
# File 'lib/s3_secure/encryption/disable.rb', line 3

def run
  show = Show.new(@options)

  if show.enabled?
    s3.delete_bucket_encryption(bucket: @bucket) # returns resp = #<struct Aws::EmptyStructure>
    say "Bucket #{@bucket} encryption has been removed"
  else
    say "Bucket #{@bucket} is not configured with encryption at the bucket level"
  end
end