< Previous | Contents | Next >

Example: Retrieving an object ACL

Here’s a sample GET request that retrieves the ACL for the object named

mktg/budget_proposals/BudgProp-2013.


156 Chapter 6: Working with objects

Retrieving the ACL for an object



Request with s3curl command line


./s3curl.pl --id=lgreen -- -k "https://finance.europe.hcp.example.com/mktg/budget_proposals/ BudgProp-2013?acl" -H "x-hcp-pretty-print:true"


Request headers


GET /mktg/budget_proposals/BudgProp-2013?acl HTTP/1.1 Host: finance.europe.hcp.example.com

Date: Fri, 05 Apr 2013 14:15:44 +0000

Authorization: AWS bGdyZWVu:3pB7HQ8LNIHaFzHToefVgDD9hVo= x-hcp-pretty-print: true


Response headers


HTTP/1.1 200 OK

Date: Fri, 05 Apr 2013 14:15:43 GMT Server: HCP V7.0.0.16

Content-Type: application/xml;charset=UTF-8 Transfer-Encoding: chunked


Response body


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<AccessControlPolicy xmlns="http://s3.amazonaws.com/doc/2006-03-01/">

<Owner>

<ID>b9d39144-a081-4762-b0e8-b8fb51e10192</ID>

<DisplayName>lgreen</DisplayName>

</Owner>

<AccessControlList>

<Grant>

<Grantee xsi:type="CanonicalUser" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<ID>b9d39144-a081-4762-b0e8-b8fb51e10192</ID>

<DisplayName>lgreen</DisplayName>

</Grantee>

<Permission>FULL_CONTROL</Permission>

</Grant>

<Grant>

<Grantee xsi:type="Group" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<URI>http://acs.amazonaws.com/groups/global/AuthenticatedUsers

</URI>

</Grantee>

<Permission>READ</Permission>

</Grant>

<Grant>

<Grantee xsi:type="CanonicalUser"


Chapter 6: Working with objects 157

Copying an object


xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<ID>b9d39144-a081-4761-b0e8-b8fb51e10192</ID>

<DisplayName>pblack</DisplayName>

</Grantee>

<Permission>FULL_CONTROL</Permission>

</Grant>

</AccessControlList>

</AccessControlPolicy>