storeAddACL

Adds ACL to existing ACL for object or bucket.

storeAddACL(url, ACLObject);

Argument Reference for the storeAddACL function

url

Required: Yes
Amazon S3 URLs (content or object).

ACLObject

Required: Yes
An array of struct where each struct represents a permission or grant as discussed in ACLObject.

Examples sample code invoking the storeAddACL function


Tag Syntax

Use this function to add permissions to the existing ones.

<cftry> 
 <cfset dir = 's3://bucket_name/'> 
 
     <cfset perm = structNew()> 
     <cfset perm.group = 'authenticated'> 
     <cfset perm.permission = 'READ'> 
     <cfset perm1 = structNew()> 
     <cfset perm1.email = 'email_ID'> 
     <cfset perm1.permission = 'READ_ACP'> 
     <cfset myarrray = [perm,perm1]> 
     <cfif NOT directoryExists(dir)> 
         <cfset directoryCreate(dir)> 
     </cfif> 
     <cfset fileWrite('#dir#/Sample.txt','This is to test storeAddACL')> 
     <cfset storeAddACL('#dir#','#myarrray#')> 
     <cfset test = storeGetACL(dirkey)> 
         <cfdump var='#test#'> 
     <cfcatch> 
         <cfdump var='#cfcatch#'> 
     </cfcatch> 
 </cftry> 

Fork me on GitHub