Class: Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client
- Inherits:
-
Object
- Object
- Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client
- Includes:
- Paths
- Defined in:
- lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb
Overview
Client for the DataTransferService service.
This API allows users to manage their data transfers into BigQuery.
Defined Under Namespace
Classes: Configuration
Instance Attribute Summary collapse
-
#location_client ⇒ Google::Cloud::Location::Locations::Client
readonly
Get the associated client for mix-in of the Locations.
Class Method Summary collapse
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the DataTransferService Client class.
Instance Method Summary collapse
-
#check_valid_creds(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse
Returns true if valid credentials exist for the given data source and requesting user.
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the DataTransferService Client instance.
-
#create_transfer_config(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig
Creates a new data transfer configuration.
-
#delete_transfer_config(request, options = nil) {|response, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes a data transfer configuration, including any associated transfer runs and logs.
-
#delete_transfer_run(request, options = nil) {|response, operation| ... } ⇒ ::Google::Protobuf::Empty
Deletes the specified transfer run.
-
#enroll_data_sources(request, options = nil) {|response, operation| ... } ⇒ ::Google::Protobuf::Empty
Enroll data sources in a user project.
-
#get_data_source(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource
Retrieves a supported data source and returns its settings.
-
#get_transfer_config(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig
Returns information about a data transfer config.
-
#get_transfer_run(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun
Returns information about the particular transfer run.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new DataTransferService client object.
-
#list_data_sources(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>
Lists supported data sources and returns their settings.
-
#list_transfer_configs(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>
Returns information about all transfer configs owned by a project in the specified location.
-
#list_transfer_logs(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>
Returns log messages for the transfer run.
-
#list_transfer_runs(request, options = nil) {|response, operation| ... } ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>
Returns information about running and completed transfer runs.
-
#schedule_transfer_runs(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse
deprecated
Deprecated.
This method is deprecated and may be removed in the next major version update.
-
#start_manual_transfer_runs(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse
Start manual transfer runs to be executed now with schedule_time equal to current time.
-
#unenroll_data_sources(request, options = nil) {|response, operation| ... } ⇒ ::Google::Protobuf::Empty
Unenroll data sources in a user project.
-
#universe_domain ⇒ String
The effective universe domain.
-
#update_transfer_config(request, options = nil) {|response, operation| ... } ⇒ ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig
Updates a data transfer configuration.
Methods included from Paths
#data_source_path, #location_path, #project_path, #run_path, #transfer_config_path
Constructor Details
#initialize {|config| ... } ⇒ Client
Create a new DataTransferService client object.
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
# File 'lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb', line 182 def initialize # These require statements are intentionally placed here to initialize # the gRPC module only when it's required. # See https://github.com/googleapis/toolkit/issues/446 require "gapic/grpc" require "google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb" # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint.nil? || (@config.endpoint == Configuration::DEFAULT_ENDPOINT && !@config.endpoint.split(".").first.include?("-")) credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @data_transfer_service_stub = ::Gapic::ServiceStub.new( ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Stub, credentials: credentials, endpoint: @config.endpoint, endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, universe_domain: @config.universe_domain, channel_args: @config.channel_args, interceptors: @config.interceptors, channel_pool_config: @config.channel_pool ) @location_client = Google::Cloud::Location::Locations::Client.new do |config| config.credentials = credentials config.quota_project = @quota_project_id config.endpoint = @data_transfer_service_stub.endpoint config.universe_domain = @data_transfer_service_stub.universe_domain end end |
Instance Attribute Details
#location_client ⇒ Google::Cloud::Location::Locations::Client (readonly)
Get the associated client for mix-in of the Locations.
234 235 236 |
# File 'lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb', line 234 def location_client @location_client end |
Class Method Details
.configure {|config| ... } ⇒ Client::Configuration
Configure the DataTransferService Client class.
See Configuration for a description of the configuration fields.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb', line 64 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "Bigquery", "DataTransfer", "V1"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config.rpcs.get_data_source.timeout = 20.0 default_config.rpcs.get_data_source.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.list_data_sources.timeout = 20.0 default_config.rpcs.list_data_sources.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.create_transfer_config.timeout = 30.0 default_config.rpcs.update_transfer_config.timeout = 30.0 default_config.rpcs.delete_transfer_config.timeout = 20.0 default_config.rpcs.delete_transfer_config.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.get_transfer_config.timeout = 20.0 default_config.rpcs.get_transfer_config.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.list_transfer_configs.timeout = 20.0 default_config.rpcs.list_transfer_configs.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.schedule_transfer_runs.timeout = 30.0 default_config.rpcs.get_transfer_run.timeout = 20.0 default_config.rpcs.get_transfer_run.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.delete_transfer_run.timeout = 20.0 default_config.rpcs.delete_transfer_run.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.list_transfer_runs.timeout = 20.0 default_config.rpcs.list_transfer_runs.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.list_transfer_logs.timeout = 20.0 default_config.rpcs.list_transfer_logs.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config.rpcs.check_valid_creds.timeout = 20.0 default_config.rpcs.check_valid_creds.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] } default_config end yield @configure if block_given? @configure end |
Instance Method Details
#check_valid_creds(request, options = nil) ⇒ ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse #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.
1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 |
# File 'lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb', line 1615 def check_valid_creds request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.check_valid_creds..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.check_valid_creds.timeout, metadata: , retry_policy: @config.rpcs.check_valid_creds.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :check_valid_creds, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#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 configure.
See Configuration for a description of the configuration fields.
152 153 154 155 |
# File 'lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb', line 152 def configure yield @config if block_given? @config end |
#create_transfer_config(request, options = nil) ⇒ ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig #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.
522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 |
# File 'lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb', line 522 def create_transfer_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.create_transfer_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.create_transfer_config.timeout, metadata: , retry_policy: @config.rpcs.create_transfer_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :create_transfer_config, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_transfer_config(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_transfer_config(name: nil) ⇒ ::Google::Protobuf::Empty
Deletes a data transfer configuration, including any associated transfer runs and logs.
745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 |
# File 'lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb', line 745 def delete_transfer_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_transfer_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_transfer_config.timeout, metadata: , retry_policy: @config.rpcs.delete_transfer_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :delete_transfer_config, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#delete_transfer_run(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_transfer_run(name: nil) ⇒ ::Google::Protobuf::Empty
Deletes the specified transfer run.
1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 |
# File 'lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb', line 1316 def delete_transfer_run request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.delete_transfer_run..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.delete_transfer_run.timeout, metadata: , retry_policy: @config.rpcs.delete_transfer_run.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :delete_transfer_run, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#enroll_data_sources(request, options = nil) ⇒ ::Google::Protobuf::Empty #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.
1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 |
# File 'lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb', line 1712 def enroll_data_sources request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.enroll_data_sources..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.enroll_data_sources.timeout, metadata: , retry_policy: @config.rpcs.enroll_data_sources.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :enroll_data_sources, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_data_source(request, options = nil) ⇒ ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource #get_data_source(name: nil) ⇒ ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource
Retrieves a supported data source and returns its settings.
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 |
# File 'lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb', line 284 def get_data_source request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_data_source..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_data_source.timeout, metadata: , retry_policy: @config.rpcs.get_data_source.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :get_data_source, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_transfer_config(request, options = nil) ⇒ ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig #get_transfer_config(name: nil) ⇒ ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig
Returns information about a data transfer config.
833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 |
# File 'lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb', line 833 def get_transfer_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_transfer_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_transfer_config.timeout, metadata: , retry_policy: @config.rpcs.get_transfer_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :get_transfer_config, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#get_transfer_run(request, options = nil) ⇒ ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun #get_transfer_run(name: nil) ⇒ ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun
Returns information about the particular transfer run.
1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 |
# File 'lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb', line 1227 def get_transfer_run request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.get_transfer_run..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.get_transfer_run.timeout, metadata: , retry_policy: @config.rpcs.get_transfer_run.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :get_transfer_run, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_data_sources(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource> #list_data_sources(parent: nil, page_token: nil, page_size: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>
Lists supported data sources and returns their settings.
384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 |
# File 'lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb', line 384 def list_data_sources request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_data_sources..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_data_sources.timeout, metadata: , retry_policy: @config.rpcs.list_data_sources.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :list_data_sources, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_data_sources, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_transfer_configs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig> #list_transfer_configs(parent: nil, data_source_ids: nil, page_token: nil, page_size: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>
Returns information about all transfer configs owned by a project in the specified location.
936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 |
# File 'lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb', line 936 def list_transfer_configs request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_transfer_configs..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_transfer_configs.timeout, metadata: , retry_policy: @config.rpcs.list_transfer_configs.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :list_transfer_configs, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_configs, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_transfer_logs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage> #list_transfer_logs(parent: nil, page_token: nil, page_size: nil, message_types: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>
Returns log messages for the transfer run.
1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 |
# File 'lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb', line 1525 def list_transfer_logs request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_transfer_logs..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_transfer_logs.timeout, metadata: , retry_policy: @config.rpcs.list_transfer_logs.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :list_transfer_logs, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_logs, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#list_transfer_runs(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun> #list_transfer_runs(parent: nil, states: nil, page_token: nil, page_size: nil, run_attempt: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>
Returns information about running and completed transfer runs.
1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 |
# File 'lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb', line 1421 def list_transfer_runs request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.list_transfer_runs..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.list_transfer_runs.timeout, metadata: , retry_policy: @config.rpcs.list_transfer_runs.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :list_transfer_runs, request, options: do |response, operation| response = ::Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_runs, request, response, operation, yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#schedule_transfer_runs(request, options = nil) ⇒ ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse #schedule_transfer_runs(parent: nil, start_time: nil, end_time: nil) ⇒ ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse
This method is deprecated and may be removed in the next major version update.
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.
1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 |
# File 'lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb', line 1037 def schedule_transfer_runs request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.schedule_transfer_runs..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.schedule_transfer_runs.timeout, metadata: , retry_policy: @config.rpcs.schedule_transfer_runs.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :schedule_transfer_runs, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#start_manual_transfer_runs(request, options = nil) ⇒ ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse #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.
1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 |
# File 'lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb', line 1138 def start_manual_transfer_runs request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.start_manual_transfer_runs..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.parent header_params["parent"] = request.parent end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.start_manual_transfer_runs.timeout, metadata: , retry_policy: @config.rpcs.start_manual_transfer_runs.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :start_manual_transfer_runs, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#unenroll_data_sources(request, options = nil) ⇒ ::Google::Protobuf::Empty #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.
1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 |
# File 'lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb', line 1806 def unenroll_data_sources request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.unenroll_data_sources..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.name header_params["name"] = request.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.unenroll_data_sources.timeout, metadata: , retry_policy: @config.rpcs.unenroll_data_sources.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :unenroll_data_sources, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |
#universe_domain ⇒ String
The effective universe domain
162 163 164 |
# File 'lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb', line 162 def universe_domain @data_transfer_service_stub.universe_domain end |
#update_transfer_config(request, options = nil) ⇒ ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig #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.
656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 |
# File 'lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb', line 656 def update_transfer_config request, = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest # Converts hash and nil to an options object = ::Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs.update_transfer_config..to_h # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::Bigquery::DataTransfer::V1::VERSION [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? [:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = {} if request.transfer_config&.name header_params["transfer_config.name"] = request.transfer_config.name end request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") [:"x-goog-request-params"] ||= request_params_header .apply_defaults timeout: @config.rpcs.update_transfer_config.timeout, metadata: , retry_policy: @config.rpcs.update_transfer_config.retry_policy .apply_defaults timeout: @config.timeout, metadata: @config., retry_policy: @config.retry_policy @data_transfer_service_stub.call_rpc :update_transfer_config, request, options: do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end |