User Credit Quota Management
Updated at:2025-11-03
put_user_quota
This API is used to set the user's quota, which includes the total number of buckets and the total storage capacity of each region. Currently, the maximum total number of buckets cannot exceed 100. Note that this API can only be called by the primary user.
| Parameters | Required or not | Description |
|---|---|---|
| max_bucket_count | Yes | Maximum number of buckets that can be created. A value of -1 means no setting |
| max_capacity_mega_bytes | Yes | Maximum storage capacity in MB. A value of -1 or 0 means no setting for storage capacity quota limit, namely no upper limit |
Python
1response = bos_client.put_user_quota(max_bucket_count, max_capacity_mega_bytes)
get_user_quota
This API displays the user’s quota settings. Note that only primary users are authorized to call this API.
Python
1response = bos_client.get_user_quota()
2print("[Sample] get user quota maxBucketCount:", response.max_bucket_count)
3print("[Sample] get user quota maxCapacityMegaBytes:", response.max_capacity_mega_bytes)
delete_user_quota
This API deletes quota settings. Note that only the primary user is authorized to call this API.
Python
1response = bos_client.delete_user_quota()
