Class: S3Secure::AccessLogs::Disable
- Defined in:
- lib/s3_secure/access_logs/disable.rb
Instance Method Summary collapse
Methods inherited from CLI::Base
Methods included from CLI::Say
Methods included from S3Secure::AwsServices
Methods included from S3Secure::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
#remove_access_logging ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/s3_secure/access_logs/disable.rb', line 10 def remove_access_logging unless @show.logging_enabled? say "Bucket #{@bucket} is not configured with access logging. So nothing to remove." return end s3.put_bucket_logging( bucket: @bucket, # source bucket_logging_status: {}, # empty hash to remove ) say "Bucket #{@bucket} access logging removed" end |
#remove_bucket_acl ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/s3_secure/access_logs/disable.rb', line 23 def remove_bucket_acl unless @show.acl_enabled? say "Bucket #{@bucket} is not configured the log delivery ACL. So nothing to remove." return end access_control_policy = @show. s3.put_bucket_acl( bucket: @bucket, access_control_policy: access_control_policy, ) say "Bucket #{@bucket} ACL Log Delivery removed" end |