pub struct DataTransferService { /* private fields */ }
Expand description
Implements a client for the BigQuery Data Transfer API.
§Example
let client = DataTransferService::builder().build().await?;
// use `client` to make requests to the BigQuery Data Transfer API.
§Service Description
This API allows users to manage their data transfers into BigQuery.
§Configuration
To configure DataTransferService
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://bigquerydatatransfer.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
DataTransferService
holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap DataTransferService
in
an Rc or Arc to reuse it, because it
already uses an Arc
internally.
Implementations§
Source§impl DataTransferService
impl DataTransferService
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for DataTransferService.
let client = DataTransferService::builder().build().await?;
Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: DataTransferService + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: DataTransferService + '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 get_data_source(&self) -> GetDataSource
pub fn get_data_source(&self) -> GetDataSource
Retrieves a supported data source and returns its settings.
Sourcepub fn list_data_sources(&self) -> ListDataSources
pub fn list_data_sources(&self) -> ListDataSources
Lists supported data sources and returns their settings.
Sourcepub fn create_transfer_config(&self) -> CreateTransferConfig
pub fn create_transfer_config(&self) -> CreateTransferConfig
Creates a new data transfer configuration.
Sourcepub fn update_transfer_config(&self) -> UpdateTransferConfig
pub fn update_transfer_config(&self) -> UpdateTransferConfig
Updates a data transfer configuration. All fields must be set, even if they are not updated.
Sourcepub fn delete_transfer_config(&self) -> DeleteTransferConfig
pub fn delete_transfer_config(&self) -> DeleteTransferConfig
Deletes a data transfer configuration, including any associated transfer runs and logs.
Sourcepub fn get_transfer_config(&self) -> GetTransferConfig
pub fn get_transfer_config(&self) -> GetTransferConfig
Returns information about a data transfer config.
Sourcepub fn list_transfer_configs(&self) -> ListTransferConfigs
pub fn list_transfer_configs(&self) -> ListTransferConfigs
Returns information about all transfer configs owned by a project in the specified location.
Sourcepub fn schedule_transfer_runs(&self) -> ScheduleTransferRuns
👎Deprecated
pub fn schedule_transfer_runs(&self) -> ScheduleTransferRuns
Creates transfer runs for a time range [start_time, end_time]. For each date - or whatever granularity the data source supports - in the range, one transfer run is created. Note that runs are created per UTC time in the time range. DEPRECATED: use StartManualTransferRuns instead.
Sourcepub fn start_manual_transfer_runs(&self) -> StartManualTransferRuns
pub fn start_manual_transfer_runs(&self) -> StartManualTransferRuns
Start manual transfer runs to be executed now with schedule_time equal to current time. The transfer runs can be created for a time range where the run_time is between start_time (inclusive) and end_time (exclusive), or for a specific run_time.
Sourcepub fn get_transfer_run(&self) -> GetTransferRun
pub fn get_transfer_run(&self) -> GetTransferRun
Returns information about the particular transfer run.
Sourcepub fn delete_transfer_run(&self) -> DeleteTransferRun
pub fn delete_transfer_run(&self) -> DeleteTransferRun
Deletes the specified transfer run.
Sourcepub fn list_transfer_runs(&self) -> ListTransferRuns
pub fn list_transfer_runs(&self) -> ListTransferRuns
Returns information about running and completed transfer runs.
Sourcepub fn list_transfer_logs(&self) -> ListTransferLogs
pub fn list_transfer_logs(&self) -> ListTransferLogs
Returns log messages for the transfer run.
Sourcepub fn check_valid_creds(&self) -> CheckValidCreds
pub fn check_valid_creds(&self) -> CheckValidCreds
Returns true if valid credentials exist for the given data source and requesting user.
Sourcepub fn enroll_data_sources(&self) -> EnrollDataSources
pub fn enroll_data_sources(&self) -> EnrollDataSources
Enroll data sources in a user project. This allows users to create transfer configurations for these data sources. They will also appear in the ListDataSources RPC and as such, will appear in the BigQuery UI, and the documents can be found in the public guide for BigQuery Web UI and Data Transfer Service.
Sourcepub fn unenroll_data_sources(&self) -> UnenrollDataSources
pub fn unenroll_data_sources(&self) -> UnenrollDataSources
Unenroll data sources in a user project. This allows users to remove transfer configurations for these data sources. They will no longer appear in the ListDataSources RPC and will also no longer appear in the BigQuery UI. Data transfers configurations of unenrolled data sources will not be scheduled.
Sourcepub fn list_locations(&self) -> ListLocations
pub fn list_locations(&self) -> ListLocations
Lists information about the supported locations for this service.
Sourcepub fn get_location(&self) -> GetLocation
pub fn get_location(&self) -> GetLocation
Gets information about a location.
Trait Implementations§
Source§impl Clone for DataTransferService
impl Clone for DataTransferService
Source§fn clone(&self) -> DataTransferService
fn clone(&self) -> DataTransferService
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more