paws.storage (version 0.1.0)

s3_put_object_acl: uses the acl subresource to set the access control list (ACL) permissions for an object that already exists in a bucket

Description

uses the acl subresource to set the access control list (ACL) permissions for an object that already exists in a bucket

Usage

s3_put_object_acl(ACL, AccessControlPolicy, Bucket, ContentMD5,
  GrantFullControl, GrantRead, GrantReadACP, GrantWrite, GrantWriteACP,
  Key, RequestPayer, VersionId)

Arguments

ACL

The canned ACL to apply to the object.

AccessControlPolicy
Bucket

[required]

ContentMD5
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.

Key

[required]

RequestPayer
VersionId

VersionId used to reference a specific version of the object.

Request syntax

svc$put_object_acl(
  ACL = "private"|"public-read"|"public-read-write"|"authenticated-read"|"aws-exec-read"|"bucket-owner-read"|"bucket-owner-full-control",
  AccessControlPolicy = list(
    Grants = list(
      list(
        Grantee = list(
          DisplayName = "string",
          EmailAddress = "string",
          ID = "string",
          Type = "CanonicalUser"|"AmazonCustomerByEmail"|"Group",
          URI = "string"
        ),
        Permission = "FULL_CONTROL"|"WRITE"|"WRITE_ACP"|"READ"|"READ_ACP"
      )
    ),
    Owner = list(
      DisplayName = "string",
      ID = "string"
    )
  ),
  Bucket = "string",
  ContentMD5 = "string",
  GrantFullControl = "string",
  GrantRead = "string",
  GrantReadACP = "string",
  GrantWrite = "string",
  GrantWriteACP = "string",
  Key = "string",
  RequestPayer = "requester",
  VersionId = "string"
)

Examples

Run this code
# NOT RUN {
# The following example adds grants to an object ACL. The first permission
# grants user1 and user2 FULL_CONTROL and the AllUsers group READ
# permission.
# }
# NOT RUN {
svc$put_object_acl(
  AccessControlPolicy = structure(
    list(),
    .Names = character(
      0
    )
  ),
  Bucket = "examplebucket",
  GrantFullControl = "emailaddress=user1@example.com,emailaddress=user2@example.com",
  GrantRead = "uri=http://acs.amazonaws.com/groups/global/AllUsers",
  Key = "HappyFace.jpg"
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab