Updated on 2023-07-14 GMT+08:00

Managing Bucket Quotas

Scenarios

By default, neither the entire OBS system nor any single bucket has limitations on the total size or quantity of objects that can be stored. You can set a quota for a bucket to limit the total size of objects that can be uploaded to the bucket. If the total object size reaches the upper limit, object uploads will fail.

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.

  • 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 bucket quotas. You can set the bucket quota to 0 to cancel the quota limit.

How to Use

You can use APIs or SDKs to manage bucket quotas.

Tool

Reference

SDKs

OBS supports software development kits (SDKs) in multiple languages. For details, see the corresponding developer guide on the SDK Overview page.

API

Configuring Bucket Storage Quota