Struct google_cloud_spanner::admin::database::database_admin_client::DatabaseAdminClient [−][src]
pub struct DatabaseAdminClient { /* fields omitted */ }Implementations
pub async fn list_databases(
&mut self,
req: ListDatabasesRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Vec<Database>, Status>
pub async fn list_databases(
&mut self,
req: ListDatabasesRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Vec<Database>, Status>
list_databases lists Cloud Spanner databases.
pub async fn create_database(
&mut self,
req: CreateDatabaseRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Operation<Database>, Status>
pub async fn create_database(
&mut self,
req: CreateDatabaseRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Operation<Database>, Status>
create_database 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 field type is CreateDatabaseMetadata. The response field type is Database, if successful.
pub async fn get_database(
&mut self,
req: GetDatabaseRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Response<Database>, Status>
pub async fn get_database(
&mut self,
req: GetDatabaseRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Response<Database>, Status>
get_database gets the state of a Cloud Spanner database.
pub async fn update_database_ddl(
&mut self,
req: UpdateDatabaseDdlRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Operation<()>, Status>
pub async fn update_database_ddl(
&mut self,
req: UpdateDatabaseDdlRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Operation<()>, Status>
update_database_ddl 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 field type is UpdateDatabaseDdlMetadata. The operation has no response.
pub async fn drop_database(
&mut self,
req: DropDatabaseRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Response<()>, Status>
pub async fn drop_database(
&mut self,
req: DropDatabaseRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Response<()>, Status>
drop_database drops (aka deletes) a Cloud Spanner database. Completed backups for the database will be retained according to their expire_time.
pub async fn get_database_ddl(
&mut self,
req: GetDatabaseDdlRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Response<GetDatabaseDdlResponse>, Status>
pub async fn get_database_ddl(
&mut self,
req: GetDatabaseDdlRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Response<GetDatabaseDdlResponse>, Status>
get_database_ddl 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 API.
pub async fn set_iam_policy(
&mut self,
req: SetIamPolicyRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Response<Policy>, Status>
pub async fn set_iam_policy(
&mut self,
req: SetIamPolicyRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Response<Policy>, Status>
set_iam_policy sets the access control policy on a database or backup resource. Replaces any existing policy.
Authorization requires spanner.databases.setIamPolicy permission on resource. For backups, authorization requires spanner.backups.setIamPolicy permission on resource.
pub async fn get_iam_policy(
&mut self,
req: GetIamPolicyRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Response<Policy>, Status>
pub async fn get_iam_policy(
&mut self,
req: GetIamPolicyRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Response<Policy>, Status>
get_iam_policy 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. For backups, authorization requires spanner.backups.getIamPolicy permission on resource.
pub async fn test_iam_permissions(
&mut self,
req: TestIamPermissionsRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Response<TestIamPermissionsResponse>, Status>
pub async fn test_iam_permissions(
&mut self,
req: TestIamPermissionsRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Response<TestIamPermissionsResponse>, Status>
test_iam_permissions 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
pub async fn create_backup(
&mut self,
req: CreateBackupRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Operation<Backup>, Status>
pub async fn create_backup(
&mut self,
req: CreateBackupRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Operation<Backup>, Status>
create_backup starts creating a new Cloud Spanner Backup.
The returned backup [long-running operation][google.longrunning.Operation]
will have a name of the format
projects/
pub async fn get_backup(
&mut self,
req: GetBackupRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Response<Backup>, Status>
pub async fn get_backup(
&mut self,
req: GetBackupRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Response<Backup>, Status>
get_backup gets metadata on a pending or completed Backup.
pub async fn update_backup(
&mut self,
req: UpdateBackupRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Response<Backup>, Status>
pub async fn update_backup(
&mut self,
req: UpdateBackupRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Response<Backup>, Status>
update_backup updates a pending or completed Backup.
pub async fn delete_backup(
&mut self,
req: DeleteBackupRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Response<()>, Status>
pub async fn delete_backup(
&mut self,
req: DeleteBackupRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Response<()>, Status>
delete_backup deletes a pending or completed Backup.
pub async fn list_backups(
&mut self,
req: ListBackupsRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Vec<Backup>, Status>
pub async fn list_backups(
&mut self,
req: ListBackupsRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Vec<Backup>, Status>
list_backups lists completed and pending backups. Backups returned are ordered by create_time in descending order, starting from the most recent create_time.
pub async fn restore_database(
&mut self,
req: RestoreDatabaseRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Operation<Database>, Status>
pub async fn restore_database(
&mut self,
req: RestoreDatabaseRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Operation<Database>, Status>
restore_database 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/
pub async fn list_backup_operations(
&mut self,
req: ListBackupOperationsRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Vec<InternalOperation>, Status>
pub async fn list_backup_operations(
&mut self,
req: ListBackupOperationsRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Vec<InternalOperation>, Status>
list_backup_operations lists the backup [long-running operations][google.longrunning.Operation] in
the given instance. A backup operation has a name of the form
projects/
pub async fn list_database_operations(
&mut self,
req: ListDatabaseOperationsRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Vec<InternalOperation>, Status>
pub async fn list_database_operations(
&mut self,
req: ListDatabaseOperationsRequest,
opt: Option<BackoffRetrySettings>
) -> Result<Vec<InternalOperation>, Status>
list_database_operations lists database [longrunning-operations][google.longrunning.Operation].
A database operation has a name of the form
projects/
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for DatabaseAdminClient
impl Send for DatabaseAdminClient
impl Sync for DatabaseAdminClient
impl Unpin for DatabaseAdminClient
impl !UnwindSafe for DatabaseAdminClient
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T in a tonic::Request
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
