Updated on 2026-08-21 GMT+08:00

Configuring a Storage Class

Scenarios

This section describes how to configure a storage class when you create a bucket or upload an object. If you want to change the storage class of an existing bucket or object, see Changing the Storage Class of a Bucket or Object.

Bucket and Object Storage Classes

When creating a bucket, you can specify a storage class for it. You can also change the storage class after the bucket has been created.

By default, an object inherits the storage class of the bucket where it is uploaded. You can specify a storage class for an object when uploading it, or you can change the object storage class after the object has been uploaded.

Changing the storage class of a bucket does not change the storage class of existing objects in the bucket. However, any new objects uploaded to the bucket will inherit the bucket's new storage class.

Important Notes

If a third-party tool specifies the storage class when uploading an object, the object will not inherit the bucket's storage class. For example, you create an Archive bucket A. You might expect that objects uploaded to that bucket inherit the Archive storage class and are billed accordingly. However, if a third-party tool uploads objects to bucket A and sets their storage class to Standard, those objects will be stored as Standard, and billing will apply to Standard objects. Different storage classes incur different costs, which may result in higher costs than expected. Before using a third-party tool to upload objects, verify the storage class specified in the tool. After the objects are uploaded, you can also change their storage class if needed. For details, see Changing the Storage Class of a Bucket or Object.

Configuring a Storage Class During Bucket Creation

You can use OBS Console, APIs, OBS SDKs, OBS Browser+, or obsutil to specify a storage class when creating a bucket.

Configuring a Storage Class During Object Uploads

You can use OBS Console, APIs, OBS SDKs, OBS Browser+, or obsutil to specify a storage class when uploading an object.

Logging and Monitoring

You can use Cloud Trace Service (CTS) and OBS logging to record operations on the storage class of an OBS bucket and its objects.

Auditing OBS operations with CTS: CTS can be configured to record operations related to the storage class of buckets and objects. It collects and stores these records, and allows you to query them for purposes such as security analysis, compliance audits, resource tracking, and troubleshooting. For details, see Using CTS to Audit OBS.

Logging storage class operations: You can enable logging for operations related to the storage class (including setting or obtaining the storage class of a bucket and changing the storage class of an object). These logs can be queried for further auditing or analysis. For details, see Using Logging to Record OBS Logs.