Last update:2025-08-18 15:50:16
This API is used to create a storage bucket. To perform this operation, you must have the wos:PutBucket permission.
PUT / HTTP/1.1
Host: BucketName.s3-cn-south-6.wcsapi.com
Date: GMT Date
Authorization: SignatureValue
None
Only common request headers are required.
The request body must be in XML format with the following elements:
| Element Name | Description | Required |
|---|---|---|
| CreateBucketConfiguration | Defines the bucket configuration list. Type: XML Child node: Rule Parent node: None |
Yes |
| StorageClass | Specifies the bucket storage class. Supported values: Standard, IA, and Archive (defaults to the user-configured storage class). Type: XML Parent node: CreateBucketConfiguration |
No |
HTTP/1.1 200 OK
x-wos-request-id: request id
Content-Type: type
Date: date
Content-Length: length
Server: WS-web-server
Only common response headers are required.
None
| Reason | HTTP Status Code | Error Code |
|---|---|---|
| Invalid bucket name | 400 | InvalidBucketName |
| Bucket already exists | 409 | BucketAlreadyExists |
| IAM authentication failed | 403 | AccessDenied |
| Invalid storage class | 400 | InvalidStorageClass |
| Storage service not enabled for region | 403 | Standard storage service in XX not enabled. |
| Specified storage class does not exist (case sensitive) | 400 | InvalidStorageClass |
The following example demonstrates how to specify the storage class using the x-amz-storage-class header or by providing the StorageClass element in the XML body.
PUT / HTTP/1.1
Host: BucketName.s3-cn-south-6.wcsapi.com
Date: GMT Date
Authorization: SignatureValue
x-amz-storage-class: Standard, IA, Archive
<?xml version="1.0" encoding="UTF-8"?>
<CreateBucketConfiguration>
<StorageClass>Standard</StorageClass>
</CreateBucketConfiguration>
HTTP/1.1 200 OK
x-amz-request-id: 534B371674E88A4D8906****
Date: Fri, 24 Feb 2017 03:15:40 GMT
Content-Length: 0
Connection: keep-alive
Server: WCS-Web-Server
Location: /bucketName