GET Bucket Location

Description

A GET location request operation using a bucket URI lists the location constraint of the bucket.

To view the location constraint of a bucket, you must be the bucket owner.

Requests

Syntax

GET /?location HTTP/1.1
Host: destinationBucket.s3.amazonaws.com
Date: date
Authorization: signature

Headers

This operations uses standard request headers.

Responses

Success Response

Syntax

HTTP/1.1 200 OK
x-amz-id-2: id
x-amz-request-id: request_id
Date: date
Content-Type: type
Content-Length: length
Connection: close
Server: AmazonS3

<?xml version="1.0" encoding="UTF-8"?>
<LocationConstraint xmlns="http://s3.amazonaws.com/doc/2006-03-01/">constraint</LocationConstraint>

Elements

Name Description
LocationConstraint

Location constraint of the bucket.

Type: String

Ancestor: None

Special Errors

There are no special errors for this operation. For information about general Amazon S3 errors, see List of Error Codes.

Examples

Sample Request

This example lists the bucket location constraint of the quotes bucket.

GET /?location HTTP/1.1
Host: quotes.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>

Related Resources