lucee.Components3sdk.AmazonS3
Amazon S3 REST Wrapper
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
any
|
accessKey
|
true
|
false
|
|
any
|
encryption_charset
|
true
|
false
|
|
any
|
log
|
true
|
false
|
|
any
|
secretKey
|
true
|
false
|
|
any
|
ssl
|
true
|
false
|
|
any
|
URLEndPoint
|
true
|
false
|
Constructor Summary | |
---|---|
init(any accessKey, any secretKey, [any encryption_charset='utf-8'], [any ssl='false'])
Constructor. |
Method Summary | |
---|---|
boolean
|
copyObject(string fromBucket, string fromURI, string toBucket, string toURI, [string acl='[runtime expression]'], [struct metaHeaders='[runtime expression]'])
Copies an object. |
struct
|
createMetaHeaders([struct metaHeaders='[runtime expression]'])
Create a structure of amazon enabled metadata headers. |
any
|
createSignature(any stringToSign)
Create request signature according to AWS standards. |
boolean
|
deleteBucket(string bucketName)
Deletes a bucket. |
boolean
|
deleteObject(string bucketName, string uri)
Deletes an object. |
string
|
getAccessKey()
|
array
|
getAcessControlPolicy(string bucketName, [string uri=''])
Get's a bucket or object's ACL policy'. |
string
|
getAuthenticatedURL(string bucketName, string uri, [string minutesValid='60'], [boolean virtualHostStyle='false'], [boolean useSSL='false'])
Returns a query string authenticated URL to an object in S3. |
array
|
getBucket(string bucketName, [string prefix=''], [string marker=''], [string maxKeys=''], [string delimiter=''])
Lists information about the objects of a bucket. |
string
|
getBucketLocation(string bucketName)
Get bucket location. |
string
|
getBucketVersionStatus(string bucketName)
Get bucket location. |
string
|
getEncryption_charset()
|
string
|
getLog()
|
struct
|
getObjectInfo(string bucketName, string uri)
Get an object's metadata information. |
string
|
getSecretKey()
|
string
|
getSsl()
|
string
|
getURLEndPoint()
|
private binary
|
HMAC_SHA1(string signKey, string signMessage)
NSA SHA-1 Algorithm: RFC 2104HMAC-SHA1 . |
array
|
listBuckets()
List all available buckets. |
boolean
|
putBucket(string bucketName, [string acl='[runtime expression]'], [string location='USA'])
Creates a bucket. |
string
|
putObject(string bucketName, string uri, [any data=''], [string contentDisposition=''], [string contentType='text/plain'], [numeric HTTPTimeout='300'], [string cacheControl='no-store, no-cache, must-revalidate'], [string expires=''], [string acl='[runtime expression]'], [struct metaHeaders='[runtime expression]'])
Puts an object into a bucket and returns the etag. |
string
|
putObjectFile(string bucketName, string filepath, [string uri=''], [string contentType='binary/octet-stream'], [numeric HTTPTimeout='300'], [string cacheControl='no-store, no-cache, must-revalidate'], [string expires=''], [string acl='[runtime expression]'], [struct metaHeaders='[runtime expression]'])
Puts an object from a local file into a bucket and returns the etag. |
string
|
putObjectFolder(string bucketName, string uri='', [string contentType='binary/octet-stream'], [numeric HTTPTimeout='300'], [string cacheControl='no-store, no-cache, must-revalidate'], [string expires=''], [string acl='[runtime expression]'], [struct metaHeaders='[runtime expression]'])
Puts an object from a local file into a bucket and returns the etag. |
boolean
|
renameObject(string oldBucketName, string oldFileKey, string newBucketName, string newFileKey)
Renames an object by copying then deleting original. |
private struct
|
S3Request([string method='GET'], [string resource=''], [any body=''], [struct headers='[runtime expression]'], [struct amzHeaders='[runtime expression]'], [struct parameters='[runtime expression]'], [numeric timeout='20'])
Invoke an Amazon REST Call. |
any
|
setAccessKey(any accessKey)
|
void
|
setAuth(string accessKey='', string secretKey='')
Set the Amazon credentials. |
boolean
|
setBucketVersionStatus(string bucketName, [boolean version='true'])
set bucket versioning. |
any
|
setEncryption_charset(any encryption_charset)
|
any
|
setLog(any log)
|
any
|
setSecretKey(any secretKey)
|
void
|
setSSL([boolean useSSL='true'])
Set SSL flag and alter the internal URL End point pointer. |
any
|
setURLEndPoint(any URLEndPoint)
|
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Constructor
accessKey
secretKey
encryption_charset
ssl
Property Detail |
---|
access
- publicrequired
- falsereturntype
- anyserializable
- trueaccess
- publicrequired
- falsereturntype
- anyserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- logbox:logger:{this}serializable
- trueaccess
- publicrequired
- falsereturntype
- anyserializable
- trueaccess
- publicrequired
- falsereturntype
- anyserializable
- trueaccess
- publicrequired
- falsereturntype
- anyserializable
- trueMethod Detail |
---|
Copies an object. False if the same object or error copying object.
fromBucket
- The source bucketfromURI
- The source uritoBucket
- The destination buckettoURI
- The destination uriacl
- The default Amazon security access policymetaHeaders
- Replace metadata headers to the file by passing a struct of name-value pairsCreate a structure of amazon enabled metadata headers
metaHeaders
- Add additonal metadata headers to the file by passing a struct of name-value pairsCreate request signature according to AWS standards
stringToSign
Deletes a bucket.
bucketName
Deletes an object.
bucketName
- The bucket nameuri
- The file object uri to removeGet's a bucket or object's ACL policy'
bucketName
- The bucket name to listuri
- The object URI to get the policyReturns a query string authenticated URL to an object in S3.
bucketName
- The bucket the object resides inuri
- The uri to the object to create a link forminutesValid
- The minutes the link is valid for. Defaults to 60 minutesvirtualHostStyle
- Whether to use virtual bucket style or path style. Defaults to virtualuseSSL
- Use SSL on http callLists information about the objects of a bucket
bucketName
- The bucket name to listprefix
- Limits the response to keys which begin with the indicated prefix.marker
- Indicates where in the bucket to begin listing.maxKeys
- The maximum number of keys you'd like to see in the response bodydelimiter
- The delimiter to use in the keysGet bucket location.
bucketName
- The bucket name to get info onGet bucket location.
bucketName
- The bucket name to get info onGet an object's metadata information
bucketName
- The bucket the object resides inuri
- The object URI to retrieve info fromNSA SHA-1 Algorithm: RFC 2104HMAC-SHA1
signKey
signMessage
List all available buckets.
Creates a bucket
bucketName
- The name of the bucket to createacl
- The ACL permissions to apply. Use the this scope constants for ease of use.location
- The location of the storage, defaults to USA or EUPuts an object into a bucket and returns the etag
bucketName
- The bucket to store inuri
- The destination uri key to use when saving the objectdata
- The content to save as data, this can be binary,string or anything you like.contentDisposition
- The content-disposition header to use when downloading filecontentType
- The file/data content type, defaults to text/plain. For plain binary use: binary/octet-streamHTTPTimeout
- The HTTP timeout to usecacheControl
- The caching header to send. Defaults to no caching. Example: public,max-age=864000 (10days). For more info look here: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9expires
- Sets the expiration header of the object in days.acl
- The default Amazon security access policymetaHeaders
- Add additonal metadata headers to the file by passing a struct of name-value pairsPuts an object from a local file into a bucket and returns the etag
bucketName
- The bucket to store infilepath
- The absolute file path to read in binary and uploaduri
- The destination uri key to use when saving the object, if not used, the name of the file will be used.contentType
- The file content type, defaults to: binary/octet-streamHTTPTimeout
- The HTTP timeout to usecacheControl
- The caching header to send. Defaults to no caching. Example: public,max-age=864000 (10days). For more info look here: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9expires
- Sets the expiration header of the object in days.acl
- The default Amazon security access policymetaHeaders
- Add additonal metadata headers to the file by passing a struct of name-value pairsPuts an object from a local file into a bucket and returns the etag
bucketName
- The bucket to store inuri
- The destination uri key to use when saving the object, if not used, the name of the file will be used.contentType
- The file content type, defaults to: binary/octet-streamHTTPTimeout
- The HTTP timeout to usecacheControl
- The caching header to send. Defaults to no caching. Example: public,max-age=864000 (10days). For more info look here: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9expires
- Sets the expiration header of the object in days.acl
- The default Amazon security access policymetaHeaders
- Add additonal metadata headers to the file by passing a struct of name-value pairsRenames an object by copying then deleting original.
oldBucketName
oldFileKey
newBucketName
newFileKey
Invoke an Amazon REST Call
method
- The HTTP method to invokeresource
- The resource to hit in the amazon s3 service.body
- The body content of the request if passed.headers
- An struct of HTTP headers to sendamzHeaders
- An struct of amz header name-value pairs to sendparameters
- An struct of HTTP URL parameters to send in the requesttimeout
- The default call timeoutaccessKey
Set the Amazon credentials
accessKey
- The amazon access keysecretKey
- The amazon secret keyset bucket versioning
bucketName
- The name of the bucket to createversion
- the version status enabled/disabled.encryption_charset
log
secretKey
Set SSL flag and alter the internal URL End point pointer
useSSL
- Set to true or falseURLEndPoint