Set default bucket storage class
Updated at:2025-11-03
API description
This API allows you to set the default storage class for a bucket.
If the object uploaded via API, CLI, or SDK does not have a specified storage class, it follows the default storage class of the bucket. If the specified storage class of the uploaded object differs from the default storage class of the bucket, the storage class of the object shall apply. Storage classes include standard storage, infrequent access storage, cold storage, and archive storage. For specific usage scenarios and performance, refer to Tiered Storage.
Request URI
PUT /v1/{bucketName}/?storageClass
| Parameter name | Parameter type | Required or not | Description | Example value | Parameter location |
|---|---|---|---|---|---|
| bucketName | String | Yes | Bucket name | "bucketName_example" | Path |
Parameters of request body
Description of the data structure of request body fields
| Parameter name | Parameter type | Required or not | Description | Example value |
|---|---|---|---|---|
| storageClass | String | Yes | Specifies the default storage class for a bucket. STANDARD represents standard storage, STANDARD_IA represents infrequent access storage, COLD represents cold storage, and ARCHIVE represents archive storage. For multi-AZ buckets, only MAZ_STANDARD (multi-AZ standard storage) and MAZ_STANDARD_IA (multi-AZ infrequent access storage) are permitted. | STANDARD_IA |
Response body parameters
Description of the data structure of response body fields
Request example
JSON
1PUT /v1/bucketName_example/?storageClass
2 <Common request headers>
3{
4 "storageClass" : "STANDARD_IA"
5}
Response example
JSON
1HTTP/1.1 200 OK
2 <Common response headers>
3{ }
Error code
Please refer to the general error codes
