Method: projects.availableLocations.list

Returns a list of valid Google Cloud Platform (GCP) resource locations for the specified Project (including a FirebaseProject).

One of these locations can be selected as the Project's default GCP resource location, which is the geographical location where project resources, such as Cloud Firestore, will be provisioned by default. However, if the default GCP resource location has already been set for the Project, then this setting cannot be changed.

This call checks for any location restrictions for the specified Project and, thus, might return a subset of all possible GCP resource locations. To list all GCP resource locations (regardless of any restrictions), call the endpoint without specifying a projectId (that is, /v1beta1/{parent=projects/-}/listAvailableLocations).

To call availableLocations.list with a specified project, a member must be at minimum a Viewer of the project. Calls without a specified project do not require any specific project permissions.

HTTP request

GET https://firebase.googleapis.com/v1beta1/{parent=projects/*}/availableLocations

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

The Project for which to list GCP resource locations, in the format:

projects/projectId


If no project is specified (that is, projects/-), the returned list does not take into account org-specific or project-specific location restrictions.

Query parameters

Parameters
pageToken

string

Token returned from a previous call to availableLocations.list indicating where in the list of locations to resume listing.

pageSize

integer

The maximum number of locations to return in the response.

The server may return fewer than this value at its discretion. If no value is specified (or too large a value is specified), then the server will impose its own limit.

This value cannot be negative.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

JSON representation
{
  "locations": [
    {
      object (Location)
    }
  ],
  "nextPageToken": string
}
Fields
locations[]

object (Location)

One page of results from a call to availableLocations.list.

nextPageToken

string

If the result list is too large to fit in a single response, then a token is returned. If the string is empty, then this response is the last page of results and all available locations have been listed.

This token can be used in a subsequent call to availableLocations.list to find more locations.

Page tokens are short-lived and should not be persisted.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/cloud-platform.read-only
  • https://www.googleapis.com/auth/firebase
  • https://www.googleapis.com/auth/firebase.readonly

For more information, see the Authentication Overview.

Location

A GCP resource location that can be selected for a Project.

JSON representation
{
  "locationId": string,
  "type": enum (LocationType),
  "features": [
    enum (LocationFeature)
  ]
}
Fields
locationId

string

The ID of the GCP resource location. It will be one of the available GCP resource locations.

type

enum (LocationType)

Indicates whether the GCP resource location is a regional or multi-regional location for data replication.

features[]

enum (LocationFeature)

Products and services that are available in the GCP resource location.

LocationType

Specifies how data is replicated within the GCP resource location. Learn more about the types of GCP resource locations.

Enums
LOCATION_TYPE_UNSPECIFIED Used internally for distinguishing unset values and is not intended for external use.
REGIONAL The location is a regional location.
Data in a regional location is replicated in multiple zones within a region.
MULTI_REGIONAL The location is a multi-regional location.
Data in a multi-region location is replicated in multiple regions. Within each region, data is replicated in multiple zones.

LocationFeature

Products and services that are available in the GCP resource location.

Enums
LOCATION_FEATURE_UNSPECIFIED Used internally for distinguishing unset values and is not intended for external use.
FIRESTORE This location supports Cloud Firestore database instances.
App Engine is available in this location, so it can be a project's default GCP resource location.
DEFAULT_STORAGE This location supports default Cloud Storage buckets.
App Engine is available in this location, so it can be a project's default GCP resource location.
FUNCTIONS Cloud Functions for Firebase is available in this location.

Try it!