Scalr\Service\Aws\S3\DataType\BucketData::getPolicy PHP Method

getPolicy() public method

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 getPolicy ( ) : string
return string Returns bucket policy string (json encoded)
    public function getPolicy()
    {
        $this->throwExceptionIfNotInitialized();
        return $this->getS3()->bucket->getPolicy($this->bucketName);
    }