pub struct SqlBackupsService { /* private fields */ }Expand description
Implements a client for the Cloud SQL Admin API.
§Example
let client = SqlBackupsService::builder().build().await?;
// use `client` to make requests to the Cloud SQL Admin API.§Service Description
§Configuration
To configure SqlBackupsService use the with_* methods in the type returned
by builder(). The default configuration should
work for most applications. Common configuration changes include
- with_endpoint(): by default this client uses the global default endpoint
(
https://sqladmin.googleapis.com). Applications using regional endpoints or running in restricted networks (e.g. a network configured override this default. - with_credentials(): by default this client uses Application Default Credentials. Applications using custom authentication may need to override this default.
§Pooling and Cloning
SqlBackupsService holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap SqlBackupsService in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl SqlBackupsService
impl SqlBackupsService
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for SqlBackupsService.
let client = SqlBackupsService::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: SqlBackupsService + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: SqlBackupsService + 'static,
Creates a new client from the provided stub.
The most common case for calling this function is in tests mocking the client’s behavior.
Sourcepub fn create_backup(&self) -> CreateBackup
pub fn create_backup(&self) -> CreateBackup
Creates a backup for a Cloud SQL instance. This API can be used only to create on-demand backups.
Sourcepub fn get_backup(&self) -> GetBackup
pub fn get_backup(&self) -> GetBackup
Retrieves a resource containing information about a backup.
Sourcepub fn list_backups(&self) -> ListBackups
pub fn list_backups(&self) -> ListBackups
Lists all backups associated with the project.
Sourcepub fn update_backup(&self) -> UpdateBackup
pub fn update_backup(&self) -> UpdateBackup
Updates the retention period and description of the backup. You can use this API to update final backups only.
Sourcepub fn delete_backup(&self) -> DeleteBackup
pub fn delete_backup(&self) -> DeleteBackup
Deletes the backup.
Trait Implementations§
Source§impl Clone for SqlBackupsService
impl Clone for SqlBackupsService
Source§fn clone(&self) -> SqlBackupsService
fn clone(&self) -> SqlBackupsService
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more