• Object Storage Service

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

Examples

Sample Request

PUT / HTTP/1.1 
 User-Agent: Jakarta Commons-HttpClient/3.1 
 Host: bucketname.obs.example.com 
 Accept: */* 
 Date: Sat, 03 Dec 2011 06:31:58 +0000 
 Authorization: AWS BF6C09F302931425E9A7:QBaO+tS/76QYHVnUoxvf9EPH/3o= 
 Content-Length: 0

Sample Response

HTTP/1.1 200 OK 
 Server: OBS 
 x-amz-request-id: 001B21A61C6C00000134029F41D1527F 
 x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc 
 Location: /bucketname 
 x-amz-id-2: MDAxQjIxQTYxQzZDMDAwMDAxMzQwMjlGNDFEMTUyN0ZBQUFBQUFBQWJiYmJiYmJi 
 Date: Sat, 03 Dec 2011 06:31:58 GMT 
 Content-Length: 0

Sample Request (Example of Setting the Region of a Bucket)

PUT / HTTP/1.1 
 User-Agent: Jakarta Commons-HttpClient/3.1 
 Host: bucketname.obs.example.com 
 Accept: */* 
 Date: Sat, 03 Dec 2011 06:31:58 +0000 
 Authorization: AWS BF6C09F302931425E9A7:QBaO+tS/76QYHVnUoxvf9EPH/3o= 
 Content-Length: 149

<CreateBucketConfiguration xmlns="http://obs.example.com/doc/2015-06-30/"> 
<LocationConstraint>EU</LocationConstraint>
</CreateBucketConfiguration>

Sample Response (Example of Setting the Region of a Bucket)

HTTP/1.1 200 OK 
 Server: OBS 
 x-amz-request-id: 001B21A61C6C00000134029F41D1527F 
 x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc  
 Location: /bucketname 
 x-amz-id-2: MDAxQjIxQTYxQzZDMDAwMDAxMzQwMjlGNDFEMTUyN0ZBQUFBQUFBQWJiYmJiYmJi 
 Date: Sat, 03 Dec 2011 06:31:58 GMT 
 Content-Length: 0