Cloud Datastore v1 API - Class DatastoreAdmin.DatastoreAdminClient (2.2.0)

public class DatastoreAdmin.DatastoreAdminClient : ClientBase<DatastoreAdmin.DatastoreAdminClient>

Reference documentation and code samples for the Cloud Datastore v1 API class DatastoreAdmin.DatastoreAdminClient.

Client for DatastoreAdmin

Inheritance

object > ClientBase > ClientBaseDatastoreAdminDatastoreAdminClient > DatastoreAdmin.DatastoreAdminClient

Namespace

Google.Cloud.Datastore.Admin.V1

Assembly

Google.Cloud.Datastore.Admin.V1.dll

Constructors

DatastoreAdminClient()

protected DatastoreAdminClient()

Protected parameterless constructor to allow creation of test doubles.

DatastoreAdminClient(CallInvoker)

public DatastoreAdminClient(CallInvoker callInvoker)

Creates a new client for DatastoreAdmin that uses a custom CallInvoker.

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

DatastoreAdminClient(ChannelBase)

public DatastoreAdminClient(ChannelBase channel)

Creates a new client for DatastoreAdmin

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

DatastoreAdminClient(ClientBaseConfiguration)

protected DatastoreAdminClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

The client configuration.

Methods

CreateIndex(CreateIndexRequest, CallOptions)

public virtual Operation CreateIndex(CreateIndexRequest request, CallOptions options)

Creates the specified index. A newly created index's initial state is CREATING. On completion of the returned [google.longrunning.Operation][google.longrunning.Operation], the state will be READY. If the index already exists, the call will return an ALREADY_EXISTS status.

During index creation, the process could result in an error, in which case the index will move to the ERROR state. The process can be recovered by fixing the data that caused the error, removing the index with [delete][google.datastore.admin.v1.DatastoreAdmin.DeleteIndex], then re-creating the index with [create] [google.datastore.admin.v1.DatastoreAdmin.CreateIndex].

Indexes with a single property cannot be created.

Parameters
NameDescription
requestCreateIndexRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

