Scalr\Service\Aws\S3\DataType\BucketData::setPolicy PHP Метод

setPolicy() публичный Метод

This implementation of the GET operation uses the policy subresource to return the policy of a specified bucket. To use this operation, you must have GetPolicy permissions on the specified bucket, and you must be the bucket owner.
public setPolicy ( string $policy ) : boolean
$policy string A JSON document that defines policy configuration.
Результат boolean Returns true on succes or false if failure.
    public function setPolicy($policy)
    {
        $this->throwExceptionIfNotInitialized();
        return $this->getS3()->bucket->setPolicy($this->bucketName, $policy);
    }