-
Notifications
You must be signed in to change notification settings - Fork 180
Create Container Comparison
Creating a container requires at least two, and at most three, things:
- URL (I list this here because it secretly implies a region to create the bucket in)
- Account ID (query parameter; apparently a tenant ID? OpenStack docs are ambiguous here)
- Container name (query parameter)
- Metadata (optional, encoded in headers)
Note that ACL or permissions-related data cannot be provided through this call.
Returns 201 if successful.
- Bucket name (must be DNS compatible; passed as a header)
- Authorization token (header)
- Bucket Region (passed inside an XML element; constrains where the bucket is created)
- Access privileges (header; optional)
Note that the bucket region in S3 has no corresponding counterpart in OpenStack's request; this is because the URL you hit in OpenStack to create the container is already tied to a specific region.
Returns 200 if successful, along with some metadata on the bucket created.
See http://www.windowsazure.com/en-us/develop/net/how-to-guides/blob-storage/#create-container for an interesting work-flow. You need to get a "reference" to a container, even if it doesn't exist. Then, you create it if it doesn't exist with another call. This document doesn't illustrate wire-level transactions, though, so this might be a client-side abstraction. I'm still researching.