Google Cloud Spanner Database Administration v1 API - Class DatabaseAdmin.DatabaseAdminClient (4.4.0)

public class DatabaseAdmin.DatabaseAdminClient : ClientBase<DatabaseAdmin.DatabaseAdminClient>

Reference documentation and code samples for the Google Cloud Spanner Database Administration v1 API class DatabaseAdmin.DatabaseAdminClient.

Client for DatabaseAdmin

Inheritance

object > ClientBase > ClientBaseDatabaseAdminDatabaseAdminClient > DatabaseAdmin.DatabaseAdminClient

Namespace

GoogleCloudGoogle.Cloud.SpannerGoogle.Cloud.Spanner.AdminGoogle.Cloud.Spanner.Admin.DatabaseV1

Assembly

Google.Cloud.Spanner.Admin.Database.V1.dll

Constructors

DatabaseAdminClient()

protected DatabaseAdminClient()

Protected parameterless constructor to allow creation of test doubles.

DatabaseAdminClient(CallInvoker)

public DatabaseAdminClient(CallInvoker callInvoker)

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

Parameter
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

DatabaseAdminClient(ChannelBase)

public DatabaseAdminClient(ChannelBase channel)

Creates a new client for DatabaseAdmin

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

DatabaseAdminClient(ClientBaseConfiguration)

protected DatabaseAdminClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

The client configuration.

Methods

CopyBackup(CopyBackupRequest, CallOptions)

public virtual Operation CopyBackup(CopyBackupRequest request, CallOptions options)

