Set bucket storage class
Updated at:2025-11-03
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.
put_bucket_storage_class
This API allows you to set the default storage class for a bucket.
Python
1 bos_client.set_bucket_storage_class(bucket_name, storage_class=storage_class.COLD)
get_bucket_storage_class
This API retrieves the default storage class for a bucket.
Python
1 response = bos_client.get_bucket_storage_class(bucket_name)
