Reference documentation and code samples for the Cloud Firestore Admin V1 API class Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.
REST client for the FirestoreAdmin service.
The Cloud Firestore Admin API.
This API provides several administrative services for Cloud Firestore.
Project, Database, Namespace, Collection, Collection Group, and Document are used as defined in the Google Cloud Firestore API.
Operation: An Operation represents work being performed in the background.
The index service manages Cloud Firestore indexes.
Index creation is performed asynchronously. An Operation resource is created for each such asynchronous operation. The state of the operation (including any errors encountered) may be queried via the Operation resource.
The Operations collection provides a record of actions performed for the specified Project (including any Operations in progress). Operations are not created directly but through calls on other collections or resources.
An Operation that is done may be deleted so that it is no longer listed as
part of the Operation collection. Operations are garbage collected after
30 days. By default, ListOperations will only return in progress and failed
operations. To list completed operation, issue a ListOperations request with
the filter done: true
.
Operations are created by service FirestoreAdmin
, but are accessed via
service google.longrunning.Operations
.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the FirestoreAdmin Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all FirestoreAdmin clients ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.configure do |config| config.timeout = 10.0 end
#bulk_delete_documents
def bulk_delete_documents(request, options = nil) -> ::Gapic::Operation
def bulk_delete_documents(name: nil, collection_ids: nil, namespace_ids: nil) -> ::Gapic::Operation
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
def bulk_delete_documents(request, options = nil) -> ::Gapic::Operation
bulk_delete_documents
via a request object, either of type
BulkDeleteDocumentsRequest or an equivalent Hash.
- request (::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def bulk_delete_documents(name: nil, collection_ids: nil, namespace_ids: nil) -> ::Gapic::Operation
bulk_delete_documents
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Database to operate. Should be of the form:
projects/{project_id}/databases/{database_id}
. -
collection_ids (::Array<::String>) — Optional. IDs of the collection groups to delete. Unspecified means all
collection groups.
Each collection group in this list must be unique.
-
namespace_ids (::Array<::String>) — Optional. Namespaces to delete.
An empty list means all namespaces. This is the recommended usage for databases that don't use namespaces.
An empty string element represents the default namespace. This should be used if the database has data in non-default namespaces, but doesn't want to delete from them.
Each namespace in this list must be unique.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/firestore/admin/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest.new # Call the bulk_delete_documents method. result = client.bulk_delete_documents request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the FirestoreAdmin Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_backup_schedule
def create_backup_schedule(request, options = nil) -> ::Google::Cloud::Firestore::Admin::V1::BackupSchedule
def create_backup_schedule(parent: nil, backup_schedule: nil) -> ::Google::Cloud::Firestore::Admin::V1::BackupSchedule
Creates a backup schedule on a database. At most two backup schedules can be configured on a database, one daily backup schedule and one weekly backup schedule.
def create_backup_schedule(request, options = nil) -> ::Google::Cloud::Firestore::Admin::V1::BackupSchedule
create_backup_schedule
via a request object, either of type
CreateBackupScheduleRequest or an equivalent Hash.
- request (::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_backup_schedule(parent: nil, backup_schedule: nil) -> ::Google::Cloud::Firestore::Admin::V1::BackupSchedule
create_backup_schedule
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The parent database.
Format
projects/{project}/databases/{database}
- backup_schedule (::Google::Cloud::Firestore::Admin::V1::BackupSchedule, ::Hash) — Required. The backup schedule to create.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Firestore::Admin::V1::BackupSchedule)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/firestore/admin/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest.new # Call the create_backup_schedule method. result = client.create_backup_schedule request # The returned object is of type Google::Cloud::Firestore::Admin::V1::BackupSchedule. p result
#create_database
def create_database(request, options = nil) -> ::Gapic::Operation
def create_database(parent: nil, database: nil, database_id: nil) -> ::Gapic::Operation
Create a database.
def create_database(request, options = nil) -> ::Gapic::Operation
create_database
via a request object, either of type
CreateDatabaseRequest or an equivalent Hash.
- request (::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_database(parent: nil, database: nil, database_id: nil) -> ::Gapic::Operation
create_database
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. A parent name of the form
projects/{project_id}
- database (::Google::Cloud::Firestore::Admin::V1::Database, ::Hash) — Required. The Database to create.
-
database_id (::String) — Required. The ID to use for the database, which will become the final
component of the database's resource name.
This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/.
"(default)" database id is also valid.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/firestore/admin/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest.new # Call the create_database method. result = client.create_database request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#create_index
def create_index(request, options = nil) -> ::Gapic::Operation
def create_index(parent: nil, index: nil) -> ::Gapic::Operation
Creates a composite index. This returns a google.longrunning.Operation which may be used to track the status of the creation. The metadata for the operation will be the type IndexOperationMetadata.
def create_index(request, options = nil) -> ::Gapic::Operation
create_index
via a request object, either of type
CreateIndexRequest or an equivalent Hash.
- request (::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_index(parent: nil, index: nil) -> ::Gapic::Operation
create_index
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. A parent name of the form
projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}
- index (::Google::Cloud::Firestore::Admin::V1::Index, ::Hash) — Required. The composite index to create.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/firestore/admin/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Firestore::Admin::V1::CreateIndexRequest.new # Call the create_index method. result = client.create_index request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#delete_backup
def delete_backup(request, options = nil) -> ::Google::Protobuf::Empty
def delete_backup(name: nil) -> ::Google::Protobuf::Empty
Deletes a backup.
def delete_backup(request, options = nil) -> ::Google::Protobuf::Empty
delete_backup
via a request object, either of type
DeleteBackupRequest or an equivalent Hash.
- request (::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_backup(name: nil) -> ::Google::Protobuf::Empty
delete_backup
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Name of the backup to delete.
format is
projects/{project}/locations/{location}/backups/{backup}
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/firestore/admin/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest.new # Call the delete_backup method. result = client.delete_backup request # The returned object is of type Google::Protobuf::Empty. p result
#delete_backup_schedule
def delete_backup_schedule(request, options = nil) -> ::Google::Protobuf::Empty
def delete_backup_schedule(name: nil) -> ::Google::Protobuf::Empty
Deletes a backup schedule.
def delete_backup_schedule(request, options = nil) -> ::Google::Protobuf::Empty
delete_backup_schedule
via a request object, either of type
DeleteBackupScheduleRequest or an equivalent Hash.
- request (::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_backup_schedule(name: nil) -> ::Google::Protobuf::Empty
delete_backup_schedule
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the backup schedule.
Format
projects/{project}/databases/{database}/backupSchedules/{backup_schedule}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/firestore/admin/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest.new # Call the delete_backup_schedule method. result = client.delete_backup_schedule request # The returned object is of type Google::Protobuf::Empty. p result
#delete_database
def delete_database(request, options = nil) -> ::Gapic::Operation
def delete_database(name: nil, etag: nil) -> ::Gapic::Operation
Deletes a database.
def delete_database(request, options = nil) -> ::Gapic::Operation
delete_database
via a request object, either of type
DeleteDatabaseRequest or an equivalent Hash.
- request (::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_database(name: nil, etag: nil) -> ::Gapic::Operation
delete_database
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. A name of the form
projects/{project_id}/databases/{database_id}
- etag (::String) — The current etag of the Database. If an etag is provided and does not match the current etag of the database, deletion will be blocked and a FAILED_PRECONDITION error will be returned.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/firestore/admin/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest.new # Call the delete_database method. result = client.delete_database request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#delete_index
def delete_index(request, options = nil) -> ::Google::Protobuf::Empty
def delete_index(name: nil) -> ::Google::Protobuf::Empty
Deletes a composite index.
def delete_index(request, options = nil) -> ::Google::Protobuf::Empty
delete_index
via a request object, either of type
DeleteIndexRequest or an equivalent Hash.
- request (::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_index(name: nil) -> ::Google::Protobuf::Empty
delete_index
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. A name of the form
projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/firestore/admin/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest.new # Call the delete_index method. result = client.delete_index request # The returned object is of type Google::Protobuf::Empty. p result
#export_documents
def export_documents(request, options = nil) -> ::Gapic::Operation
def export_documents(name: nil, collection_ids: nil, output_uri_prefix: nil, namespace_ids: nil, snapshot_time: nil) -> ::Gapic::Operation
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
def export_documents(request, options = nil) -> ::Gapic::Operation
export_documents
via a request object, either of type
ExportDocumentsRequest or an equivalent Hash.
- request (::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def export_documents(name: nil, collection_ids: nil, output_uri_prefix: nil, namespace_ids: nil, snapshot_time: nil) -> ::Gapic::Operation
export_documents
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Database to export. Should be of the form:
projects/{project_id}/databases/{database_id}
. - collection_ids (::Array<::String>) — Which collection ids to export. Unspecified means all collections. Each collection id in this list must be unique.
-
output_uri_prefix (::String) — The output URI. Currently only supports Google Cloud Storage URIs of the
form:
gs://BUCKET_NAME[/NAMESPACE_PATH]
, whereBUCKET_NAME
is the name of the Google Cloud Storage bucket andNAMESPACE_PATH
is an optional Google Cloud Storage namespace path. When choosing a name, be sure to consider Google Cloud Storage naming guidelines: https://cloud.google.com/storage/docs/naming. If the URI is a bucket (without a namespace path), a prefix will be generated based on the start time. -
namespace_ids (::Array<::String>) — An empty list represents all namespaces. This is the preferred
usage for databases that don't use namespaces.
An empty string element represents the default namespace. This should be used if the database has data in non-default namespaces, but doesn't want to include them. Each namespace in this list must be unique.
- snapshot_time (::Google::Protobuf::Timestamp, ::Hash) — The timestamp that corresponds to the version of the database to be exported. The timestamp must be in the past, rounded to the minute and not older than earliestVersionTime. If specified, then the exported documents will represent a consistent view of the database at the provided time. Otherwise, there are no guarantees about the consistency of the exported documents.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/firestore/admin/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest.new # Call the export_documents method. result = client.export_documents request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#get_backup
def get_backup(request, options = nil) -> ::Google::Cloud::Firestore::Admin::V1::Backup
def get_backup(name: nil) -> ::Google::Cloud::Firestore::Admin::V1::Backup
Gets information about a backup.
def get_backup(request, options = nil) -> ::Google::Cloud::Firestore::Admin::V1::Backup
get_backup
via a request object, either of type
GetBackupRequest or an equivalent Hash.
- request (::Google::Cloud::Firestore::Admin::V1::GetBackupRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_backup(name: nil) -> ::Google::Cloud::Firestore::Admin::V1::Backup
get_backup
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Name of the backup to fetch.
Format is
projects/{project}/locations/{location}/backups/{backup}
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Firestore::Admin::V1::Backup)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/firestore/admin/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Firestore::Admin::V1::GetBackupRequest.new # Call the get_backup method. result = client.get_backup request # The returned object is of type Google::Cloud::Firestore::Admin::V1::Backup. p result
#get_backup_schedule
def get_backup_schedule(request, options = nil) -> ::Google::Cloud::Firestore::Admin::V1::BackupSchedule
def get_backup_schedule(name: nil) -> ::Google::Cloud::Firestore::Admin::V1::BackupSchedule
Gets information about a backup schedule.
def get_backup_schedule(request, options = nil) -> ::Google::Cloud::Firestore::Admin::V1::BackupSchedule
get_backup_schedule
via a request object, either of type
GetBackupScheduleRequest or an equivalent Hash.
- request (::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_backup_schedule(name: nil) -> ::Google::Cloud::Firestore::Admin::V1::BackupSchedule
get_backup_schedule
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the backup schedule.
Format
projects/{project}/databases/{database}/backupSchedules/{backup_schedule}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Firestore::Admin::V1::BackupSchedule)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/firestore/admin/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest.new # Call the get_backup_schedule method. result = client.get_backup_schedule request # The returned object is of type Google::Cloud::Firestore::Admin::V1::BackupSchedule. p result
#get_database
def get_database(request, options = nil) -> ::Google::Cloud::Firestore::Admin::V1::Database
def get_database(name: nil) -> ::Google::Cloud::Firestore::Admin::V1::Database
Gets information about a database.
def get_database(request, options = nil) -> ::Google::Cloud::Firestore::Admin::V1::Database
get_database
via a request object, either of type
GetDatabaseRequest or an equivalent Hash.
- request (::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_database(name: nil) -> ::Google::Cloud::Firestore::Admin::V1::Database
get_database
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. A name of the form
projects/{project_id}/databases/{database_id}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Firestore::Admin::V1::Database)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/firestore/admin/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest.new # Call the get_database method. result = client.get_database request # The returned object is of type Google::Cloud::Firestore::Admin::V1::Database. p result
#get_field
def get_field(request, options = nil) -> ::Google::Cloud::Firestore::Admin::V1::Field
def get_field(name: nil) -> ::Google::Cloud::Firestore::Admin::V1::Field
Gets the metadata and configuration for a Field.
def get_field(request, options = nil) -> ::Google::Cloud::Firestore::Admin::V1::Field
get_field
via a request object, either of type
GetFieldRequest or an equivalent Hash.
- request (::Google::Cloud::Firestore::Admin::V1::GetFieldRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_field(name: nil) -> ::Google::Cloud::Firestore::Admin::V1::Field
get_field
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. A name of the form
projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Firestore::Admin::V1::Field)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/firestore/admin/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Firestore::Admin::V1::GetFieldRequest.new # Call the get_field method. result = client.get_field request # The returned object is of type Google::Cloud::Firestore::Admin::V1::Field. p result
#get_index
def get_index(request, options = nil) -> ::Google::Cloud::Firestore::Admin::V1::Index
def get_index(name: nil) -> ::Google::Cloud::Firestore::Admin::V1::Index
Gets a composite index.
def get_index(request, options = nil) -> ::Google::Cloud::Firestore::Admin::V1::Index
get_index
via a request object, either of type
GetIndexRequest or an equivalent Hash.
- request (::Google::Cloud::Firestore::Admin::V1::GetIndexRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_index(name: nil) -> ::Google::Cloud::Firestore::Admin::V1::Index
get_index
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. A name of the form
projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Firestore::Admin::V1::Index)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/firestore/admin/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Firestore::Admin::V1::GetIndexRequest.new # Call the get_index method. result = client.get_index request # The returned object is of type Google::Cloud::Firestore::Admin::V1::Index. p result
#import_documents
def import_documents(request, options = nil) -> ::Gapic::Operation
def import_documents(name: nil, collection_ids: nil, input_uri_prefix: nil, namespace_ids: nil) -> ::Gapic::Operation
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.
def import_documents(request, options = nil) -> ::Gapic::Operation
import_documents
via a request object, either of type
ImportDocumentsRequest or an equivalent Hash.
- request (::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def import_documents(name: nil, collection_ids: nil, input_uri_prefix: nil, namespace_ids: nil) -> ::Gapic::Operation
import_documents
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Database to import into. Should be of the form:
projects/{project_id}/databases/{database_id}
. - collection_ids (::Array<::String>) — Which collection ids to import. Unspecified means all collections included in the import. Each collection id in this list must be unique.
- input_uri_prefix (::String) — Location of the exported files. This must match the output_uri_prefix of an ExportDocumentsResponse from an export that has completed successfully. See: google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix.
-
namespace_ids (::Array<::String>) — An empty list represents all namespaces. This is the preferred
usage for databases that don't use namespaces.
An empty string element represents the default namespace. This should be used if the database has data in non-default namespaces, but doesn't want to include them. Each namespace in this list must be unique.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/firestore/admin/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest.new # Call the import_documents method. result = client.import_documents request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#initialize
def initialize() { |config| ... } -> Client
Create a new FirestoreAdmin REST client object.
- (config) — Configure the FirestoreAdmin client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| config.timeout = 10.0 end
#list_backup_schedules
def list_backup_schedules(request, options = nil) -> ::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse
def list_backup_schedules(parent: nil) -> ::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse
List backup schedules.
def list_backup_schedules(request, options = nil) -> ::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse
list_backup_schedules
via a request object, either of type
ListBackupSchedulesRequest or an equivalent Hash.
- request (::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_backup_schedules(parent: nil) -> ::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse
list_backup_schedules
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The parent database.
Format is
projects/{project}/databases/{database}
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/firestore/admin/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest.new # Call the list_backup_schedules method. result = client.list_backup_schedules request # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse. p result
#list_backups
def list_backups(request, options = nil) -> ::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse
def list_backups(parent: nil) -> ::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse
Lists all the backups.
def list_backups(request, options = nil) -> ::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse
list_backups
via a request object, either of type
ListBackupsRequest or an equivalent Hash.
- request (::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_backups(parent: nil) -> ::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse
list_backups
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The location to list backups from.
Format is
projects/{project}/locations/{location}
. Use{location} = '-'
to list backups from all locations for the given project. This allows listing backups from a single location or from all locations.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/firestore/admin/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Firestore::Admin::V1::ListBackupsRequest.new # Call the list_backups method. result = client.list_backups request # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListBackupsResponse. p result
#list_databases
def list_databases(request, options = nil) -> ::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse
def list_databases(parent: nil, show_deleted: nil) -> ::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse
List all the databases in the project.
def list_databases(request, options = nil) -> ::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse
list_databases
via a request object, either of type
ListDatabasesRequest or an equivalent Hash.
- request (::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_databases(parent: nil, show_deleted: nil) -> ::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse
list_databases
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. A parent name of the form
projects/{project_id}
- show_deleted (::Boolean) — If true, also returns deleted resources.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/firestore/admin/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest.new # Call the list_databases method. result = client.list_databases request # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse. p result
#list_fields
def list_fields(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Field>
def list_fields(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Field>
Lists the field configuration and metadata for this database.
Currently,
FirestoreAdmin.ListFields
only supports listing fields that have been explicitly overridden. To issue
this query, call
FirestoreAdmin.ListFields
with the filter set to indexConfig.usesAncestorConfig:false
or
ttlConfig:*
.
def list_fields(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Field>
list_fields
via a request object, either of type
ListFieldsRequest or an equivalent Hash.
- request (::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_fields(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Field>
list_fields
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. A parent name of the form
projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}
-
filter (::String) — The filter to apply to list results. Currently,
FirestoreAdmin.ListFields
only supports listing fields that have been explicitly overridden. To issue
this query, call
FirestoreAdmin.ListFields
with a filter that includes
indexConfig.usesAncestorConfig:false
orttlConfig:*
. - page_size (::Integer) — The number of results to return.
- page_token (::String) — A page token, returned from a previous call to FirestoreAdmin.ListFields, that may be used to get the next page of results.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Field>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Field>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/firestore/admin/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Firestore::Admin::V1::ListFieldsRequest.new # Call the list_fields method. result = client.list_fields request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Firestore::Admin::V1::Field. p item end
#list_indexes
def list_indexes(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Index>
def list_indexes(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Index>
Lists composite indexes.
def list_indexes(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Index>
list_indexes
via a request object, either of type
ListIndexesRequest or an equivalent Hash.
- request (::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_indexes(parent: nil, filter: nil, page_size: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Index>
list_indexes
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. A parent name of the form
projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}
- filter (::String) — The filter to apply to list results.
- page_size (::Integer) — The number of results to return.
- page_token (::String) — A page token, returned from a previous call to FirestoreAdmin.ListIndexes, that may be used to get the next page of results.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Index>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Index>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/firestore/admin/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Firestore::Admin::V1::ListIndexesRequest.new # Call the list_indexes method. result = client.list_indexes request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Firestore::Admin::V1::Index. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#operations_client
def operations_client() -> ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Operations
Get the associated client for long-running operations.
#restore_database
def restore_database(request, options = nil) -> ::Gapic::Operation
def restore_database(parent: nil, database_id: nil, backup: nil) -> ::Gapic::Operation
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.
def restore_database(request, options = nil) -> ::Gapic::Operation
restore_database
via a request object, either of type
RestoreDatabaseRequest or an equivalent Hash.
- request (::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def restore_database(parent: nil, database_id: nil, backup: nil) -> ::Gapic::Operation
restore_database
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The project to restore the database in. Format is
projects/{project_id}
. -
database_id (::String) — Required. The ID to use for the database, which will become the final
component of the database's resource name. This database id must not be
associated with an existing database.
This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/.
"(default)" database id is also valid.
-
backup (::String) — Required. Backup to restore from. Must be from the same project as the
parent.
Format is:
projects/{project_id}/locations/{location}/backups/{backup}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/firestore/admin/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest.new # Call the restore_database method. result = client.restore_database request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#update_backup_schedule
def update_backup_schedule(request, options = nil) -> ::Google::Cloud::Firestore::Admin::V1::BackupSchedule
def update_backup_schedule(backup_schedule: nil, update_mask: nil) -> ::Google::Cloud::Firestore::Admin::V1::BackupSchedule
Updates a backup schedule.
def update_backup_schedule(request, options = nil) -> ::Google::Cloud::Firestore::Admin::V1::BackupSchedule
update_backup_schedule
via a request object, either of type
UpdateBackupScheduleRequest or an equivalent Hash.
- request (::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_backup_schedule(backup_schedule: nil, update_mask: nil) -> ::Google::Cloud::Firestore::Admin::V1::BackupSchedule
update_backup_schedule
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- backup_schedule (::Google::Cloud::Firestore::Admin::V1::BackupSchedule, ::Hash) — Required. The backup schedule to update.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — The list of fields to be updated.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Firestore::Admin::V1::BackupSchedule)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/firestore/admin/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest.new # Call the update_backup_schedule method. result = client.update_backup_schedule request # The returned object is of type Google::Cloud::Firestore::Admin::V1::BackupSchedule. p result
#update_database
def update_database(request, options = nil) -> ::Gapic::Operation
def update_database(database: nil, update_mask: nil) -> ::Gapic::Operation
Updates a database.
def update_database(request, options = nil) -> ::Gapic::Operation
update_database
via a request object, either of type
UpdateDatabaseRequest or an equivalent Hash.
- request (::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_database(database: nil, update_mask: nil) -> ::Gapic::Operation
update_database
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- database (::Google::Cloud::Firestore::Admin::V1::Database, ::Hash) — Required. The database to update.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — The list of fields to be updated.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/firestore/admin/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest.new # Call the update_database method. result = client.update_database request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#update_field
def update_field(request, options = nil) -> ::Gapic::Operation
def update_field(field: nil, update_mask: nil) -> ::Gapic::Operation
Updates a field configuration. Currently, field updates apply only to
single field index configuration. However, calls to
FirestoreAdmin.UpdateField
should provide a field mask to avoid changing any configuration that the
caller isn't aware of. The field mask should be specified as: { paths:
"index_config" }
.
This call returns a google.longrunning.Operation which may be used to track the status of the field update. The metadata for the operation will be the type FieldOperationMetadata.
To configure the default field settings for the database, use
the special Field
with resource name:
projects/{project_id}/databases/{database_id}/collectionGroups/default/fields/*
.
def update_field(request, options = nil) -> ::Gapic::Operation
update_field
via a request object, either of type
UpdateFieldRequest or an equivalent Hash.
- request (::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_field(field: nil, update_mask: nil) -> ::Gapic::Operation
update_field
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- field (::Google::Cloud::Firestore::Admin::V1::Field, ::Hash) — Required. The field to be updated.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — A mask, relative to the field. If specified, only configuration specified by this field_mask will be updated in the field.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/firestore/admin/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest.new # Call the update_field method. result = client.update_field request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end