• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. API Reference (OBS)
  4. Operations on Buckets
  5. PUT Bucket acl
  6. Examples

Examples

Sample Request for Setting the Bucket ACL

PUT /?acl HTTP/1.1 
 User-Agent: Jakarta Commons-HttpClient/3.1 
 Host: bucketname.obs.example.com 
 Accept-Encoding: gzip,deflate 
 Date: Mon, 27 Sep 2010 01:37:17 GMT 
 Authorization: AWS 04RZT432N80TGDF2Y2G2:9uNLINAQ7IOIrD9OnCpDfY2R6nU= 
 Content-Length: 598 

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

Sample Response for Setting the Bucket ACL

HTTP/1.1 200 OK 
 Server: OBS 
 x-amz-request-id: 7B6DFC9BC71DD58B061285551605709 
 x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc 
 x-amz-id-2: N0I2REZDOUJDNzFERDU4QjA2MTI4NTU1MTYwNTcwOUFBQUFBQUFBYmJiYmJiYmJD 
 Date: Mon, 27 Sep 2010 01:40:03 GMT 
 Content-Length: 0

Sample Request for Setting the Bucket ACL Using Headers

PUT /?acl HTTP/1.1 
User-Agent: curl/7.19.0
Host: bucketname.obs.example.com
Accept: */* 
Date: Mon, 27 Sep 2010 01:37:17 GMT 
Authorization: AWS 04RZT432N80TGDF2Y2G2:9uNLINAQ7IOIrD9OnCpDfY2R6nU=
x-amz-acl: private 

Sample Response for Setting the Bucket ACL Using Headers

HTTP/1.1 200 OK 
 Server: OBS 
 x-amz-request-id: 7B6DFC9BC71DD58B061285551605709 
 x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
 x-amz-id-2: N0I2REZDOUJDNzFERDU4QjA2MTI4NTU1MTYwNTcwOUFBQUFBQUFBYmJiYmJiYmJD 
 Content-Type: application/xml
 Date: Mon, 27 Sep 2010 01:40:03 GMT 
 Content-Length: 526