Lucee Function Reference

s3generateuri()

Generates a URI endpoint pointing to the object given

Example

s3generateuri(string bucketNameOrPath,[string objectName,[string type,[boolean secure,[string accessKeyId,[string secretAccessKey,[number timeout]]]]]]):string

Arguments

The arguments for this function are set. You can not use other arguments except the following ones.
Name Type Required Default Value Description
bucketNameOrPath string  Yes   This can be the bucketname or simple the virtual filesystem point for the file (if object name is no defined)  
objectName string  No   Name of the object (path) within the bucket of your object you want to grant access to  
type string  No virtualhost Defines the style/type created, possible values are:
- virtualhost
- path
- arn
- s3
for more details, please see:
https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-bucket-intro.html
https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html  
secure boolean  No true Should a secure URL (https) be created or not. Only applies to type virtualhost and path.  
accessKeyId string  No   S3 accessKeyId, if not defined it checks the system property/environment variable for [lucee.s3.accesskeyid].  
secretAccessKey string  No   S3 secretAccessKey, if not defined it checks the system property/environment variable for [lucee.s3.secretaccesskey].  
timeout number  No 10000 timeout for this execution