PUT Bucket acl
From Hostway API Documentation
				
								
				Revision as of 07:27, 20 May 2013 by Mike.robski  (Talk | contribs)
				
			Set the access control list (ACL) for a bucket.
PUT /?acl
Requests
- Syntax
 
PUT /?acl HTTP/1.1
Host: BucketName.hs2.hostway.com
Content-Length: length
Date: date
Authorization: signatureValue
<AccessControlPolicy>
  <Owner>
    <ID>ID</ID>
    <DisplayName>email</DisplayName>
  </Owner>
  <AccessControlList>
    <Grant>
      <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser">
        <ID>id</ID>
        <DisplayName>email</DisplayName>
      </Grantee>
      <Permission>Permission</Permission>
    </Grant>
  </AccessControlList>
</AccessControlPolicy> 
- Parameters
 
This implementation of the operation does not use request parameters.
- Headers
 
This implementation of the operation only uses request headers common to all operations
- Elements in body
 
- AccessControlList: Container for Grant, Grantee, and Permission
 - AccessControlPolicy: Contains the elements that set the ACL permissions for an object per Grantee
 - DisplayName: Screen name of the bucket owner.
 - Grant: Container for the grantee and his or her permissions.
 - Grantee: The subject whose permissions are being set.
 - ID: ID of the bucket owner, or the ID of the grantee
 - Owner: Container for the bucket owner's display name and ID.
 - Permission: Specifies the permission given to the grantee.
 
Responses
- Headers
 
This implementation of the operation uses only response headers that are common
- Elements
 
This implementation of the operation does not return response elements.
Examples
- Sample Request
 
PUT /?acl HTTP/1.1
Host: BucketName.hs2.hostway.com
Content-Length: 214
Date: date
Authorization: siagnatureValue
<AccessControlPolicy>
  <Owner>
    <ID>8a6925ce4adf588a4f21c32aa379004fef</ID>
    <DisplayName>BucketOwnersEmail@hostway.com</DisplayName>
  </Owner>
  <AccessControlList>
    <Grant>
      <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CanonicalUser">
        <ID>8a6925ce47f21c32aa379004fef</ID>
        <DisplayName>BucketOwnersEmail@hostway.com</DisplayName>
      </Grantee>
      <Permission>FULL_CONTROL</Permission>
    </Grant>
  </AccessControlList>
</AccessControlPolicy> 
</nowiki>
- Sample Response
 
HTTP/1.1 200 OK Date : date Connection : keep-alive Content-Length : 0