paws.storage (version 0.1.0)

s3_create_bucket: Creates a new bucket

Description

Creates a new bucket.

Usage

s3_create_bucket(ACL, Bucket, CreateBucketConfiguration,
  GrantFullControl, GrantRead, GrantReadACP, GrantWrite, GrantWriteACP,
  ObjectLockEnabledForBucket)

Arguments

ACL

The canned ACL to apply to the bucket.

Bucket

[required]

CreateBucketConfiguration
GrantFullControl

Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.

GrantRead

Allows grantee to list the objects in the bucket.

GrantReadACP

Allows grantee to read the bucket ACL.

GrantWrite

Allows grantee to create, overwrite, and delete any object in the bucket.

GrantWriteACP

Allows grantee to write the ACL for the applicable bucket.

ObjectLockEnabledForBucket

Specifies whether you want S3 Object Lock to be enabled for the new bucket.

Request syntax

svc$create_bucket(
  ACL = "private"|"public-read"|"public-read-write"|"authenticated-read",
  Bucket = "string",
  CreateBucketConfiguration = list(
    LocationConstraint = "EU"|"eu-west-1"|"us-west-1"|"us-west-2"|"ap-south-1"|"ap-southeast-1"|"ap-southeast-2"|"ap-northeast-1"|"sa-east-1"|"cn-north-1"|"eu-central-1"
  ),
  GrantFullControl = "string",
  GrantRead = "string",
  GrantReadACP = "string",
  GrantWrite = "string",
  GrantWriteACP = "string",
  ObjectLockEnabledForBucket = TRUE|FALSE
)

Examples

Run this code
# NOT RUN {
# The following example creates a bucket. The request specifies an AWS
# region where to create the bucket.
# }
# NOT RUN {
svc$create_bucket(
  Bucket = "examplebucket",
  CreateBucketConfiguration = list(
    LocationConstraint = "eu-west-1"
  )
)
# }
# NOT RUN {
# The following example creates a bucket.
# }
# NOT RUN {
svc$create_bucket(
  Bucket = "examplebucket"
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab