Class DatabaseAdminConnection (2.30.0)

This interface defines 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) when writing tests that use objects of type DatabaseAdminClient.

To create a concrete instance, see MakeDatabaseAdminConnection().

For mocking, see spanner_admin_mocks::MockDatabaseAdminConnection.

Functions

virtual options()

Returns
Type Description
Options

virtual ListDatabases(google::spanner::admin::database::v1::ListDatabasesRequest)

Parameter
Name Description
request google::spanner::admin::database::v1::ListDatabasesRequest
Returns
Type Description
StreamRange< google::spanner::admin::database::v1::Database >

virtual CreateDatabase(google::spanner::admin::database::v1::CreateDatabaseRequest const &)

Parameter
Name Description
request google::spanner::admin::database::v1::CreateDatabaseRequest const &
Returns
Type Description
future< StatusOr< google::spanner::admin::database::v1::Database > >

virtual CreateDatabase(NoAwaitTag, google::spanner::admin::database::v1::CreateDatabaseRequest const &)

Parameters
Name Description
NoAwaitTag
request google::spanner::admin::database::v1::CreateDatabaseRequest const &
Returns
Type Description
StatusOr< google::longrunning::Operation >

virtual CreateDatabase(google::longrunning::Operation const &)

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::spanner::admin::database::v1::Database > >

virtual GetDatabase(google::spanner::admin::database::v1::GetDatabaseRequest const &)

Parameter
Name Description
request google::spanner::admin::database::v1::GetDatabaseRequest const &
Returns
Type Description
StatusOr< google::spanner::admin::database::v1::Database >

virtual UpdateDatabase(google::spanner::admin::database::v1::UpdateDatabaseRequest const &)

Parameter
Name Description
request google::spanner::admin::database::v1::UpdateDatabaseRequest const &
Returns
Type Description
future< StatusOr< google::spanner::admin::database::v1::Database > >

virtual UpdateDatabase(NoAwaitTag, google::spanner::admin::database::v1::UpdateDatabaseRequest const &)

Parameters
Name Description
NoAwaitTag
request google::spanner::admin::database::v1::UpdateDatabaseRequest const &
Returns
Type Description
StatusOr< google::longrunning::Operation >

virtual UpdateDatabase(google::longrunning::Operation const &)

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::spanner::admin::database::v1::Database > >

virtual UpdateDatabaseDdl(google::spanner::admin::database::v1::UpdateDatabaseDdlRequest const &)

Parameter
Name Description
request google::spanner::admin::database::v1::UpdateDatabaseDdlRequest const &
Returns
Type Description
future< StatusOr< google::spanner::admin::database::v1::UpdateDatabaseDdlMetadata > >

virtual UpdateDatabaseDdl(NoAwaitTag, google::spanner::admin::database::v1::UpdateDatabaseDdlRequest const &)

Parameters
Name Description
NoAwaitTag
request google::spanner::admin::database::v1::UpdateDatabaseDdlRequest const &
Returns
Type Description
StatusOr< google::longrunning::Operation >

virtual UpdateDatabaseDdl(google::longrunning::Operation const &)

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::spanner::admin::database::v1::UpdateDatabaseDdlMetadata > >

virtual DropDatabase(google::spanner::admin::database::v1::DropDatabaseRequest const &)

Parameter
Name Description
request google::spanner::admin::database::v1::DropDatabaseRequest const &
Returns
Type Description
Status

virtual GetDatabaseDdl(google::spanner::admin::database::v1::GetDatabaseDdlRequest const &)

Parameter
Name Description
request google::spanner::admin::database::v1::GetDatabaseDdlRequest const &
Returns
Type Description
StatusOr< google::spanner::admin::database::v1::GetDatabaseDdlResponse >

virtual SetIamPolicy(google::iam::v1::SetIamPolicyRequest const &)

Parameter
Name Description
request google::iam::v1::SetIamPolicyRequest const &
Returns
Type Description
StatusOr< google::iam::v1::Policy >

virtual GetIamPolicy(google::iam::v1::GetIamPolicyRequest const &)

Parameter
Name Description
request google::iam::v1::GetIamPolicyRequest const &
Returns
Type Description
StatusOr< google::iam::v1::Policy >

virtual TestIamPermissions(google::iam::v1::TestIamPermissionsRequest const &)

Parameter
Name Description
request google::iam::v1::TestIamPermissionsRequest const &
Returns
Type Description
StatusOr< google::iam::v1::TestIamPermissionsResponse >

virtual CreateBackup(google::spanner::admin::database::v1::CreateBackupRequest const &)

Parameter
Name Description
request google::spanner::admin::database::v1::CreateBackupRequest const &
Returns
Type Description
future< StatusOr< google::spanner::admin::database::v1::Backup > >

virtual CreateBackup(NoAwaitTag, google::spanner::admin::database::v1::CreateBackupRequest const &)

Parameters
Name Description
NoAwaitTag
request google::spanner::admin::database::v1::CreateBackupRequest const &
Returns
Type Description
StatusOr< google::longrunning::Operation >

