google-cloud-bigquery-connection-v1 0.4.2 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/lib/google/cloud/bigquery/connection/v1/connection_pb.rb +14 -2
- data/lib/google/cloud/bigquery/connection/v1/connection_service/client.rb +219 -68
- data/lib/google/cloud/bigquery/connection/v1/connection_services_pb.rb +1 -1
- data/lib/google/cloud/bigquery/connection/v1/version.rb +1 -1
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/bigquery/connection/v1/connection.rb +34 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88ce725b50ba120d8c4036cd4dcd431d74c7a94c4591e087395be2d68bef0474
|
4
|
+
data.tar.gz: 727b79ad86cab8f37336bebc4932b950cb075cc68c167f2c2d9d2e710b86cfad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8257691493dfe99fd4d43248929935569b8abbca0cc87b69a55d36a49000c0f5a06857b9825a5850f222ba2635c413570c625865fb4159246c5379f2592f5b4b
|
7
|
+
data.tar.gz: 694cead673625367cf27c9ba867c842627223221cf5e91dc6b0221cbbdb19f06f10a26b2557b46f4341d695d946ecb3a0b2a94c5a229275908bde54aee0d0971
|
data/.yardopts
CHANGED
data/AUTHENTICATION.md
CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
121
121
|
*should* only be used during development.
|
122
122
|
|
123
|
-
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
|
124
|
-
[dev-console]: https://console.cloud.google.com/project
|
125
|
-
|
126
|
-
[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
|
127
|
-
|
128
|
-
[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
|
129
|
-
[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
|
130
|
-
[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
|
131
|
-
|
132
123
|
## Creating a Service Account
|
133
124
|
|
134
125
|
Google Cloud requires **Service Account Credentials** to
|
@@ -139,31 +130,22 @@ If you are not running this client within
|
|
139
130
|
[Google Cloud Platform environments](#google-cloud-platform-environments), you
|
140
131
|
need a Google Developers service account.
|
141
132
|
|
142
|
-
1. Visit the [Google
|
133
|
+
1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
|
143
134
|
2. Create a new project or click on an existing project.
|
144
|
-
3. Activate the
|
135
|
+
3. Activate the menu in the upper left and select **APIs & Services**. From
|
145
136
|
here, you will enable the APIs that your application requires.
|
146
137
|
|
147
|
-
![Enable the APIs that your application requires][enable-apis]
|
148
|
-
|
149
138
|
*Note: You may need to enable billing in order to use these services.*
|
150
139
|
|
151
140
|
4. Select **Credentials** from the side navigation.
|
152
141
|
|
153
|
-
|
154
|
-
|
155
|
-
![Create a new service account][create-new-service-account]
|
156
|
-
|
157
|
-
![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
|
158
|
-
|
159
|
-
Find the "Add credentials" drop down and select "Service account" to be
|
160
|
-
guided through downloading a new JSON key file.
|
142
|
+
Find the "Create credentials" drop down near the top of the page, and select
|
143
|
+
"Service account" to be guided through downloading a new JSON key file.
|
161
144
|
|
162
145
|
If you want to re-use an existing service account, you can easily generate a
|
163
|
-
new key file. Just select the account you wish to re-use,
|
164
|
-
|
165
|
-
|
166
|
-
![Re-use an existing service account][reuse-service-account]
|
146
|
+
new key file. Just select the account you wish to re-use, click the pencil
|
147
|
+
tool on the right side to edit the service account, select the **Keys** tab,
|
148
|
+
and then select **Add Key**.
|
167
149
|
|
168
150
|
The key file you download will be used by this library to authenticate API
|
169
151
|
requests and should be stored in a secure location.
|
@@ -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]
|
@@ -120,19 +119,15 @@ module Google
|
|
120
119
|
##
|
121
120
|
# Create a new ConnectionService client object.
|
122
121
|
#
|
123
|
-
#
|
124
|
-
#
|
125
|
-
# To create a new ConnectionService client with the default
|
126
|
-
# configuration:
|
127
|
-
#
|
128
|
-
# client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new
|
122
|
+
# @example
|
129
123
|
#
|
130
|
-
#
|
131
|
-
#
|
124
|
+
# # Create a client using the default configuration
|
125
|
+
# client = ::Google::Cloud::Bigquery::Connection::V1::ConnectionService::Client.new
|
132
126
|
#
|
133
|
-
#
|
134
|
-
#
|
135
|
-
#
|
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
|
136
131
|
#
|
137
132
|
# @yield [config] Configure the ConnectionService client.
|
138
133
|
# @yieldparam config [Client::Configuration]
|
@@ -152,10 +147,9 @@ module Google
|
|
152
147
|
|
153
148
|
# Create credentials
|
154
149
|
credentials = @config.credentials
|
155
|
-
# Use self-signed JWT if the
|
150
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
156
151
|
# but only if the default endpoint does not have a region prefix.
|
157
|
-
enable_self_signed_jwt = @config.
|
158
|
-
@config.endpoint == Client.configure.endpoint &&
|
152
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
159
153
|
!@config.endpoint.split(".").first.include?("-")
|
160
154
|
credentials ||= Credentials.default scope: @config.scope,
|
161
155
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -210,6 +204,21 @@ module Google
|
|
210
204
|
#
|
211
205
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
212
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
|
+
#
|
213
222
|
def create_connection request, options = nil
|
214
223
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
215
224
|
|
@@ -227,16 +236,20 @@ module Google
|
|
227
236
|
gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION
|
228
237
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
229
238
|
|
230
|
-
header_params = {
|
231
|
-
|
232
|
-
|
239
|
+
header_params = {}
|
240
|
+
if request.parent
|
241
|
+
header_params["parent"] = request.parent
|
242
|
+
end
|
243
|
+
|
233
244
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
234
245
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
235
246
|
|
236
247
|
options.apply_defaults timeout: @config.rpcs.create_connection.timeout,
|
237
248
|
metadata: metadata,
|
238
249
|
retry_policy: @config.rpcs.create_connection.retry_policy
|
239
|
-
|
250
|
+
|
251
|
+
options.apply_defaults timeout: @config.timeout,
|
252
|
+
metadata: @config.metadata,
|
240
253
|
retry_policy: @config.retry_policy
|
241
254
|
|
242
255
|
@connection_service_stub.call_rpc :create_connection, request, options: options do |response, operation|
|
@@ -277,6 +290,21 @@ module Google
|
|
277
290
|
#
|
278
291
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
279
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
|
+
#
|
280
308
|
def get_connection request, options = nil
|
281
309
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
282
310
|
|
@@ -294,16 +322,20 @@ module Google
|
|
294
322
|
gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION
|
295
323
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
296
324
|
|
297
|
-
header_params = {
|
298
|
-
|
299
|
-
|
325
|
+
header_params = {}
|
326
|
+
if request.name
|
327
|
+
header_params["name"] = request.name
|
328
|
+
end
|
329
|
+
|
300
330
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
301
331
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
302
332
|
|
303
333
|
options.apply_defaults timeout: @config.rpcs.get_connection.timeout,
|
304
334
|
metadata: metadata,
|
305
335
|
retry_policy: @config.rpcs.get_connection.retry_policy
|
306
|
-
|
336
|
+
|
337
|
+
options.apply_defaults timeout: @config.timeout,
|
338
|
+
metadata: @config.metadata,
|
307
339
|
retry_policy: @config.retry_policy
|
308
340
|
|
309
341
|
@connection_service_stub.call_rpc :get_connection, request, options: options do |response, operation|
|
@@ -348,6 +380,27 @@ module Google
|
|
348
380
|
#
|
349
381
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
350
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
|
+
#
|
351
404
|
def list_connections request, options = nil
|
352
405
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
353
406
|
|
@@ -365,16 +418,20 @@ module Google
|
|
365
418
|
gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION
|
366
419
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
367
420
|
|
368
|
-
header_params = {
|
369
|
-
|
370
|
-
|
421
|
+
header_params = {}
|
422
|
+
if request.parent
|
423
|
+
header_params["parent"] = request.parent
|
424
|
+
end
|
425
|
+
|
371
426
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
372
427
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
373
428
|
|
374
429
|
options.apply_defaults timeout: @config.rpcs.list_connections.timeout,
|
375
430
|
metadata: metadata,
|
376
431
|
retry_policy: @config.rpcs.list_connections.retry_policy
|
377
|
-
|
432
|
+
|
433
|
+
options.apply_defaults timeout: @config.timeout,
|
434
|
+
metadata: @config.metadata,
|
378
435
|
retry_policy: @config.retry_policy
|
379
436
|
|
380
437
|
@connection_service_stub.call_rpc :list_connections, request, options: options do |response, operation|
|
@@ -421,6 +478,21 @@ module Google
|
|
421
478
|
#
|
422
479
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
423
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
|
+
#
|
424
496
|
def update_connection request, options = nil
|
425
497
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
426
498
|
|
@@ -438,16 +510,20 @@ module Google
|
|
438
510
|
gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION
|
439
511
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
440
512
|
|
441
|
-
header_params = {
|
442
|
-
|
443
|
-
|
513
|
+
header_params = {}
|
514
|
+
if request.name
|
515
|
+
header_params["name"] = request.name
|
516
|
+
end
|
517
|
+
|
444
518
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
445
519
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
446
520
|
|
447
521
|
options.apply_defaults timeout: @config.rpcs.update_connection.timeout,
|
448
522
|
metadata: metadata,
|
449
523
|
retry_policy: @config.rpcs.update_connection.retry_policy
|
450
|
-
|
524
|
+
|
525
|
+
options.apply_defaults timeout: @config.timeout,
|
526
|
+
metadata: @config.metadata,
|
451
527
|
retry_policy: @config.retry_policy
|
452
528
|
|
453
529
|
@connection_service_stub.call_rpc :update_connection, request, options: options do |response, operation|
|
@@ -488,6 +564,21 @@ module Google
|
|
488
564
|
#
|
489
565
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
490
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
|
+
#
|
491
582
|
def delete_connection request, options = nil
|
492
583
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
493
584
|
|
@@ -505,16 +596,20 @@ module Google
|
|
505
596
|
gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION
|
506
597
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
507
598
|
|
508
|
-
header_params = {
|
509
|
-
|
510
|
-
|
599
|
+
header_params = {}
|
600
|
+
if request.name
|
601
|
+
header_params["name"] = request.name
|
602
|
+
end
|
603
|
+
|
511
604
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
512
605
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
513
606
|
|
514
607
|
options.apply_defaults timeout: @config.rpcs.delete_connection.timeout,
|
515
608
|
metadata: metadata,
|
516
609
|
retry_policy: @config.rpcs.delete_connection.retry_policy
|
517
|
-
|
610
|
+
|
611
|
+
options.apply_defaults timeout: @config.timeout,
|
612
|
+
metadata: @config.metadata,
|
518
613
|
retry_policy: @config.retry_policy
|
519
614
|
|
520
615
|
@connection_service_stub.call_rpc :delete_connection, request, options: options do |response, operation|
|
@@ -560,6 +655,21 @@ module Google
|
|
560
655
|
#
|
561
656
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
562
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
|
+
#
|
563
673
|
def get_iam_policy request, options = nil
|
564
674
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
565
675
|
|
@@ -577,16 +687,20 @@ module Google
|
|
577
687
|
gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION
|
578
688
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
579
689
|
|
580
|
-
header_params = {
|
581
|
-
|
582
|
-
|
690
|
+
header_params = {}
|
691
|
+
if request.resource
|
692
|
+
header_params["resource"] = request.resource
|
693
|
+
end
|
694
|
+
|
583
695
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
584
696
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
585
697
|
|
586
698
|
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
587
699
|
metadata: metadata,
|
588
700
|
retry_policy: @config.rpcs.get_iam_policy.retry_policy
|
589
|
-
|
701
|
+
|
702
|
+
options.apply_defaults timeout: @config.timeout,
|
703
|
+
metadata: @config.metadata,
|
590
704
|
retry_policy: @config.retry_policy
|
591
705
|
|
592
706
|
@connection_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
|
@@ -635,6 +749,21 @@ module Google
|
|
635
749
|
#
|
636
750
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
637
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
|
+
#
|
638
767
|
def set_iam_policy request, options = nil
|
639
768
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
640
769
|
|
@@ -652,16 +781,20 @@ module Google
|
|
652
781
|
gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION
|
653
782
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
654
783
|
|
655
|
-
header_params = {
|
656
|
-
|
657
|
-
|
784
|
+
header_params = {}
|
785
|
+
if request.resource
|
786
|
+
header_params["resource"] = request.resource
|
787
|
+
end
|
788
|
+
|
658
789
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
659
790
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
660
791
|
|
661
792
|
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
662
793
|
metadata: metadata,
|
663
794
|
retry_policy: @config.rpcs.set_iam_policy.retry_policy
|
664
|
-
|
795
|
+
|
796
|
+
options.apply_defaults timeout: @config.timeout,
|
797
|
+
metadata: @config.metadata,
|
665
798
|
retry_policy: @config.retry_policy
|
666
799
|
|
667
800
|
@connection_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
|
@@ -713,6 +846,21 @@ module Google
|
|
713
846
|
#
|
714
847
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
715
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
|
+
#
|
716
864
|
def test_iam_permissions request, options = nil
|
717
865
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
718
866
|
|
@@ -730,16 +878,20 @@ module Google
|
|
730
878
|
gapic_version: ::Google::Cloud::Bigquery::Connection::V1::VERSION
|
731
879
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
732
880
|
|
733
|
-
header_params = {
|
734
|
-
|
735
|
-
|
881
|
+
header_params = {}
|
882
|
+
if request.resource
|
883
|
+
header_params["resource"] = request.resource
|
884
|
+
end
|
885
|
+
|
736
886
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
737
887
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
738
888
|
|
739
889
|
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
740
890
|
metadata: metadata,
|
741
891
|
retry_policy: @config.rpcs.test_iam_permissions.retry_policy
|
742
|
-
|
892
|
+
|
893
|
+
options.apply_defaults timeout: @config.timeout,
|
894
|
+
metadata: @config.metadata,
|
743
895
|
retry_policy: @config.retry_policy
|
744
896
|
|
745
897
|
@connection_service_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
|
@@ -763,22 +915,21 @@ module Google
|
|
763
915
|
# Configuration can be applied globally to all clients, or to a single client
|
764
916
|
# on construction.
|
765
917
|
#
|
766
|
-
#
|
767
|
-
#
|
768
|
-
#
|
769
|
-
# to 20 seconds,
|
770
|
-
#
|
771
|
-
#
|
772
|
-
#
|
773
|
-
#
|
774
|
-
#
|
775
|
-
#
|
776
|
-
#
|
777
|
-
#
|
778
|
-
#
|
779
|
-
#
|
780
|
-
#
|
781
|
-
# 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
|
782
933
|
#
|
783
934
|
# @!attribute [rw] endpoint
|
784
935
|
# The hostname or hostname:port of the service endpoint.
|
@@ -33,11 +33,7 @@ module Google
|
|
33
33
|
# // For Kubernetes resources, the format is {api group}/{kind}.
|
34
34
|
# option (google.api.resource) = {
|
35
35
|
# type: "pubsub.googleapis.com/Topic"
|
36
|
-
#
|
37
|
-
# pattern: "projects/{project}/topics/{topic}"
|
38
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
39
|
-
# parent_name_extractor: "projects/{project}"
|
40
|
-
# }
|
36
|
+
# pattern: "projects/{project}/topics/{topic}"
|
41
37
|
# };
|
42
38
|
# }
|
43
39
|
#
|
@@ -45,10 +41,7 @@ module Google
|
|
45
41
|
#
|
46
42
|
# resources:
|
47
43
|
# - type: "pubsub.googleapis.com/Topic"
|
48
|
-
#
|
49
|
-
# - pattern: "projects/{project}/topics/{topic}"
|
50
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
51
|
-
# parent_name_extractor: "projects/{project}"
|
44
|
+
# pattern: "projects/{project}/topics/{topic}"
|
52
45
|
#
|
53
46
|
# Sometimes, resources have multiple patterns, typically because they can
|
54
47
|
# live under multiple parents.
|
@@ -58,26 +51,10 @@ module Google
|
|
58
51
|
# message LogEntry {
|
59
52
|
# option (google.api.resource) = {
|
60
53
|
# type: "logging.googleapis.com/LogEntry"
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
65
|
-
# }
|
66
|
-
# name_descriptor: {
|
67
|
-
# pattern: "folders/{folder}/logs/{log}"
|
68
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
69
|
-
# parent_name_extractor: "folders/{folder}"
|
70
|
-
# }
|
71
|
-
# name_descriptor: {
|
72
|
-
# pattern: "organizations/{organization}/logs/{log}"
|
73
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
74
|
-
# parent_name_extractor: "organizations/{organization}"
|
75
|
-
# }
|
76
|
-
# name_descriptor: {
|
77
|
-
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
78
|
-
# parent_type: "billing.googleapis.com/BillingAccount"
|
79
|
-
# parent_name_extractor: "billingAccounts/{billing_account}"
|
80
|
-
# }
|
54
|
+
# pattern: "projects/{project}/logs/{log}"
|
55
|
+
# pattern: "folders/{folder}/logs/{log}"
|
56
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
57
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
81
58
|
# };
|
82
59
|
# }
|
83
60
|
#
|
@@ -85,48 +62,10 @@ module Google
|
|
85
62
|
#
|
86
63
|
# resources:
|
87
64
|
# - type: 'logging.googleapis.com/LogEntry'
|
88
|
-
#
|
89
|
-
#
|
90
|
-
#
|
91
|
-
#
|
92
|
-
# - pattern: "folders/{folder}/logs/{log}"
|
93
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
94
|
-
# parent_name_extractor: "folders/{folder}"
|
95
|
-
# - pattern: "organizations/{organization}/logs/{log}"
|
96
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
97
|
-
# parent_name_extractor: "organizations/{organization}"
|
98
|
-
# - pattern: "billingAccounts/{billing_account}/logs/{log}"
|
99
|
-
# parent_type: "billing.googleapis.com/BillingAccount"
|
100
|
-
# parent_name_extractor: "billingAccounts/{billing_account}"
|
101
|
-
#
|
102
|
-
# For flexible resources, the resource name doesn't contain parent names, but
|
103
|
-
# the resource itself has parents for policy evaluation.
|
104
|
-
#
|
105
|
-
# Example:
|
106
|
-
#
|
107
|
-
# message Shelf {
|
108
|
-
# option (google.api.resource) = {
|
109
|
-
# type: "library.googleapis.com/Shelf"
|
110
|
-
# name_descriptor: {
|
111
|
-
# pattern: "shelves/{shelf}"
|
112
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
113
|
-
# }
|
114
|
-
# name_descriptor: {
|
115
|
-
# pattern: "shelves/{shelf}"
|
116
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
117
|
-
# }
|
118
|
-
# };
|
119
|
-
# }
|
120
|
-
#
|
121
|
-
# The ResourceDescriptor Yaml config will look like:
|
122
|
-
#
|
123
|
-
# resources:
|
124
|
-
# - type: 'library.googleapis.com/Shelf'
|
125
|
-
# name_descriptor:
|
126
|
-
# - pattern: "shelves/{shelf}"
|
127
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
128
|
-
# - pattern: "shelves/{shelf}"
|
129
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
65
|
+
# pattern: "projects/{project}/logs/{log}"
|
66
|
+
# pattern: "folders/{folder}/logs/{log}"
|
67
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
68
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
130
69
|
# @!attribute [rw] type
|
131
70
|
# @return [::String]
|
132
71
|
# The resource type. It must be in the format of
|
@@ -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
|
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-11 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
|
@@ -228,7 +228,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
228
228
|
- !ruby/object:Gem::Version
|
229
229
|
version: '0'
|
230
230
|
requirements: []
|
231
|
-
rubygems_version: 3.
|
231
|
+
rubygems_version: 3.3.4
|
232
232
|
signing_key:
|
233
233
|
specification_version: 4
|
234
234
|
summary: API Client library for the BigQuery Connection V1 API
|