百度智能云

All Product Document

          Object Storage

          PutUserQuota

          Interface Description

          This interface is used to set the user quota. The quota includes total number of buckets and total storage capacity of each region. At present, the maximum number of buckets cannot exceed 100. Note that this interface can be only called by the primary user.

          Request

          • Request syntax

          PUT /?userQuota HTTP/1.1      
          Host: bj.bcebos.com
          Date: <Date>
          Authorization: <Authorization_String>
          Content-Type: text/plain
          Content-Length: <Content_Length>
          {
            "maxBucketCount" : 50,   
            "maxCapacityMegaBytes"  : 12334424 
          }
          • Request parameters

          Name Type Description Required?
          maxBucketCount int64 Maximum number of creatable buckets. If it is -1, indicate that it is not set. Yes
          maxCapacityMegaBytes int64 It indicates the maximum storage capacity (MB). If it is -1 or 0, indicate that the storage capacity quota is not set, that is, there is no upper limit. Yes
          • Request header field

          No special request header field.

          Response

          • Response header field

            No special parameters.

          • Response element

            No special parameters.

          Example

          • Request example

          PUT /?userQuota HTTP/1.1      
          Host: bj.bcebos.com
          Date: <Date>
          Authorization: <Authorization_String>
          Content-Type: text/plain
          Content-Length: <Content_Length>
          {
            "maxBucketCount" : 50,   
            "maxCapacityMegaBytes"  : 12334424 
          }
          • Response example

          HTTP/1.1 200 OK
          x-bce-request-id: 4db4b34d-653d-4d9a-b49b-3049ca786409
          Date: Wed, 31 May 2019 10:34:40 GMT
          Server: BceBos
          Previous
          ListBuckets
          Next
          DeleteUserQuota