GET Object acl
Description
This implementation of the GET
operation uses the acl
sub-resource to return the access control list (ACL) of an object.
To use this operation, you must have READ_ACP
access to the object.
Requests
Syntax
GET /ObjectName
?acl HTTP/1.1 Host:BucketName
.s3.amazonaws.com Date:date
Authorization:signatureValue
Range:bytes=byte_range
Request Parameters
This implementation of the operation does not use request parameters.
Request Headers
This implementation of the operation only uses request headers common to all operations. For more information, see
Request Elements
This implementation of the operation does not use request elements.
Responses
Response Headers
This implementation of the operation uses only response headers that are common to most responses. For more information, see Common Response Headers.
Response Elements
Name | Description |
---|---|
AccessControlList |
Container for Grant, Grantee, and Permission Type: Container Ancestors: AcessControlPolicy |
AccessControlPolicy |
Contains the elements that set the ACL permissions for an object per Grantee. Type: Container Ancestors: None |
DisplayName |
Screen name of the bucket owner Type: String Ancestors: AcessControlPolicy.Owner |
Grant |
Container for the grantee and his or her permissions. Type: Container Ancestors: AcessControlPolicy.AccessControlList |
Grantee |
The subject whose permissions are being set. Type: String Ancestors: AcessControlPolicy.AccessControlList.Grant |
ID |
ID of the bucket owner, or the ID of the grantee Type: String Ancestors: AcessControlPolicy.Owner or AcessControlPolicy.AccessControlList.Grant |
Owner |
Container for the bucket owner's display name and ID. Type: Container Ancestors: AcessControlPolicy |
Permission |
Specifies the permission (FULL_CONTROL, WRITE, READ_ACP) given to the grantee. Type: String Ancestors: AcessControlPolicy.AccessControlList.Grant |
Special Errors
This implementation of the operation does not return special errors. For general information about Amazon S3 errors and a list of error codes, see Error Responses.
Examples
Sample Request
The following request returns information, including the ACL, of the object, my-image.jpg.
GET /my-image.jpg?acl HTTP/1.1 Host: bucket.s3.amazonaws.com Date: Wed, 28 Oct 2009 22:32:00 GMT Authorization: AWS 02236Q3V0WHVSRW0EXG2:0RQf4/cRonhpaBX5sCYVf1bNRuU=
Sample Response
HTTP/1.1 200 OK x-amz-id-2: eftixk72aD6Ap51TnqcoF8eFidJG9Z/2mkiDFu8yU9AS1ed4OpIszj7UDNEHGran x-amz-request-id: 318BC8BC148832E5 x-amz-version-id: 4HL4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nrjfkd Date: Wed, 28 Oct 2009 22:32:00 GMT Last-Modified: Sun, 1 Jan 2006 12:00:00 GMT Content-Length: 124 Content-Type: text/plain Connection: close Server: AmazonS3 <AccessControlPolicy> <Owner> <ID>8a6925ce4adf588a4532aa379004fef</ID> <DisplayName>[email protected]</DisplayName> </Owner> <AccessControlList> <Grant> <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"> <ID>8a6925ce4adf588a453214a379004fef</ID> <DisplayName>[email protected]</DisplayName> </Grantee> <Permission>FULL_CONTROL</Permission> </Grant> </AccessControlList> </AccessControlPolicy>
Sample Request Getting the ACL of the Specific Version of an Object
The following request returns information, including the ACL, of the specified version of the object, my-image.jpg.
GET /my-image.jpg?versionId=3/L4kqtJlcpXroDVBH40Nr8X8gdRQBpUMLUo&acl HTTP/1.1 Host: bucket.s3.amazonaws.com Date: Wed, 28 Oct 2009 22:32:00 GMT Authorization: AWS 02236Q3V0WHVSRW0EXG2:0RQf4/cRonhpaBX5sCYVf1bNRuU=
Sample Response Showing the ACL of the Specific Version
HTTP/1.1 200 OK x-amz-id-2: eftixk72aD6Ap51TnqcoF8eFidJG9Z/2mkiDFu8yU9AS1ed4OpIszj7UDNEHGran x-amz-request-id: 318BC8BC148832E5 Date: Wed, 28 Oct 2009 22:32:00 GMT Last-Modified: Sun, 1 Jan 2006 12:00:00 GMT x-amz-version-id: 3/L4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo Content-Length: 124 Content-Type: text/plain Connection: close Server: AmazonS3 <AccessControlPolicy> <Owner> <ID>8a6925ce4adf588a421c32aa379004fef</ID> <DisplayName>[email protected]</DisplayName> </Owner> <AccessControlList> <Grant> <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser"> <ID>8a6925ce4adf588a4532142d3f74dd8c71fa124b1ddee97f21c32aa379004fef</ID> <DisplayName>[email protected]</DisplayName> </Grantee> <Permission>FULL_CONTROL</Permission> </Grant> </AccessControlList> </AccessControlPolicy>