Learn R Programming

paws.storage (version 0.1.11)

s3_put_object_lock_configuration: Places an Object Lock configuration on the specified bucket

Description

Places an Object Lock configuration on the specified bucket. The rule specified in the Object Lock configuration will be applied by default to every new object placed in the specified bucket.

DefaultRetention requires either Days or Years. You can't specify both at the same time.

Related Resources

Usage

s3_put_object_lock_configuration(Bucket, ObjectLockConfiguration,
  RequestPayer, Token, ContentMD5, ExpectedBucketOwner)

Arguments

Bucket

[required] The bucket whose Object Lock configuration you want to create or replace.

ObjectLockConfiguration

The Object Lock configuration that you want to apply to the specified bucket.

RequestPayer
Token

A token to allow Object Lock to be enabled for an existing bucket.

ContentMD5

The MD5 hash for the request body.

For requests made using the AWS Command Line Interface (CLI) or AWS SDKs, this field is calculated automatically.

ExpectedBucketOwner

The account id of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

Value

A list with the following syntax:

list(
  RequestCharged = "requester"
)

Request syntax

svc$put_object_lock_configuration(
  Bucket = "string",
  ObjectLockConfiguration = list(
    ObjectLockEnabled = "Enabled",
    Rule = list(
      DefaultRetention = list(
        Mode = "GOVERNANCE"|"COMPLIANCE",
        Days = 123,
        Years = 123
      )
    )
  ),
  RequestPayer = "requester",
  Token = "string",
  ContentMD5 = "string",
  ExpectedBucketOwner = "string"
)