put_bucket: Create bucket

Description Usage Arguments Details Value References See Also Examples

View source: R/put_bucket.R

Description

Creates a new S3 bucket.

Usage

1
2
3
4
put_bucket(bucket, acl = c("private", "public-read", "public-read-write",
  "aws-exec-read", "authenticated-read", "bucket-owner-read",
  "bucket-owner-full-control"), headers = list(), use_https = FALSE,
  ...)

Arguments

bucket

Character string with the name of the bucket, or an object of class “s3_bucket”.

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 get_acl and modified using put_acl.

headers

List of request headers for the REST call.

use_https

True if connection is HTTPS and False if connection is HTTP

...

Additional arguments passed to s3HTTP.

Details

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.

Value

TRUE if successful.

References

API Documentation AWS Policy Generator

See Also

bucketlist, get_bucket, delete_bucket, put_object

Examples

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"), use_https=F)


## End(Not run)

jourdiw/minio.s3 documentation built on Dec. 5, 2019, 2:05 a.m.