Scalr\Service\Aws\S3\Handler\BucketHandler::deletePolicy PHP Method

deletePolicy() public method

This implementation of the DELETE operation uses the policy subresource to delete the policy on a specified bucket. To use the operation, you must have DeletePolicy permissions on the specified bucket and be the bucket owner.
public deletePolicy ( BucketData | string $bucketName ) : boolean
$bucketName Scalr\Service\Aws\S3\DataType\BucketData | string A bucket name.
return boolean Returns true on success or throws an exception.
    public function deletePolicy($bucketName)
    {
        if ($bucketName instanceof BucketData) {
            $bucketName = $bucketName->bucketName;
        }
        return $this->getS3()->getApiHandler()->deleteBucketPolicy($bucketName);
    }