| Module | AWS::S3::ACL::Bucket::ClassMethods |
| In: |
lib/aws/s3/acl.rb
|
The acl method is the single point of entry for reading and writing access control list policies for a given bucket.
# Fetch the acl for the 'marcel' bucket policy = Bucket.acl 'marcel' # Modify the policy ... # ... # Send updated policy back to the S3 servers Bucket.acl 'marcel', policy
# File lib/aws/s3/acl.rb, line 506
506: def acl(name = nil, policy = nil)
507: if name.is_a?(ACL::Policy)
508: policy = name
509: name = nil
510: end
511:
512: path = path(name) << '?acl'
513: respond_with ACL::Policy::Response do
514: policy ? put(path, {}, policy.to_xml) : ACL::Policy.new(get(path(name) << '?acl').policy)
515: end
516: end