Starts copying a Cloud Spanner Backup. The returned backup [long-running operation][google.longrunning.Operation] will have a name of the format projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id> and can be used to track copying of the backup. The operation is associated with the destination backup. The [metadata][google.longrunning.Operation.metadata] field type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. The [response][google.longrunning.Operation.response] field type is [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned operation will stop the copying and delete the backup. Concurrent CopyBackup requests can run on the same source backup.

Parameters
NameDescription
requestCopyBackupRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

CopyBackup(CopyBackupRequest, Metadata, DateTime?, CancellationToken)

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

Starts copying a Cloud Spanner Backup. The returned backup [long-running operation][google.longrunning.Operation] will have a name of the format projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id> and can be used to track copying of the backup. The operation is associated with the destination backup. The [metadata][google.longrunning.Operation.metadata] field type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. The [response][google.longrunning.Operation.response] field type is [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned operation will stop the copying and delete the backup. Concurrent CopyBackup requests can run on the same source backup.

Parameters
NameDescription
requestCopyBackupRequest

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.

CopyBackupAsync(CopyBackupRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> CopyBackupAsync(CopyBackupRequest request, CallOptions options)

Starts copying a Cloud Spanner Backup. The returned backup [long-running operation][google.longrunning.Operation] will have a name of the format projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id> and can be used to track copying of the backup. The operation is associated with the destination backup. The [metadata][google.longrunning.Operation.metadata] field type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. The [response][google.longrunning.Operation.response] field type is [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned operation will stop the copying and delete the backup. Concurrent CopyBackup requests can run on the same source backup.

Parameters
NameDescription
requestCopyBackupRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

CopyBackupAsync(CopyBackupRequest, Metadata, DateTime?, CancellationToken)

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

Starts copying a Cloud Spanner Backup. The returned backup [long-running operation][google.longrunning.Operation] will have a name of the format projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id> and can be used to track copying of the backup. The operation is associated with the destination backup. The [metadata][google.longrunning.Operation.metadata] field type is [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]. The [response][google.longrunning.Operation.response] field type is [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned operation will stop the copying and delete the backup. Concurrent CopyBackup requests can run on the same source backup.

Parameters
NameDescription
requestCopyBackupRequest

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.

CreateBackup(CreateBackupRequest, CallOptions)

public virtual Operation CreateBackup(CreateBackupRequest request, CallOptions options)

Starts creating a new Cloud Spanner Backup. The returned backup [long-running operation][google.longrunning.Operation] will have a name of the format projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id> and can be used to track creation of the backup. The [metadata][google.longrunning.Operation.metadata] field type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. The [response][google.longrunning.Operation.response] field type is [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned operation will stop the creation and delete the backup. There can be only one pending backup creation per database. Backup creation of different databases can run concurrently.

Parameters
NameDescription
requestCreateBackupRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

CreateBackup(CreateBackupRequest, Metadata, DateTime?, CancellationToken)

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

Starts creating a new Cloud Spanner Backup. The returned backup [long-running operation][google.longrunning.Operation] will have a name of the format projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id> and can be used to track creation of the backup. The [metadata][google.longrunning.Operation.metadata] field type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. The [response][google.longrunning.Operation.response] field type is [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned operation will stop the creation and delete the backup. There can be only one pending backup creation per database. Backup creation of different databases can run concurrently.

Parameters
NameDescription
requestCreateBackupRequest

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.

CreateBackupAsync(CreateBackupRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> CreateBackupAsync(CreateBackupRequest request, CallOptions options)

Starts creating a new Cloud Spanner Backup. The returned backup [long-running operation][google.longrunning.Operation] will have a name of the format projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id> and can be used to track creation of the backup. The [metadata][google.longrunning.Operation.metadata] field type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. The [response][google.longrunning.Operation.response] field type is [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned operation will stop the creation and delete the backup. There can be only one pending backup creation per database. Backup creation of different databases can run concurrently.

Parameters
NameDescription
requestCreateBackupRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

CreateBackupAsync(CreateBackupRequest, Metadata, DateTime?, CancellationToken)

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

Starts creating a new Cloud Spanner Backup. The returned backup [long-running operation][google.longrunning.Operation] will have a name of the format projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id> and can be used to track creation of the backup. The [metadata][google.longrunning.Operation.metadata] field type is [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]. The [response][google.longrunning.Operation.response] field type is [Backup][google.spanner.admin.database.v1.Backup], if successful. Cancelling the returned operation will stop the creation and delete the backup. There can be only one pending backup creation per database. Backup creation of different databases can run concurrently.

Parameters
NameDescription
requestCreateBackupRequest

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.

CreateDatabase(CreateDatabaseRequest, CallOptions)

public virtual Operation CreateDatabase(CreateDatabaseRequest request, CallOptions options)

Creates a new Cloud Spanner database and starts to prepare it for serving. The returned [long-running operation][google.longrunning.Operation] will have a name of the format <database_name>/operations/<operation_id> and can be used to track preparation of the database. The [metadata][google.longrunning.Operation.metadata] field type is [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The [response][google.longrunning.Operation.response] field type is [Database][google.spanner.admin.database.v1.Database], if successful.

Parameters
NameDescription
requestCreateDatabaseRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

CreateDatabase(CreateDatabaseRequest, Metadata, DateTime?, CancellationToken)

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

Creates a new Cloud Spanner database and starts to prepare it for serving. The returned [long-running operation][google.longrunning.Operation] will have a name of the format <database_name>/operations/<operation_id> and can be used to track preparation of the database. The [metadata][google.longrunning.Operation.metadata] field type is [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The [response][google.longrunning.Operation.response] field type is [Database][google.spanner.admin.database.v1.Database], if successful.

Parameters
NameDescription
requestCreateDatabaseRequest

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.

CreateDatabaseAsync(CreateDatabaseRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> CreateDatabaseAsync(CreateDatabaseRequest request, CallOptions options)

Creates a new Cloud Spanner database and starts to prepare it for serving. The returned [long-running operation][google.longrunning.Operation] will have a name of the format <database_name>/operations/<operation_id> and can be used to track preparation of the database. The [metadata][google.longrunning.Operation.metadata] field type is [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The [response][google.longrunning.Operation.response] field type is [Database][google.spanner.admin.database.v1.Database], if successful.

Parameters
NameDescription
requestCreateDatabaseRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

CreateDatabaseAsync(CreateDatabaseRequest, Metadata, DateTime?, CancellationToken)

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

Creates a new Cloud Spanner database and starts to prepare it for serving. The returned [long-running operation][google.longrunning.Operation] will have a name of the format <database_name>/operations/<operation_id> and can be used to track preparation of the database. The [metadata][google.longrunning.Operation.metadata] field type is [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata]. The [response][google.longrunning.Operation.response] field type is [Database][google.spanner.admin.database.v1.Database], if successful.

Parameters
NameDescription
requestCreateDatabaseRequest

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.

DeleteBackup(DeleteBackupRequest, CallOptions)

public virtual Empty DeleteBackup(DeleteBackupRequest request, CallOptions options)

Deletes a pending or completed [Backup][google.spanner.admin.database.v1.Backup].

Parameters
NameDescription
requestDeleteBackupRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Empty

The response received from the server.

DeleteBackup(DeleteBackupRequest, Metadata, DateTime?, CancellationToken)

public virtual Empty DeleteBackup(DeleteBackupRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes a pending or completed [Backup][google.spanner.admin.database.v1.Backup].

Parameters
NameDescription
requestDeleteBackupRequest

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
Empty

The response received from the server.

DeleteBackupAsync(DeleteBackupRequest, CallOptions)

public virtual AsyncUnaryCall<Empty> DeleteBackupAsync(DeleteBackupRequest request, CallOptions options)

Deletes a pending or completed [Backup][google.spanner.admin.database.v1.Backup].

Parameters
NameDescription
requestDeleteBackupRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallEmpty

The call object.

DeleteBackupAsync(DeleteBackupRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Empty> DeleteBackupAsync(DeleteBackupRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes a pending or completed [Backup][google.spanner.admin.database.v1.Backup].

Parameters
NameDescription
requestDeleteBackupRequest

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
AsyncUnaryCallEmpty

The call object.

DropDatabase(DropDatabaseRequest, CallOptions)

public virtual Empty DropDatabase(DropDatabaseRequest request, CallOptions options)

Drops (aka deletes) a Cloud Spanner database. Completed backups for the database will be retained according to their expire_time. Note: Cloud Spanner might continue to accept requests for a few seconds after the database has been deleted.

Parameters
NameDescription
requestDropDatabaseRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Empty

The response received from the server.

DropDatabase(DropDatabaseRequest, Metadata, DateTime?, CancellationToken)

public virtual Empty DropDatabase(DropDatabaseRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Drops (aka deletes) a Cloud Spanner database. Completed backups for the database will be retained according to their expire_time. Note: Cloud Spanner might continue to accept requests for a few seconds after the database has been deleted.

Parameters
NameDescription
requestDropDatabaseRequest

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
Empty

The response received from the server.

DropDatabaseAsync(DropDatabaseRequest, CallOptions)

public virtual AsyncUnaryCall<Empty> DropDatabaseAsync(DropDatabaseRequest request, CallOptions options)

Drops (aka deletes) a Cloud Spanner database. Completed backups for the database will be retained according to their expire_time. Note: Cloud Spanner might continue to accept requests for a few seconds after the database has been deleted.

Parameters
NameDescription
requestDropDatabaseRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallEmpty

The call object.

DropDatabaseAsync(DropDatabaseRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Empty> DropDatabaseAsync(DropDatabaseRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Drops (aka deletes) a Cloud Spanner database. Completed backups for the database will be retained according to their expire_time. Note: Cloud Spanner might continue to accept requests for a few seconds after the database has been deleted.

Parameters
NameDescription
requestDropDatabaseRequest

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
AsyncUnaryCallEmpty

The call object.

GetBackup(GetBackupRequest, CallOptions)

public virtual Backup GetBackup(GetBackupRequest request, CallOptions options)

Gets metadata on a pending or completed [Backup][google.spanner.admin.database.v1.Backup].

Parameters
NameDescription
requestGetBackupRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Backup

The response received from the server.

GetBackup(GetBackupRequest, Metadata, DateTime?, CancellationToken)

public virtual Backup GetBackup(GetBackupRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets metadata on a pending or completed [Backup][google.spanner.admin.database.v1.Backup].

Parameters
NameDescription
requestGetBackupRequest

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
Backup

The response received from the server.

GetBackupAsync(GetBackupRequest, CallOptions)

public virtual AsyncUnaryCall<Backup> GetBackupAsync(GetBackupRequest request, CallOptions options)

Gets metadata on a pending or completed [Backup][google.spanner.admin.database.v1.Backup].

Parameters
NameDescription
requestGetBackupRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallBackup

The call object.

GetBackupAsync(GetBackupRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Backup> GetBackupAsync(GetBackupRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets metadata on a pending or completed [Backup][google.spanner.admin.database.v1.Backup].

Parameters
NameDescription
requestGetBackupRequest

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
AsyncUnaryCallBackup

The call object.

GetDatabase(GetDatabaseRequest, CallOptions)

public virtual Database GetDatabase(GetDatabaseRequest request, CallOptions options)

Gets the state of a Cloud Spanner database.

Parameters
NameDescription
requestGetDatabaseRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Database

The response received from the server.

GetDatabase(GetDatabaseRequest, Metadata, DateTime?, CancellationToken)

public virtual Database GetDatabase(GetDatabaseRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets the state of a Cloud Spanner database.

Parameters
NameDescription
requestGetDatabaseRequest

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
Database

The response received from the server.

GetDatabaseAsync(GetDatabaseRequest, CallOptions)

public virtual AsyncUnaryCall<Database> GetDatabaseAsync(GetDatabaseRequest request, CallOptions options)

Gets the state of a Cloud Spanner database.

Parameters
NameDescription
requestGetDatabaseRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallDatabase

The call object.

GetDatabaseAsync(GetDatabaseRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Database> GetDatabaseAsync(GetDatabaseRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets the state of a Cloud Spanner database.

Parameters
NameDescription
requestGetDatabaseRequest

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
AsyncUnaryCallDatabase

The call object.

GetDatabaseDdl(GetDatabaseDdlRequest, CallOptions)

public virtual GetDatabaseDdlResponse GetDatabaseDdl(GetDatabaseDdlRequest request, CallOptions options)

Returns the schema of a Cloud Spanner database as a list of formatted DDL statements. This method does not show pending schema updates, those may be queried using the [Operations][google.longrunning.Operations] API.

Parameters
NameDescription
requestGetDatabaseDdlRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
GetDatabaseDdlResponse

The response received from the server.

GetDatabaseDdl(GetDatabaseDdlRequest, Metadata, DateTime?, CancellationToken)

public virtual GetDatabaseDdlResponse GetDatabaseDdl(GetDatabaseDdlRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns the schema of a Cloud Spanner database as a list of formatted DDL statements. This method does not show pending schema updates, those may be queried using the [Operations][google.longrunning.Operations] API.

Parameters
NameDescription
requestGetDatabaseDdlRequest

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
GetDatabaseDdlResponse

The response received from the server.

GetDatabaseDdlAsync(GetDatabaseDdlRequest, CallOptions)

public virtual AsyncUnaryCall<GetDatabaseDdlResponse> GetDatabaseDdlAsync(GetDatabaseDdlRequest request, CallOptions options)

Returns the schema of a Cloud Spanner database as a list of formatted DDL statements. This method does not show pending schema updates, those may be queried using the [Operations][google.longrunning.Operations] API.

Parameters
NameDescription
requestGetDatabaseDdlRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallGetDatabaseDdlResponse

The call object.

GetDatabaseDdlAsync(GetDatabaseDdlRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<GetDatabaseDdlResponse> GetDatabaseDdlAsync(GetDatabaseDdlRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns the schema of a Cloud Spanner database as a list of formatted DDL statements. This method does not show pending schema updates, those may be queried using the [Operations][google.longrunning.Operations] API.

Parameters
NameDescription
requestGetDatabaseDdlRequest

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
AsyncUnaryCallGetDatabaseDdlResponse

The call object.

GetIamPolicy(GetIamPolicyRequest, CallOptions)

public virtual Policy GetIamPolicy(GetIamPolicyRequest request, CallOptions options)

Gets the access control policy for a database or backup resource. Returns an empty policy if a database or backup exists but does not have a policy set.

Authorization requires spanner.databases.getIamPolicy permission on [resource][google.iam.v1.GetIamPolicyRequest.resource]. For backups, authorization requires spanner.backups.getIamPolicy permission on [resource][google.iam.v1.GetIamPolicyRequest.resource].

Parameters
NameDescription
requestGetIamPolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Policy

The response received from the server.

GetIamPolicy(GetIamPolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual Policy GetIamPolicy(GetIamPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets the access control policy for a database or backup resource. Returns an empty policy if a database or backup exists but does not have a policy set.

Authorization requires spanner.databases.getIamPolicy permission on [resource][google.iam.v1.GetIamPolicyRequest.resource]. For backups, authorization requires spanner.backups.getIamPolicy permission on [resource][google.iam.v1.GetIamPolicyRequest.resource].

Parameters
NameDescription
requestGetIamPolicyRequest

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
Policy

The response received from the server.

GetIamPolicyAsync(GetIamPolicyRequest, CallOptions)

public virtual AsyncUnaryCall<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CallOptions options)

Gets the access control policy for a database or backup resource. Returns an empty policy if a database or backup exists but does not have a policy set.

Authorization requires spanner.databases.getIamPolicy permission on [resource][google.iam.v1.GetIamPolicyRequest.resource]. For backups, authorization requires spanner.backups.getIamPolicy permission on [resource][google.iam.v1.GetIamPolicyRequest.resource].

Parameters
NameDescription
requestGetIamPolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallPolicy

The call object.

GetIamPolicyAsync(GetIamPolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets the access control policy for a database or backup resource. Returns an empty policy if a database or backup exists but does not have a policy set.

Authorization requires spanner.databases.getIamPolicy permission on [resource][google.iam.v1.GetIamPolicyRequest.resource]. For backups, authorization requires spanner.backups.getIamPolicy permission on [resource][google.iam.v1.GetIamPolicyRequest.resource].

Parameters
NameDescription
requestGetIamPolicyRequest

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
AsyncUnaryCallPolicy

The call object.

ListBackupOperations(ListBackupOperationsRequest, CallOptions)

public virtual ListBackupOperationsResponse ListBackupOperations(ListBackupOperationsRequest request, CallOptions options)

Lists the backup [long-running operations][google.longrunning.Operation] in the given instance. A backup operation has a name of the form projects/<project>/instances/<instance>/backups/<backup>/operations/<operation>. The long-running operation [metadata][google.longrunning.Operation.metadata] field type metadata.type_url describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations. Operations returned are ordered by operation.metadata.value.progress.start_time in descending order starting from the most recently started operation.

Parameters
NameDescription
requestListBackupOperationsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListBackupOperationsResponse

The response received from the server.

ListBackupOperations(ListBackupOperationsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListBackupOperationsResponse ListBackupOperations(ListBackupOperationsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists the backup [long-running operations][google.longrunning.Operation] in the given instance. A backup operation has a name of the form projects/<project>/instances/<instance>/backups/<backup>/operations/<operation>. The long-running operation [metadata][google.longrunning.Operation.metadata] field type metadata.type_url describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations. Operations returned are ordered by operation.metadata.value.progress.start_time in descending order starting from the most recently started operation.

Parameters
NameDescription
requestListBackupOperationsRequest

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
ListBackupOperationsResponse

The response received from the server.

ListBackupOperationsAsync(ListBackupOperationsRequest, CallOptions)

public virtual AsyncUnaryCall<ListBackupOperationsResponse> ListBackupOperationsAsync(ListBackupOperationsRequest request, CallOptions options)

Lists the backup [long-running operations][google.longrunning.Operation] in the given instance. A backup operation has a name of the form projects/<project>/instances/<instance>/backups/<backup>/operations/<operation>. The long-running operation [metadata][google.longrunning.Operation.metadata] field type metadata.type_url describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations. Operations returned are ordered by operation.metadata.value.progress.start_time in descending order starting from the most recently started operation.

Parameters
NameDescription
requestListBackupOperationsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListBackupOperationsResponse

The call object.

ListBackupOperationsAsync(ListBackupOperationsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListBackupOperationsResponse> ListBackupOperationsAsync(ListBackupOperationsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists the backup [long-running operations][google.longrunning.Operation] in the given instance. A backup operation has a name of the form projects/<project>/instances/<instance>/backups/<backup>/operations/<operation>. The long-running operation [metadata][google.longrunning.Operation.metadata] field type metadata.type_url describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations. Operations returned are ordered by operation.metadata.value.progress.start_time in descending order starting from the most recently started operation.

Parameters
NameDescription
requestListBackupOperationsRequest

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
AsyncUnaryCallListBackupOperationsResponse

The call object.

ListBackups(ListBackupsRequest, CallOptions)

public virtual ListBackupsResponse ListBackups(ListBackupsRequest request, CallOptions options)

Lists completed and pending backups. Backups returned are ordered by create_time in descending order, starting from the most recent create_time.

Parameters
NameDescription
requestListBackupsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListBackupsResponse

The response received from the server.

ListBackups(ListBackupsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListBackupsResponse ListBackups(ListBackupsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists completed and pending backups. Backups returned are ordered by create_time in descending order, starting from the most recent create_time.

Parameters
NameDescription
requestListBackupsRequest

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
ListBackupsResponse

The response received from the server.

ListBackupsAsync(ListBackupsRequest, CallOptions)

public virtual AsyncUnaryCall<ListBackupsResponse> ListBackupsAsync(ListBackupsRequest request, CallOptions options)

Lists completed and pending backups. Backups returned are ordered by create_time in descending order, starting from the most recent create_time.

Parameters
NameDescription
requestListBackupsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListBackupsResponse

The call object.

ListBackupsAsync(ListBackupsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListBackupsResponse> ListBackupsAsync(ListBackupsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists completed and pending backups. Backups returned are ordered by create_time in descending order, starting from the most recent create_time.

Parameters
NameDescription
requestListBackupsRequest

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
AsyncUnaryCallListBackupsResponse

The call object.

ListDatabaseOperations(ListDatabaseOperationsRequest, CallOptions)

public virtual ListDatabaseOperationsResponse ListDatabaseOperations(ListDatabaseOperationsRequest request, CallOptions options)

Lists database [longrunning-operations][google.longrunning.Operation]. A database operation has a name of the form projects/<project>/instances/<instance>/databases/<database>/operations/<operation>. The long-running operation [metadata][google.longrunning.Operation.metadata] field type metadata.type_url describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations.

Parameters
NameDescription
requestListDatabaseOperationsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListDatabaseOperationsResponse

The response received from the server.

ListDatabaseOperations(ListDatabaseOperationsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListDatabaseOperationsResponse ListDatabaseOperations(ListDatabaseOperationsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists database [longrunning-operations][google.longrunning.Operation]. A database operation has a name of the form projects/<project>/instances/<instance>/databases/<database>/operations/<operation>. The long-running operation [metadata][google.longrunning.Operation.metadata] field type metadata.type_url describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations.

Parameters
NameDescription
requestListDatabaseOperationsRequest

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
ListDatabaseOperationsResponse

The response received from the server.

ListDatabaseOperationsAsync(ListDatabaseOperationsRequest, CallOptions)

public virtual AsyncUnaryCall<ListDatabaseOperationsResponse> ListDatabaseOperationsAsync(ListDatabaseOperationsRequest request, CallOptions options)

Lists database [longrunning-operations][google.longrunning.Operation]. A database operation has a name of the form projects/<project>/instances/<instance>/databases/<database>/operations/<operation>. The long-running operation [metadata][google.longrunning.Operation.metadata] field type metadata.type_url describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations.

Parameters
NameDescription
requestListDatabaseOperationsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListDatabaseOperationsResponse

The call object.

ListDatabaseOperationsAsync(ListDatabaseOperationsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListDatabaseOperationsResponse> ListDatabaseOperationsAsync(ListDatabaseOperationsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists database [longrunning-operations][google.longrunning.Operation]. A database operation has a name of the form projects/<project>/instances/<instance>/databases/<database>/operations/<operation>. The long-running operation [metadata][google.longrunning.Operation.metadata] field type metadata.type_url describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations.

Parameters
NameDescription
requestListDatabaseOperationsRequest

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
AsyncUnaryCallListDatabaseOperationsResponse

The call object.

ListDatabaseRoles(ListDatabaseRolesRequest, CallOptions)

public virtual ListDatabaseRolesResponse ListDatabaseRoles(ListDatabaseRolesRequest request, CallOptions options)

Lists Cloud Spanner database roles.

Parameters
NameDescription
requestListDatabaseRolesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListDatabaseRolesResponse

The response received from the server.

ListDatabaseRoles(ListDatabaseRolesRequest, Metadata, DateTime?, CancellationToken)

public virtual ListDatabaseRolesResponse ListDatabaseRoles(ListDatabaseRolesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists Cloud Spanner database roles.

Parameters
NameDescription
requestListDatabaseRolesRequest

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
ListDatabaseRolesResponse

The response received from the server.

ListDatabaseRolesAsync(ListDatabaseRolesRequest, CallOptions)

public virtual AsyncUnaryCall<ListDatabaseRolesResponse> ListDatabaseRolesAsync(ListDatabaseRolesRequest request, CallOptions options)

Lists Cloud Spanner database roles.

Parameters
NameDescription
requestListDatabaseRolesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListDatabaseRolesResponse

The call object.

ListDatabaseRolesAsync(ListDatabaseRolesRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListDatabaseRolesResponse> ListDatabaseRolesAsync(ListDatabaseRolesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists Cloud Spanner database roles.

Parameters
NameDescription
requestListDatabaseRolesRequest

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
AsyncUnaryCallListDatabaseRolesResponse

The call object.

ListDatabases(ListDatabasesRequest, CallOptions)

public virtual ListDatabasesResponse ListDatabases(ListDatabasesRequest request, CallOptions options)

Lists Cloud Spanner databases.

Parameters
NameDescription
requestListDatabasesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListDatabasesResponse

The response received from the server.

ListDatabases(ListDatabasesRequest, Metadata, DateTime?, CancellationToken)

public virtual ListDatabasesResponse ListDatabases(ListDatabasesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists Cloud Spanner databases.

Parameters
NameDescription
requestListDatabasesRequest

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
ListDatabasesResponse

The response received from the server.

ListDatabasesAsync(ListDatabasesRequest, CallOptions)

public virtual AsyncUnaryCall<ListDatabasesResponse> ListDatabasesAsync(ListDatabasesRequest request, CallOptions options)

Lists Cloud Spanner databases.

Parameters
NameDescription
requestListDatabasesRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallListDatabasesResponse

The call object.

ListDatabasesAsync(ListDatabasesRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListDatabasesResponse> ListDatabasesAsync(ListDatabasesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists Cloud Spanner databases.

Parameters
NameDescription
requestListDatabasesRequest

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
AsyncUnaryCallListDatabasesResponse

The call object.

NewInstance(ClientBaseConfiguration)

protected override DatabaseAdmin.DatabaseAdminClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
DatabaseAdminDatabaseAdminClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.Spanner.Admin.Database.V1.DatabaseAdmin.DatabaseAdminClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

RestoreDatabase(RestoreDatabaseRequest, CallOptions)

public virtual Operation RestoreDatabase(RestoreDatabaseRequest request, CallOptions options)

Create a new database by restoring from a completed backup. The new database must be in the same project and in an instance with the same instance configuration as the instance containing the backup. The returned database [long-running operation][google.longrunning.Operation] has a name of the format projects/<project>/instances/<instance>/databases/<database>/operations/<operation_id>, and can be used to track the progress of the operation, and to cancel it. The [metadata][google.longrunning.Operation.metadata] field type is [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. The [response][google.longrunning.Operation.response] type is [Database][google.spanner.admin.database.v1.Database], if successful. Cancelling the returned operation will stop the restore and delete the database. There can be only one database being restored into an instance at a time. Once the restore operation completes, a new restore operation can be initiated, without waiting for the optimize operation associated with the first restore to complete.

Parameters
NameDescription
requestRestoreDatabaseRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

RestoreDatabase(RestoreDatabaseRequest, Metadata, DateTime?, CancellationToken)

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

Create a new database by restoring from a completed backup. The new database must be in the same project and in an instance with the same instance configuration as the instance containing the backup. The returned database [long-running operation][google.longrunning.Operation] has a name of the format projects/<project>/instances/<instance>/databases/<database>/operations/<operation_id>, and can be used to track the progress of the operation, and to cancel it. The [metadata][google.longrunning.Operation.metadata] field type is [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. The [response][google.longrunning.Operation.response] type is [Database][google.spanner.admin.database.v1.Database], if successful. Cancelling the returned operation will stop the restore and delete the database. There can be only one database being restored into an instance at a time. Once the restore operation completes, a new restore operation can be initiated, without waiting for the optimize operation associated with the first restore to complete.

Parameters
NameDescription
requestRestoreDatabaseRequest

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.

RestoreDatabaseAsync(RestoreDatabaseRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> RestoreDatabaseAsync(RestoreDatabaseRequest request, CallOptions options)

Create a new database by restoring from a completed backup. The new database must be in the same project and in an instance with the same instance configuration as the instance containing the backup. The returned database [long-running operation][google.longrunning.Operation] has a name of the format projects/<project>/instances/<instance>/databases/<database>/operations/<operation_id>, and can be used to track the progress of the operation, and to cancel it. The [metadata][google.longrunning.Operation.metadata] field type is [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. The [response][google.longrunning.Operation.response] type is [Database][google.spanner.admin.database.v1.Database], if successful. Cancelling the returned operation will stop the restore and delete the database. There can be only one database being restored into an instance at a time. Once the restore operation completes, a new restore operation can be initiated, without waiting for the optimize operation associated with the first restore to complete.

Parameters
NameDescription
requestRestoreDatabaseRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

RestoreDatabaseAsync(RestoreDatabaseRequest, Metadata, DateTime?, CancellationToken)

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

Create a new database by restoring from a completed backup. The new database must be in the same project and in an instance with the same instance configuration as the instance containing the backup. The returned database [long-running operation][google.longrunning.Operation] has a name of the format projects/<project>/instances/<instance>/databases/<database>/operations/<operation_id>, and can be used to track the progress of the operation, and to cancel it. The [metadata][google.longrunning.Operation.metadata] field type is [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata]. The [response][google.longrunning.Operation.response] type is [Database][google.spanner.admin.database.v1.Database], if successful. Cancelling the returned operation will stop the restore and delete the database. There can be only one database being restored into an instance at a time. Once the restore operation completes, a new restore operation can be initiated, without waiting for the optimize operation associated with the first restore to complete.

Parameters
NameDescription
requestRestoreDatabaseRequest

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.

SetIamPolicy(SetIamPolicyRequest, CallOptions)

public virtual Policy SetIamPolicy(SetIamPolicyRequest request, CallOptions options)

Sets the access control policy on a database or backup resource. Replaces any existing policy.

Authorization requires spanner.databases.setIamPolicy permission on [resource][google.iam.v1.SetIamPolicyRequest.resource]. For backups, authorization requires spanner.backups.setIamPolicy permission on [resource][google.iam.v1.SetIamPolicyRequest.resource].

Parameters
NameDescription
requestSetIamPolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Policy

The response received from the server.

SetIamPolicy(SetIamPolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual Policy SetIamPolicy(SetIamPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Sets the access control policy on a database or backup resource. Replaces any existing policy.

Authorization requires spanner.databases.setIamPolicy permission on [resource][google.iam.v1.SetIamPolicyRequest.resource]. For backups, authorization requires spanner.backups.setIamPolicy permission on [resource][google.iam.v1.SetIamPolicyRequest.resource].

Parameters
NameDescription
requestSetIamPolicyRequest

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
Policy

The response received from the server.

SetIamPolicyAsync(SetIamPolicyRequest, CallOptions)

public virtual AsyncUnaryCall<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CallOptions options)

Sets the access control policy on a database or backup resource. Replaces any existing policy.

Authorization requires spanner.databases.setIamPolicy permission on [resource][google.iam.v1.SetIamPolicyRequest.resource]. For backups, authorization requires spanner.backups.setIamPolicy permission on [resource][google.iam.v1.SetIamPolicyRequest.resource].

Parameters
NameDescription
requestSetIamPolicyRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallPolicy

The call object.

SetIamPolicyAsync(SetIamPolicyRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Sets the access control policy on a database or backup resource. Replaces any existing policy.

Authorization requires spanner.databases.setIamPolicy permission on [resource][google.iam.v1.SetIamPolicyRequest.resource]. For backups, authorization requires spanner.backups.setIamPolicy permission on [resource][google.iam.v1.SetIamPolicyRequest.resource].

Parameters
NameDescription
requestSetIamPolicyRequest

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
AsyncUnaryCallPolicy

The call object.

TestIamPermissions(TestIamPermissionsRequest, CallOptions)

public virtual TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, CallOptions options)

Returns permissions that the caller has on the specified database or backup resource.

Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has spanner.databases.list permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not exist will result in a NOT_FOUND error if the user has spanner.backups.list permission on the containing instance.

Parameters
NameDescription
requestTestIamPermissionsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
TestIamPermissionsResponse

The response received from the server.

TestIamPermissions(TestIamPermissionsRequest, Metadata, DateTime?, CancellationToken)

public virtual TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns permissions that the caller has on the specified database or backup resource.

Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has spanner.databases.list permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not exist will result in a NOT_FOUND error if the user has spanner.backups.list permission on the containing instance.

Parameters
NameDescription
requestTestIamPermissionsRequest

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
TestIamPermissionsResponse

The response received from the server.

TestIamPermissionsAsync(TestIamPermissionsRequest, CallOptions)

public virtual AsyncUnaryCall<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CallOptions options)

Returns permissions that the caller has on the specified database or backup resource.

Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has spanner.databases.list permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not exist will result in a NOT_FOUND error if the user has spanner.backups.list permission on the containing instance.

Parameters
NameDescription
requestTestIamPermissionsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallTestIamPermissionsResponse

The call object.

TestIamPermissionsAsync(TestIamPermissionsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns permissions that the caller has on the specified database or backup resource.

Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has spanner.databases.list permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not exist will result in a NOT_FOUND error if the user has spanner.backups.list permission on the containing instance.

Parameters
NameDescription
requestTestIamPermissionsRequest

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
AsyncUnaryCallTestIamPermissionsResponse

The call object.

UpdateBackup(UpdateBackupRequest, CallOptions)

public virtual Backup UpdateBackup(UpdateBackupRequest request, CallOptions options)

Updates a pending or completed [Backup][google.spanner.admin.database.v1.Backup].

Parameters
NameDescription
requestUpdateBackupRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Backup

The response received from the server.

UpdateBackup(UpdateBackupRequest, Metadata, DateTime?, CancellationToken)

public virtual Backup UpdateBackup(UpdateBackupRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates a pending or completed [Backup][google.spanner.admin.database.v1.Backup].

Parameters
NameDescription
requestUpdateBackupRequest

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
Backup

The response received from the server.

UpdateBackupAsync(UpdateBackupRequest, CallOptions)

public virtual AsyncUnaryCall<Backup> UpdateBackupAsync(UpdateBackupRequest request, CallOptions options)

Updates a pending or completed [Backup][google.spanner.admin.database.v1.Backup].

Parameters
NameDescription
requestUpdateBackupRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallBackup

The call object.

UpdateBackupAsync(UpdateBackupRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Backup> UpdateBackupAsync(UpdateBackupRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates a pending or completed [Backup][google.spanner.admin.database.v1.Backup].

Parameters
NameDescription
requestUpdateBackupRequest

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
AsyncUnaryCallBackup

The call object.

UpdateDatabaseDdl(UpdateDatabaseDdlRequest, CallOptions)

public virtual Operation UpdateDatabaseDdl(UpdateDatabaseDdlRequest request, CallOptions options)

Updates the schema of a Cloud Spanner database by creating/altering/dropping tables, columns, indexes, etc. The returned [long-running operation][google.longrunning.Operation] will have a name of the format <database_name>/operations/<operation_id> and can be used to track execution of the schema change(s). The [metadata][google.longrunning.Operation.metadata] field type is [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response.

Parameters
NameDescription
requestUpdateDatabaseDdlRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Operation

The response received from the server.

UpdateDatabaseDdl(UpdateDatabaseDdlRequest, Metadata, DateTime?, CancellationToken)

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

Updates the schema of a Cloud Spanner database by creating/altering/dropping tables, columns, indexes, etc. The returned [long-running operation][google.longrunning.Operation] will have a name of the format <database_name>/operations/<operation_id> and can be used to track execution of the schema change(s). The [metadata][google.longrunning.Operation.metadata] field type is [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response.

Parameters
NameDescription
requestUpdateDatabaseDdlRequest

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.

UpdateDatabaseDdlAsync(UpdateDatabaseDdlRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> UpdateDatabaseDdlAsync(UpdateDatabaseDdlRequest request, CallOptions options)

Updates the schema of a Cloud Spanner database by creating/altering/dropping tables, columns, indexes, etc. The returned [long-running operation][google.longrunning.Operation] will have a name of the format <database_name>/operations/<operation_id> and can be used to track execution of the schema change(s). The [metadata][google.longrunning.Operation.metadata] field type is [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response.

Parameters
NameDescription
requestUpdateDatabaseDdlRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCallOperation

The call object.

UpdateDatabaseDdlAsync(UpdateDatabaseDdlRequest, Metadata, DateTime?, CancellationToken)

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

Updates the schema of a Cloud Spanner database by creating/altering/dropping tables, columns, indexes, etc. The returned [long-running operation][google.longrunning.Operation] will have a name of the format <database_name>/operations/<operation_id> and can be used to track execution of the schema change(s). The [metadata][google.longrunning.Operation.metadata] field type is [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]. The operation has no response.

Parameters
NameDescription
requestUpdateDatabaseDdlRequest

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.