s3setmetadata()

Sets the metadata on bucket or object. You can provide the endpoint as a bucket/object definition (S3SetMetaData(bucket:"mybucket",object:"myobject.txt",metadata:data) ) or as a virtual filesystem path (S3SetMetaData(path:"s3://mybucket/myobject.txt",metadata:data) ).

Requires Extension: S3 Resource Extension

s3setmetadata( bucketNameOrPath=string, objectName=string, metadata=struct, accessKeyId=string, secretAccessKey=string, host=string, timeout=number );

Returns: void

Argument Description Default
bucketNameOrPath
string, required

This can be the bucketname or a virtual filesystem path for a file/directory (example "s3://mybucket/myobject.txt").

Alias: bucket, bucketName, path

objectName
string, optional

Name of the object (path) within the bucket of your object to read. In case you have defined a bucket with the first argument.

Alias: object, path

metadata
struct, required
accessKeyId
string, optional

S3 accessKeyId, if not defined it checks the system property/environment variable for [lucee.s3.accesskeyid].

Alias: accessKey, awsAccessKeyId, awsAccessKey

secretAccessKey
string, optional

S3 secretAccessKey, if not defined it checks the system property/environment variable for [lucee.s3.secretaccesskey].

Alias: secretkey, awsSecretkey, awsSecretAccessKey

host
string, optional

the provider to connect, if not set Amazon AWS is used.

Alias: provider, server

timeout
number, optional

timeout for this execution

10000

Examples

There are currently no examples for this function 18,172ms WARN No examples for function s3setmetadata

See also