paws.storage (version 0.1.0)

s3_put_bucket_logging: Set the logging parameters for a bucket and to specify permissions for who can view and modify the logging parameters

Description

Set the logging parameters for a bucket and to specify permissions for who can view and modify the logging parameters. To set the logging status of a bucket, you must be the bucket owner.

Usage

s3_put_bucket_logging(Bucket, BucketLoggingStatus, ContentMD5)

Arguments

Bucket

[required]

BucketLoggingStatus

[required]

ContentMD5

Request syntax

svc$put_bucket_logging(
  Bucket = "string",
  BucketLoggingStatus = list(
    LoggingEnabled = list(
      TargetBucket = "string",
      TargetGrants = list(
        list(
          Grantee = list(
            DisplayName = "string",
            EmailAddress = "string",
            ID = "string",
            Type = "CanonicalUser"|"AmazonCustomerByEmail"|"Group",
            URI = "string"
          ),
          Permission = "FULL_CONTROL"|"READ"|"WRITE"
        )
      ),
      TargetPrefix = "string"
    )
  ),
  ContentMD5 = "string"
)

Examples

Run this code
# NOT RUN {
# The following example sets logging policy on a bucket. For the Log
# Delivery group to deliver logs to the destination bucket, it needs
# permission for the READ_ACP action which the policy grants.
# }
# NOT RUN {
svc$put_bucket_logging(
  Bucket = "sourcebucket",
  BucketLoggingStatus = list(
    LoggingEnabled = list(
      TargetBucket = "targetbucket",
      TargetGrants = list(
        list(
          Grantee = list(
            Type = "Group",
            URI = "http://acs.amazonaws.com/groups/global/AllUsers"
          ),
          Permission = "READ"
        )
      ),
      TargetPrefix = "MyBucketLogs/"
    )
  )
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab