Reference documentation and code samples for the BigQuery Data Transfer Service V1 API class Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.
REST client for the DataTransferService service.
This API allows users to manage their data transfers into BigQuery.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the DataTransferService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all DataTransferService clients ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.configure do |config| config.timeout = 10.0 end
#check_valid_creds
def check_valid_creds(request, options = nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse
def check_valid_creds(name: nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse
Returns true if valid credentials exist for the given data source and requesting user.
def check_valid_creds(request, options = nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse
check_valid_creds
via a request object, either of type
CheckValidCredsRequest or an equivalent Hash.
- request (::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def check_valid_creds(name: nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse
check_valid_creds
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The data source in the form:
projects/{project_id}/dataSources/{data_source_id}
orprojects/{project_id}/locations/{location_id}/dataSources/{data_source_id}
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/bigquery/data_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new # Call the check_valid_creds method. result = client.check_valid_creds request # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse. p result
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the DataTransferService Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_transfer_config
def create_transfer_config(request, options = nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig
def create_transfer_config(parent: nil, transfer_config: nil, authorization_code: nil, version_info: nil, service_account_name: nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig
Creates a new data transfer configuration.
def create_transfer_config(request, options = nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig
create_transfer_config
via a request object, either of type
CreateTransferConfigRequest or an equivalent Hash.
- request (::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_transfer_config(parent: nil, transfer_config: nil, authorization_code: nil, version_info: nil, service_account_name: nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig
create_transfer_config
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — 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, ::Hash) — Required. Data transfer configuration to create.
-
authorization_code (::String) — Deprecated: Authorization code was required when
transferConfig.dataSourceId
is 'youtube_channel' but it is no longer used in any data sources. Useversion_info
instead.Optional OAuth2 authorization code to use with this transfer configuration. This is required only if
transferConfig.dataSourceId
is 'youtube_channel' and new credentials are needed, as indicated byCheckValidCreds
. In order to obtain authorization_code, make a request to the following URL:https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
- The client_id is the OAuth client_id of the data source as returned by ListDataSources method.
- data_source_scopes are the scopes returned by ListDataSources method.
Note that this should not be set when
service_account_name
is used to create the transfer config. -
version_info (::String) — Optional version info. This parameter replaces
authorization_code
which is no longer used in any data sources. This is required only iftransferConfig.dataSourceId
is 'youtube_channel' or new credentials are needed, as indicated byCheckValidCreds
. In order to obtain version info, make a request to the following URL:https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
- The client_id is the OAuth client_id of the data source as returned by ListDataSources method.
- data_source_scopes are the scopes returned by ListDataSources method.
Note that this should not be set when
service_account_name
is used to create the transfer config. -
service_account_name (::String) — Optional service account email. If this field is set, the transfer config
will be created with this service account's credentials. It requires that
the requesting user calling this API has permissions to act as this service
account.
Note that not all data sources support service account credentials when creating a transfer config. For the latest list of data sources, read about using service accounts.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/bigquery/data_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new # Call the create_transfer_config method. result = client.create_transfer_config request # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. p result
#delete_transfer_config
def delete_transfer_config(request, options = nil) -> ::Google::Protobuf::Empty
def delete_transfer_config(name: nil) -> ::Google::Protobuf::Empty
Deletes a data transfer configuration, including any associated transfer runs and logs.
def delete_transfer_config(request, options = nil) -> ::Google::Protobuf::Empty
delete_transfer_config
via a request object, either of type
Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest or an equivalent Hash.
- request (::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_transfer_config(name: nil) -> ::Google::Protobuf::Empty
delete_transfer_config
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The field will contain name of the resource requested, for
example:
projects/{project_id}/transferConfigs/{config_id}
orprojects/{project_id}/locations/{location_id}/transferConfigs/{config_id}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/bigquery/data_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new # Call the delete_transfer_config method. result = client.delete_transfer_config request # The returned object is of type Google::Protobuf::Empty. p result
#delete_transfer_run
def delete_transfer_run(request, options = nil) -> ::Google::Protobuf::Empty
def delete_transfer_run(name: nil) -> ::Google::Protobuf::Empty
Deletes the specified transfer run.
def delete_transfer_run(request, options = nil) -> ::Google::Protobuf::Empty
delete_transfer_run
via a request object, either of type
Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest or an equivalent Hash.
- request (::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_transfer_run(name: nil) -> ::Google::Protobuf::Empty
delete_transfer_run
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The field will contain name of the resource requested, for
example:
projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}
orprojects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/bigquery/data_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new # Call the delete_transfer_run method. result = client.delete_transfer_run request # The returned object is of type Google::Protobuf::Empty. p result
#enroll_data_sources
def enroll_data_sources(request, options = nil) -> ::Google::Protobuf::Empty
def enroll_data_sources(name: nil, data_source_ids: nil) -> ::Google::Protobuf::Empty
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.
def enroll_data_sources(request, options = nil) -> ::Google::Protobuf::Empty
enroll_data_sources
via a request object, either of type
EnrollDataSourcesRequest or an equivalent Hash.
- request (::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def enroll_data_sources(name: nil, data_source_ids: nil) -> ::Google::Protobuf::Empty
enroll_data_sources
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the project resource in the form:
projects/{project_id}
- data_source_ids (::Array<::String>) — Data sources that are enrolled. It is required to provide at least one data source id.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/bigquery/data_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new # Call the enroll_data_sources method. result = client.enroll_data_sources request # The returned object is of type Google::Protobuf::Empty. p result
#get_data_source
def get_data_source(request, options = nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource
def get_data_source(name: nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource
Retrieves a supported data source and returns its settings.
def get_data_source(request, options = nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource
get_data_source
via a request object, either of type
GetDataSourceRequest or an equivalent Hash.
- request (::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_data_source(name: nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource
get_data_source
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The field will contain name of the resource requested, for
example:
projects/{project_id}/dataSources/{data_source_id}
orprojects/{project_id}/locations/{location_id}/dataSources/{data_source_id}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Bigquery::DataTransfer::V1::DataSource)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/bigquery/data_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new # Call the get_data_source method. result = client.get_data_source request # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::DataSource. p result
#get_transfer_config
def get_transfer_config(request, options = nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig
def get_transfer_config(name: nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig
Returns information about a data transfer config.
def get_transfer_config(request, options = nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig
get_transfer_config
via a request object, either of type
GetTransferConfigRequest or an equivalent Hash.
- request (::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_transfer_config(name: nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig
get_transfer_config
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The field will contain name of the resource requested, for
example:
projects/{project_id}/transferConfigs/{config_id}
orprojects/{project_id}/locations/{location_id}/transferConfigs/{config_id}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/bigquery/data_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new # Call the get_transfer_config method. result = client.get_transfer_config request # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. p result
#get_transfer_run
def get_transfer_run(request, options = nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun
def get_transfer_run(name: nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun
Returns information about the particular transfer run.
def get_transfer_run(request, options = nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun
get_transfer_run
via a request object, either of type
GetTransferRunRequest or an equivalent Hash.
- request (::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_transfer_run(name: nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun
get_transfer_run
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The field will contain name of the resource requested, for
example:
projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}
orprojects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/bigquery/data_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new # Call the get_transfer_run method. result = client.get_transfer_run request # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferRun. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new DataTransferService REST client object.
- (config) — Configure the DataTransferService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| config.timeout = 10.0 end
#list_data_sources
def list_data_sources(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>
def list_data_sources(parent: nil, page_token: nil, page_size: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>
Lists supported data sources and returns their settings.
def list_data_sources(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>
list_data_sources
via a request object, either of type
ListDataSourcesRequest or an equivalent Hash.
- request (::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_data_sources(parent: nil, page_token: nil, page_size: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>
list_data_sources
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The BigQuery project id for which data sources should be
returned. Must be in the form:
projects/{project_id}
orprojects/{project_id}/locations/{location_id}
-
page_token (::String) — Pagination token, which can be used to request a specific page
of
ListDataSourcesRequest
list results. For multiple-page results,ListDataSourcesResponse
outputs anext_page
token, which can be used as thepage_token
value to request the next page of list results. - page_size (::Integer) — Page size. The default page size is the maximum value of 1000 results.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/bigquery/data_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.new # Call the list_data_sources method. result = client.list_data_sources request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource. p item end
#list_transfer_configs
def list_transfer_configs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>
def list_transfer_configs(parent: nil, data_source_ids: nil, page_token: nil, page_size: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>
Returns information about all transfer configs owned by a project in the specified location.
def list_transfer_configs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>
list_transfer_configs
via a request object, either of type
ListTransferConfigsRequest or an equivalent Hash.
- request (::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_transfer_configs(parent: nil, data_source_ids: nil, page_token: nil, page_size: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>
list_transfer_configs
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. The BigQuery project id for which transfer configs
should be returned:
projects/{project_id}
orprojects/{project_id}/locations/{location_id}
- data_source_ids (::Array<::String>) — When specified, only configurations of requested data sources are returned.
-
page_token (::String) — Pagination token, which can be used to request a specific page
of
ListTransfersRequest
list results. For multiple-page results,ListTransfersResponse
outputs anext_page
token, which can be used as thepage_token
value to request the next page of list results. - page_size (::Integer) — Page size. The default page size is the maximum value of 1000 results.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/bigquery/data_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new # Call the list_transfer_configs method. result = client.list_transfer_configs request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. p item end
#list_transfer_logs
def list_transfer_logs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>
def list_transfer_logs(parent: nil, page_token: nil, page_size: nil, message_types: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>
Returns log messages for the transfer run.
def list_transfer_logs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>
list_transfer_logs
via a request object, either of type
ListTransferLogsRequest or an equivalent Hash.
- request (::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_transfer_logs(parent: nil, page_token: nil, page_size: nil, message_types: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>
list_transfer_logs
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. Transfer run name in the form:
projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}
orprojects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}
-
page_token (::String) — Pagination token, which can be used to request a specific page
of
ListTransferLogsRequest
list results. For multiple-page results,ListTransferLogsResponse
outputs anext_page
token, which can be used as thepage_token
value to request the next page of list results. - page_size (::Integer) — Page size. The default page size is the maximum value of 1000 results.
- message_types (::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage::MessageSeverity>) — Message types to return. If not populated - INFO, WARNING and ERROR messages are returned.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/bigquery/data_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new # Call the list_transfer_logs method. result = client.list_transfer_logs request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage. p item end
#list_transfer_runs
def list_transfer_runs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>
def list_transfer_runs(parent: nil, states: nil, page_token: nil, page_size: nil, run_attempt: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>
Returns information about running and completed transfer runs.
def list_transfer_runs(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>
list_transfer_runs
via a request object, either of type
ListTransferRunsRequest or an equivalent Hash.
- request (::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_transfer_runs(parent: nil, states: nil, page_token: nil, page_size: nil, run_attempt: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>
list_transfer_runs
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. Name of transfer configuration for which transfer runs should be
retrieved. Format of transfer configuration resource name is:
projects/{project_id}/transferConfigs/{config_id}
orprojects/{project_id}/locations/{location_id}/transferConfigs/{config_id}
. - states (::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferState>) — When specified, only transfer runs with requested states are returned.
-
page_token (::String) — Pagination token, which can be used to request a specific page
of
ListTransferRunsRequest
list results. For multiple-page results,ListTransferRunsResponse
outputs anext_page
token, which can be used as thepage_token
value to request the next page of list results. - page_size (::Integer) — Page size. The default page size is the maximum value of 1000 results.
- run_attempt (::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest::RunAttempt) — Indicates how run attempts are to be pulled.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/bigquery/data_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new # Call the list_transfer_runs method. result = client.list_transfer_runs request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#logger
def logger() -> Logger
The logger used for request/response debug logging.
- (Logger)
#schedule_transfer_runs
def schedule_transfer_runs(request, options = nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse
def schedule_transfer_runs(parent: nil, start_time: nil, end_time: nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse
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.
def schedule_transfer_runs(request, options = nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse
schedule_transfer_runs
via a request object, either of type
ScheduleTransferRunsRequest or an equivalent Hash.
- request (::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def schedule_transfer_runs(parent: nil, start_time: nil, end_time: nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse
schedule_transfer_runs
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. Transfer configuration name in the form:
projects/{project_id}/transferConfigs/{config_id}
orprojects/{project_id}/locations/{location_id}/transferConfigs/{config_id}
. -
start_time (::Google::Protobuf::Timestamp, ::Hash) — Required. Start time of the range of transfer runs. For example,
"2017-05-25T00:00:00+00:00"
. -
end_time (::Google::Protobuf::Timestamp, ::Hash) — Required. End time of the range of transfer runs. For example,
"2017-05-30T00:00:00+00:00"
.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/bigquery/data_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new # Call the schedule_transfer_runs method. result = client.schedule_transfer_runs request # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse. p result
#start_manual_transfer_runs
def start_manual_transfer_runs(request, options = nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse
def start_manual_transfer_runs(parent: nil, requested_time_range: nil, requested_run_time: nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse
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.
def start_manual_transfer_runs(request, options = nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse
start_manual_transfer_runs
via a request object, either of type
StartManualTransferRunsRequest or an equivalent Hash.
- request (::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def start_manual_transfer_runs(parent: nil, requested_time_range: nil, requested_run_time: nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse
start_manual_transfer_runs
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. Transfer configuration name in the form:
projects/{project_id}/transferConfigs/{config_id}
orprojects/{project_id}/locations/{location_id}/transferConfigs/{config_id}
. - requested_time_range (::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest::TimeRange, ::Hash) — A time_range start and end timestamp for historical data files or reports that are scheduled to be transferred by the scheduled transfer run. requested_time_range must be a past time and cannot include future time values.
- requested_run_time (::Google::Protobuf::Timestamp, ::Hash) — A run_time timestamp for historical data files or reports that are scheduled to be transferred by the scheduled transfer run. requested_run_time must be a past time and cannot include future time values.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/bigquery/data_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new # Call the start_manual_transfer_runs method. result = client.start_manual_transfer_runs request # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse. p result
#unenroll_data_sources
def unenroll_data_sources(request, options = nil) -> ::Google::Protobuf::Empty
def unenroll_data_sources(name: nil, data_source_ids: nil) -> ::Google::Protobuf::Empty
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.
def unenroll_data_sources(request, options = nil) -> ::Google::Protobuf::Empty
unenroll_data_sources
via a request object, either of type
UnenrollDataSourcesRequest or an equivalent Hash.
- request (::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def unenroll_data_sources(name: nil, data_source_ids: nil) -> ::Google::Protobuf::Empty
unenroll_data_sources
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The name of the project resource in the form:
projects/{project_id}
- data_source_ids (::Array<::String>) — Data sources that are unenrolled. It is required to provide at least one data source id.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/bigquery/data_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new # Call the unenroll_data_sources method. result = client.unenroll_data_sources request # The returned object is of type Google::Protobuf::Empty. p result
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#update_transfer_config
def update_transfer_config(request, options = nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig
def update_transfer_config(transfer_config: nil, authorization_code: nil, update_mask: nil, version_info: nil, service_account_name: nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig
Updates a data transfer configuration. All fields must be set, even if they are not updated.
def update_transfer_config(request, options = nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig
update_transfer_config
via a request object, either of type
UpdateTransferConfigRequest or an equivalent Hash.
- request (::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_transfer_config(transfer_config: nil, authorization_code: nil, update_mask: nil, version_info: nil, service_account_name: nil) -> ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig
update_transfer_config
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- transfer_config (::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig, ::Hash) — Required. Data transfer configuration to create.
-
authorization_code (::String) — Deprecated: Authorization code was required when
transferConfig.dataSourceId
is 'youtube_channel' but it is no longer used in any data sources. Useversion_info
instead.Optional OAuth2 authorization code to use with this transfer configuration. This is required only if
transferConfig.dataSourceId
is 'youtube_channel' and new credentials are needed, as indicated byCheckValidCreds
. In order to obtain authorization_code, make a request to the following URL:https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
- The client_id is the OAuth client_id of the data source as returned by ListDataSources method.
- data_source_scopes are the scopes returned by ListDataSources method.
Note that this should not be set when
service_account_name
is used to update the transfer config. - update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. Required list of fields to be updated in this request.
-
version_info (::String) — Optional version info. This parameter replaces
authorization_code
which is no longer used in any data sources. This is required only iftransferConfig.dataSourceId
is 'youtube_channel' or new credentials are needed, as indicated byCheckValidCreds
. In order to obtain version info, make a request to the following URL:https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
- The client_id is the OAuth client_id of the data source as returned by ListDataSources method.
- data_source_scopes are the scopes returned by ListDataSources method.
Note that this should not be set when
service_account_name
is used to update the transfer config. -
service_account_name (::String) — Optional service account email. If this field is set, the transfer config
will be created with this service account's credentials. It requires that
the requesting user calling this API has permissions to act as this service
account.
Note that not all data sources support service account credentials when creating a transfer config. For the latest list of data sources, read about using service accounts.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/bigquery/data_transfer/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new # Call the update_transfer_config method. result = client.update_transfer_config request # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. p result