Class DatabaseAdminConnection (2.29.0)

A connection to the Cloud Spanner instance administration service.

This interface defines pure-virtual methods for each of the user-facing overload sets in DatabaseAdminClient. This allows users to inject custom behavior (e.g., with a Google Mock object) in a DatabaseAdminClient object for use in their own tests.

To create a concrete instance that connects you to a real Cloud Spanner instance administration service, see MakeDatabaseAdminConnection().

Functions

virtual options()

Returns
Type Description
Options

CreateDatabase(CreateDatabaseParams)

Define the interface for a google.spanner.v1.DatabaseAdmin.CreateDatabase RPC.

Parameter
Name Description
CreateDatabaseParams
Returns
Type Description
future< StatusOr< google::spanner::admin::database::v1::Database > >

GetDatabase(GetDatabaseParams)

Define the interface for a google.spanner.v1.DatabaseAdmin.GetDatabase RPC.

Parameter
Name Description
GetDatabaseParams
Returns
Type Description
StatusOr< google::spanner::admin::database::v1::Database >

GetDatabaseDdl(GetDatabaseDdlParams)

Define the interface for a google.spanner.v1.DatabaseAdmin.GetDatabaseDdl RPC.

Parameter
Name Description
GetDatabaseDdlParams
Returns
Type Description
StatusOr< google::spanner::admin::database::v1::GetDatabaseDdlResponse >

UpdateDatabase(UpdateDatabaseParams)

Define the interface for a google.spanner.v1.DatabaseAdmin.UpdateDatabase RPC.

Parameter
Name Description
UpdateDatabaseParams
Returns
Type Description
future< StatusOr< google::spanner::admin::database::v1::UpdateDatabaseDdlMetadata > >

DropDatabase(DropDatabaseParams)

Define the interface for a google.spanner.v1.DatabaseAdmin.DropDatabase RPC.

Parameter
Name Description
DropDatabaseParams
Returns
Type Description
Status

ListDatabases(ListDatabasesParams)

Define the interface for a google.spanner.v1.DatabaseAdmin.DropDatabase RPC.

Parameter
Name Description
ListDatabasesParams
Returns
Type Description
ListDatabaseRange

virtual RestoreDatabase(RestoreDatabaseParams)

Define the interface for a google.spanner.v1.DatabaseAdmin.RestoreDatabase RPC.

Parameter
Name Description
RestoreDatabaseParams
Returns
Type Description
future< StatusOr< google::spanner::admin::database::v1::Database > >

GetIamPolicy(GetIamPolicyParams)

Define the interface for a google.spanner.v1.DatabaseAdmin.GetIamPolicy RPC.

Parameter
Name Description
GetIamPolicyParams
Returns
Type Description
StatusOr< google::iam::v1::Policy >

SetIamPolicy(SetIamPolicyParams)

Define the interface for a google.spanner.v1.DatabaseAdmin.SetIamPolicy RPC.

Parameter
Name Description
SetIamPolicyParams
Returns
Type Description
StatusOr< google::iam::v1::Policy >

TestIamPermissions(TestIamPermissionsParams)

Define the interface for a google.spanner.v1.DatabaseAdmin.TestIamPermissions RPC.

Parameter
Name Description
TestIamPermissionsParams
Returns
Type Description
StatusOr< google::iam::v1::TestIamPermissionsResponse >

virtual CreateBackup(CreateBackupParams)

Define the interface for a google.spanner.v1.DatabaseAdmin.CreateBackup RPC.

Parameter
Name Description
CreateBackupParams
Returns
Type Description
future< StatusOr< google::spanner::admin::database::v1::Backup > >

virtual GetBackup(GetBackupParams)

Define the interface for a google.spanner.v1.DatabaseAdmin.GetBackup RPC.

Parameter
Name Description
GetBackupParams
Returns
Type Description
StatusOr< google::spanner::admin::database::v1::Backup >

virtual DeleteBackup(DeleteBackupParams)

Define the interface for a google.spanner.v1.DatabaseAdmin.DeleteBackup RPC.

Parameter
Name Description
DeleteBackupParams
Returns
Type Description
Status

virtual ListBackups(ListBackupsParams)

Define the interface for a google.spanner.v1.DatabaseAdmin.ListBackups RPC.

Parameter
Name Description
ListBackupsParams
Returns
Type Description
ListBackupsRange

virtual UpdateBackup(UpdateBackupParams)

Define the interface for a google.spanner.v1.DatabaseAdmin.UpdateBackup RPC.

Parameter
Name Description
UpdateBackupParams
Returns
Type Description
StatusOr< google::spanner::admin::database::v1::Backup >

virtual ListBackupOperations(ListBackupOperationsParams)

Define the interface for a google.spanner.v1.DatabaseAdmin.ListBackupOperations RPC.

Parameter
Name Description
ListBackupOperationsParams
Returns
Type Description
ListBackupOperationsRange

virtual ListDatabaseOperations(ListDatabaseOperationsParams)

Define the interface for a google.spanner.v1.DatabaseAdmin.ListDatabaseOperations RPC.

Parameter
Name Description
ListDatabaseOperationsParams
Returns
Type Description
ListDatabaseOperationsRange