Method |
URI |
Description |
---|---|---|
PUT |
/v1/{account}/{container} |
Creates a container in a specified account. |
{account} indicates the name of an account.
{container} indicates the name of a container.
This operation does not involve a request body.
Create a container named marktwain:
curl -i $publicURL/marktwain -X PUT -H "X-Auth-Token:$token"
This operation does not include request query parameters.
Request URI parameters
Parameter |
Type |
Description |
---|---|---|
{account} |
String (Required) |
A unique account name. In the current version, it indicates a unique ID for the account. |
{container} |
String (Required) |
A unique container name. For details about container naming rules, see Naming Rules. |
Table 2 describes the request header parameters.
Header |
Type |
Description |
---|---|---|
X-Auth-Token |
String (Required) |
Authentication token. |
X-Container-Read |
String (Optional) |
Sets a container access control list (ACL) that grants read access. To set the container read ACL: curl -X {PUT|POST} -i -H "X-Auth-Token: $token" -H \ "X-Container-Read: ACL" $publicURL/Container For details about ACL format rules, see the next section. |
X-Container-Write |
String (Optional) |
Sets a container ACL that grants write access. To set the container write ACL: curl -X {PUT|POST} -i -H "X-Auth-Token: $token" -H \ "X-Container-Write: ACL" $publicURL/Container For details about ACL format rules, see the next section. |
X-Container-Meta-name |
String (Optional) |
Container metadata. {name} is the name of a metadata item that you want to add, update, or delete. To delete this item, leave {name} empty in this header. You must specify an X-Container-Meta-{name} header for each metadata item (for each {name}) that you want to add, update, or delete. |
Container read ACL rules are as follows: