Go to main content

Oracle® ZFS Storage Appliance Object API Guide for Amazon S3 Service Support, Release OS8.8.0

Exit Print View

Updated: January 2019
 
 

PUT Object ACL

The PUT Object ACL sets the Access Control List (ACL) permissions on an existing bucket object. To set ACL permissions on an existing bucket object, you must have WRITE_ACP permissions. You can choose to use request headers to specify the permissions, or specify the ACL in the request body. For more details about using the PUT Object ACL, see the following:

Versioning

The ACL for an object is set at the object version level. By default, a PUT request sets the ACL for the current version of the object. To set the ACL for a different version, use the versionId subresource.

Syntax Example

For syntax examples of the PUT Object ACL operation, see Amazon's official S3 API PUT Object ACL documentation (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUTacl.html).

Request Parameters

This implementation of the PUT Object ACL operation does not support the use of request parameters.

Request Headers

The PUT Object ACL operation supports the use of the following access-control headers to set permissions:

  • x-amz-acl header – Use this header to specify canned ACL permissions.

  • x-amz-grant-permission header – Use this header to individually specify the permissions for a grantee.

For more information about how to specify ACL permissions, see:

Request Elements

The PUT Object ACL operation supports the use of request elements when not using a request body. Note that if you use a request body, you cannot use the request headers to set an ACL. For a list of supported request elements, see Amazon's official S3 API PUT Object ACL documentation (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUTacl.html).

Response Headers

The PUT Object ACL operation supports the use of the following response headers:

Response Elements

This implementation of the PUT Object ACL does not support the use of response elements.

Expected HTTP Response Code

200 OK

Error Response Codes

The PUT Object ACL operation does not return special errors. For general information about S3 errors and a list of error codes, see S3 Client Error Handling Reference.

Example

PUT /my-image.jpg?acl
<AccessControlPolicy>
  <Owner>
    <ID>joe</ID>
    <DisplayName>joe/DisplayName>
  </Owner>
  <AccessControlList>
    <Grant>
      <Grantee type="CanonicalUser">
        <ID>jack</ID>
        <DisplayName>joe</DisplayName>
      </Grantee>
      <Permission>FULL_CONTROL</Permission>
    </Grant>
  </AccessControlList>
</AccessControlPolicy>



HTTP/1.1 200 OK
x-amz-request-id: tx318BC8BC148832E5
x-amz-version-id: 0055
Date: Wed, 28 Oct 2018 22:32:00 GMT
Last-Modified: Sun, 1 Jan 2018 12:00:00 GMT
Content-Length: 0
Connection: close
Server: Apache

Alternatively, a request can also be made to a specific version of an object, for instance:

PUT /my-image.jpg?acl&versionId=0099