Class | AWS::S3::Bucket |
In: |
lib/aws/s3/bucket.rb
|
Parent: | Object |
name | [R] | @return [String] The bucket name |
Returns the bucket‘s access control list. This will be an instance of AccessControlList, plus an additional change method:
bucket.acl.change do |acl| acl.grants.reject! do |g| g.grantee.canonical_user_id != bucket.owner.id end end
@return [AccessControlList]
Sets the bucket‘s access control list. acl can be:
@param [AccessControlList] acl @return [nil]
Returns a tree that allows you to expose the bucket contents like a directory structure.
@see Tree @param [Hash] options @option options [String] :prefix (nil) Set prefix to choose where
the top of the tree will be. A value of +nil+ means that the tree will include all objects in the collection.
@option options [String] :delimiter (’/’) The string that separates
each level of the tree. This is usually a directory separator.
@option options [Boolean] :append (true) If true, the delimiter is
appended to the prefix when the prefix does not already end with the delimiter.
@return [Tree]
@return [Boolean] Returns true if the bucket has no objects
(this includes versioned objects that are delete markers).
@return [MultipartUploadCollection] Represents all of the
multipart uploads that are in progress for this bucket.
Returns the bucket policy. This will be an instance of Policy. The returned policy will also have the methods of PolicyProxy mixed in, so you can use it to change the current policy or delete it, for example:
if policy = bucket.policy # add a statement policy.change do |p| p.allow(...) end # delete the policy policy.delete end
Note that changing the policy is not an atomic operation; it fetches the current policy, yields it to the block, and then sets it again. Therefore, it‘s possible that you may overwrite a concurrent update to the policy using this method.
@return [Policy,nil] Returns the bucket policy (if it has one),
or it returns +nil+ otherwise.
Generates fields for a presigned POST to this object. All options are sent to the PresignedPost constructor.
@see PresignedPost
Returns the versioning status for this bucket. States include:
@return [Symbol] the versioning state
@return [BucketVersionCollection] Represents all of the versioned
objects stored in this bucket.