google-cloud-bigquery-connection-v1 0.4.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/bigquery/connection/v1/connection_pb.rb +14 -2
- data/lib/google/cloud/bigquery/connection/v1/connection_service/client.rb +223 -81
- data/lib/google/cloud/bigquery/connection/v1/version.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/cloud/bigquery/connection/v1/connection.rb +34 -0
- data/proto_docs/google/type/expr.rb +35 -12
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 487013f3885e23811eafe2566bf728c5519b2158f0e32a2b768e0dd567bbff82
|
4
|
+
data.tar.gz: 94782071919c707deba4f918dce7dedc887576a93bfae9bc896d5e8f331a44ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e453fb4312a2f065aed892164220130838138873f73deb84381a50025babef96b72dcb67d44343c800cde64db87b6ff6e430bf8f52d912b3a0dfe74f4eade60f
|
7
|
+
data.tar.gz: 63f2d8b7f7f93e938af786bf8561e77db05492d61f23dde286db04d2d0f87346df84a7962e46ec262a1a7d26dec0a9261b6e3249e7486b17d26505f270c42506
|
data/AUTHENTICATION.md
CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-bigquery-connection-v1
|
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
67
|
{::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Credentials}):
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
* `BIGQUERY_CONNECTION_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
|
+
* `BIGQUERY_CONNECTION_KEYFILE` - Path to JSON file, or JSON contents
|
71
|
+
* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
|
72
|
+
* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
|
73
|
+
* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
|
74
74
|
|
75
75
|
```ruby
|
76
76
|
require "google/cloud/bigquery/connection/v1"
|
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.ne
|
|
82
82
|
|
83
83
|
### Configuration
|
84
84
|
|
85
|
-
The **Credentials JSON** can be configured instead of
|
86
|
-
environment
|
85
|
+
The path to the **Credentials JSON** file can be configured instead of storing
|
86
|
+
it in an environment variable. Either on an individual client initialization:
|
87
87
|
|
88
88
|
```ruby
|
89
89
|
require "google/cloud/bigquery/connection/v1"
|
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.ne
|
|
93
93
|
end
|
94
94
|
```
|
95
95
|
|
96
|
-
Or
|
96
|
+
Or globally for all clients:
|
97
97
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/bigquery/connection/v1"
|
data/README.md
CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
|
|
33
33
|
require "google/cloud/bigquery/connection/v1"
|
34
34
|
|
35
35
|
client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new
|
36
|
-
request =
|
36
|
+
request = ::Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest.new # (request fields as keyword arguments...)
|
37
37
|
response = client.create_connection request
|
38
38
|
```
|
39
39
|
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/bigquery/connection/v1/connection.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/annotations_pb'
|
7
5
|
require 'google/api/client_pb'
|
8
6
|
require 'google/api/field_behavior_pb'
|
@@ -12,6 +10,8 @@ require 'google/iam/v1/policy_pb'
|
|
12
10
|
require 'google/protobuf/empty_pb'
|
13
11
|
require 'google/protobuf/field_mask_pb'
|
14
12
|
require 'google/protobuf/wrappers_pb'
|
13
|
+
require 'google/protobuf'
|
14
|
+
|
15
15
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
16
16
|
add_file("google/cloud/bigquery/connection/v1/connection.proto", :syntax => :proto3) do
|
17
17
|
add_message "google.cloud.bigquery.connection.v1.CreateConnectionRequest" do
|
@@ -49,6 +49,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
49
49
|
oneof :properties do
|
50
50
|
optional :cloud_sql, :message, 4, "google.cloud.bigquery.connection.v1.CloudSqlProperties"
|
51
51
|
optional :aws, :message, 8, "google.cloud.bigquery.connection.v1.AwsProperties"
|
52
|
+
optional :cloud_spanner, :message, 21, "google.cloud.bigquery.connection.v1.CloudSpannerProperties"
|
52
53
|
end
|
53
54
|
end
|
54
55
|
add_message "google.cloud.bigquery.connection.v1.CloudSqlProperties" do
|
@@ -66,9 +67,14 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
66
67
|
optional :username, :string, 1
|
67
68
|
optional :password, :string, 2
|
68
69
|
end
|
70
|
+
add_message "google.cloud.bigquery.connection.v1.CloudSpannerProperties" do
|
71
|
+
optional :database, :string, 1
|
72
|
+
optional :use_parallelism, :bool, 2
|
73
|
+
end
|
69
74
|
add_message "google.cloud.bigquery.connection.v1.AwsProperties" do
|
70
75
|
oneof :authentication_method do
|
71
76
|
optional :cross_account_role, :message, 2, "google.cloud.bigquery.connection.v1.AwsCrossAccountRole"
|
77
|
+
optional :access_role, :message, 3, "google.cloud.bigquery.connection.v1.AwsAccessRole"
|
72
78
|
end
|
73
79
|
end
|
74
80
|
add_message "google.cloud.bigquery.connection.v1.AwsCrossAccountRole" do
|
@@ -76,6 +82,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
76
82
|
optional :iam_user_id, :string, 2
|
77
83
|
optional :external_id, :string, 3
|
78
84
|
end
|
85
|
+
add_message "google.cloud.bigquery.connection.v1.AwsAccessRole" do
|
86
|
+
optional :iam_role_id, :string, 1
|
87
|
+
optional :identity, :string, 2
|
88
|
+
end
|
79
89
|
end
|
80
90
|
end
|
81
91
|
|
@@ -94,8 +104,10 @@ module Google
|
|
94
104
|
CloudSqlProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.CloudSqlProperties").msgclass
|
95
105
|
CloudSqlProperties::DatabaseType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.CloudSqlProperties.DatabaseType").enummodule
|
96
106
|
CloudSqlCredential = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.CloudSqlCredential").msgclass
|
107
|
+
CloudSpannerProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.CloudSpannerProperties").msgclass
|
97
108
|
AwsProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.AwsProperties").msgclass
|
98
109
|
AwsCrossAccountRole = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.AwsCrossAccountRole").msgclass
|
110
|
+
AwsAccessRole = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.connection.v1.AwsAccessRole").msgclass
|
99
111
|
end
|
100
112
|
end
|
101
113
|
end
|
@@ -42,13 +42,12 @@ module Google
|
|
42
42
|
# See {::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client::Configuration}
|
43
43
|
# for a description of the configuration fields.
|
44
44
|
#
|
45
|
-
#
|
45
|
+
# @example
|
46
46
|
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
#
|
50
|
-
#
|
51
|
-
# end
|
47
|
+
# # Modify the configuration for all ConnectionService clients
|
48
|
+
# ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.configure do |config|
|
49
|
+
# config.timeout = 10.0
|
50
|
+
# end
|
52
51
|
#
|
53
52
|
# @yield [config] Configure the Client client.
|
54
53
|
# @yieldparam config [Client::Configuration]
|
@@ -70,28 +69,19 @@ module Google
|
|
70
69
|
|
71
70
|
default_config.rpcs.get_connection.timeout = 60.0
|
72
71
|
default_config.rpcs.get_connection.retry_policy = {
|
73
|
-
initial_delay: 0.1,
|
74
|
-
max_delay: 60.0,
|
75
|
-
multiplier: 1.3,
|
76
|
-
retry_codes: [4, 14]
|
72
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
77
73
|
}
|
78
74
|
|
79
75
|
default_config.rpcs.list_connections.timeout = 60.0
|
80
76
|
default_config.rpcs.list_connections.retry_policy = {
|
81
|
-
initial_delay: 0.1,
|
82
|
-
max_delay: 60.0,
|
83
|
-
multiplier: 1.3,
|
84
|
-
retry_codes: [4, 14]
|
77
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
85
78
|
}
|
86
79
|
|
87
80
|
default_config.rpcs.update_connection.timeout = 60.0
|
88
81
|
|
89
82
|
default_config.rpcs.delete_connection.timeout = 60.0
|
90
83
|
default_config.rpcs.delete_connection.retry_policy = {
|
91
|
-
initial_delay: 0.1,
|
92
|
-
max_delay: 60.0,
|
93
|
-
multiplier: 1.3,
|
94
|
-
retry_codes: [4, 14]
|
84
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14]
|
95
85
|
}
|
96
86
|
|
97
87
|
default_config.rpcs.get_iam_policy.timeout = 60.0
|
@@ -129,19 +119,15 @@ module Google
|
|
129
119
|
##
|
130
120
|
# Create a new ConnectionService client object.
|
131
121
|
#
|
132
|
-
#
|
133
|
-
#
|
134
|
-
# To create a new ConnectionService client with the default
|
135
|
-
# configuration:
|
136
|
-
#
|
137
|
-
# client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new
|
122
|
+
# @example
|
138
123
|
#
|
139
|
-
#
|
140
|
-
#
|
124
|
+
# # Create a client using the default configuration
|
125
|
+
# client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new
|
141
126
|
#
|
142
|
-
#
|
143
|
-
#
|
144
|
-
#
|
127
|
+
# # Create a client using a custom configuration
|
128
|
+
# client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config|
|
129
|
+
# config.timeout = 10.0
|
130
|
+
# end
|
145
131
|
#
|
146
132
|
# @yield [config] Configure the ConnectionService client.
|
147
133
|
# @yieldparam config [Client::Configuration]
|
@@ -161,14 +147,13 @@ module Google
|
|
161
147
|
|
162
148
|
# Create credentials
|
163
149
|
credentials = @config.credentials
|
164
|
-
# Use self-signed JWT if the
|
150
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
165
151
|
# but only if the default endpoint does not have a region prefix.
|
166
|
-
enable_self_signed_jwt = @config.
|
167
|
-
@config.endpoint == Client.configure.endpoint &&
|
152
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
168
153
|
!@config.endpoint.split(".").first.include?("-")
|
169
154
|
credentials ||= Credentials.default scope: @config.scope,
|
170
155
|
enable_self_signed_jwt: enable_self_signed_jwt
|
171
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
156
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
172
157
|
credentials = Credentials.new credentials, scope: @config.scope
|
173
158
|
end
|
174
159
|
@quota_project_id = @config.quota_project
|
@@ -219,6 +204,21 @@ module Google
|
|
219
204
|
#
|
220
205
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
221
206
|
#
|
207
|
+
# @example Basic example
|
208
|
+
# require "google/cloud/bigquery/connection/v1"
|
209
|
+
#
|
210
|
+
# # Create a client object. The client can be reused for multiple calls.
|
211
|
+
# client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new
|
212
|
+
#
|
213
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
214
|
+
# request = Google::Cloud::Bigquery::Connection::V1::CreateConnectionRequest.new
|
215
|
+
#
|
216
|
+
# # Call the create_connection method.
|
217
|
+
# result = client.create_connection request
|
218
|
+
#
|
219
|
+
# # The returned object is of type Google::Cloud::Bigquery::Connection::V1::Connection.
|
220
|
+
# p result
|
221
|
+
#
|
222
222
|
def create_connection request, options = nil
|
223
223
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
224
224
|
|
@@ -236,16 +236,20 @@ module Google
|
|
236
236
|
gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION
|
237
237
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
238
238
|
|
239
|
-
header_params = {
|
240
|
-
|
241
|
-
|
239
|
+
header_params = {}
|
240
|
+
if request.parent
|
241
|
+
header_params["parent"] = request.parent
|
242
|
+
end
|
243
|
+
|
242
244
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
243
245
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
244
246
|
|
245
247
|
options.apply_defaults timeout: @config.rpcs.create_connection.timeout,
|
246
248
|
metadata: metadata,
|
247
249
|
retry_policy: @config.rpcs.create_connection.retry_policy
|
248
|
-
|
250
|
+
|
251
|
+
options.apply_defaults timeout: @config.timeout,
|
252
|
+
metadata: @config.metadata,
|
249
253
|
retry_policy: @config.retry_policy
|
250
254
|
|
251
255
|
@connection_service_stub.call_rpc :create_connection, request, options: options do |response, operation|
|
@@ -286,6 +290,21 @@ module Google
|
|
286
290
|
#
|
287
291
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
288
292
|
#
|
293
|
+
# @example Basic example
|
294
|
+
# require "google/cloud/bigquery/connection/v1"
|
295
|
+
#
|
296
|
+
# # Create a client object. The client can be reused for multiple calls.
|
297
|
+
# client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new
|
298
|
+
#
|
299
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
300
|
+
# request = Google::Cloud::Bigquery::Connection::V1::GetConnectionRequest.new
|
301
|
+
#
|
302
|
+
# # Call the get_connection method.
|
303
|
+
# result = client.get_connection request
|
304
|
+
#
|
305
|
+
# # The returned object is of type Google::Cloud::Bigquery::Connection::V1::Connection.
|
306
|
+
# p result
|
307
|
+
#
|
289
308
|
def get_connection request, options = nil
|
290
309
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
291
310
|
|
@@ -303,16 +322,20 @@ module Google
|
|
303
322
|
gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION
|
304
323
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
305
324
|
|
306
|
-
header_params = {
|
307
|
-
|
308
|
-
|
325
|
+
header_params = {}
|
326
|
+
if request.name
|
327
|
+
header_params["name"] = request.name
|
328
|
+
end
|
329
|
+
|
309
330
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
310
331
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
311
332
|
|
312
333
|
options.apply_defaults timeout: @config.rpcs.get_connection.timeout,
|
313
334
|
metadata: metadata,
|
314
335
|
retry_policy: @config.rpcs.get_connection.retry_policy
|
315
|
-
|
336
|
+
|
337
|
+
options.apply_defaults timeout: @config.timeout,
|
338
|
+
metadata: @config.metadata,
|
316
339
|
retry_policy: @config.retry_policy
|
317
340
|
|
318
341
|
@connection_service_stub.call_rpc :get_connection, request, options: options do |response, operation|
|
@@ -357,6 +380,27 @@ module Google
|
|
357
380
|
#
|
358
381
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
359
382
|
#
|
383
|
+
# @example Basic example
|
384
|
+
# require "google/cloud/bigquery/connection/v1"
|
385
|
+
#
|
386
|
+
# # Create a client object. The client can be reused for multiple calls.
|
387
|
+
# client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new
|
388
|
+
#
|
389
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
390
|
+
# request = Google::Cloud::Bigquery::Connection::V1::ListConnectionsRequest.new
|
391
|
+
#
|
392
|
+
# # Call the list_connections method.
|
393
|
+
# result = client.list_connections request
|
394
|
+
#
|
395
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
396
|
+
# # iterate over all elements by calling #each, and the enumerable
|
397
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
398
|
+
# # methods are also available for managing paging directly.
|
399
|
+
# result.each do |response|
|
400
|
+
# # Each element is of type ::Google::Cloud::Bigquery::Connection::V1::Connection.
|
401
|
+
# p response
|
402
|
+
# end
|
403
|
+
#
|
360
404
|
def list_connections request, options = nil
|
361
405
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
362
406
|
|
@@ -374,16 +418,20 @@ module Google
|
|
374
418
|
gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION
|
375
419
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
376
420
|
|
377
|
-
header_params = {
|
378
|
-
|
379
|
-
|
421
|
+
header_params = {}
|
422
|
+
if request.parent
|
423
|
+
header_params["parent"] = request.parent
|
424
|
+
end
|
425
|
+
|
380
426
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
381
427
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
382
428
|
|
383
429
|
options.apply_defaults timeout: @config.rpcs.list_connections.timeout,
|
384
430
|
metadata: metadata,
|
385
431
|
retry_policy: @config.rpcs.list_connections.retry_policy
|
386
|
-
|
432
|
+
|
433
|
+
options.apply_defaults timeout: @config.timeout,
|
434
|
+
metadata: @config.metadata,
|
387
435
|
retry_policy: @config.retry_policy
|
388
436
|
|
389
437
|
@connection_service_stub.call_rpc :list_connections, request, options: options do |response, operation|
|
@@ -430,6 +478,21 @@ module Google
|
|
430
478
|
#
|
431
479
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
432
480
|
#
|
481
|
+
# @example Basic example
|
482
|
+
# require "google/cloud/bigquery/connection/v1"
|
483
|
+
#
|
484
|
+
# # Create a client object. The client can be reused for multiple calls.
|
485
|
+
# client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new
|
486
|
+
#
|
487
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
488
|
+
# request = Google::Cloud::Bigquery::Connection::V1::UpdateConnectionRequest.new
|
489
|
+
#
|
490
|
+
# # Call the update_connection method.
|
491
|
+
# result = client.update_connection request
|
492
|
+
#
|
493
|
+
# # The returned object is of type Google::Cloud::Bigquery::Connection::V1::Connection.
|
494
|
+
# p result
|
495
|
+
#
|
433
496
|
def update_connection request, options = nil
|
434
497
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
435
498
|
|
@@ -447,16 +510,20 @@ module Google
|
|
447
510
|
gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION
|
448
511
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
449
512
|
|
450
|
-
header_params = {
|
451
|
-
|
452
|
-
|
513
|
+
header_params = {}
|
514
|
+
if request.name
|
515
|
+
header_params["name"] = request.name
|
516
|
+
end
|
517
|
+
|
453
518
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
454
519
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
455
520
|
|
456
521
|
options.apply_defaults timeout: @config.rpcs.update_connection.timeout,
|
457
522
|
metadata: metadata,
|
458
523
|
retry_policy: @config.rpcs.update_connection.retry_policy
|
459
|
-
|
524
|
+
|
525
|
+
options.apply_defaults timeout: @config.timeout,
|
526
|
+
metadata: @config.metadata,
|
460
527
|
retry_policy: @config.retry_policy
|
461
528
|
|
462
529
|
@connection_service_stub.call_rpc :update_connection, request, options: options do |response, operation|
|
@@ -497,6 +564,21 @@ module Google
|
|
497
564
|
#
|
498
565
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
499
566
|
#
|
567
|
+
# @example Basic example
|
568
|
+
# require "google/cloud/bigquery/connection/v1"
|
569
|
+
#
|
570
|
+
# # Create a client object. The client can be reused for multiple calls.
|
571
|
+
# client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new
|
572
|
+
#
|
573
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
574
|
+
# request = Google::Cloud::Bigquery::Connection::V1::DeleteConnectionRequest.new
|
575
|
+
#
|
576
|
+
# # Call the delete_connection method.
|
577
|
+
# result = client.delete_connection request
|
578
|
+
#
|
579
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
580
|
+
# p result
|
581
|
+
#
|
500
582
|
def delete_connection request, options = nil
|
501
583
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
502
584
|
|
@@ -514,16 +596,20 @@ module Google
|
|
514
596
|
gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION
|
515
597
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
516
598
|
|
517
|
-
header_params = {
|
518
|
-
|
519
|
-
|
599
|
+
header_params = {}
|
600
|
+
if request.name
|
601
|
+
header_params["name"] = request.name
|
602
|
+
end
|
603
|
+
|
520
604
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
521
605
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
522
606
|
|
523
607
|
options.apply_defaults timeout: @config.rpcs.delete_connection.timeout,
|
524
608
|
metadata: metadata,
|
525
609
|
retry_policy: @config.rpcs.delete_connection.retry_policy
|
526
|
-
|
610
|
+
|
611
|
+
options.apply_defaults timeout: @config.timeout,
|
612
|
+
metadata: @config.metadata,
|
527
613
|
retry_policy: @config.retry_policy
|
528
614
|
|
529
615
|
@connection_service_stub.call_rpc :delete_connection, request, options: options do |response, operation|
|
@@ -569,6 +655,21 @@ module Google
|
|
569
655
|
#
|
570
656
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
571
657
|
#
|
658
|
+
# @example Basic example
|
659
|
+
# require "google/cloud/bigquery/connection/v1"
|
660
|
+
#
|
661
|
+
# # Create a client object. The client can be reused for multiple calls.
|
662
|
+
# client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new
|
663
|
+
#
|
664
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
665
|
+
# request = Google::Iam::V1::GetIamPolicyRequest.new
|
666
|
+
#
|
667
|
+
# # Call the get_iam_policy method.
|
668
|
+
# result = client.get_iam_policy request
|
669
|
+
#
|
670
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
671
|
+
# p result
|
672
|
+
#
|
572
673
|
def get_iam_policy request, options = nil
|
573
674
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
574
675
|
|
@@ -586,16 +687,20 @@ module Google
|
|
586
687
|
gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION
|
587
688
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
588
689
|
|
589
|
-
header_params = {
|
590
|
-
|
591
|
-
|
690
|
+
header_params = {}
|
691
|
+
if request.resource
|
692
|
+
header_params["resource"] = request.resource
|
693
|
+
end
|
694
|
+
|
592
695
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
593
696
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
594
697
|
|
595
698
|
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
596
699
|
metadata: metadata,
|
597
700
|
retry_policy: @config.rpcs.get_iam_policy.retry_policy
|
598
|
-
|
701
|
+
|
702
|
+
options.apply_defaults timeout: @config.timeout,
|
703
|
+
metadata: @config.metadata,
|
599
704
|
retry_policy: @config.retry_policy
|
600
705
|
|
601
706
|
@connection_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
|
@@ -644,6 +749,21 @@ module Google
|
|
644
749
|
#
|
645
750
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
646
751
|
#
|
752
|
+
# @example Basic example
|
753
|
+
# require "google/cloud/bigquery/connection/v1"
|
754
|
+
#
|
755
|
+
# # Create a client object. The client can be reused for multiple calls.
|
756
|
+
# client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new
|
757
|
+
#
|
758
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
759
|
+
# request = Google::Iam::V1::SetIamPolicyRequest.new
|
760
|
+
#
|
761
|
+
# # Call the set_iam_policy method.
|
762
|
+
# result = client.set_iam_policy request
|
763
|
+
#
|
764
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
765
|
+
# p result
|
766
|
+
#
|
647
767
|
def set_iam_policy request, options = nil
|
648
768
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
649
769
|
|
@@ -661,16 +781,20 @@ module Google
|
|
661
781
|
gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION
|
662
782
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
663
783
|
|
664
|
-
header_params = {
|
665
|
-
|
666
|
-
|
784
|
+
header_params = {}
|
785
|
+
if request.resource
|
786
|
+
header_params["resource"] = request.resource
|
787
|
+
end
|
788
|
+
|
667
789
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
668
790
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
669
791
|
|
670
792
|
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
671
793
|
metadata: metadata,
|
672
794
|
retry_policy: @config.rpcs.set_iam_policy.retry_policy
|
673
|
-
|
795
|
+
|
796
|
+
options.apply_defaults timeout: @config.timeout,
|
797
|
+
metadata: @config.metadata,
|
674
798
|
retry_policy: @config.retry_policy
|
675
799
|
|
676
800
|
@connection_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
|
@@ -722,6 +846,21 @@ module Google
|
|
722
846
|
#
|
723
847
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
724
848
|
#
|
849
|
+
# @example Basic example
|
850
|
+
# require "google/cloud/bigquery/connection/v1"
|
851
|
+
#
|
852
|
+
# # Create a client object. The client can be reused for multiple calls.
|
853
|
+
# client = Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new
|
854
|
+
#
|
855
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
856
|
+
# request = Google::Iam::V1::TestIamPermissionsRequest.new
|
857
|
+
#
|
858
|
+
# # Call the test_iam_permissions method.
|
859
|
+
# result = client.test_iam_permissions request
|
860
|
+
#
|
861
|
+
# # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
|
862
|
+
# p result
|
863
|
+
#
|
725
864
|
def test_iam_permissions request, options = nil
|
726
865
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
727
866
|
|
@@ -739,16 +878,20 @@ module Google
|
|
739
878
|
gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION
|
740
879
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
741
880
|
|
742
|
-
header_params = {
|
743
|
-
|
744
|
-
|
881
|
+
header_params = {}
|
882
|
+
if request.resource
|
883
|
+
header_params["resource"] = request.resource
|
884
|
+
end
|
885
|
+
|
745
886
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
746
887
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
747
888
|
|
748
889
|
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
749
890
|
metadata: metadata,
|
750
891
|
retry_policy: @config.rpcs.test_iam_permissions.retry_policy
|
751
|
-
|
892
|
+
|
893
|
+
options.apply_defaults timeout: @config.timeout,
|
894
|
+
metadata: @config.metadata,
|
752
895
|
retry_policy: @config.retry_policy
|
753
896
|
|
754
897
|
@connection_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
|
@@ -772,22 +915,21 @@ module Google
|
|
772
915
|
# Configuration can be applied globally to all clients, or to a single client
|
773
916
|
# on construction.
|
774
917
|
#
|
775
|
-
#
|
776
|
-
#
|
777
|
-
#
|
778
|
-
# to 20 seconds,
|
779
|
-
#
|
780
|
-
#
|
781
|
-
#
|
782
|
-
#
|
783
|
-
#
|
784
|
-
#
|
785
|
-
#
|
786
|
-
#
|
787
|
-
#
|
788
|
-
#
|
789
|
-
#
|
790
|
-
# end
|
918
|
+
# @example
|
919
|
+
#
|
920
|
+
# # Modify the global config, setting the timeout for
|
921
|
+
# # create_connection to 20 seconds,
|
922
|
+
# # and all remaining timeouts to 10 seconds.
|
923
|
+
# ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.configure do |config|
|
924
|
+
# config.timeout = 10.0
|
925
|
+
# config.rpcs.create_connection.timeout = 20.0
|
926
|
+
# end
|
927
|
+
#
|
928
|
+
# # Apply the above configuration only to a new client.
|
929
|
+
# client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new do |config|
|
930
|
+
# config.timeout = 10.0
|
931
|
+
# config.rpcs.create_connection.timeout = 20.0
|
932
|
+
# end
|
791
933
|
#
|
792
934
|
# @!attribute [rw] endpoint
|
793
935
|
# The hostname or hostname:port of the service endpoint.
|
@@ -57,9 +57,15 @@ module Google
|
|
57
57
|
|
58
58
|
# Denotes that a (repeated) field is an unordered list.
|
59
59
|
# This indicates that the service may provide the elements of the list
|
60
|
-
# in any arbitrary
|
60
|
+
# in any arbitrary order, rather than the order the user originally
|
61
61
|
# provided. Additionally, the list's order may or may not be stable.
|
62
62
|
UNORDERED_LIST = 6
|
63
|
+
|
64
|
+
# Denotes that this field returns a non-empty default value if not set.
|
65
|
+
# This indicates that if the user provides the empty value in a request,
|
66
|
+
# a non-empty value will be returned. The user will not be aware of what
|
67
|
+
# non-empty value to expect.
|
68
|
+
NON_EMPTY_DEFAULT = 7
|
63
69
|
end
|
64
70
|
end
|
65
71
|
end
|
@@ -120,6 +120,9 @@ module Google
|
|
120
120
|
# @!attribute [rw] aws
|
121
121
|
# @return [::Google::Cloud::Bigquery::Connection::V1::AwsProperties]
|
122
122
|
# Amazon Web Services (AWS) properties.
|
123
|
+
# @!attribute [rw] cloud_spanner
|
124
|
+
# @return [::Google::Cloud::Bigquery::Connection::V1::CloudSpannerProperties]
|
125
|
+
# Cloud Spanner properties.
|
123
126
|
# @!attribute [r] creation_time
|
124
127
|
# @return [::Integer]
|
125
128
|
# Output only. The creation timestamp of the connection.
|
@@ -176,11 +179,27 @@ module Google
|
|
176
179
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
177
180
|
end
|
178
181
|
|
182
|
+
# Connection properties specific to Cloud Spanner.
|
183
|
+
# @!attribute [rw] database
|
184
|
+
# @return [::String]
|
185
|
+
# Cloud Spanner database in the form `project/instance/database'
|
186
|
+
# @!attribute [rw] use_parallelism
|
187
|
+
# @return [::Boolean]
|
188
|
+
# If parallelism should be used when reading from Cloud Spanner
|
189
|
+
class CloudSpannerProperties
|
190
|
+
include ::Google::Protobuf::MessageExts
|
191
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
192
|
+
end
|
193
|
+
|
179
194
|
# Connection properties specific to Amazon Web Services (AWS).
|
180
195
|
# @!attribute [rw] cross_account_role
|
181
196
|
# @return [::Google::Cloud::Bigquery::Connection::V1::AwsCrossAccountRole]
|
182
197
|
# Authentication using Google owned AWS IAM user's access key to assume
|
183
198
|
# into customer's AWS IAM Role.
|
199
|
+
# @!attribute [rw] access_role
|
200
|
+
# @return [::Google::Cloud::Bigquery::Connection::V1::AwsAccessRole]
|
201
|
+
# Authentication using Google owned service account to assume into
|
202
|
+
# customer's AWS IAM Role.
|
184
203
|
class AwsProperties
|
185
204
|
include ::Google::Protobuf::MessageExts
|
186
205
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -204,6 +223,21 @@ module Google
|
|
204
223
|
include ::Google::Protobuf::MessageExts
|
205
224
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
206
225
|
end
|
226
|
+
|
227
|
+
# Authentication method for Amazon Web Services (AWS) that uses Google owned
|
228
|
+
# Google service account to assume into customer's AWS IAM Role.
|
229
|
+
# @!attribute [rw] iam_role_id
|
230
|
+
# @return [::String]
|
231
|
+
# The user’s AWS IAM Role that trusts the Google-owned AWS IAM user
|
232
|
+
# Connection.
|
233
|
+
# @!attribute [rw] identity
|
234
|
+
# @return [::String]
|
235
|
+
# A unique Google-owned and Google-generated identity for the Connection.
|
236
|
+
# This identity will be used to access the user's AWS IAM Role.
|
237
|
+
class AwsAccessRole
|
238
|
+
include ::Google::Protobuf::MessageExts
|
239
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
240
|
+
end
|
207
241
|
end
|
208
242
|
end
|
209
243
|
end
|
@@ -19,30 +19,53 @@
|
|
19
19
|
|
20
20
|
module Google
|
21
21
|
module Type
|
22
|
-
# Represents
|
22
|
+
# Represents a textual expression in the Common Expression Language (CEL)
|
23
|
+
# syntax. CEL is a C-like expression language. The syntax and semantics of CEL
|
24
|
+
# are documented at https://github.com/google/cel-spec.
|
23
25
|
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
#
|
26
|
+
# Example (Comparison):
|
27
|
+
#
|
28
|
+
# title: "Summary size limit"
|
29
|
+
# description: "Determines if a summary is less than 100 chars"
|
30
|
+
# expression: "document.summary.size() < 100"
|
31
|
+
#
|
32
|
+
# Example (Equality):
|
33
|
+
#
|
34
|
+
# title: "Requestor is owner"
|
35
|
+
# description: "Determines if requestor is the document owner"
|
36
|
+
# expression: "document.owner == request.auth.claims.email"
|
37
|
+
#
|
38
|
+
# Example (Logic):
|
39
|
+
#
|
40
|
+
# title: "Public documents"
|
41
|
+
# description: "Determine whether the document should be publicly visible"
|
42
|
+
# expression: "document.type != 'private' && document.type != 'internal'"
|
43
|
+
#
|
44
|
+
# Example (Data Manipulation):
|
45
|
+
#
|
46
|
+
# title: "Notification string"
|
47
|
+
# description: "Create a notification string with a timestamp."
|
48
|
+
# expression: "'New message received at ' + string(document.create_time)"
|
49
|
+
#
|
50
|
+
# The exact variables and functions that may be referenced within an expression
|
51
|
+
# are determined by the service that evaluates it. See the service
|
52
|
+
# documentation for additional information.
|
27
53
|
# @!attribute [rw] expression
|
28
54
|
# @return [::String]
|
29
|
-
# Textual representation of an expression in
|
30
|
-
#
|
31
|
-
#
|
32
|
-
# The application context of the containing message determines which
|
33
|
-
# well-known feature set of CEL is supported.
|
55
|
+
# Textual representation of an expression in Common Expression Language
|
56
|
+
# syntax.
|
34
57
|
# @!attribute [rw] title
|
35
58
|
# @return [::String]
|
36
|
-
#
|
59
|
+
# Optional. Title for the expression, i.e. a short string describing
|
37
60
|
# its purpose. This can be used e.g. in UIs which allow to enter the
|
38
61
|
# expression.
|
39
62
|
# @!attribute [rw] description
|
40
63
|
# @return [::String]
|
41
|
-
#
|
64
|
+
# Optional. Description of the expression. This is a longer text which
|
42
65
|
# describes the expression, e.g. when hovered over it in a UI.
|
43
66
|
# @!attribute [rw] location
|
44
67
|
# @return [::String]
|
45
|
-
#
|
68
|
+
# Optional. String indicating the location of the expression for error
|
46
69
|
# reporting, e.g. a file name and a position in the file.
|
47
70
|
class Expr
|
48
71
|
include ::Google::Protobuf::MessageExts
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-bigquery-connection-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.7'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.7'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|