Resource: Database
A Cloud Firestore Database.
JSON representation |
---|
{ "name": string, "uid": string, "createTime": string, "updateTime": string, "deleteTime": string, "locationId": string, "type": enum ( |
Fields | |
---|---|
name |
The resource name of the Database. Format: |
uid |
Output only. The system-generated UUID4 for this Database. |
createTime |
Output only. The timestamp at which this database was created. Databases created before 2016 do not populate createTime. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
updateTime |
Output only. The timestamp at which this database was most recently updated. Note this only includes updates to the database resource and not data contained by the database. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
deleteTime |
Output only. The timestamp at which this database was deleted. Only set if the database has been deleted. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
locationId |
The location of the database. Available locations are listed at https://cloud.google.com/firestore/docs/locations. |
type |
The type of the database. See https://cloud.google.com/datastore/docs/firestore-or-datastore for information about how to choose. |
concurrencyMode |
The concurrency control mode to use for this database. |
versionRetentionPeriod |
Output only. The period during which past versions of data are retained in the database. Any If the PITR feature is enabled, the retention period is 7 days. Otherwise, the retention period is 1 hour. A duration in seconds with up to nine fractional digits, ending with ' |
earliestVersionTime |
Output only. The earliest timestamp at which older versions of the data can be read from the database. See [versionRetentionPeriod] above; this field is populated with This value is continuously updated, and becomes stale the moment it is queried. If you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
pointInTimeRecoveryEnablement |
Whether to enable the PITR feature on this database. |
appEngineIntegrationMode |
The App Engine integration mode to use for this database. |
keyPrefix |
Output only. The keyPrefix for this database. This keyPrefix is used, in combination with the project ID (" This value may be empty in which case the appid to use for URL-encoded keys is the projectId (eg: foo instead of v~foo). |
deleteProtectionState |
State of delete protection for the database. |
cmekConfig |
Optional. Presence indicates CMEK is enabled for this database. |
previousId |
Output only. The database resource's prior database ID. This field is only populated for deleted databases. |
sourceInfo |
Output only. Information about the provenance of this database. |
etag |
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.
Mode changes are only allowed if the database is empty.
Enums | |
---|---|
DATABASE_TYPE_UNSPECIFIED |
Not used. |
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 mode is available for Cloud Firestore databases. |
PESSIMISTIC |
Use pessimistic concurrency control by default. This mode is available for Cloud Firestore databases. 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 mode for Cloud Datastore. This mode is also available for Cloud Firestore with Datastore Mode but is not recommended. |
PointInTimeRecoveryEnablement
Point In Time Recovery feature enablement.
Enums | |
---|---|
POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED |
Not used. |
POINT_IN_TIME_RECOVERY_ENABLED |
Reads are supported on selected versions of the data from within the past 7 days:
|
POINT_IN_TIME_RECOVERY_DISABLED |
Reads are supported on any version of the data from within the past 1 hour. |
AppEngineIntegrationMode
The type of App Engine integration mode.
Enums | |
---|---|
APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED |
Not used. |
ENABLED |
If an App Engine application exists in the same region as this database, App Engine configuration will impact this database. This includes disabling of the application & database, as well as disabling writes to the database. |
DISABLED |
App Engine has no effect on the ability of this database to serve requests. This is the default setting for databases created with the Firestore API. |
DeleteProtectionState
The delete protection state of the database.
Enums | |
---|---|
DELETE_PROTECTION_STATE_UNSPECIFIED |
The default value. Delete protection type is not specified |
DELETE_PROTECTION_DISABLED |
Delete protection is disabled |
DELETE_PROTECTION_ENABLED |
Delete protection is enabled |
CmekConfig
The CMEK (Customer Managed Encryption Key) configuration for a Firestore database. If not present, the database is secured by the default Google encryption key.
JSON representation |
---|
{ "kmsKeyName": string, "activeKeyVersion": [ string ] } |
Fields | |
---|---|
kmsKeyName |
Required. Only keys in the same location as this database are allowed to be used for encryption. For Firestore's nam5 multi-region, this corresponds to Cloud KMS multi-region us. For Firestore's eur3 multi-region, this corresponds to Cloud KMS multi-region europe. See https://cloud.google.com/kms/docs/locations. The expected format is |
activeKeyVersion[] |
Output only. Currently in-use KMS key versions. During key rotation, there can be multiple in-use key versions. The expected format is |
SourceInfo
Information about the provenance of this database.
JSON representation |
---|
{ "operation": string, // Union field |
Fields | |
---|---|
operation |
The associated long-running operation. This field may not be set after the operation has completed. Format: |
Union field source . The source from which this database is derived. source can be only one of the following: |
|
backup |
If set, this database was restored from the specified backup (or a snapshot thereof). |
BackupSource
Information about a backup that was used to restore a database.
JSON representation |
---|
{ "backup": string } |
Fields | |
---|---|
backup |
The resource name of the backup that was used to restore this database. Format: |
Methods |
|
---|---|
|
Create a database. |
|
Deletes a database. |
|
Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage system, such as Google Cloud Storage. |
|
Gets information about a database. |
|
Imports documents into Google Cloud Firestore. |
|
List all the databases in the project. |
|
Updates a database. |
|
Creates a new database by restoring from an existing backup. |