paws.storage (version 0.1.0)

s3_delete_objects: This operation enables you to delete multiple objects from a bucket using a single HTTP request

Description

This operation enables you to delete multiple objects from a bucket using a single HTTP request. You may specify up to 1000 keys.

Usage

s3_delete_objects(Bucket, Delete, MFA, RequestPayer,
  BypassGovernanceRetention)

Arguments

Bucket

[required]

Delete

[required]

MFA

The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device.

RequestPayer
BypassGovernanceRetention

Specifies whether you want to delete this object even if it has a Governance-type Object Lock in place. You must have sufficient permissions to perform this operation.

Request syntax

svc$delete_objects(
  Bucket = "string",
  Delete = list(
    Objects = list(
      list(
        Key = "string",
        VersionId = "string"
      )
    ),
    Quiet = TRUE|FALSE
  ),
  MFA = "string",
  RequestPayer = "requester",
  BypassGovernanceRetention = TRUE|FALSE
)

Examples

Run this code
# NOT RUN {
# The following example deletes objects from a bucket. The bucket is
# versioned, and the request does not specify the object version to
# delete. In this case, all versions remain in the bucket and S3 adds a
# delete marker.
# }
# NOT RUN {
svc$delete_objects(
  Bucket = "examplebucket",
  Delete = list(
    Objects = list(
      list(
        Key = "objectkey1"
      ),
      list(
        Key = "objectkey2"
      )
    ),
    Quiet = FALSE
  )
)
# }
# NOT RUN {
# The following example deletes objects from a bucket. The request
# specifies object versions. S3 deletes specific object versions and
# returns the key and versions of deleted objects in the response.
# }
# NOT RUN {
svc$delete_objects(
  Bucket = "examplebucket",
  Delete = list(
    Objects = list(
      list(
        Key = "HappyFace.jpg",
        VersionId = "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b"
      ),
      list(
        Key = "HappyFace.jpg",
        VersionId = "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd"
      )
    ),
    Quiet = FALSE
  )
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace