PutBucketStorageclass
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
-
Request syntax
Plain Text1 PUT /?storageClass HTTP/1.1 2 Host: <BcuketName>.bj.bcebos.com 3 x-bce-date: date 4 Content-Length: request-body-length 5 Content-Type: application/json; charset=utf-8 6 Authorization: AuthorizationString -
Request headers
No special parameters
-
Request parameters
| Name | Types | Description | Required or not |
|---|---|---|---|
| storageClass | String | It specifies default storage class of the bucket: STANDARD indicates standard storage, STANDARD_IA indicates infrequent access storage, COLD indicates cold storage, and ARCHIVE indicates archive storage. For multi-AZ buckets, only two storage classes i.e. MAZ_STANDARD and MAZ_STANDARD_IA are allowed, where MAZ_STANDARD indicates multi-AZ standard storage and MAZ_STANDARD_IA indicates multi-AZ infrequent access storage. |
Yes |
Response
Example
-
Request example
Plain Text1 PUT /?storageClass HTTP/1.1 2 Host: <BcuketName>.bj.bcebos.com 3 x-bce-date: date 4 Content-Length: 38 5 Content-Type: application/json; charset=utf-8 6 Authorization: AuthorizationString 7 { 8 "storageClass": "STANDARD_IA" 9 } -
Response example
Plain Text1 HTTP/1.1 200 OK 2 x-bce-request-id: 4db4b34d-653d-4d9a-b49b-3049ca786409 3 Date: Wed, 31 May 2017 08:34:40 GMT 4 Connection: keep-alive 5 Server: BceBos
