GET Bucket quota
API Description
You can use this API to obtain the bucket quota. Value 0 indicates that no upper limit is set for the bucket quota.
Method Definition
1. ObsClient->getBucketQuota(array $parameter) 2. ObsClient->getBucketQuotaAsync(array $parameter, callable $callback)
Request Parameter
| Field | Type | Optional or Mandatory | Description |
|---|---|---|---|
| Bucket | string | Mandatory | Bucket name |
Returned Result
| Field | Type | Description |
|---|---|---|
| HttpStatusCode | integer | HTTP status code |
| Reason | string | Reason description |
| RequestId | string | Request ID returned by the OBS server |
| StorageQuota | integer | Bucket quota |
Sample Code
try{
$resp = $obsClient -> getBucketQuota([
'Bucket' => 'bucketname'
]);
printf("RequestId:%s\n", $resp['RequestId']);
printf("StorageQuota:%s\n", $resp['StorageQuota']);
}catch (Obs\Common\ObsException $obsException){
printf("ExceptionCode:%s\n", $obsException->getExceptionCode());
printf("ExceptionMessage:%s\n", $obsException->getExceptionMessage());
} Last Article: PUT Bucket quota
Next Article: Set Bucket storagePolicy
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.