Updated on 2025-12-22 GMT+08:00
DELETE Bucket policy
API Description
You can use this API to delete a bucket policy.
Method Definition
1. ObsClient->deleteBucketPolicy(array $parameter) 2. ObsClient->deleteBucketPolicyAsync(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 |
Sample Code
try{
$resp = $obsClient -> deleteBucketPolicy([
'Bucket' => 'bucketname'
]);
printf("RequestId:%s\n", $resp['RequestId']);
}catch (Obs\Common\ObsException $obsException){
printf("ExceptionCode:%s\n", $obsException->getExceptionCode());
printf("ExceptionMessage:%s\n", $obsException->getExceptionMessage());
} Parent topic:Bucket-Related APIs
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.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot
