google-cloud-metastore-v1 0.3.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +1 -1
- data/README.md +1 -1
- data/lib/google/cloud/metastore/v1/dataproc_metastore/client.rb +76 -54
- data/lib/google/cloud/metastore/v1/dataproc_metastore/operations.rb +12 -14
- data/lib/google/cloud/metastore/v1/dataproc_metastore/paths.rb +19 -0
- data/lib/google/cloud/metastore/v1/dataproc_metastore.rb +1 -1
- data/lib/google/cloud/metastore/v1/dataproc_metastore_federation/client.rb +926 -0
- data/lib/google/cloud/metastore/v1/dataproc_metastore_federation/credentials.rb +51 -0
- data/lib/google/cloud/metastore/v1/dataproc_metastore_federation/operations.rb +768 -0
- data/lib/google/cloud/metastore/v1/dataproc_metastore_federation/paths.rb +69 -0
- data/lib/google/cloud/metastore/v1/dataproc_metastore_federation.rb +62 -0
- data/lib/google/cloud/metastore/v1/metastore_federation_pb.rb +94 -0
- data/lib/google/cloud/metastore/v1/metastore_federation_services_pb.rb +65 -0
- data/lib/google/cloud/metastore/v1/metastore_pb.rb +35 -0
- data/lib/google/cloud/metastore/v1/version.rb +1 -1
- data/lib/google/cloud/metastore/v1.rb +3 -2
- data/proto_docs/google/api/client.rb +318 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/cloud/metastore/v1/metastore.rb +95 -2
- data/proto_docs/google/cloud/metastore/v1/metastore_federation.rb +302 -0
- data/proto_docs/google/protobuf/empty.rb +0 -2
- data/proto_docs/google/rpc/status.rb +4 -2
- metadata +57 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85836b778dea961c5cb2b20a13a370554372f38feba88d4e6b08bde71adf79d5
|
4
|
+
data.tar.gz: 7f465484eb4ea2e236aab84facd351524f5328dfd9a7bf287b6f371e192fd614
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddc6476dd33a665cdc561547684ebcc725140293237ae0c340c30eeaf2ace9e5b872d0ef35ef70b96209e6eb91b7f3c4171885329dc1eada59917260408af995
|
7
|
+
data.tar.gz: 719e9068b6fb668790a5a2302d2b742946af18bed9ea9a6d75ea25d2ad5672c223bf6211702b9b905454a1ad9d882497eaec58dd7df927c7265e168f1a6893e1
|
data/AUTHENTICATION.md
CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
|
|
114
114
|
To configure your system for this, simply:
|
115
115
|
|
116
116
|
1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
|
117
|
-
2. Authenticate using OAuth 2.0 `$ gcloud auth login`
|
117
|
+
2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
|
118
118
|
3. Write code as if already authenticated.
|
119
119
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
data/README.md
CHANGED
@@ -46,7 +46,7 @@ for general usage information.
|
|
46
46
|
## Enabling Logging
|
47
47
|
|
48
48
|
To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
|
49
|
-
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/
|
49
|
+
The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
|
50
50
|
or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
|
51
51
|
that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
|
52
52
|
and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
|
@@ -18,6 +18,8 @@
|
|
18
18
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/metastore/v1/metastore_pb"
|
21
|
+
require "google/cloud/location"
|
22
|
+
require "google/iam/v1"
|
21
23
|
|
22
24
|
module Google
|
23
25
|
module Cloud
|
@@ -178,6 +180,18 @@ module Google
|
|
178
180
|
config.endpoint = @config.endpoint
|
179
181
|
end
|
180
182
|
|
183
|
+
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
184
|
+
config.credentials = credentials
|
185
|
+
config.quota_project = @quota_project_id
|
186
|
+
config.endpoint = @config.endpoint
|
187
|
+
end
|
188
|
+
|
189
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
190
|
+
config.credentials = credentials
|
191
|
+
config.quota_project = @quota_project_id
|
192
|
+
config.endpoint = @config.endpoint
|
193
|
+
end
|
194
|
+
|
181
195
|
@dataproc_metastore_stub = ::Gapic::ServiceStub.new(
|
182
196
|
::Google::Cloud::Metastore::V1::DataprocMetastore::Stub,
|
183
197
|
credentials: credentials,
|
@@ -194,6 +208,20 @@ module Google
|
|
194
208
|
#
|
195
209
|
attr_reader :operations_client
|
196
210
|
|
211
|
+
##
|
212
|
+
# Get the associated client for mix-in of the Locations.
|
213
|
+
#
|
214
|
+
# @return [Google::Cloud::Location::Locations::Client]
|
215
|
+
#
|
216
|
+
attr_reader :location_client
|
217
|
+
|
218
|
+
##
|
219
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
220
|
+
#
|
221
|
+
# @return [Google::Iam::V1::IAMPolicy::Client]
|
222
|
+
#
|
223
|
+
attr_reader :iam_policy_client
|
224
|
+
|
197
225
|
# Service calls
|
198
226
|
|
199
227
|
##
|
@@ -259,13 +287,11 @@ module Google
|
|
259
287
|
# # Call the list_services method.
|
260
288
|
# result = client.list_services request
|
261
289
|
#
|
262
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
263
|
-
# #
|
264
|
-
#
|
265
|
-
# # methods are also available for managing paging directly.
|
266
|
-
# result.each do |response|
|
290
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
291
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
292
|
+
# result.each do |item|
|
267
293
|
# # Each element is of type ::Google::Cloud::Metastore::V1::Service.
|
268
|
-
# p
|
294
|
+
# p item
|
269
295
|
# end
|
270
296
|
#
|
271
297
|
def list_services request, options = nil
|
@@ -466,14 +492,14 @@ module Google
|
|
466
492
|
# # Call the create_service method.
|
467
493
|
# result = client.create_service request
|
468
494
|
#
|
469
|
-
# # The returned object is of type Gapic::Operation. You can use
|
470
|
-
# #
|
471
|
-
# #
|
495
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
496
|
+
# # check the status of an operation, cancel it, or wait for results.
|
497
|
+
# # Here is how to wait for a response.
|
472
498
|
# result.wait_until_done! timeout: 60
|
473
499
|
# if result.response?
|
474
500
|
# p result.response
|
475
501
|
# else
|
476
|
-
# puts "
|
502
|
+
# puts "No response received."
|
477
503
|
# end
|
478
504
|
#
|
479
505
|
def create_service request, options = nil
|
@@ -581,14 +607,14 @@ module Google
|
|
581
607
|
# # Call the update_service method.
|
582
608
|
# result = client.update_service request
|
583
609
|
#
|
584
|
-
# # The returned object is of type Gapic::Operation. You can use
|
585
|
-
# #
|
586
|
-
# #
|
610
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
611
|
+
# # check the status of an operation, cancel it, or wait for results.
|
612
|
+
# # Here is how to wait for a response.
|
587
613
|
# result.wait_until_done! timeout: 60
|
588
614
|
# if result.response?
|
589
615
|
# p result.response
|
590
616
|
# else
|
591
|
-
# puts "
|
617
|
+
# puts "No response received."
|
592
618
|
# end
|
593
619
|
#
|
594
620
|
def update_service request, options = nil
|
@@ -690,14 +716,14 @@ module Google
|
|
690
716
|
# # Call the delete_service method.
|
691
717
|
# result = client.delete_service request
|
692
718
|
#
|
693
|
-
# # The returned object is of type Gapic::Operation. You can use
|
694
|
-
# #
|
695
|
-
# #
|
719
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
720
|
+
# # check the status of an operation, cancel it, or wait for results.
|
721
|
+
# # Here is how to wait for a response.
|
696
722
|
# result.wait_until_done! timeout: 60
|
697
723
|
# if result.response?
|
698
724
|
# p result.response
|
699
725
|
# else
|
700
|
-
# puts "
|
726
|
+
# puts "No response received."
|
701
727
|
# end
|
702
728
|
#
|
703
729
|
def delete_service request, options = nil
|
@@ -805,13 +831,11 @@ module Google
|
|
805
831
|
# # Call the list_metadata_imports method.
|
806
832
|
# result = client.list_metadata_imports request
|
807
833
|
#
|
808
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
809
|
-
# #
|
810
|
-
#
|
811
|
-
# # methods are also available for managing paging directly.
|
812
|
-
# result.each do |response|
|
834
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
835
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
836
|
+
# result.each do |item|
|
813
837
|
# # Each element is of type ::Google::Cloud::Metastore::V1::MetadataImport.
|
814
|
-
# p
|
838
|
+
# p item
|
815
839
|
# end
|
816
840
|
#
|
817
841
|
def list_metadata_imports request, options = nil
|
@@ -1012,14 +1036,14 @@ module Google
|
|
1012
1036
|
# # Call the create_metadata_import method.
|
1013
1037
|
# result = client.create_metadata_import request
|
1014
1038
|
#
|
1015
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1016
|
-
# #
|
1017
|
-
# #
|
1039
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1040
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1041
|
+
# # Here is how to wait for a response.
|
1018
1042
|
# result.wait_until_done! timeout: 60
|
1019
1043
|
# if result.response?
|
1020
1044
|
# p result.response
|
1021
1045
|
# else
|
1022
|
-
# puts "
|
1046
|
+
# puts "No response received."
|
1023
1047
|
# end
|
1024
1048
|
#
|
1025
1049
|
def create_metadata_import request, options = nil
|
@@ -1128,14 +1152,14 @@ module Google
|
|
1128
1152
|
# # Call the update_metadata_import method.
|
1129
1153
|
# result = client.update_metadata_import request
|
1130
1154
|
#
|
1131
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1132
|
-
# #
|
1133
|
-
# #
|
1155
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1156
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1157
|
+
# # Here is how to wait for a response.
|
1134
1158
|
# result.wait_until_done! timeout: 60
|
1135
1159
|
# if result.response?
|
1136
1160
|
# p result.response
|
1137
1161
|
# else
|
1138
|
-
# puts "
|
1162
|
+
# puts "No response received."
|
1139
1163
|
# end
|
1140
1164
|
#
|
1141
1165
|
def update_metadata_import request, options = nil
|
@@ -1243,14 +1267,14 @@ module Google
|
|
1243
1267
|
# # Call the export_metadata method.
|
1244
1268
|
# result = client.export_metadata request
|
1245
1269
|
#
|
1246
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1247
|
-
# #
|
1248
|
-
# #
|
1270
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1271
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1272
|
+
# # Here is how to wait for a response.
|
1249
1273
|
# result.wait_until_done! timeout: 60
|
1250
1274
|
# if result.response?
|
1251
1275
|
# p result.response
|
1252
1276
|
# else
|
1253
|
-
# puts "
|
1277
|
+
# puts "No response received."
|
1254
1278
|
# end
|
1255
1279
|
#
|
1256
1280
|
def export_metadata request, options = nil
|
@@ -1359,14 +1383,14 @@ module Google
|
|
1359
1383
|
# # Call the restore_service method.
|
1360
1384
|
# result = client.restore_service request
|
1361
1385
|
#
|
1362
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1363
|
-
# #
|
1364
|
-
# #
|
1386
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1387
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1388
|
+
# # Here is how to wait for a response.
|
1365
1389
|
# result.wait_until_done! timeout: 60
|
1366
1390
|
# if result.response?
|
1367
1391
|
# p result.response
|
1368
1392
|
# else
|
1369
|
-
# puts "
|
1393
|
+
# puts "No response received."
|
1370
1394
|
# end
|
1371
1395
|
#
|
1372
1396
|
def restore_service request, options = nil
|
@@ -1474,13 +1498,11 @@ module Google
|
|
1474
1498
|
# # Call the list_backups method.
|
1475
1499
|
# result = client.list_backups request
|
1476
1500
|
#
|
1477
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1478
|
-
# #
|
1479
|
-
#
|
1480
|
-
# # methods are also available for managing paging directly.
|
1481
|
-
# result.each do |response|
|
1501
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1502
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1503
|
+
# result.each do |item|
|
1482
1504
|
# # Each element is of type ::Google::Cloud::Metastore::V1::Backup.
|
1483
|
-
# p
|
1505
|
+
# p item
|
1484
1506
|
# end
|
1485
1507
|
#
|
1486
1508
|
def list_backups request, options = nil
|
@@ -1680,14 +1702,14 @@ module Google
|
|
1680
1702
|
# # Call the create_backup method.
|
1681
1703
|
# result = client.create_backup request
|
1682
1704
|
#
|
1683
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1684
|
-
# #
|
1685
|
-
# #
|
1705
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1706
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1707
|
+
# # Here is how to wait for a response.
|
1686
1708
|
# result.wait_until_done! timeout: 60
|
1687
1709
|
# if result.response?
|
1688
1710
|
# p result.response
|
1689
1711
|
# else
|
1690
|
-
# puts "
|
1712
|
+
# puts "No response received."
|
1691
1713
|
# end
|
1692
1714
|
#
|
1693
1715
|
def create_backup request, options = nil
|
@@ -1789,14 +1811,14 @@ module Google
|
|
1789
1811
|
# # Call the delete_backup method.
|
1790
1812
|
# result = client.delete_backup request
|
1791
1813
|
#
|
1792
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1793
|
-
# #
|
1794
|
-
# #
|
1814
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1815
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1816
|
+
# # Here is how to wait for a response.
|
1795
1817
|
# result.wait_until_done! timeout: 60
|
1796
1818
|
# if result.response?
|
1797
1819
|
# p result.response
|
1798
1820
|
# else
|
1799
|
-
# puts "
|
1821
|
+
# puts "No response received."
|
1800
1822
|
# end
|
1801
1823
|
#
|
1802
1824
|
def delete_backup request, options = nil
|
@@ -158,13 +158,11 @@ module Google
|
|
158
158
|
# # Call the list_operations method.
|
159
159
|
# result = client.list_operations request
|
160
160
|
#
|
161
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
162
|
-
# #
|
163
|
-
#
|
164
|
-
# # methods are also available for managing paging directly.
|
165
|
-
# result.each do |response|
|
161
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
162
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
163
|
+
# result.each do |item|
|
166
164
|
# # Each element is of type ::Google::Longrunning::Operation.
|
167
|
-
# p
|
165
|
+
# p item
|
168
166
|
# end
|
169
167
|
#
|
170
168
|
def list_operations request, options = nil
|
@@ -253,14 +251,14 @@ module Google
|
|
253
251
|
# # Call the get_operation method.
|
254
252
|
# result = client.get_operation request
|
255
253
|
#
|
256
|
-
# # The returned object is of type Gapic::Operation. You can use
|
257
|
-
# #
|
258
|
-
# #
|
254
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
255
|
+
# # check the status of an operation, cancel it, or wait for results.
|
256
|
+
# # Here is how to wait for a response.
|
259
257
|
# result.wait_until_done! timeout: 60
|
260
258
|
# if result.response?
|
261
259
|
# p result.response
|
262
260
|
# else
|
263
|
-
# puts "
|
261
|
+
# puts "No response received."
|
264
262
|
# end
|
265
263
|
#
|
266
264
|
def get_operation request, options = nil
|
@@ -540,14 +538,14 @@ module Google
|
|
540
538
|
# # Call the wait_operation method.
|
541
539
|
# result = client.wait_operation request
|
542
540
|
#
|
543
|
-
# # The returned object is of type Gapic::Operation. You can use
|
544
|
-
# #
|
545
|
-
# #
|
541
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
542
|
+
# # check the status of an operation, cancel it, or wait for results.
|
543
|
+
# # Here is how to wait for a response.
|
546
544
|
# result.wait_until_done! timeout: 60
|
547
545
|
# if result.response?
|
548
546
|
# p result.response
|
549
547
|
# else
|
550
|
-
# puts "
|
548
|
+
# puts "No response received."
|
551
549
|
# end
|
552
550
|
#
|
553
551
|
def wait_operation request, options = nil
|
@@ -119,6 +119,25 @@ module Google
|
|
119
119
|
"projects/#{project}/locations/#{location}/services/#{service}"
|
120
120
|
end
|
121
121
|
|
122
|
+
##
|
123
|
+
# Create a fully-qualified Subnetwork resource string.
|
124
|
+
#
|
125
|
+
# The resource will be in the following format:
|
126
|
+
#
|
127
|
+
# `projects/{project}/regions/{region}/subnetworks/{subnetwork}`
|
128
|
+
#
|
129
|
+
# @param project [String]
|
130
|
+
# @param region [String]
|
131
|
+
# @param subnetwork [String]
|
132
|
+
#
|
133
|
+
# @return [::String]
|
134
|
+
def subnetwork_path project:, region:, subnetwork:
|
135
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
136
|
+
raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/"
|
137
|
+
|
138
|
+
"projects/#{project}/regions/#{region}/subnetworks/#{subnetwork}"
|
139
|
+
end
|
140
|
+
|
122
141
|
extend self
|
123
142
|
end
|
124
143
|
end
|
@@ -50,7 +50,7 @@ module Google
|
|
50
50
|
#
|
51
51
|
# `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
|
52
52
|
#
|
53
|
-
#
|
53
|
+
# @example Load this service and instantiate a gRPC client
|
54
54
|
#
|
55
55
|
# require "google/cloud/metastore/v1/dataproc_metastore"
|
56
56
|
# client = ::Google::Cloud::Metastore::V1::DataprocMetastore::Client.new
|