PUT Object acl

Sets the access control list (ACL) permissions for an object that exists in a storage system bucket. This operation requires WRITE_ACP permission for the object.

Request syntax

PUT /ObjectName?acl HTTP/1.1
Host: BucketName.rs2.StorageService.com
Date: date
Authorization: signatureValue

<AccessControlPolicy>
  <Owner>
    <ID>ID</ID>
    <DisplayName>EmailAddress</DisplayName>
  </Owner>
  <AccessControlList>
    <Grant>
      <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser">
        <ID>ID</ID>
        <DisplayName>EmailAddress</DisplayName>
      </Grantee>
      <Permission>Permission</Permission>
    </Grant>
  </AccessControlList>
  </AccessControlPolicy> 

Request headers

You can use the following request headers with the PUT Object acl operation: Authorization, Cache-Control, Content-Disposition, Content-Encoding, Content-Length, Content-MD5, Content-Type, Date, Expect, Expires, Host, and x-amz-acl.

The Authorization, Content-Length, Date, and Host headers are required; all the others are optional. For more information about supported request headers, see Request Headers.

Request elements

The PUT Object acl operation uses the following request elements (element datatypes in parentheses):

Response headers

The PUT Object acl operation may include the following response headers: Content-Length, Connection, Date, ETag, and Server. 

For more information about supported response headers, see Response Headers.

Examples

Request sample

This sample assigns ACL permissions to the hosts object:

PUT /hosts?acl HTTP/1.1
Host: docs.demo.cloud.it
Accept-Encoding: identity
Content-Length: 393
Authorization: AWS pat:0kh+s13soutxNvrBo9ViL5wiA8w=
Date: Tue, 21 Jun 2011 12:24:26 GMT

<AccessControlPolicy xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
   <Owner>
     <ID>3452783832C94517345278000000004000000120</ID>
   </Owner>
   <AccessControlList>
    <Grant>
       <Grantee xmlnssi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser">
          <ID>3452783832C94517345278000000004000000120</ID>
       </Grantee>
       <Permission>FULL_CONTROL</Permission>
    </Grant>
   </AccessControlList>
</AccessControlPolicy>
Response sample
HTTP/1.1 200 OK
Date: Tue, 21 Jun 2011 12:24:26 GMT
Server: RestServer/1.0
Content-Length: 0
Content-Type: application/octet-stream
Cache-Control: no-cache
Connection: close