Learn R Programming

aws.s3 (version 0.2.2)

get_bucket_policy: Bucket policies

Description

Get/Put/Delete the bucket access policy for a bucket.

Usage

get_bucket_policy(bucket, parse_response = TRUE, ...)

put_bucket_policy(bucket, policy, ...)

delete_bucket_policy(bucket, ...)

Arguments

bucket
Character string with the name of the bucket, or an object of class “s3_bucket”.
parse_response
A logical indicating whether to return the response as is, or parse and return as a list. Default is FALSE.
Additional arguments passed to s3HTTP.
policy
A character string containing a bucket policy.

Value

For get_policy: A character string containing the JSON representation of the policy, if one has been set. For delete_policy and put_policy: TRUE if successful, FALSE otherwise.

References

http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETpolicy.html http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketDELETEpolicy.html