Description Usage Arguments Details Value References See Also Examples
Creates a new S3 bucket.
1 2 3 4 5 6 7 8 9 | put_bucket(
bucket,
region = Sys.getenv("AWS_DEFAULT_REGION"),
acl = c("private", "public-read", "public-read-write", "aws-exec-read",
"authenticated-read", "bucket-owner-read", "bucket-owner-full-control"),
location_constraint = region,
headers = list(),
...
)
|
bucket |
Character string with the name of the bucket, or an object of class “s3_bucket”. |
region |
A character string containing the AWS region. If missing, defaults to value of environment variable AWS_DEFAULT_REGION. |
acl |
A character string indicating a “canned” access control list. By default all bucket contents and objects therein are given the ACL “private”. This can later be viewed using |
location_constraint |
A character string specifying a location constraint. If |
headers |
List of request headers for the REST call. |
... |
Additional arguments passed to |
Bucket policies regulate who has what access to a bucket and its contents. The header
argument can beused to specify “canned” policies and put_bucket_policy
can be used to specify a more complex policy. The AWS Policy Generator can be useful for creating the appropriate JSON policy structure.
TRUE
if successful.
API Documentation AWS Policy Generator
bucketlist
, get_bucket
, delete_bucket
, put_object
, put_encryption
, put_versioning
1 2 3 4 5 6 7 8 | ## Not run:
put_bucket("examplebucket")
# set a "canned" ACL to, e.g., make bucket publicly readable
put_bucket("examplebucket", headers = list(`x-amz-acl` = "public-read")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.