pub struct DataTransferService { /* private fields */ }Expand description
Implements a client for the BigQuery Data Transfer API.
§Service Description
This API allows users to manage their data transfers into BigQuery.
§Configuration
DataTransferService has various configuration parameters, the defaults should
work with most applications.
§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 async fn new_with_config(conf: ClientConfig) -> Result<Self>
pub async fn new_with_config(conf: ClientConfig) -> Result<Self>
Creates a new client with the specified configuration.
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 when mocking the client.
Sourcepub fn get_data_source(&self, name: impl Into<String>) -> GetDataSource
pub fn get_data_source(&self, name: impl Into<String>) -> GetDataSource
Retrieves a supported data source and returns its settings.
Sourcepub fn list_data_sources(&self, parent: impl Into<String>) -> ListDataSources
pub fn list_data_sources(&self, parent: impl Into<String>) -> ListDataSources
Lists supported data sources and returns their settings.
Sourcepub fn create_transfer_config(
&self,
parent: impl Into<String>,
) -> CreateTransferConfig
pub fn create_transfer_config( &self, parent: impl Into<String>, ) -> CreateTransferConfig
Creates a new data transfer configuration.
Sourcepub fn update_transfer_config(
&self,
transfer_config: impl Into<TransferConfig>,
) -> UpdateTransferConfig
pub fn update_transfer_config( &self, transfer_config: impl Into<TransferConfig>, ) -> UpdateTransferConfig
Updates a data transfer configuration. All fields must be set, even if they are not updated.
Sourcepub fn delete_transfer_config(
&self,
name: impl Into<String>,
) -> DeleteTransferConfig
pub fn delete_transfer_config( &self, name: impl Into<String>, ) -> DeleteTransferConfig
Deletes a data transfer configuration, including any associated transfer runs and logs.
Sourcepub fn get_transfer_config(&self, name: impl Into<String>) -> GetTransferConfig
pub fn get_transfer_config(&self, name: impl Into<String>) -> GetTransferConfig
Returns information about a data transfer config.
Sourcepub fn list_transfer_configs(
&self,
parent: impl Into<String>,
) -> ListTransferConfigs
pub fn list_transfer_configs( &self, parent: impl Into<String>, ) -> ListTransferConfigs
Returns information about all transfer configs owned by a project in the specified location.
Sourcepub fn schedule_transfer_runs(
&self,
parent: impl Into<String>,
) -> ScheduleTransferRuns
pub fn schedule_transfer_runs( &self, parent: impl Into<String>, ) -> 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,
parent: impl Into<String>,
) -> StartManualTransferRuns
pub fn start_manual_transfer_runs( &self, parent: impl Into<String>, ) -> 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, name: impl Into<String>) -> GetTransferRun
pub fn get_transfer_run(&self, name: impl Into<String>) -> GetTransferRun
Returns information about the particular transfer run.
Sourcepub fn delete_transfer_run(&self, name: impl Into<String>) -> DeleteTransferRun
pub fn delete_transfer_run(&self, name: impl Into<String>) -> DeleteTransferRun
Deletes the specified transfer run.
Sourcepub fn list_transfer_runs(&self, parent: impl Into<String>) -> ListTransferRuns
pub fn list_transfer_runs(&self, parent: impl Into<String>) -> ListTransferRuns
Returns information about running and completed transfer runs.
Sourcepub fn list_transfer_logs(&self, parent: impl Into<String>) -> ListTransferLogs
pub fn list_transfer_logs(&self, parent: impl Into<String>) -> ListTransferLogs
Returns log messages for the transfer run.
Sourcepub fn check_valid_creds(&self, name: impl Into<String>) -> CheckValidCreds
pub fn check_valid_creds(&self, name: impl Into<String>) -> CheckValidCreds
Returns true if valid credentials exist for the given data source and requesting user.
Sourcepub fn enroll_data_sources(&self, name: impl Into<String>) -> EnrollDataSources
pub fn enroll_data_sources(&self, name: impl Into<String>) -> 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,
name: impl Into<String>,
) -> UnenrollDataSources
pub fn unenroll_data_sources( &self, name: impl Into<String>, ) -> 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, name: impl Into<String>) -> ListLocations
pub fn list_locations(&self, name: impl Into<String>) -> ListLocations
Lists information about the supported locations for this service.
Sourcepub fn get_location(&self, name: impl Into<String>) -> GetLocation
pub fn get_location(&self, name: impl Into<String>) -> 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