Sha256: 51db414e2c7571305d68ea079cbbe6ab5f7eecb3e9bea4d002f90c82f1d77787
Contents?: true
Size: 995 Bytes
Versions: 3
Compression:
Stored size: 995 Bytes
Contents
module S3Secure::AccessLogs class Disable < Base def run @show = Show.new(bucket: @bucket) remove_access_logging remove_bucket_acl end 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 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.access_control_policy_without_log_delivery_permissions s3.put_bucket_acl( bucket: @bucket, access_control_policy: access_control_policy, ) say "Bucket #{@bucket} ACL Log Delivery removed" end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
s3-secure-0.7.0 | lib/s3_secure/access_logs/disable.rb |
s3-secure-0.6.1 | lib/s3_secure/access_logs/disable.rb |
s3-secure-0.6.0 | lib/s3_secure/access_logs/disable.rb |