google-cloud-bigquery-data_transfer 0.2.5 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/lib/google/cloud/bigquery/data_transfer.rb +7 -3
- data/lib/google/cloud/bigquery/data_transfer/v1.rb +11 -3
- data/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service_client.rb +160 -5
- data/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service_client_config.json +5 -0
- data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/cloud/bigquery/data_transfer/v1/data_transfer.rb +1 -2
- data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/cloud/bigquery/datatransfer/v1/datasource.rb +25 -0
- data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/cloud/bigquery/datatransfer/v1/datatransfer.rb +66 -14
- data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/cloud/bigquery/datatransfer/v1/transfer.rb +37 -19
- data/lib/google/cloud/bigquery/data_transfer/v1/doc/google/protobuf/wrappers.rb +3 -67
- data/lib/google/cloud/bigquery/data_transfer/version.rb +1 -1
- data/lib/google/cloud/bigquery/datatransfer/v1/datasource_pb.rb +170 -0
- data/lib/google/cloud/bigquery/datatransfer/v1/datasource_services_pb.rb +103 -0
- data/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_pb.rb +21 -0
- data/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb.rb +8 -1
- data/lib/google/cloud/bigquery/datatransfer/v1/transfer_pb.rb +7 -0
- metadata +8 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc90505271ff31b135796655d8c8e92c8c3e2e9f3c2a21f32bc8d5525bfd1962
|
4
|
+
data.tar.gz: 9edae69922aa7e185f59e63cc2bca5c36d66478ce785d894c6c536cd97f3fa2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd0354755bd7183603b23bb85f2c2c08fa5b1f73c0e02c908c481c24eb6b7f1fed0fe66ab8833b1379998e4f769b4928c08503a6930eaf9015f2897b28af0f75
|
7
|
+
data.tar.gz: 90ff6bd37eaaa3f30ec4dae5d580e3491ad3e5a3522f644d4847f98d4108358335ac46ed95235cd6180622fa5dac34af5d0a295814e8ba71686f9917cf4652fc
|
data/README.md
CHANGED
@@ -13,7 +13,7 @@ steps:
|
|
13
13
|
1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
14
14
|
2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
15
15
|
3. [Enable the BigQuery Data Transfer API.](https://console.cloud.google.com/apis/library/bigquerydatatransfer.googleapis.com)
|
16
|
-
4. [Setup Authentication.](https://googleapis.
|
16
|
+
4. [Setup Authentication.](https://googleapis.dev/ruby/google-cloud-bigquery-data_transfer/latest/file.AUTHENTICATION.html)
|
17
17
|
|
18
18
|
### Installation
|
19
19
|
```
|
@@ -26,7 +26,7 @@ $ gem install google-cloud-bigquery-data_transfer
|
|
26
26
|
require "google/cloud/bigquery/data_transfer"
|
27
27
|
|
28
28
|
data_transfer_client = Google::Cloud::Bigquery::DataTransfer.new
|
29
|
-
formatted_parent = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferServiceClient.
|
29
|
+
formatted_parent = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferServiceClient.location_path(project_id, "us-central1")
|
30
30
|
|
31
31
|
# Iterate over all results.
|
32
32
|
data_transfer_client.list_data_sources(formatted_parent).each do |element|
|
@@ -50,14 +50,14 @@ end
|
|
50
50
|
- View this [repository's main README](https://github.com/googleapis/google-cloud-ruby/blob/master/README.md)
|
51
51
|
to see the full list of Cloud APIs that we cover.
|
52
52
|
|
53
|
-
[Client Library Documentation]: https://googleapis.
|
53
|
+
[Client Library Documentation]: https://googleapis.dev/ruby/google-cloud-bigquery-data_transfer/latest
|
54
54
|
[Product Documentation]: https://cloud.google.com/bigquery/transfer/
|
55
55
|
|
56
56
|
## Enabling Logging
|
57
57
|
|
58
58
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
59
59
|
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
|
60
|
-
or a [`Google::Cloud::Logging::Logger`](https://googleapis.
|
60
|
+
or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
|
61
61
|
that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
62
62
|
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
63
63
|
|
@@ -36,7 +36,7 @@ module Google
|
|
36
36
|
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
37
37
|
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
38
38
|
# 3. [Enable the BigQuery Data Transfer API.](https://console.cloud.google.com/apis/library/bigquerydatatransfer.googleapis.com)
|
39
|
-
# 4. [Setup Authentication.](https://googleapis.
|
39
|
+
# 4. [Setup Authentication.](https://googleapis.dev/ruby/google-cloud-bigquery-data_transfer/latest/file.AUTHENTICATION.html)
|
40
40
|
#
|
41
41
|
# ### Installation
|
42
42
|
# ```
|
@@ -49,7 +49,7 @@ module Google
|
|
49
49
|
# require "google/cloud/bigquery/data_transfer"
|
50
50
|
#
|
51
51
|
# data_transfer_client = Google::Cloud::Bigquery::DataTransfer.new
|
52
|
-
# formatted_parent = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferServiceClient.
|
52
|
+
# formatted_parent = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferServiceClient.location_path(project_id, "us-central1")
|
53
53
|
#
|
54
54
|
# # Iterate over all results.
|
55
55
|
# data_transfer_client.list_data_sources(formatted_parent).each do |element|
|
@@ -77,7 +77,7 @@ module Google
|
|
77
77
|
#
|
78
78
|
# To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
79
79
|
# The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
|
80
|
-
# or a [`Google::Cloud::Logging::Logger`](https://googleapis.
|
80
|
+
# or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
|
81
81
|
# that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
82
82
|
# and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
83
83
|
#
|
@@ -146,6 +146,10 @@ module Google
|
|
146
146
|
# The default timeout, in seconds, for calls made through this client.
|
147
147
|
# @param metadata [Hash]
|
148
148
|
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
149
|
+
# @param service_address [String]
|
150
|
+
# Override for the service hostname, or `nil` to leave as the default.
|
151
|
+
# @param service_port [Integer]
|
152
|
+
# Override for the service port, or `nil` to leave as the default.
|
149
153
|
# @param exception_transformer [Proc]
|
150
154
|
# An optional proc that intercepts any exceptions raised during an API call to inject
|
151
155
|
# custom error handling.
|
@@ -36,7 +36,7 @@ module Google
|
|
36
36
|
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
37
37
|
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
38
38
|
# 3. [Enable the BigQuery Data Transfer API.](https://console.cloud.google.com/apis/library/bigquerydatatransfer.googleapis.com)
|
39
|
-
# 4. [Setup Authentication.](https://googleapis.
|
39
|
+
# 4. [Setup Authentication.](https://googleapis.dev/ruby/google-cloud-bigquery-data_transfer/latest/file.AUTHENTICATION.html)
|
40
40
|
#
|
41
41
|
# ### Installation
|
42
42
|
# ```
|
@@ -49,7 +49,7 @@ module Google
|
|
49
49
|
# require "google/cloud/bigquery/data_transfer"
|
50
50
|
#
|
51
51
|
# data_transfer_client = Google::Cloud::Bigquery::DataTransfer.new(version: :v1)
|
52
|
-
# formatted_parent = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferServiceClient.
|
52
|
+
# formatted_parent = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferServiceClient.location_path(project_id, "us-central1")
|
53
53
|
#
|
54
54
|
# # Iterate over all results.
|
55
55
|
# data_transfer_client.list_data_sources(formatted_parent).each do |element|
|
@@ -77,7 +77,7 @@ module Google
|
|
77
77
|
#
|
78
78
|
# To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
79
79
|
# The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib-2.5.0/libdoc/logger/rdoc/Logger.html) as shown below,
|
80
|
-
# or a [`Google::Cloud::Logging::Logger`](https://googleapis.
|
80
|
+
# or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
|
81
81
|
# that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
82
82
|
# and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
83
83
|
#
|
@@ -134,6 +134,10 @@ module Google
|
|
134
134
|
# The default timeout, in seconds, for calls made through this client.
|
135
135
|
# @param metadata [Hash]
|
136
136
|
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
137
|
+
# @param service_address [String]
|
138
|
+
# Override for the service hostname, or `nil` to leave as the default.
|
139
|
+
# @param service_port [Integer]
|
140
|
+
# Override for the service port, or `nil` to leave as the default.
|
137
141
|
# @param exception_transformer [Proc]
|
138
142
|
# An optional proc that intercepts any exceptions raised during an API call to inject
|
139
143
|
# custom error handling.
|
@@ -143,6 +147,8 @@ module Google
|
|
143
147
|
client_config: nil,
|
144
148
|
timeout: nil,
|
145
149
|
metadata: nil,
|
150
|
+
service_address: nil,
|
151
|
+
service_port: nil,
|
146
152
|
exception_transformer: nil,
|
147
153
|
lib_name: nil,
|
148
154
|
lib_version: nil
|
@@ -154,6 +160,8 @@ module Google
|
|
154
160
|
metadata: metadata,
|
155
161
|
exception_transformer: exception_transformer,
|
156
162
|
lib_name: lib_name,
|
163
|
+
service_address: service_address,
|
164
|
+
service_port: service_port,
|
157
165
|
lib_version: lib_version
|
158
166
|
}.select { |_, v| v != nil }
|
159
167
|
Google::Cloud::Bigquery::DataTransfer::V1::DataTransferServiceClient.new(**kwargs)
|
@@ -84,6 +84,30 @@ module Google
|
|
84
84
|
].freeze
|
85
85
|
|
86
86
|
|
87
|
+
LOCATION_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
88
|
+
"projects/{project}/locations/{location}"
|
89
|
+
)
|
90
|
+
|
91
|
+
private_constant :LOCATION_PATH_TEMPLATE
|
92
|
+
|
93
|
+
LOCATION_DATA_SOURCE_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
94
|
+
"projects/{project}/locations/{location}/dataSources/{data_source}"
|
95
|
+
)
|
96
|
+
|
97
|
+
private_constant :LOCATION_DATA_SOURCE_PATH_TEMPLATE
|
98
|
+
|
99
|
+
LOCATION_RUN_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
100
|
+
"projects/{project}/locations/{location}/transferConfigs/{transfer_config}/runs/{run}"
|
101
|
+
)
|
102
|
+
|
103
|
+
private_constant :LOCATION_RUN_PATH_TEMPLATE
|
104
|
+
|
105
|
+
LOCATION_TRANSFER_CONFIG_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
106
|
+
"projects/{project}/locations/{location}/transferConfigs/{transfer_config}"
|
107
|
+
)
|
108
|
+
|
109
|
+
private_constant :LOCATION_TRANSFER_CONFIG_PATH_TEMPLATE
|
110
|
+
|
87
111
|
PROJECT_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
88
112
|
"projects/{project}"
|
89
113
|
)
|
@@ -108,6 +132,58 @@ module Google
|
|
108
132
|
|
109
133
|
private_constant :PROJECT_TRANSFER_CONFIG_PATH_TEMPLATE
|
110
134
|
|
135
|
+
# Returns a fully-qualified location resource name string.
|
136
|
+
# @param project [String]
|
137
|
+
# @param location [String]
|
138
|
+
# @return [String]
|
139
|
+
def self.location_path project, location
|
140
|
+
LOCATION_PATH_TEMPLATE.render(
|
141
|
+
:"project" => project,
|
142
|
+
:"location" => location
|
143
|
+
)
|
144
|
+
end
|
145
|
+
|
146
|
+
# Returns a fully-qualified location_data_source resource name string.
|
147
|
+
# @param project [String]
|
148
|
+
# @param location [String]
|
149
|
+
# @param data_source [String]
|
150
|
+
# @return [String]
|
151
|
+
def self.location_data_source_path project, location, data_source
|
152
|
+
LOCATION_DATA_SOURCE_PATH_TEMPLATE.render(
|
153
|
+
:"project" => project,
|
154
|
+
:"location" => location,
|
155
|
+
:"data_source" => data_source
|
156
|
+
)
|
157
|
+
end
|
158
|
+
|
159
|
+
# Returns a fully-qualified location_run resource name string.
|
160
|
+
# @param project [String]
|
161
|
+
# @param location [String]
|
162
|
+
# @param transfer_config [String]
|
163
|
+
# @param run [String]
|
164
|
+
# @return [String]
|
165
|
+
def self.location_run_path project, location, transfer_config, run
|
166
|
+
LOCATION_RUN_PATH_TEMPLATE.render(
|
167
|
+
:"project" => project,
|
168
|
+
:"location" => location,
|
169
|
+
:"transfer_config" => transfer_config,
|
170
|
+
:"run" => run
|
171
|
+
)
|
172
|
+
end
|
173
|
+
|
174
|
+
# Returns a fully-qualified location_transfer_config resource name string.
|
175
|
+
# @param project [String]
|
176
|
+
# @param location [String]
|
177
|
+
# @param transfer_config [String]
|
178
|
+
# @return [String]
|
179
|
+
def self.location_transfer_config_path project, location, transfer_config
|
180
|
+
LOCATION_TRANSFER_CONFIG_PATH_TEMPLATE.render(
|
181
|
+
:"project" => project,
|
182
|
+
:"location" => location,
|
183
|
+
:"transfer_config" => transfer_config
|
184
|
+
)
|
185
|
+
end
|
186
|
+
|
111
187
|
# Returns a fully-qualified project resource name string.
|
112
188
|
# @param project [String]
|
113
189
|
# @return [String]
|
@@ -178,6 +254,10 @@ module Google
|
|
178
254
|
# The default timeout, in seconds, for calls made through this client.
|
179
255
|
# @param metadata [Hash]
|
180
256
|
# Default metadata to be sent with each request. This can be overridden on a per call basis.
|
257
|
+
# @param service_address [String]
|
258
|
+
# Override for the service hostname, or `nil` to leave as the default.
|
259
|
+
# @param service_port [Integer]
|
260
|
+
# Override for the service port, or `nil` to leave as the default.
|
181
261
|
# @param exception_transformer [Proc]
|
182
262
|
# An optional proc that intercepts any exceptions raised during an API call to inject
|
183
263
|
# custom error handling.
|
@@ -187,6 +267,8 @@ module Google
|
|
187
267
|
client_config: {},
|
188
268
|
timeout: DEFAULT_TIMEOUT,
|
189
269
|
metadata: nil,
|
270
|
+
service_address: nil,
|
271
|
+
service_port: nil,
|
190
272
|
exception_transformer: nil,
|
191
273
|
lib_name: nil,
|
192
274
|
lib_version: ""
|
@@ -241,8 +323,8 @@ module Google
|
|
241
323
|
end
|
242
324
|
|
243
325
|
# Allow overriding the service path/port in subclasses.
|
244
|
-
service_path = self.class::SERVICE_ADDRESS
|
245
|
-
port = self.class::DEFAULT_SERVICE_PORT
|
326
|
+
service_path = service_address || self.class::SERVICE_ADDRESS
|
327
|
+
port = service_port || self.class::DEFAULT_SERVICE_PORT
|
246
328
|
interceptors = self.class::GRPC_INTERCEPTORS
|
247
329
|
@data_transfer_service_stub = Google::Gax::Grpc.create_stub(
|
248
330
|
service_path,
|
@@ -359,6 +441,14 @@ module Google
|
|
359
441
|
{'name' => request.name}
|
360
442
|
end
|
361
443
|
)
|
444
|
+
@start_manual_transfer_runs = Google::Gax.create_api_call(
|
445
|
+
@data_transfer_service_stub.method(:start_manual_transfer_runs),
|
446
|
+
defaults["start_manual_transfer_runs"],
|
447
|
+
exception_transformer: exception_transformer,
|
448
|
+
params_extractor: proc do |request|
|
449
|
+
{'parent' => request.parent}
|
450
|
+
end
|
451
|
+
)
|
362
452
|
end
|
363
453
|
|
364
454
|
# Service calls
|
@@ -455,7 +545,7 @@ module Google
|
|
455
545
|
#
|
456
546
|
# @param parent [String]
|
457
547
|
# The BigQuery project id where the transfer configuration should be created.
|
458
|
-
# Must be in the format
|
548
|
+
# Must be in the format projects/\\{project_id}/locations/\\{location_id}
|
459
549
|
# If specified location and location of the destination bigquery dataset
|
460
550
|
# do not match - the request will fail.
|
461
551
|
# @param transfer_config [Google::Cloud::Bigquery::Datatransfer::V1::TransferConfig | Hash]
|
@@ -479,6 +569,13 @@ module Google
|
|
479
569
|
# urn:ietf:wg:oauth:2.0:oob means that authorization code should be
|
480
570
|
# returned in the title bar of the browser, with the page text prompting
|
481
571
|
# the user to copy the code and paste it in the application.
|
572
|
+
# @param version_info [String]
|
573
|
+
# Optional version info. If users want to find a very recent access token,
|
574
|
+
# that is, immediately after approving access, users have to set the
|
575
|
+
# version_info claim in the token request. To obtain the version_info, users
|
576
|
+
# must use the "none+gsession" response type. which be return a
|
577
|
+
# version_info back in the authorization response which be be put in a JWT
|
578
|
+
# claim in the token request.
|
482
579
|
# @param options [Google::Gax::CallOptions]
|
483
580
|
# Overrides the default settings for this call, e.g, timeout,
|
484
581
|
# retries, etc.
|
@@ -501,12 +598,14 @@ module Google
|
|
501
598
|
parent,
|
502
599
|
transfer_config,
|
503
600
|
authorization_code: nil,
|
601
|
+
version_info: nil,
|
504
602
|
options: nil,
|
505
603
|
&block
|
506
604
|
req = {
|
507
605
|
parent: parent,
|
508
606
|
transfer_config: transfer_config,
|
509
|
-
authorization_code: authorization_code
|
607
|
+
authorization_code: authorization_code,
|
608
|
+
version_info: version_info
|
510
609
|
}.delete_if { |_, v| v.nil? }
|
511
610
|
req = Google::Gax::to_proto(req, Google::Cloud::Bigquery::Datatransfer::V1::CreateTransferConfigRequest)
|
512
611
|
@create_transfer_config.call(req, options, &block)
|
@@ -540,6 +639,13 @@ module Google
|
|
540
639
|
# urn:ietf:wg:oauth:2.0:oob means that authorization code should be
|
541
640
|
# returned in the title bar of the browser, with the page text prompting
|
542
641
|
# the user to copy the code and paste it in the application.
|
642
|
+
# @param version_info [String]
|
643
|
+
# Optional version info. If users want to find a very recent access token,
|
644
|
+
# that is, immediately after approving access, users have to set the
|
645
|
+
# version_info claim in the token request. To obtain the version_info, users
|
646
|
+
# must use the "none+gsession" response type. which be return a
|
647
|
+
# version_info back in the authorization response which be be put in a JWT
|
648
|
+
# claim in the token request.
|
543
649
|
# @param options [Google::Gax::CallOptions]
|
544
650
|
# Overrides the default settings for this call, e.g, timeout,
|
545
651
|
# retries, etc.
|
@@ -564,12 +670,14 @@ module Google
|
|
564
670
|
transfer_config,
|
565
671
|
update_mask,
|
566
672
|
authorization_code: nil,
|
673
|
+
version_info: nil,
|
567
674
|
options: nil,
|
568
675
|
&block
|
569
676
|
req = {
|
570
677
|
transfer_config: transfer_config,
|
571
678
|
update_mask: update_mask,
|
572
|
-
authorization_code: authorization_code
|
679
|
+
authorization_code: authorization_code,
|
680
|
+
version_info: version_info
|
573
681
|
}.delete_if { |_, v| v.nil? }
|
574
682
|
req = Google::Gax::to_proto(req, Google::Cloud::Bigquery::Datatransfer::V1::UpdateTransferConfigRequest)
|
575
683
|
@update_transfer_config.call(req, options, &block)
|
@@ -701,6 +809,7 @@ module Google
|
|
701
809
|
# For each date - or whatever granularity the data source supports - in the
|
702
810
|
# range, one transfer run is created.
|
703
811
|
# Note that runs are created per UTC time in the time range.
|
812
|
+
# DEPRECATED: use StartManualTransferRuns instead.
|
704
813
|
#
|
705
814
|
# @param parent [String]
|
706
815
|
# Transfer configuration name in the form:
|
@@ -972,6 +1081,52 @@ module Google
|
|
972
1081
|
req = Google::Gax::to_proto(req, Google::Cloud::Bigquery::Datatransfer::V1::CheckValidCredsRequest)
|
973
1082
|
@check_valid_creds.call(req, options, &block)
|
974
1083
|
end
|
1084
|
+
|
1085
|
+
# Start manual transfer runs to be executed now with schedule_time equal to
|
1086
|
+
# current time. The transfer runs can be created for a time range where the
|
1087
|
+
# run_time is between start_time (inclusive) and end_time (exclusive), or for
|
1088
|
+
# a specific run_time.
|
1089
|
+
#
|
1090
|
+
# @param parent [String]
|
1091
|
+
# Transfer configuration name in the form:
|
1092
|
+
# `projects/{project_id}/transferConfigs/{config_id}`.
|
1093
|
+
# @param requested_time_range [Google::Cloud::Bigquery::Datatransfer::V1::StartManualTransferRunsRequest::TimeRange | Hash]
|
1094
|
+
# Time range for the transfer runs that should be started.
|
1095
|
+
# A hash of the same form as `Google::Cloud::Bigquery::Datatransfer::V1::StartManualTransferRunsRequest::TimeRange`
|
1096
|
+
# can also be provided.
|
1097
|
+
# @param requested_run_time [Google::Protobuf::Timestamp | Hash]
|
1098
|
+
# Specific run_time for a transfer run to be started. The
|
1099
|
+
# requested_run_time must not be in the future.
|
1100
|
+
# A hash of the same form as `Google::Protobuf::Timestamp`
|
1101
|
+
# can also be provided.
|
1102
|
+
# @param options [Google::Gax::CallOptions]
|
1103
|
+
# Overrides the default settings for this call, e.g, timeout,
|
1104
|
+
# retries, etc.
|
1105
|
+
# @yield [result, operation] Access the result along with the RPC operation
|
1106
|
+
# @yieldparam result [Google::Cloud::Bigquery::Datatransfer::V1::StartManualTransferRunsResponse]
|
1107
|
+
# @yieldparam operation [GRPC::ActiveCall::Operation]
|
1108
|
+
# @return [Google::Cloud::Bigquery::Datatransfer::V1::StartManualTransferRunsResponse]
|
1109
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
1110
|
+
# @example
|
1111
|
+
# require "google/cloud/bigquery/data_transfer"
|
1112
|
+
#
|
1113
|
+
# data_transfer_client = Google::Cloud::Bigquery::DataTransfer.new(version: :v1)
|
1114
|
+
# response = data_transfer_client.start_manual_transfer_runs
|
1115
|
+
|
1116
|
+
def start_manual_transfer_runs \
|
1117
|
+
parent: nil,
|
1118
|
+
requested_time_range: nil,
|
1119
|
+
requested_run_time: nil,
|
1120
|
+
options: nil,
|
1121
|
+
&block
|
1122
|
+
req = {
|
1123
|
+
parent: parent,
|
1124
|
+
requested_time_range: requested_time_range,
|
1125
|
+
requested_run_time: requested_run_time
|
1126
|
+
}.delete_if { |_, v| v.nil? }
|
1127
|
+
req = Google::Gax::to_proto(req, Google::Cloud::Bigquery::Datatransfer::V1::StartManualTransferRunsRequest)
|
1128
|
+
@start_manual_transfer_runs.call(req, options, &block)
|
1129
|
+
end
|
975
1130
|
end
|
976
1131
|
end
|
977
1132
|
end
|
@@ -84,6 +84,11 @@
|
|
84
84
|
"timeout_millis": 30000,
|
85
85
|
"retry_codes_name": "idempotent",
|
86
86
|
"retry_params_name": "default"
|
87
|
+
},
|
88
|
+
"StartManualTransferRuns": {
|
89
|
+
"timeout_millis": 60000,
|
90
|
+
"retry_codes_name": "non_idempotent",
|
91
|
+
"retry_params_name": "default"
|
87
92
|
}
|
88
93
|
}
|
89
94
|
}
|
@@ -25,8 +25,7 @@ module Google
|
|
25
25
|
# | [DataTransferServiceClient][] | The Google BigQuery Data Transfer Service API enables BigQuery users to configure the transfer of their data from other Google Products into BigQuery. |
|
26
26
|
# | [Data Types][] | Data types for Google::Cloud::Bigquery::DataTransfer::V1 |
|
27
27
|
#
|
28
|
-
# [DataTransferServiceClient]: https://googleapis.
|
29
|
-
# [Data Types]: https://googleapis.github.io/google-cloud-ruby/#/docs/google-cloud-bigquery-data_transfer/latest/google/cloud/bigquery/datatransfer/v1/datatypes
|
28
|
+
# [DataTransferServiceClient]: https://googleapis.dev/ruby/google-cloud-bigquery-data_transfer/latest/Google/Cloud/Bigquery/DataTransfer/V1/DataTransferServiceClient.html
|
30
29
|
#
|
31
30
|
module V1
|
32
31
|
# Represents a data source parameter with validation rules, so that
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# Copyright 2019 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
|
16
|
+
module Google
|
17
|
+
module Cloud
|
18
|
+
module Bigquery
|
19
|
+
module Datatransfer
|
20
|
+
module V1
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|