Scalr\Service\Aws\S3\V20060301\S3Api::getBucketLocation PHP Метод

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

This implementation of the GET operation uses the location subresource to return a bucket's Region. You set the bucket's Region using the LocationContraint request parameter in a PUT Bucket request.
public getBucketLocation ( string $bucketName ) : string
$bucketName string A bucket name.
Результат string Returns bucket location Valid Values: EU | eu-west-1 | eu-central-1 | us-west-1 | us-west-2 | ap-southeast-1 | ap-northeast-1 | ap-northeast-2 | sa-east-1 | empty string (for the US Classic Region)
    public function getBucketLocation($bucketName)
    {
        $response = $this->getBucketSubresource($bucketName, 'location');
        $sxml = simplexml_load_string($response->getRawContent());
        $location = (string) $sxml;
        return $location;
    }