REST Resource: projects.databases

Resource: Database

A Cloud Firestore Database. Currently only one database is allowed per cloud project; this database must have a databaseId of '(default)'.

JSON representation
{
  "name": string,
  "locationId": string,
  "type": enum (DatabaseType),
  "concurrencyMode": enum (ConcurrencyMode),
  "etag": string
}
Fields
name

string

The resource name of the Database. Format: projects/{project}/databases/{database}

locationId

string

The location of the database. Available databases are listed at https://cloud.google.com/firestore/docs/locations.

type

enum (DatabaseType)

The type of the database. See https://cloud.google.com/datastore/docs/firestore-or-datastore for information about how to choose.

concurrencyMode

enum (ConcurrencyMode)

The concurrency control mode to use for this database.

etag

string

This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

DatabaseType

The type of the database. See https://cloud.google.com/datastore/docs/firestore-or-datastore for information about how to choose.

Enums
DATABASE_TYPE_UNSPECIFIED The default value. This value is used if the database type is omitted.
FIRESTORE_NATIVE Firestore Native Mode
DATASTORE_MODE Firestore in Datastore Mode.

ConcurrencyMode

The type of concurrency control mode for transactions.

Enums
CONCURRENCY_MODE_UNSPECIFIED Not used.
OPTIMISTIC Use optimistic concurrency control by default. This setting is available for Cloud Firestore customers.
PESSIMISTIC Use pessimistic concurrency control by default. This setting is available for Cloud Firestore customers. This is the default setting for Cloud Firestore.
OPTIMISTIC_WITH_ENTITY_GROUPS Use optimistic concurrency control with entity groups by default. This is the only available setting for Cloud Datastore customers. This is the default setting for Cloud Datastore.

Methods

exportDocuments

Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage system, such as Google Cloud Storage.

get

Gets information about a database.

importDocuments

Imports documents into Google Cloud Firestore.

list

List all the databases in the project.

patch

Updates a database.