# 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