listBucket: Get bucket names and information

Description Usage Arguments Value Author(s) References See Also

Description

These functions allow an R user to list all of the buckets for a paticular S3 login/user and to list the contents (the names of the objects) within a bucket. We can also find out meta-information about a bucket, currently just where it is located (e.g. US or Europe).

Usage

1
2
3
4
5
listBuckets(withDates = TRUE, auth = getOption("AmazonS3"), host = "http://s3.amazonaws.com")
listBucket(name, auth = getOption("AmazonS3"), host = "s3.amazonaws.com",
            curl = getCurlHandle(), asXML = FALSE, virtual = (tolower(name) == name))
getBucketLocation(bucket, auth = getOption("AmazonS3"), curl = getCurlHandle(),
                    virtual = (tolower(bucket) == bucket))

Arguments

withDates

a logical value that controls whether the creation dates of the buckets being listed are returned or just the names

bucket

the name of the AWS bucket. One can also specify the bucket and object/file name as "bucket/name".

name

the name of the object within the bucket to remove

auth

a named character vector giving the AWS key and secret as a c(key = secret).

curl

a curl handle that the caller can specif to reuse an existing object that is resused across different libcurl calls.

virtual

a logical value indicating whether to use the virtual host mechanism or s3.amazonaws.com/bucket/obj format. The default argument is most likely the appropriate value.

host

a string identifying the basic host.

asXML

a logical value that allows the caller to indicate that they want the parsed XML document containing the response and not to bother converting it to a data frame. This allows the caller to extract the information in the way she wants it.

Value

listBuckets: If withDates is TRUE, a data frame with as many rows as there are buckets for that S3 user and with 2 columns: the names of the buckets and the creationDate

Author(s)

Duncan Temple Lang <duncan@wald.ucdavis.edu>

References

http://docs.amazonwebservices.com/AmazonS3/latest/gsg/

See Also

listBuckets addFile removeFile about


duncantl/RAmazonS3 documentation built on May 15, 2019, 5:26 p.m.