GET Bucket versioning
API Description
You can use this API to obtain the versioning status of a bucket.
Method Definition
1. ObsClient->getBucketVersioning(array $parameter) 2. ObsClient->getBucketVersioningAsync(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 |
| Status | string | Versioning status of the bucket
|
Sample Code
try{ $resp = $obsClient -> getBucketVersioning([ 'Bucket' => 'bucketname' ]); printf("RequestId:%s\n", $resp['RequestId']); printf("Status:%s\n", $resp['Status']); }catch (Obs\Common\ObsException $obsException){ printf("ExceptionCode:%s\n", $obsException->getExceptionCode()); printf("ExceptionMessage:%s\n", $obsException->getExceptionMessage()); }
What is your overall rating for this page?
Thank 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