< Previous | Contents | Next >

Creating a bucket

You use the HTTP PUT method to create a bucket. You can create a bucket only if your user account is configured to let you do so.


When you create a bucket, you specify a name for it. For information on naming buckets, see “Bucket names” on page 16.


You can specify an ACL for a bucket in the same request as you use to create the bucket. To do this, you need to use ACL headers. You cannot use an ACL request body when creating a bucket. For information on ACLs, see “Access control lists” on page 25.


If the ACL you specify in a request to create a bucket is invalid, HCP returns a 400 (Bad Request) or 501 (Not Implemented) status code and does not create the bucket.


When you create a bucket, you become the bucket owner. You also get browse, read, read ACL, write, write ACL, and delete data access permissions for the bucket. If search is enabled for the bucket, you also get search permission.


For information on bucket ownership, see “Bucket owners” on page 24. For information on data access permissions, see “Data access permissions” on page 11. For information on search, see “Search” on page 36.


 

Request lineRequest headersResponse headersHTTP status codesExamplesExample 1: Creating a bucketExample 2: Creating a bucket with an ACL