s3listBucket()
List all objects in a s3 bucket
Requires Extension: S3 Resource Extension
s3listBucket( bucketName=string, listener=any, blockfactor=numeric, accessKeyId=string, secretAccessKey=string, host=string, timeout=number );
Returns: Query
| Argument | Description | Default |
|---|---|---|
|
bucketName
string,
required
|
edit
Name of the bucket to list objects from. Alias: bucket |
|
|
listener
any,
optional
|
edit
Optional. Defines the target where the downloaded data will be directed. If a file path is provided, the data is saved to that path, the file path must be provided with help of the function "fileOpen" like this [fileOpen(path,"write")]. If a closure or function is given, it will be invoked with parts of the downloaded data as its argument. The function should accept a single argument named 'line' for line-by-line processing, 'string{Number}' for string blocks of a specified size, or 'binary{Number}' for binary blocks of a specified size. The function should return a boolean value: returning false will stop further reading from S3, while true will continue the process. If this argument is omitted, the function returns the downloaded data directly. Alias: closure, udf, function, component |
|
|
blockfactor
numeric,
optional
|
edit
Alias: maxKeys, blockSize |
1000 |
|
accessKeyId
string,
optional
|
edit
S3 accessKeyId, if not defined it checks the system property/environment variable for [lucee.s3.accesskeyid]. Alias: accessKey, awsAccessKeyId, awsAccessKey |
|
|
secretAccessKey
string,
optional
|
edit
S3 secretAccessKey, if not defined it checks the system property/environment variable for [lucee.s3.secretaccesskey]. Alias: secretkey, awsSecretkey, awsSecretAccessKey |
|
|
host
string,
optional
|
edit
the provider to connect, if not set Amazon AWS is used. Alias: provider, server |
|
|
timeout
number,
optional
|
edit
timeout for this execution |
10000 |
Examples
There are currently no examples for this function 39,046ms WARN No examples for function S3ListBucketSee also
- S3
- s3clearBucket()
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)