PUT Bucket quota
API Description
You can use this API to set the bucket quota. A bucket quota must be expressed in bytes and the maximum value is 263-1. Value 0 indicates that no upper limit is set for the bucket quota.
Method Definition
1. ObsClient->setBucketQuota(array $parameter) 2. ObsClient->setBucketQuotaAsync(array $parameter, callable $callback)
Request Parameter
Field |
Type |
Optional or Mandatory |
Description |
---|---|---|---|
Bucket |
string |
Mandatory |
Bucket name |
StorageQuota |
integer |
Mandatory |
Bucket quota. The value is a non-negative integer. |
Returned Result
Field |
Type |
Description |
---|---|---|
HttpStatusCode |
integer |
HTTP status code |
Reason |
string |
Reason description |
RequestId |
string |
Request ID returned by the OBS server |
Sample Code
try{ $resp = $obsClient -> setBucketQuota([ 'Bucket' => 'bucketname', 'StorageQuota' => 100 * 1024 * 1024 ]); printf("RequestId:%s\n", $resp['RequestId']); }catch (Obs\Common\ObsException $obsException){ printf("ExceptionCode:%s\n", $obsException->getExceptionCode()); printf("ExceptionMessage:%s\n", $obsException->getExceptionMessage()); }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot