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

Managing Bucket Quotas

Scenarios

By default, there are no limits on the total size or number of objects you can store in OBS or even in a single bucket. You can set a storage quota to limit how much data a bucket can store. When the quota is exceeded, object uploads will fail and return HTTP status code 403 Forbidden with the error code InsufficientStorageSpace. In this case, to continue uploading objects, you can increase the quota, remove the quota limit by setting it to 0, or delete unneeded objects from the bucket.

A bucket quota can control object uploading only after the quota is set. If the bucket quota is less than the capacity of the uploaded objects, the existing objects will not be deleted, but new objects cannot be uploaded. In this case, you can upload new objects only after deleting some existing objects until the used storage capacity is less than the quota limit.

Constraints

  • A bucket quota must be a non-negative integer, in bytes. The maximum value is 263 – 1.
  • OBS does not provide an API for deleting a bucket quota. You can set the bucket quota to 0 to remove the limit.
  • The bucket storage quota is checked against backend-calculated usage. Since this calculation is not real-time, the quota may take effect with a delay. As a result, the actual storage usage may exceed the quota or the usage may not drop immediately after data is deleted. For details about how to query bucket storage usage, see Obtaining Storage Information of a Bucket.

Ways to Manage Bucket Quotas

You can use APIs or SDKs to manage bucket quotas.