virtual CreateBackup(google::longrunning::Operation const &)

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::spanner::admin::database::v1::Backup > >

virtual CopyBackup(google::spanner::admin::database::v1::CopyBackupRequest const &)

Parameter
Name Description
request google::spanner::admin::database::v1::CopyBackupRequest const &
Returns
Type Description
future< StatusOr< google::spanner::admin::database::v1::Backup > >

virtual CopyBackup(NoAwaitTag, google::spanner::admin::database::v1::CopyBackupRequest const &)

Parameters
Name Description
NoAwaitTag
request google::spanner::admin::database::v1::CopyBackupRequest const &
Returns
Type Description
StatusOr< google::longrunning::Operation >

virtual CopyBackup(google::longrunning::Operation const &)

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::spanner::admin::database::v1::Backup > >

virtual GetBackup(google::spanner::admin::database::v1::GetBackupRequest const &)

Parameter
Name Description
request google::spanner::admin::database::v1::GetBackupRequest const &
Returns
Type Description
StatusOr< google::spanner::admin::database::v1::Backup >

virtual UpdateBackup(google::spanner::admin::database::v1::UpdateBackupRequest const &)

Parameter
Name Description
request google::spanner::admin::database::v1::UpdateBackupRequest const &
Returns
Type Description
StatusOr< google::spanner::admin::database::v1::Backup >

virtual DeleteBackup(google::spanner::admin::database::v1::DeleteBackupRequest const &)

Parameter
Name Description
request google::spanner::admin::database::v1::DeleteBackupRequest const &
Returns
Type Description
Status

virtual ListBackups(google::spanner::admin::database::v1::ListBackupsRequest)

Parameter
Name Description
request google::spanner::admin::database::v1::ListBackupsRequest
Returns
Type Description
StreamRange< google::spanner::admin::database::v1::Backup >

virtual RestoreDatabase(google::spanner::admin::database::v1::RestoreDatabaseRequest const &)

Parameter
Name Description
request google::spanner::admin::database::v1::RestoreDatabaseRequest const &
Returns
Type Description
future< StatusOr< google::spanner::admin::database::v1::Database > >

virtual RestoreDatabase(NoAwaitTag, google::spanner::admin::database::v1::RestoreDatabaseRequest const &)

Parameters
Name Description
NoAwaitTag
request google::spanner::admin::database::v1::RestoreDatabaseRequest const &
Returns
Type Description
StatusOr< google::longrunning::Operation >

virtual RestoreDatabase(google::longrunning::Operation const &)

Parameter
Name Description
operation google::longrunning::Operation const &
Returns
Type Description
future< StatusOr< google::spanner::admin::database::v1::Database > >

virtual ListDatabaseOperations(google::spanner::admin::database::v1::ListDatabaseOperationsRequest)

Parameter
Name Description
request google::spanner::admin::database::v1::ListDatabaseOperationsRequest
Returns
Type Description
StreamRange< google::longrunning::Operation >

virtual ListBackupOperations(google::spanner::admin::database::v1::ListBackupOperationsRequest)

Parameter
Name Description
request google::spanner::admin::database::v1::ListBackupOperationsRequest
Returns
Type Description
StreamRange< google::longrunning::Operation >

virtual ListDatabaseRoles(google::spanner::admin::database::v1::ListDatabaseRolesRequest)

Parameter
Name Description
request google::spanner::admin::database::v1::ListDatabaseRolesRequest
Returns
Type Description
StreamRange< google::spanner::admin::database::v1::DatabaseRole >

virtual CreateBackupSchedule(google::spanner::admin::database::v1::CreateBackupScheduleRequest const &)

Parameter
Name Description
request google::spanner::admin::database::v1::CreateBackupScheduleRequest const &
Returns
Type Description
StatusOr< google::spanner::admin::database::v1::BackupSchedule >

virtual GetBackupSchedule(google::spanner::admin::database::v1::GetBackupScheduleRequest const &)

Parameter
Name Description
request google::spanner::admin::database::v1::GetBackupScheduleRequest const &
Returns
Type Description
StatusOr< google::spanner::admin::database::v1::BackupSchedule >

virtual UpdateBackupSchedule(google::spanner::admin::database::v1::UpdateBackupScheduleRequest const &)

Parameter
Name Description
request google::spanner::admin::database::v1::UpdateBackupScheduleRequest const &
Returns
Type Description
StatusOr< google::spanner::admin::database::v1::BackupSchedule >

virtual DeleteBackupSchedule(google::spanner::admin::database::v1::DeleteBackupScheduleRequest const &)

Parameter
Name Description
request google::spanner::admin::database::v1::DeleteBackupScheduleRequest const &
Returns
Type Description
Status

virtual ListBackupSchedules(google::spanner::admin::database::v1::ListBackupSchedulesRequest)

Parameter
Name Description
request google::spanner::admin::database::v1::ListBackupSchedulesRequest
Returns
Type Description
StreamRange< google::spanner::admin::database::v1::BackupSchedule >