Description Usage Arguments Details Value References See Also Examples
List the contents of an S3 bucket as either a list or data frame
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
bucket |
Character string with the name of the bucket, or an object of class “s3_bucket”. |
prefix |
Character string that limits the response to keys that begin with the specified prefix |
delimiter |
Character string used to group keys. Read the AWS doc for more detail. |
max |
Integer indicating the maximum number of keys to return. The function will recursively access the bucket in case |
marker |
Character string that specifies the key to start with when listing objects in a bucket. Amazon S3 returns object keys in alphabetical order, starting with key after the marker in order. |
parse_response |
logical, should we attempt to parse the response? |
... |
Additional arguments passed to |
From the AWS doc: “This implementation of the GET operation 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.” The max
and marker
arguments can be used to retrieve additional pages of results. Values from a call are store as attributes
get_bucket
returns a list of objects in the bucket (with class “s3_bucket”), while get_bucket_df
returns a data frame (the only difference is the application of the as.data.frame()
method to the list of bucket contents. If max
is greater than 1000, multiple API requests are executed and the attributes attached to the response object reflect only the final request.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
# basic usage
b <- bucketlist()
get_bucket(b[1,1])
get_bucket_df(b[1,1])
# bucket names with dots
## this (default) should work:
get_bucket("this.bucket.has.dots", url_style = "path")
## this probably wont:
#get_bucket("this.bucket.has.dots", url_style = "virtual")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.