Learn R Programming

paws.storage (version 0.1.4)

s3_list_objects_v2: Returns some or all (up to 1000) of the objects in a bucket

Description

Returns some or all (up to 1000) of the objects in a bucket. You can use the request parameters as selection criteria to return a subset of the objects in a bucket. Note: ListObjectsV2 is the revised List Objects API and we recommend you use this revised API for new application development.

Usage

s3_list_objects_v2(Bucket, Delimiter, EncodingType, MaxKeys, Prefix,
  ContinuationToken, FetchOwner, StartAfter, RequestPayer)

Arguments

Bucket

[required] Name of the bucket to list.

Delimiter

A delimiter is a character you use to group keys.

EncodingType

Encoding type used by Amazon S3 to encode object keys in the response.

MaxKeys

Sets the maximum number of keys returned in the response. The response might contain fewer keys but will never contain more.

Prefix

Limits the response to keys that begin with the specified prefix.

ContinuationToken

ContinuationToken indicates Amazon S3 that the list is being continued on this bucket with a token. ContinuationToken is obfuscated and is not a real key

FetchOwner

The owner field is not present in listV2 by default, if you want to return owner field with each key in the result then set the fetch owner field to true

StartAfter

StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this specified key. StartAfter can be any key in the bucket

RequestPayer

Confirms that the requester knows that she or he will be charged for the list objects request in V2 style. Bucket owners need not specify this parameter in their requests.

Request syntax

svc$list_objects_v2(
  Bucket = "string",
  Delimiter = "string",
  EncodingType = "url",
  MaxKeys = 123,
  Prefix = "string",
  ContinuationToken = "string",
  FetchOwner = TRUE|FALSE,
  StartAfter = "string",
  RequestPayer = "requester"
)

Examples

Run this code
# NOT RUN {
# The following example retrieves object list. The request specifies max
# keys to limit response to include only 2 object keys.
# }
# NOT RUN {
svc$list_objects_v2(
  Bucket = "examplebucket",
  MaxKeys = "2"
)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab