GET Bucket location
Description
This implementation of the GET
operation uses the location
sub-resource 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
To use this implementation of the operation, you must be the bucket owner.
Requests
Syntax
GET /?location HTTP/1.1 Host:BucketName
.s3.amazonaws.com Date:date
Authorization:signatureValue
Request Parameters
This implementation of the operation does not use request parameters.
Request Headers
This implementation of the operation only uses request headers common to all operations. For more information, see Common Request Headers.
Request Elements
This implementation of the operation does not use request elements.
Responses
Response Headers
This implementation of the operation uses only response headers that are common to most responses. For more information, see Common Response Headers.
Response Elements
Name | Description |
---|---|
LocationConstraint
|
Specifies the Region where the bucket resides. Type: String Valid Values: EU | us-west-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/"/>
Special Errors
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.
Examples
Sample Request
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 1ATXQ3HHA59CYF1CVS02:JUtd9kkJFjbKbkP9f6T/tAxozYY=
Sample Response
<?xml version="1.0" encoding="UTF-8"?> <LocationConstraint xmlns="http://s3.amazonaws.com/doc/2006-03-01/">EU</LocationConstraint>