paws.storage (version 0.1.0)

s3_put_bucket_policy: Replaces a policy on a bucket

Description

Replaces a policy on a bucket. If the bucket already has a policy, the one in this request completely replaces it.

Usage

s3_put_bucket_policy(Bucket, ContentMD5, ConfirmRemoveSelfBucketAccess,
  Policy)

Arguments

Bucket

[required]

ContentMD5
ConfirmRemoveSelfBucketAccess

Set this parameter to true to confirm that you want to remove your permissions to change this bucket policy in the future.

Policy

[required] The bucket policy as a JSON document.

Request syntax

svc$put_bucket_policy(
  Bucket = "string",
  ContentMD5 = "string",
  ConfirmRemoveSelfBucketAccess = TRUE|FALSE,
  Policy = "string"
)

Examples

Run this code
# NOT RUN {
# The following example sets a permission policy on a bucket.
# }
# NOT RUN {
svc$put_bucket_policy(
  Bucket = "examplebucket",
  Policy = "{\"Version\": \"2012-10-17\", \"Statement\": [{ \"Sid\": \"id-1\",\"Effect\": ..."
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab