This implementation of the
GET operation uses the
location subresource to return a bucket's region. You set the
bucket's region using the
LocationConstraint request parameter in
Bucket request. For more information, see PUT Bucket.
To use this implementation of the operation, you must be the bucket owner.
GET /?location HTTP/1.1 Host:
authorization string(see Authenticating Requests (AWS Signature Version 4))
This implementation of the operation does not use request parameters.
This implementation of the operation uses only request headers that are common to all operations. For more information, see Common Request Headers.
This implementation of the operation does not use request elements.
This implementation of the operation uses only response headers that are common to most responses. For more information, see Common Response Headers.
Specifies the region where the bucket resides. For more information about region endpoints and location constraints, go to Regions and Endpoints in the Amazon Web Services Glossary.
Valid Values: [ us-west-1 | us-west-2 | eu-west-1 | eu-central-1 | ap-southeast-1 | ap-northeast-1 | ap-southeast-2 | sa-east-1 | empty string (for the US Classic region)]
When the bucket's region is US Classic, Amazon S3 returns an empty string for the bucket's region:
This implementation of the operation does not return special errors. For general information about Amazon S3 errors and a list of error codes, see Error Responses.
The following request returns the region of the specified bucket.
GET /?location HTTP/1.1 Host: myBucket.s3.amazonaws.com Date: Tue, 09 Oct 2007 20:26:04 +0000 Authorization:
<?xml version="1.0" encoding="UTF-8"?> <LocationConstraint xmlns="http://s3.amazonaws.com/doc/2006-03-01/">EU</LocationConstraint>