Deletes the bucket policy for the specified Amazon S3 bucket. To delete the policy, the caller must
be the bucket owner and have DeletePolicy
permissions for the specified bucket.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
---|---|---|---|
|
Required |
The name of the bucket to use. |
|
|
Optional |
An associative array of parameters that can have the following keys:
|
Returns
Type |
Description |
---|---|
A |
Examples
Delete a bucket policy.
// Instantiate the class $s3 = new AmazonS3(); $bucket = 'my-bucket' . strtolower($s3->key); // Delete the bucket policy $response = $s3->delete_bucket_policy($bucket); // Success? var_dump($response->isOK());Result:
bool(true)
Related Methods
Source
Method defined in services/s3.class.php | Toggle source view (9 lines) | View on GitHub