PutUserQuota
Updated at:2025-11-03
API description
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 primary user.
Request
JSON
1PUT /?userQuota HTTP/1.1
2Host: bj.bcebos.com
3Date: <Date>
4Authorization: <Authorization_String>
5Content-Type: text/plain
6Content-Length: <Content_Length>
7{
8 "maxBucketCount" : 50,
9 "maxCapacityMegaBytes" : 12334424
10}
| Name | Types | Description | Required or not |
|---|---|---|---|
| maxBucketCount | int64 | Maximum number of buckets that can be created. A value of -1 means no setting | Yes |
| maxCapacityMegaBytes | int64 | Maximum storage capacity in MB. A value of -1 or 0 means no setting for storage capacity quota limit, namely no upper limit | Yes |
Response
Example
JSON
1PUT /?userQuota HTTP/1.1
2Host: bj.bcebos.com
3Date: <Date>
4Authorization: <Authorization_String>
5Content-Type: text/plain
6Content-Length: <Content_Length>
7{
8 "maxBucketCount" : 50,
9 "maxCapacityMegaBytes" : 12334424
10}
JSON
1HTTP/1.1 200 OK
2x-bce-request-id: 4db4b34d-653d-4d9a-b49b-3049ca786409
3Date: Wed, 31 May 2019 10:34:40 GMT
4Server: BceBos
