| « PreviousNext » | |
![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
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. 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:BucketName.s3.amazonaws.com Date:dateAuthorization:signatureValue
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.
| Name | Description |
|---|---|
LocationConstraint
|
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. Type: String Valid Values: EU | eu-west-1 | us-west-1 | us-west-2 | ap-southeast-1 | ap-southeast-2 | ap-northeast-1 | sa-east-1 | empty string (for the US Classic Region) Ancestry: None |
When the bucket's Region is US Classic, Amazon S3 returns an empty string for the bucket's Region:
<LocationConstraint xmlns="http://s3.amazonaws.com/doc/2006-03-01/"/>
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: AWS AKIAIOSFODNN7EXAMPLE:JUtd9kkJFjbKbkP9f6T/tAxozYY=
<?xml version="1.0" encoding="UTF-8"?> <LocationConstraint xmlns="http://s3.amazonaws.com/doc/2006-03-01/">EU</LocationConstraint>