Class DatabaseAdminConnection (2.22.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
TypeDescription
Options

CreateDatabase(CreateDatabaseParams)

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

Parameter
NameDescription
CreateDatabaseParams
Returns
TypeDescription
future< StatusOr< google::spanner::admin::database::v1::Database > >

GetDatabase(GetDatabaseParams)

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

Parameter
NameDescription
GetDatabaseParams
Returns
TypeDescription
StatusOr< google::spanner::admin::database::v1::Database >

GetDatabaseDdl(GetDatabaseDdlParams)

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

Parameter
NameDescription
GetDatabaseDdlParams
Returns
TypeDescription
StatusOr< google::spanner::admin::database::v1::GetDatabaseDdlResponse >

UpdateDatabase(UpdateDatabaseParams)

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

Parameter
NameDescription
UpdateDatabaseParams
Returns
TypeDescription
future< StatusOr< google::spanner::admin::database::v1::UpdateDatabaseDdlMetadata > >

DropDatabase(DropDatabaseParams)

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

Parameter
NameDescription
DropDatabaseParams
Returns
TypeDescription
Status

ListDatabases(ListDatabasesParams)

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

Parameter
NameDescription
ListDatabasesParams
Returns
TypeDescription
ListDatabaseRange

virtual RestoreDatabase(RestoreDatabaseParams)

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

Parameter
NameDescription
RestoreDatabaseParams
Returns
TypeDescription
future< StatusOr< google::spanner::admin::database::v1::Database > >

GetIamPolicy(GetIamPolicyParams)

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

Parameter
NameDescription
GetIamPolicyParams
Returns
TypeDescription
StatusOr< google::iam::v1::Policy >

SetIamPolicy(SetIamPolicyParams)

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

Parameter
NameDescription
SetIamPolicyParams
Returns
TypeDescription
StatusOr< google::iam::v1::Policy >

TestIamPermissions(TestIamPermissionsParams)

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

Parameter
NameDescription
TestIamPermissionsParams
Returns
TypeDescription
StatusOr< google::iam::v1::TestIamPermissionsResponse >

virtual CreateBackup(CreateBackupParams)

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

Parameter
NameDescription
CreateBackupParams
Returns
TypeDescription
future< StatusOr< google::spanner::admin::database::v1::Backup > >

virtual GetBackup(GetBackupParams)

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

Parameter
NameDescription
GetBackupParams
Returns
TypeDescription
StatusOr< google::spanner::admin::database::v1::Backup >

virtual DeleteBackup(DeleteBackupParams)

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

Parameter
NameDescription
DeleteBackupParams
Returns
TypeDescription
Status

virtual ListBackups(ListBackupsParams)

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

Parameter
NameDescription
ListBackupsParams
Returns
TypeDescription
ListBackupsRange

virtual UpdateBackup(UpdateBackupParams)

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

Parameter
NameDescription
UpdateBackupParams
Returns
TypeDescription
StatusOr< google::spanner::admin::database::v1::Backup >

virtual ListBackupOperations(ListBackupOperationsParams)

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

Parameter
NameDescription
ListBackupOperationsParams
Returns
TypeDescription
ListBackupOperationsRange

virtual ListDatabaseOperations(ListDatabaseOperationsParams)

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

Parameter
NameDescription
ListDatabaseOperationsParams
Returns
TypeDescription
ListDatabaseOperationsRange