Get bucket location

Stay organized with collections Save and categorize content based on your preferences.

To list a bucket's location you make a GET request that is scoped to a bucket and you use the location query string parameter. The location value is returned in an XML document in the response body.

Query string parameters

Parameter Description Required
location You can use this to display the location of the bucket. Returned values can include a region, dual-region, or multi-region name. For a list of possible locations, see Bucket Locations. No

See signed URL query string parameters for information on the parameters you include when creating and using signed URLs.

Request headers

See common request headers.

Request body elements

This request does not include an XML document in the request body.

Request syntax

The following syntax applies to GET Bucket requests that use the location query string parameter.

GET /?location HTTP/1.1
Host: BUCKET_NAME.storage.googleapis.com
Date: DATE
Content-Length: 0
Authorization: AUTHENTICATION_STRING

Response headers

The request can return a variety of response headers depending on the request headers you use.

Response body elements

The following response body elements are applicable only if you use the location query string parameter to display the bucket's location constraint.

Element Description
LocationConstraint The location of the bucket. Can be the name of a single region, predefined dual-region, or multi-region. For a list of locations, see Bucket Locations.
customPlacementConfig An object with the bucket's custom location configuration, which specificies the individual regions that comprise a configurable dual-region bucket. If the bucket is designated a single or multi-region, the parameters are empty.
dataLocations An object with a list of individual regions that comprise a configurable dual-region bucket. See Cloud Storage bucket locations for a list of acceptable regions. If the bucket is designated a single or multi-region, this parameter is empty.
dataLocation One of the regions that comprise a configurable dual-region bucket. See Cloud Storage bucket locations for a list of acceptable regions. If the bucket is designated a single or multi-region, these parameters are empty.