CreateIndex(CreateIndexRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation CreateIndex(CreateIndexRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates the specified index. A newly created index's initial state is CREATING. On completion of the returned [google.longrunning.Operation][google.longrunning.Operation], the state will be READY. If the index already exists, the call will return an ALREADY_EXISTS status.

During index creation, the process could result in an error, in which case the index will move to the ERROR state. The process can be recovered by fixing the data that caused the error, removing the index with [delete][google.datastore.admin.v1.DatastoreAdmin.DeleteIndex], then re-creating the index with [create] [google.datastore.admin.v1.DatastoreAdmin.CreateIndex].

Indexes with a single property cannot be created.

Parameters
NameDescription
requestCreateIndexRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Operation

The response received from the server.

CreateIndexAsync(CreateIndexRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> CreateIndexAsync(CreateIndexRequest request, CallOptions options)

Creates the specified index. A newly created index's initial state is CREATING. On completion of the returned [google.longrunning.Operation][google.longrunning.Operation], the state will be READY. If the index already exists, the call will return an ALREADY_EXISTS status.

During index creation, the process could result in an error, in which case the index will move to the ERROR state. The process can be recovered by fixing the data that caused the error, removing the index with [delete][google.datastore.admin.v1.DatastoreAdmin.DeleteIndex], then re-creating the index with [create] [google.datastore.admin.v1.DatastoreAdmin.CreateIndex].

Indexes with a single property cannot be created.

Parameters
NameDescription
requestCreateIndexRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

CreateIndexAsync(CreateIndexRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> CreateIndexAsync(CreateIndexRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates the specified index. A newly created index's initial state is CREATING. On completion of the returned [google.longrunning.Operation][google.longrunning.Operation], the state will be READY. If the index already exists, the call will return an ALREADY_EXISTS status.

During index creation, the process could result in an error, in which case the index will move to the ERROR state. The process can be recovered by fixing the data that caused the error, removing the index with [delete][google.datastore.admin.v1.DatastoreAdmin.DeleteIndex], then re-creating the index with [create] [google.datastore.admin.v1.DatastoreAdmin.CreateIndex].

Indexes with a single property cannot be created.

Parameters
NameDescription
requestCreateIndexRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

CreateOperationsClient()

public virtual Operations.OperationsClient CreateOperationsClient()

Creates a new instance of Operations.OperationsClient using the same call invoker as this client.

Returns
TypeDescription
OperationsOperationsClient

A new Operations client for the same target as this client.

DeleteIndex(DeleteIndexRequest, CallOptions)

public virtual Operation DeleteIndex(DeleteIndexRequest request, CallOptions options)

Deletes an existing index. An index can only be deleted if it is in a READY or ERROR state. On successful execution of the request, the index will be in a DELETING [state][google.datastore.admin.v1.Index.State]. And on completion of the returned [google.longrunning.Operation][google.longrunning.Operation], the index will be removed.

During index deletion, the process could result in an error, in which case the index will move to the ERROR state. The process can be recovered by fixing the data that caused the error, followed by calling [delete][google.datastore.admin.v1.DatastoreAdmin.DeleteIndex] again.

Parameters
NameDescription
requestDeleteIndexRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

DeleteIndex(DeleteIndexRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation DeleteIndex(DeleteIndexRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes an existing index. An index can only be deleted if it is in a READY or ERROR state. On successful execution of the request, the index will be in a DELETING [state][google.datastore.admin.v1.Index.State]. And on completion of the returned [google.longrunning.Operation][google.longrunning.Operation], the index will be removed.

During index deletion, the process could result in an error, in which case the index will move to the ERROR state. The process can be recovered by fixing the data that caused the error, followed by calling [delete][google.datastore.admin.v1.DatastoreAdmin.DeleteIndex] again.

Parameters
NameDescription
requestDeleteIndexRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Operation

The response received from the server.

DeleteIndexAsync(DeleteIndexRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> DeleteIndexAsync(DeleteIndexRequest request, CallOptions options)

Deletes an existing index. An index can only be deleted if it is in a READY or ERROR state. On successful execution of the request, the index will be in a DELETING [state][google.datastore.admin.v1.Index.State]. And on completion of the returned [google.longrunning.Operation][google.longrunning.Operation], the index will be removed.

During index deletion, the process could result in an error, in which case the index will move to the ERROR state. The process can be recovered by fixing the data that caused the error, followed by calling [delete][google.datastore.admin.v1.DatastoreAdmin.DeleteIndex] again.

Parameters
NameDescription
requestDeleteIndexRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

DeleteIndexAsync(DeleteIndexRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> DeleteIndexAsync(DeleteIndexRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes an existing index. An index can only be deleted if it is in a READY or ERROR state. On successful execution of the request, the index will be in a DELETING [state][google.datastore.admin.v1.Index.State]. And on completion of the returned [google.longrunning.Operation][google.longrunning.Operation], the index will be removed.

During index deletion, the process could result in an error, in which case the index will move to the ERROR state. The process can be recovered by fixing the data that caused the error, followed by calling [delete][google.datastore.admin.v1.DatastoreAdmin.DeleteIndex] again.

Parameters
NameDescription
requestDeleteIndexRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

ExportEntities(ExportEntitiesRequest, CallOptions)

public virtual Operation ExportEntities(ExportEntitiesRequest request, CallOptions options)

Exports a copy of all or a subset of entities from Google Cloud Datastore to another storage system, such as Google Cloud Storage. Recent updates to entities 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.

Parameters
NameDescription
requestExportEntitiesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

ExportEntities(ExportEntitiesRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation ExportEntities(ExportEntitiesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Exports a copy of all or a subset of entities from Google Cloud Datastore to another storage system, such as Google Cloud Storage. Recent updates to entities 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.

Parameters
NameDescription
requestExportEntitiesRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Operation

The response received from the server.

ExportEntitiesAsync(ExportEntitiesRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> ExportEntitiesAsync(ExportEntitiesRequest request, CallOptions options)

Exports a copy of all or a subset of entities from Google Cloud Datastore to another storage system, such as Google Cloud Storage. Recent updates to entities 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.

Parameters
NameDescription
requestExportEntitiesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

ExportEntitiesAsync(ExportEntitiesRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> ExportEntitiesAsync(ExportEntitiesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Exports a copy of all or a subset of entities from Google Cloud Datastore to another storage system, such as Google Cloud Storage. Recent updates to entities 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.

Parameters
NameDescription
requestExportEntitiesRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

GetIndex(GetIndexRequest, CallOptions)

public virtual Index GetIndex(GetIndexRequest request, CallOptions options)

Gets an index.

Parameters
NameDescription
requestGetIndexRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Index

The response received from the server.

GetIndex(GetIndexRequest, Metadata, DateTime?, CancellationToken)

public virtual Index GetIndex(GetIndexRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets an index.

Parameters
NameDescription
requestGetIndexRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Index

The response received from the server.

GetIndexAsync(GetIndexRequest, CallOptions)

public virtual AsyncUnaryCall<Index> GetIndexAsync(GetIndexRequest request, CallOptions options)

Gets an index.

Parameters
NameDescription
requestGetIndexRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallIndex

The call object.

GetIndexAsync(GetIndexRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Index> GetIndexAsync(GetIndexRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets an index.

Parameters
NameDescription
requestGetIndexRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallIndex

The call object.

ImportEntities(ImportEntitiesRequest, CallOptions)

public virtual Operation ImportEntities(ImportEntitiesRequest request, CallOptions options)

Imports entities into Google Cloud Datastore. Existing entities with the same key 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 ImportEntities operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Datastore.

Parameters
NameDescription
requestImportEntitiesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

ImportEntities(ImportEntitiesRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation ImportEntities(ImportEntitiesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Imports entities into Google Cloud Datastore. Existing entities with the same key 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 ImportEntities operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Datastore.

Parameters
NameDescription
requestImportEntitiesRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
Operation

The response received from the server.

ImportEntitiesAsync(ImportEntitiesRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> ImportEntitiesAsync(ImportEntitiesRequest request, CallOptions options)

Imports entities into Google Cloud Datastore. Existing entities with the same key 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 ImportEntities operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Datastore.

Parameters
NameDescription
requestImportEntitiesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

ImportEntitiesAsync(ImportEntitiesRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> ImportEntitiesAsync(ImportEntitiesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Imports entities into Google Cloud Datastore. Existing entities with the same key 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 ImportEntities operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Datastore.

Parameters
NameDescription
requestImportEntitiesRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

ListIndexes(ListIndexesRequest, CallOptions)

public virtual ListIndexesResponse ListIndexes(ListIndexesRequest request, CallOptions options)

Lists the indexes that match the specified filters. Datastore uses an eventually consistent query to fetch the list of indexes and may occasionally return stale results.

Parameters
NameDescription
requestListIndexesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListIndexesResponse

The response received from the server.

ListIndexes(ListIndexesRequest, Metadata, DateTime?, CancellationToken)

public virtual ListIndexesResponse ListIndexes(ListIndexesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists the indexes that match the specified filters. Datastore uses an eventually consistent query to fetch the list of indexes and may occasionally return stale results.

Parameters
NameDescription
requestListIndexesRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
ListIndexesResponse

The response received from the server.

ListIndexesAsync(ListIndexesRequest, CallOptions)

public virtual AsyncUnaryCall<ListIndexesResponse> ListIndexesAsync(ListIndexesRequest request, CallOptions options)

Lists the indexes that match the specified filters. Datastore uses an eventually consistent query to fetch the list of indexes and may occasionally return stale results.

Parameters
NameDescription
requestListIndexesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListIndexesResponse

The call object.

ListIndexesAsync(ListIndexesRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListIndexesResponse> ListIndexesAsync(ListIndexesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists the indexes that match the specified filters. Datastore uses an eventually consistent query to fetch the list of indexes and may occasionally return stale results.

Parameters
NameDescription
requestListIndexesRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineDateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCallListIndexesResponse

The call object.

NewInstance(ClientBaseConfiguration)

protected override DatastoreAdmin.DatastoreAdminClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
DatastoreAdminDatastoreAdminClient
Overrides