class ProjectsDatabases extends Resource (View source)

The "databases" collection of methods.

Typical usage is:

 $firestoreService = new Google\Service\Firestore(...);
 $databases = $firestoreService->projects_databases;

Methods

bulkDeleteDocuments(string $name, GoogleFirestoreAdminV1BulkDeleteDocumentsRequest $postBody, array $optParams = [])

Bulk deletes a subset of documents from Google Cloud Firestore. Documents created or updated after the underlying system starts to process the request will not be deleted. The bulk delete occurs in the background and its progress can be monitored and managed via the Operation resource that is created. For more details on bulk delete behavior, refer to: https://cloud.google.com/firestore/docs/manage-data/bulk-delete (databases.bulkDeleteDocuments)

create(string $parent, GoogleFirestoreAdminV1Database $postBody, array $optParams = [])

Create a database. (databases.create)

delete(string $name, array $optParams = [])

Deletes a database. (databases.delete)

exportDocuments(string $name, GoogleFirestoreAdminV1ExportDocumentsRequest $postBody, array $optParams = [])

Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage system, such as Google Cloud Storage. Recent updates to documents may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage. For more details on export behavior and output format, refer to: https://cloud.google.com/firestore/docs/manage-data/export-import (databases.exportDocuments)

get(string $name, array $optParams = [])

Gets information about a database. (databases.get)

importDocuments(string $name, GoogleFirestoreAdminV1ImportDocumentsRequest $postBody, array $optParams = [])

Imports documents into Google Cloud Firestore. Existing documents with the same name are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Firestore.

listProjectsDatabases(string $parent, array $optParams = [])

List all the databases in the project. (databases.listProjectsDatabases)

patch(string $name, GoogleFirestoreAdminV1Database $postBody, array $optParams = [])

Updates a database. (databases.patch)

restore(string $parent, GoogleFirestoreAdminV1RestoreDatabaseRequest $postBody, array $optParams = [])

Creates a new database by restoring from an existing backup. The new database must be in the same cloud region or multi-region location as the existing backup. This behaves similar to FirestoreAdmin.CreateDatabase except instead of creating a new empty database, a new database is created with the database type, index configuration, and documents from an existing backup. The long- running operation can be used to track the progress of the restore, with the Operation's metadata field type being the RestoreDatabaseMetadata. The response type is the Database if the restore was successful. The new database is not readable or writeable until the LRO has completed. (databases.restore)

Details

GoogleLongrunningOperation bulkDeleteDocuments(string $name, GoogleFirestoreAdminV1BulkDeleteDocumentsRequest $postBody, array $optParams = [])

Bulk deletes a subset of documents from Google Cloud Firestore. Documents created or updated after the underlying system starts to process the request will not be deleted. The bulk delete occurs in the background and its progress can be monitored and managed via the Operation resource that is created. For more details on bulk delete behavior, refer to: https://cloud.google.com/firestore/docs/manage-data/bulk-delete (databases.bulkDeleteDocuments)

Parameters

string $name

Required. Database to operate. Should be of the form: projects/{project_id}/databases/{database_id}.

GoogleFirestoreAdminV1BulkDeleteDocumentsRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleLongrunningOperation create(string $parent, GoogleFirestoreAdminV1Database $postBody, array $optParams = [])

Create a database. (databases.create)

Parameters

string $parent

Required. A parent name of the form projects/{project_id}

GoogleFirestoreAdminV1Database $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleLongrunningOperation delete(string $name, array $optParams = [])

Deletes a database. (databases.delete)

Parameters

string $name

Required. A name of the form projects/{project_id}/databases/{database_id}

array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleLongrunningOperation exportDocuments(string $name, GoogleFirestoreAdminV1ExportDocumentsRequest $postBody, array $optParams = [])

Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage system, such as Google Cloud Storage. Recent updates to documents may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage. For more details on export behavior and output format, refer to: https://cloud.google.com/firestore/docs/manage-data/export-import (databases.exportDocuments)

Parameters

string $name

Required. Database to export. Should be of the form: projects/{project_id}/databases/{database_id}.

GoogleFirestoreAdminV1ExportDocumentsRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleFirestoreAdminV1Database get(string $name, array $optParams = [])

Gets information about a database. (databases.get)

Parameters

string $name

Required. A name of the form projects/{project_id}/databases/{database_id}

array $optParams

Optional parameters.

Return Value

GoogleFirestoreAdminV1Database

Exceptions

Exception

GoogleLongrunningOperation importDocuments(string $name, GoogleFirestoreAdminV1ImportDocumentsRequest $postBody, array $optParams = [])

Imports documents into Google Cloud Firestore. Existing documents with the same name are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Firestore.

(databases.importDocuments)

Parameters

string $name

Required. Database to import into. Should be of the form: projects/{project_id}/databases/{database_id}.

GoogleFirestoreAdminV1ImportDocumentsRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleFirestoreAdminV1ListDatabasesResponse listProjectsDatabases(string $parent, array $optParams = [])

List all the databases in the project. (databases.listProjectsDatabases)

Parameters

string $parent

Required. A parent name of the form projects/{project_id}

array $optParams

Optional parameters.

Return Value

GoogleFirestoreAdminV1ListDatabasesResponse

Exceptions

Exception

GoogleLongrunningOperation patch(string $name, GoogleFirestoreAdminV1Database $postBody, array $optParams = [])

Updates a database. (databases.patch)

Parameters

string $name

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

GoogleFirestoreAdminV1Database $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleLongrunningOperation restore(string $parent, GoogleFirestoreAdminV1RestoreDatabaseRequest $postBody, array $optParams = [])

Creates a new database by restoring from an existing backup. The new database must be in the same cloud region or multi-region location as the existing backup. This behaves similar to FirestoreAdmin.CreateDatabase except instead of creating a new empty database, a new database is created with the database type, index configuration, and documents from an existing backup. The long- running operation can be used to track the progress of the restore, with the Operation's metadata field type being the RestoreDatabaseMetadata. The response type is the Database if the restore was successful. The new database is not readable or writeable until the LRO has completed. (databases.restore)

Parameters

string $parent

Required. The project to restore the database in. Format is projects/{project_id}.

GoogleFirestoreAdminV1RestoreDatabaseRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception