Struct google_cloud_spanner::admin::database::database_admin_client::DatabaseAdminClient
source · [−]pub struct DatabaseAdminClient { /* private fields */ }Implementations
sourceimpl DatabaseAdminClient
impl DatabaseAdminClient
pub fn new(
inner: InternalDatabaseAdminClient<Channel>,
lro_client: OperationsClient
) -> Self
pub async fn default() -> Result<Self, Error>
sourcepub async fn list_databases(
&self,
req: ListDatabasesRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> Result<Vec<Database>, Status>
pub async fn list_databases(
&self,
req: ListDatabasesRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> Result<Vec<Database>, Status>
list_databases lists Cloud Spanner databases.
sourcepub async fn create_database(
&self,
req: CreateDatabaseRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> Result<Operation<Database>, Status>
pub async fn create_database(
&self,
req: CreateDatabaseRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> 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.
sourcepub async fn get_database(
&self,
req: GetDatabaseRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> Result<Response<Database>, Status>
pub async fn get_database(
&self,
req: GetDatabaseRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> Result<Response<Database>, Status>
get_database gets the state of a Cloud Spanner database.
sourcepub async fn update_database_ddl(
&self,
req: UpdateDatabaseDdlRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> Result<Operation<()>, Status>
pub async fn update_database_ddl(
&self,
req: UpdateDatabaseDdlRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> 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.
sourcepub async fn drop_database(
&self,
req: DropDatabaseRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> Result<Response<()>, Status>
pub async fn drop_database(
&self,
req: DropDatabaseRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> 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.
sourcepub async fn get_database_ddl(
&self,
req: GetDatabaseDdlRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> Result<Response<GetDatabaseDdlResponse>, Status>
pub async fn get_database_ddl(
&self,
req: GetDatabaseDdlRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> 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.
sourcepub async fn set_iam_policy(
&self,
req: SetIamPolicyRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> Result<Response<Policy>, Status>
pub async fn set_iam_policy(
&self,
req: SetIamPolicyRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> 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.
sourcepub async fn get_iam_policy(
&self,
req: GetIamPolicyRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> Result<Response<Policy>, Status>
pub async fn get_iam_policy(
&self,
req: GetIamPolicyRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> 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.
sourcepub async fn test_iam_permissions(
&self,
req: TestIamPermissionsRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> Result<Response<TestIamPermissionsResponse>, Status>
pub async fn test_iam_permissions(
&self,
req: TestIamPermissionsRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> 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
sourcepub async fn create_backup(
&self,
req: CreateBackupRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> Result<Operation<Backup>, Status>
pub async fn create_backup(
&self,
req: CreateBackupRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> 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/
sourcepub async fn get_backup(
&self,
req: GetBackupRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> Result<Response<Backup>, Status>
pub async fn get_backup(
&self,
req: GetBackupRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> Result<Response<Backup>, Status>
get_backup gets metadata on a pending or completed Backup.
sourcepub async fn update_backup(
&self,
req: UpdateBackupRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> Result<Response<Backup>, Status>
pub async fn update_backup(
&self,
req: UpdateBackupRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> Result<Response<Backup>, Status>
update_backup updates a pending or completed Backup.
sourcepub async fn delete_backup(
&self,
req: DeleteBackupRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> Result<Response<()>, Status>
pub async fn delete_backup(
&self,
req: DeleteBackupRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> Result<Response<()>, Status>
delete_backup deletes a pending or completed Backup.
sourcepub async fn list_backups(
&self,
req: ListBackupsRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> Result<Vec<Backup>, Status>
pub async fn list_backups(
&self,
req: ListBackupsRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> 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.
sourcepub async fn restore_database(
&self,
req: RestoreDatabaseRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> Result<Operation<Database>, Status>
pub async fn restore_database(
&self,
req: RestoreDatabaseRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> 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/
sourcepub async fn list_backup_operations(
&self,
req: ListBackupOperationsRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> Result<Vec<InternalOperation>, Status>
pub async fn list_backup_operations(
&self,
req: ListBackupOperationsRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> 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/
sourcepub async fn list_database_operations(
&self,
req: ListDatabaseOperationsRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> Result<Vec<InternalOperation>, Status>
pub async fn list_database_operations(
&self,
req: ListDatabaseOperationsRequest,
cancel: Option<CancellationToken>,
retry: Option<RetrySetting>
) -> 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
sourceimpl Clone for DatabaseAdminClient
impl Clone for DatabaseAdminClient
sourcefn clone(&self) -> DatabaseAdminClient
fn clone(&self) -> DatabaseAdminClient
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message T in a tonic::Request
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more