This API allows users to manage their data transfers into BigQuery.
Equality
Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection>
objects compare equal. Objects that compare equal share the same underlying resources.
Performance
Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.
Thread Safety
Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.
Constructors
DataTransferServiceClient(DataTransferServiceClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
DataTransferServiceClient const &
|
DataTransferServiceClient(DataTransferServiceClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
DataTransferServiceClient &&
|
DataTransferServiceClient(std::shared_ptr< DataTransferServiceConnection >, Options)
Parameters | |
---|---|
Name | Description |
connection |
std::shared_ptr< DataTransferServiceConnection >
|
opts |
Options
|
Operators
operator=(DataTransferServiceClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
DataTransferServiceClient const &
|
Returns | |
---|---|
Type | Description |
DataTransferServiceClient & |
operator=(DataTransferServiceClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
DataTransferServiceClient &&
|
Returns | |
---|---|
Type | Description |
DataTransferServiceClient & |
Functions
GetDataSource(std::string const &, Options)
Retrieves a supported data source and returns its settings.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The field will contain name of the resource requested, for example: |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datatransfer::v1::DataSource > | the result of the RPC. The response message type (google.cloud.bigquery.datatransfer.v1.DataSource) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetDataSource(google::cloud::bigquery::datatransfer::v1::GetDataSourceRequest const &, Options)
Retrieves a supported data source and returns its settings.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datatransfer::v1::GetDataSourceRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datatransfer::v1::DataSource > | the result of the RPC. The response message type (google.cloud.bigquery.datatransfer.v1.DataSource) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
ListDataSources(std::string const &, Options)
Lists supported data sources and returns their settings.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The BigQuery project id for which data sources should be returned. Must be in the form: |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::bigquery::datatransfer::v1::DataSource > | a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListDataSources(google::cloud::bigquery::datatransfer::v1::ListDataSourcesRequest, Options)
Lists supported data sources and returns their settings.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datatransfer::v1::ListDataSourcesRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::bigquery::datatransfer::v1::DataSource > | a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
CreateTransferConfig(std::string const &, google::cloud::bigquery::datatransfer::v1::TransferConfig const &, Options)
Creates a new data transfer configuration.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The BigQuery project id where the transfer configuration should be created. Must be in the format projects/{project_id}/locations/{location_id} or projects/{project_id}. If specified location and location of the destination bigquery dataset do not match - the request will fail. |
transfer_config |
google::cloud::bigquery::datatransfer::v1::TransferConfig const &
Required. Data transfer configuration to create. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datatransfer::v1::TransferConfig > | the result of the RPC. The response message type (google.cloud.bigquery.datatransfer.v1.TransferConfig) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
CreateTransferConfig(google::cloud::bigquery::datatransfer::v1::CreateTransferConfigRequest const &, Options)
Creates a new data transfer configuration.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datatransfer::v1::CreateTransferConfigRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datatransfer::v1::TransferConfig > | the result of the RPC. The response message type (google.cloud.bigquery.datatransfer.v1.TransferConfig) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
UpdateTransferConfig(google::cloud::bigquery::datatransfer::v1::TransferConfig const &, google::protobuf::FieldMask const &, Options)
Updates a data transfer configuration.
All fields must be set, even if they are not updated.
Parameters | |
---|---|
Name | Description |
transfer_config |
google::cloud::bigquery::datatransfer::v1::TransferConfig const &
Required. Data transfer configuration to create. |
update_mask |
google::protobuf::FieldMask const &
Required. Required list of fields to be updated in this request. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datatransfer::v1::TransferConfig > | the result of the RPC. The response message type (google.cloud.bigquery.datatransfer.v1.TransferConfig) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
UpdateTransferConfig(google::cloud::bigquery::datatransfer::v1::UpdateTransferConfigRequest const &, Options)
Updates a data transfer configuration.
All fields must be set, even if they are not updated.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datatransfer::v1::UpdateTransferConfigRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datatransfer::v1::TransferConfig > | the result of the RPC. The response message type (google.cloud.bigquery.datatransfer.v1.TransferConfig) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
DeleteTransferConfig(std::string const &, Options)
Deletes a data transfer configuration, including any associated transfer runs and logs.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The field will contain name of the resource requested, for example: |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status | a |
DeleteTransferConfig(google::cloud::bigquery::datatransfer::v1::DeleteTransferConfigRequest const &, Options)
Deletes a data transfer configuration, including any associated transfer runs and logs.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datatransfer::v1::DeleteTransferConfigRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status | a |
GetTransferConfig(std::string const &, Options)
Returns information about a data transfer config.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The field will contain name of the resource requested, for example: |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datatransfer::v1::TransferConfig > | the result of the RPC. The response message type (google.cloud.bigquery.datatransfer.v1.TransferConfig) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetTransferConfig(google::cloud::bigquery::datatransfer::v1::GetTransferConfigRequest const &, Options)
Returns information about a data transfer config.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datatransfer::v1::GetTransferConfigRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datatransfer::v1::TransferConfig > | the result of the RPC. The response message type (google.cloud.bigquery.datatransfer.v1.TransferConfig) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
ListTransferConfigs(std::string const &, Options)
Returns information about all transfer configs owned by a project in the specified location.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The BigQuery project id for which transfer configs should be returned: |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::bigquery::datatransfer::v1::TransferConfig > | a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListTransferConfigs(google::cloud::bigquery::datatransfer::v1::ListTransferConfigsRequest, Options)
Returns information about all transfer configs owned by a project in the specified location.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datatransfer::v1::ListTransferConfigsRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::bigquery::datatransfer::v1::TransferConfig > | a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ScheduleTransferRuns(std::string const &, google::protobuf::Timestamp const &, google::protobuf::Timestamp const &, Options)
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.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. Transfer configuration name in the form: |
start_time |
google::protobuf::Timestamp const &
Required. Start time of the range of transfer runs. For example, |
end_time |
google::protobuf::Timestamp const &
Required. End time of the range of transfer runs. For example, |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datatransfer::v1::ScheduleTransferRunsResponse > | the result of the RPC. The response message type (google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
ScheduleTransferRuns(google::cloud::bigquery::datatransfer::v1::ScheduleTransferRunsRequest const &, Options)
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.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datatransfer::v1::ScheduleTransferRunsRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datatransfer::v1::ScheduleTransferRunsResponse > | the result of the RPC. The response message type (google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
StartManualTransferRuns(google::cloud::bigquery::datatransfer::v1::StartManualTransferRunsRequest const &, Options)
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.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datatransfer::v1::StartManualTransferRunsRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datatransfer::v1::StartManualTransferRunsResponse > | the result of the RPC. The response message type (google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetTransferRun(std::string const &, Options)
Returns information about the particular transfer run.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The field will contain name of the resource requested, for example: |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datatransfer::v1::TransferRun > | the result of the RPC. The response message type (google.cloud.bigquery.datatransfer.v1.TransferRun) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetTransferRun(google::cloud::bigquery::datatransfer::v1::GetTransferRunRequest const &, Options)
Returns information about the particular transfer run.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datatransfer::v1::GetTransferRunRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datatransfer::v1::TransferRun > | the result of the RPC. The response message type (google.cloud.bigquery.datatransfer.v1.TransferRun) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
DeleteTransferRun(std::string const &, Options)
Deletes the specified transfer run.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The field will contain name of the resource requested, for example: |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status | a |
DeleteTransferRun(google::cloud::bigquery::datatransfer::v1::DeleteTransferRunRequest const &, Options)
Deletes the specified transfer run.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datatransfer::v1::DeleteTransferRunRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status | a |
ListTransferRuns(std::string const &, Options)
Returns information about running and completed transfer runs.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. Name of transfer configuration for which transfer runs should be retrieved. Format of transfer configuration resource name is: |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::bigquery::datatransfer::v1::TransferRun > | a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListTransferRuns(google::cloud::bigquery::datatransfer::v1::ListTransferRunsRequest, Options)
Returns information about running and completed transfer runs.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datatransfer::v1::ListTransferRunsRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::bigquery::datatransfer::v1::TransferRun > | a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListTransferLogs(std::string const &, Options)
Returns log messages for the transfer run.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. Transfer run name in the form: |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::bigquery::datatransfer::v1::TransferMessage > | a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListTransferLogs(google::cloud::bigquery::datatransfer::v1::ListTransferLogsRequest, Options)
Returns log messages for the transfer run.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datatransfer::v1::ListTransferLogsRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::bigquery::datatransfer::v1::TransferMessage > | a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
CheckValidCreds(std::string const &, Options)
Returns true if valid credentials exist for the given data source and requesting user.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The data source in the form: |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datatransfer::v1::CheckValidCredsResponse > | the result of the RPC. The response message type (google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
CheckValidCreds(google::cloud::bigquery::datatransfer::v1::CheckValidCredsRequest const &, Options)
Returns true if valid credentials exist for the given data source and requesting user.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datatransfer::v1::CheckValidCredsRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::bigquery::datatransfer::v1::CheckValidCredsResponse > | the result of the RPC. The response message type (google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
EnrollDataSources(google::cloud::bigquery::datatransfer::v1::EnrollDataSourcesRequest const &, Options)
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.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datatransfer::v1::EnrollDataSourcesRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status | a |
UnenrollDataSources(google::cloud::bigquery::datatransfer::v1::UnenrollDataSourcesRequest const &, Options)
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.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::bigquery::datatransfer::v1::UnenrollDataSourcesRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status | a |