google-cloud-metastore-v1 0.8.1 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/metastore/v1/dataproc_metastore/client.rb +341 -1
- data/lib/google/cloud/metastore/v1/dataproc_metastore/operations.rb +10 -1
- data/lib/google/cloud/metastore/v1/dataproc_metastore/rest/client.rb +625 -0
- data/lib/google/cloud/metastore/v1/dataproc_metastore/rest/operations.rb +75 -0
- data/lib/google/cloud/metastore/v1/dataproc_metastore/rest/service_stub.rb +180 -0
- data/lib/google/cloud/metastore/v1/dataproc_metastore_federation/client.rb +10 -1
- data/lib/google/cloud/metastore/v1/dataproc_metastore_federation/operations.rb +10 -1
- data/lib/google/cloud/metastore/v1/dataproc_metastore_federation/rest/client.rb +105 -0
- data/lib/google/cloud/metastore/v1/dataproc_metastore_federation/rest/operations.rb +75 -0
- data/lib/google/cloud/metastore/v1/metastore_federation_pb.rb +1 -1
- data/lib/google/cloud/metastore/v1/metastore_pb.rb +9 -1
- data/lib/google/cloud/metastore/v1/metastore_services_pb.rb +9 -0
- data/lib/google/cloud/metastore/v1/version.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/cloud/metastore/v1/metastore.rb +132 -0
- data/proto_docs/google/cloud/metastore/v1/metastore_federation.rb +3 -0
- metadata +5 -5
@@ -268,6 +268,26 @@ module Google
|
|
268
268
|
# @return [::Google::Cloud::Metastore::V1::ListServicesResponse]
|
269
269
|
#
|
270
270
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
271
|
+
#
|
272
|
+
# @example Basic example
|
273
|
+
# require "google/cloud/metastore/v1"
|
274
|
+
#
|
275
|
+
# # Create a client object. The client can be reused for multiple calls.
|
276
|
+
# client = Google::Cloud::Metastore::V1::DataprocMetastore::Rest::Client.new
|
277
|
+
#
|
278
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
279
|
+
# request = Google::Cloud::Metastore::V1::ListServicesRequest.new
|
280
|
+
#
|
281
|
+
# # Call the list_services method.
|
282
|
+
# result = client.list_services request
|
283
|
+
#
|
284
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
285
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
286
|
+
# result.each do |item|
|
287
|
+
# # Each element is of type ::Google::Cloud::Metastore::V1::Service.
|
288
|
+
# p item
|
289
|
+
# end
|
290
|
+
#
|
271
291
|
def list_services request, options = nil
|
272
292
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
273
293
|
|
@@ -333,6 +353,22 @@ module Google
|
|
333
353
|
# @return [::Google::Cloud::Metastore::V1::Service]
|
334
354
|
#
|
335
355
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
356
|
+
#
|
357
|
+
# @example Basic example
|
358
|
+
# require "google/cloud/metastore/v1"
|
359
|
+
#
|
360
|
+
# # Create a client object. The client can be reused for multiple calls.
|
361
|
+
# client = Google::Cloud::Metastore::V1::DataprocMetastore::Rest::Client.new
|
362
|
+
#
|
363
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
364
|
+
# request = Google::Cloud::Metastore::V1::GetServiceRequest.new
|
365
|
+
#
|
366
|
+
# # Call the get_service method.
|
367
|
+
# result = client.get_service request
|
368
|
+
#
|
369
|
+
# # The returned object is of type Google::Cloud::Metastore::V1::Service.
|
370
|
+
# p result
|
371
|
+
#
|
336
372
|
def get_service request, options = nil
|
337
373
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
338
374
|
|
@@ -422,6 +458,29 @@ module Google
|
|
422
458
|
# @return [::Gapic::Operation]
|
423
459
|
#
|
424
460
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
461
|
+
#
|
462
|
+
# @example Basic example
|
463
|
+
# require "google/cloud/metastore/v1"
|
464
|
+
#
|
465
|
+
# # Create a client object. The client can be reused for multiple calls.
|
466
|
+
# client = Google::Cloud::Metastore::V1::DataprocMetastore::Rest::Client.new
|
467
|
+
#
|
468
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
469
|
+
# request = Google::Cloud::Metastore::V1::CreateServiceRequest.new
|
470
|
+
#
|
471
|
+
# # Call the create_service method.
|
472
|
+
# result = client.create_service request
|
473
|
+
#
|
474
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
475
|
+
# # check the status of an operation, cancel it, or wait for results.
|
476
|
+
# # Here is how to wait for a response.
|
477
|
+
# result.wait_until_done! timeout: 60
|
478
|
+
# if result.response?
|
479
|
+
# p result.response
|
480
|
+
# else
|
481
|
+
# puts "No response received."
|
482
|
+
# end
|
483
|
+
#
|
425
484
|
def create_service request, options = nil
|
426
485
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
427
486
|
|
@@ -507,6 +566,29 @@ module Google
|
|
507
566
|
# @return [::Gapic::Operation]
|
508
567
|
#
|
509
568
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
569
|
+
#
|
570
|
+
# @example Basic example
|
571
|
+
# require "google/cloud/metastore/v1"
|
572
|
+
#
|
573
|
+
# # Create a client object. The client can be reused for multiple calls.
|
574
|
+
# client = Google::Cloud::Metastore::V1::DataprocMetastore::Rest::Client.new
|
575
|
+
#
|
576
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
577
|
+
# request = Google::Cloud::Metastore::V1::UpdateServiceRequest.new
|
578
|
+
#
|
579
|
+
# # Call the update_service method.
|
580
|
+
# result = client.update_service request
|
581
|
+
#
|
582
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
583
|
+
# # check the status of an operation, cancel it, or wait for results.
|
584
|
+
# # Here is how to wait for a response.
|
585
|
+
# result.wait_until_done! timeout: 60
|
586
|
+
# if result.response?
|
587
|
+
# p result.response
|
588
|
+
# else
|
589
|
+
# puts "No response received."
|
590
|
+
# end
|
591
|
+
#
|
510
592
|
def update_service request, options = nil
|
511
593
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
512
594
|
|
@@ -586,6 +668,29 @@ module Google
|
|
586
668
|
# @return [::Gapic::Operation]
|
587
669
|
#
|
588
670
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
671
|
+
#
|
672
|
+
# @example Basic example
|
673
|
+
# require "google/cloud/metastore/v1"
|
674
|
+
#
|
675
|
+
# # Create a client object. The client can be reused for multiple calls.
|
676
|
+
# client = Google::Cloud::Metastore::V1::DataprocMetastore::Rest::Client.new
|
677
|
+
#
|
678
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
679
|
+
# request = Google::Cloud::Metastore::V1::DeleteServiceRequest.new
|
680
|
+
#
|
681
|
+
# # Call the delete_service method.
|
682
|
+
# result = client.delete_service request
|
683
|
+
#
|
684
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
685
|
+
# # check the status of an operation, cancel it, or wait for results.
|
686
|
+
# # Here is how to wait for a response.
|
687
|
+
# result.wait_until_done! timeout: 60
|
688
|
+
# if result.response?
|
689
|
+
# p result.response
|
690
|
+
# else
|
691
|
+
# puts "No response received."
|
692
|
+
# end
|
693
|
+
#
|
589
694
|
def delete_service request, options = nil
|
590
695
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
591
696
|
|
@@ -672,6 +777,26 @@ module Google
|
|
672
777
|
# @return [::Google::Cloud::Metastore::V1::ListMetadataImportsResponse]
|
673
778
|
#
|
674
779
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
780
|
+
#
|
781
|
+
# @example Basic example
|
782
|
+
# require "google/cloud/metastore/v1"
|
783
|
+
#
|
784
|
+
# # Create a client object. The client can be reused for multiple calls.
|
785
|
+
# client = Google::Cloud::Metastore::V1::DataprocMetastore::Rest::Client.new
|
786
|
+
#
|
787
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
788
|
+
# request = Google::Cloud::Metastore::V1::ListMetadataImportsRequest.new
|
789
|
+
#
|
790
|
+
# # Call the list_metadata_imports method.
|
791
|
+
# result = client.list_metadata_imports request
|
792
|
+
#
|
793
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
794
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
795
|
+
# result.each do |item|
|
796
|
+
# # Each element is of type ::Google::Cloud::Metastore::V1::MetadataImport.
|
797
|
+
# p item
|
798
|
+
# end
|
799
|
+
#
|
675
800
|
def list_metadata_imports request, options = nil
|
676
801
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
677
802
|
|
@@ -737,6 +862,22 @@ module Google
|
|
737
862
|
# @return [::Google::Cloud::Metastore::V1::MetadataImport]
|
738
863
|
#
|
739
864
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
865
|
+
#
|
866
|
+
# @example Basic example
|
867
|
+
# require "google/cloud/metastore/v1"
|
868
|
+
#
|
869
|
+
# # Create a client object. The client can be reused for multiple calls.
|
870
|
+
# client = Google::Cloud::Metastore::V1::DataprocMetastore::Rest::Client.new
|
871
|
+
#
|
872
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
873
|
+
# request = Google::Cloud::Metastore::V1::GetMetadataImportRequest.new
|
874
|
+
#
|
875
|
+
# # Call the get_metadata_import method.
|
876
|
+
# result = client.get_metadata_import request
|
877
|
+
#
|
878
|
+
# # The returned object is of type Google::Cloud::Metastore::V1::MetadataImport.
|
879
|
+
# p result
|
880
|
+
#
|
740
881
|
def get_metadata_import request, options = nil
|
741
882
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
742
883
|
|
@@ -826,6 +967,29 @@ module Google
|
|
826
967
|
# @return [::Gapic::Operation]
|
827
968
|
#
|
828
969
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
970
|
+
#
|
971
|
+
# @example Basic example
|
972
|
+
# require "google/cloud/metastore/v1"
|
973
|
+
#
|
974
|
+
# # Create a client object. The client can be reused for multiple calls.
|
975
|
+
# client = Google::Cloud::Metastore::V1::DataprocMetastore::Rest::Client.new
|
976
|
+
#
|
977
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
978
|
+
# request = Google::Cloud::Metastore::V1::CreateMetadataImportRequest.new
|
979
|
+
#
|
980
|
+
# # Call the create_metadata_import method.
|
981
|
+
# result = client.create_metadata_import request
|
982
|
+
#
|
983
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
984
|
+
# # check the status of an operation, cancel it, or wait for results.
|
985
|
+
# # Here is how to wait for a response.
|
986
|
+
# result.wait_until_done! timeout: 60
|
987
|
+
# if result.response?
|
988
|
+
# p result.response
|
989
|
+
# else
|
990
|
+
# puts "No response received."
|
991
|
+
# end
|
992
|
+
#
|
829
993
|
def create_metadata_import request, options = nil
|
830
994
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
831
995
|
|
@@ -912,6 +1076,29 @@ module Google
|
|
912
1076
|
# @return [::Gapic::Operation]
|
913
1077
|
#
|
914
1078
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1079
|
+
#
|
1080
|
+
# @example Basic example
|
1081
|
+
# require "google/cloud/metastore/v1"
|
1082
|
+
#
|
1083
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1084
|
+
# client = Google::Cloud::Metastore::V1::DataprocMetastore::Rest::Client.new
|
1085
|
+
#
|
1086
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1087
|
+
# request = Google::Cloud::Metastore::V1::UpdateMetadataImportRequest.new
|
1088
|
+
#
|
1089
|
+
# # Call the update_metadata_import method.
|
1090
|
+
# result = client.update_metadata_import request
|
1091
|
+
#
|
1092
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1093
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1094
|
+
# # Here is how to wait for a response.
|
1095
|
+
# result.wait_until_done! timeout: 60
|
1096
|
+
# if result.response?
|
1097
|
+
# p result.response
|
1098
|
+
# else
|
1099
|
+
# puts "No response received."
|
1100
|
+
# end
|
1101
|
+
#
|
915
1102
|
def update_metadata_import request, options = nil
|
916
1103
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
917
1104
|
|
@@ -998,6 +1185,29 @@ module Google
|
|
998
1185
|
# @return [::Gapic::Operation]
|
999
1186
|
#
|
1000
1187
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1188
|
+
#
|
1189
|
+
# @example Basic example
|
1190
|
+
# require "google/cloud/metastore/v1"
|
1191
|
+
#
|
1192
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1193
|
+
# client = Google::Cloud::Metastore::V1::DataprocMetastore::Rest::Client.new
|
1194
|
+
#
|
1195
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1196
|
+
# request = Google::Cloud::Metastore::V1::ExportMetadataRequest.new
|
1197
|
+
#
|
1198
|
+
# # Call the export_metadata method.
|
1199
|
+
# result = client.export_metadata request
|
1200
|
+
#
|
1201
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1202
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1203
|
+
# # Here is how to wait for a response.
|
1204
|
+
# result.wait_until_done! timeout: 60
|
1205
|
+
# if result.response?
|
1206
|
+
# p result.response
|
1207
|
+
# else
|
1208
|
+
# puts "No response received."
|
1209
|
+
# end
|
1210
|
+
#
|
1001
1211
|
def export_metadata request, options = nil
|
1002
1212
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1003
1213
|
|
@@ -1084,6 +1294,29 @@ module Google
|
|
1084
1294
|
# @return [::Gapic::Operation]
|
1085
1295
|
#
|
1086
1296
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1297
|
+
#
|
1298
|
+
# @example Basic example
|
1299
|
+
# require "google/cloud/metastore/v1"
|
1300
|
+
#
|
1301
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1302
|
+
# client = Google::Cloud::Metastore::V1::DataprocMetastore::Rest::Client.new
|
1303
|
+
#
|
1304
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1305
|
+
# request = Google::Cloud::Metastore::V1::RestoreServiceRequest.new
|
1306
|
+
#
|
1307
|
+
# # Call the restore_service method.
|
1308
|
+
# result = client.restore_service request
|
1309
|
+
#
|
1310
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1311
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1312
|
+
# # Here is how to wait for a response.
|
1313
|
+
# result.wait_until_done! timeout: 60
|
1314
|
+
# if result.response?
|
1315
|
+
# p result.response
|
1316
|
+
# else
|
1317
|
+
# puts "No response received."
|
1318
|
+
# end
|
1319
|
+
#
|
1087
1320
|
def restore_service request, options = nil
|
1088
1321
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1089
1322
|
|
@@ -1170,6 +1403,26 @@ module Google
|
|
1170
1403
|
# @return [::Google::Cloud::Metastore::V1::ListBackupsResponse]
|
1171
1404
|
#
|
1172
1405
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1406
|
+
#
|
1407
|
+
# @example Basic example
|
1408
|
+
# require "google/cloud/metastore/v1"
|
1409
|
+
#
|
1410
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1411
|
+
# client = Google::Cloud::Metastore::V1::DataprocMetastore::Rest::Client.new
|
1412
|
+
#
|
1413
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1414
|
+
# request = Google::Cloud::Metastore::V1::ListBackupsRequest.new
|
1415
|
+
#
|
1416
|
+
# # Call the list_backups method.
|
1417
|
+
# result = client.list_backups request
|
1418
|
+
#
|
1419
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1420
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1421
|
+
# result.each do |item|
|
1422
|
+
# # Each element is of type ::Google::Cloud::Metastore::V1::Backup.
|
1423
|
+
# p item
|
1424
|
+
# end
|
1425
|
+
#
|
1173
1426
|
def list_backups request, options = nil
|
1174
1427
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1175
1428
|
|
@@ -1235,6 +1488,22 @@ module Google
|
|
1235
1488
|
# @return [::Google::Cloud::Metastore::V1::Backup]
|
1236
1489
|
#
|
1237
1490
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1491
|
+
#
|
1492
|
+
# @example Basic example
|
1493
|
+
# require "google/cloud/metastore/v1"
|
1494
|
+
#
|
1495
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1496
|
+
# client = Google::Cloud::Metastore::V1::DataprocMetastore::Rest::Client.new
|
1497
|
+
#
|
1498
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1499
|
+
# request = Google::Cloud::Metastore::V1::GetBackupRequest.new
|
1500
|
+
#
|
1501
|
+
# # Call the get_backup method.
|
1502
|
+
# result = client.get_backup request
|
1503
|
+
#
|
1504
|
+
# # The returned object is of type Google::Cloud::Metastore::V1::Backup.
|
1505
|
+
# p result
|
1506
|
+
#
|
1238
1507
|
def get_backup request, options = nil
|
1239
1508
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1240
1509
|
|
@@ -1323,6 +1592,29 @@ module Google
|
|
1323
1592
|
# @return [::Gapic::Operation]
|
1324
1593
|
#
|
1325
1594
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1595
|
+
#
|
1596
|
+
# @example Basic example
|
1597
|
+
# require "google/cloud/metastore/v1"
|
1598
|
+
#
|
1599
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1600
|
+
# client = Google::Cloud::Metastore::V1::DataprocMetastore::Rest::Client.new
|
1601
|
+
#
|
1602
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1603
|
+
# request = Google::Cloud::Metastore::V1::CreateBackupRequest.new
|
1604
|
+
#
|
1605
|
+
# # Call the create_backup method.
|
1606
|
+
# result = client.create_backup request
|
1607
|
+
#
|
1608
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1609
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1610
|
+
# # Here is how to wait for a response.
|
1611
|
+
# result.wait_until_done! timeout: 60
|
1612
|
+
# if result.response?
|
1613
|
+
# p result.response
|
1614
|
+
# else
|
1615
|
+
# puts "No response received."
|
1616
|
+
# end
|
1617
|
+
#
|
1326
1618
|
def create_backup request, options = nil
|
1327
1619
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1328
1620
|
|
@@ -1402,6 +1694,29 @@ module Google
|
|
1402
1694
|
# @return [::Gapic::Operation]
|
1403
1695
|
#
|
1404
1696
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1697
|
+
#
|
1698
|
+
# @example Basic example
|
1699
|
+
# require "google/cloud/metastore/v1"
|
1700
|
+
#
|
1701
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1702
|
+
# client = Google::Cloud::Metastore::V1::DataprocMetastore::Rest::Client.new
|
1703
|
+
#
|
1704
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1705
|
+
# request = Google::Cloud::Metastore::V1::DeleteBackupRequest.new
|
1706
|
+
#
|
1707
|
+
# # Call the delete_backup method.
|
1708
|
+
# result = client.delete_backup request
|
1709
|
+
#
|
1710
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1711
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1712
|
+
# # Here is how to wait for a response.
|
1713
|
+
# result.wait_until_done! timeout: 60
|
1714
|
+
# if result.response?
|
1715
|
+
# p result.response
|
1716
|
+
# else
|
1717
|
+
# puts "No response received."
|
1718
|
+
# end
|
1719
|
+
#
|
1405
1720
|
def delete_backup request, options = nil
|
1406
1721
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1407
1722
|
|
@@ -1438,6 +1753,295 @@ module Google
|
|
1438
1753
|
raise ::Google::Cloud::Error.from_error(e)
|
1439
1754
|
end
|
1440
1755
|
|
1756
|
+
##
|
1757
|
+
# Query DPMS metadata.
|
1758
|
+
#
|
1759
|
+
# @overload query_metadata(request, options = nil)
|
1760
|
+
# Pass arguments to `query_metadata` via a request object, either of type
|
1761
|
+
# {::Google::Cloud::Metastore::V1::QueryMetadataRequest} or an equivalent Hash.
|
1762
|
+
#
|
1763
|
+
# @param request [::Google::Cloud::Metastore::V1::QueryMetadataRequest, ::Hash]
|
1764
|
+
# A request object representing the call parameters. Required. To specify no
|
1765
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1766
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1767
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1768
|
+
#
|
1769
|
+
# @overload query_metadata(service: nil, query: nil)
|
1770
|
+
# Pass arguments to `query_metadata` via keyword arguments. Note that at
|
1771
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1772
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1773
|
+
#
|
1774
|
+
# @param service [::String]
|
1775
|
+
# Required. The relative resource name of the metastore service to query
|
1776
|
+
# metadata, in the following format:
|
1777
|
+
#
|
1778
|
+
# `projects/{project_id}/locations/{location_id}/services/{service_id}`.
|
1779
|
+
# @param query [::String]
|
1780
|
+
# Required. A read-only SQL query to execute against the metadata database.
|
1781
|
+
# The query cannot change or mutate the data.
|
1782
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1783
|
+
# @yieldparam result [::Gapic::Operation]
|
1784
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1785
|
+
#
|
1786
|
+
# @return [::Gapic::Operation]
|
1787
|
+
#
|
1788
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1789
|
+
#
|
1790
|
+
# @example Basic example
|
1791
|
+
# require "google/cloud/metastore/v1"
|
1792
|
+
#
|
1793
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1794
|
+
# client = Google::Cloud::Metastore::V1::DataprocMetastore::Rest::Client.new
|
1795
|
+
#
|
1796
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1797
|
+
# request = Google::Cloud::Metastore::V1::QueryMetadataRequest.new
|
1798
|
+
#
|
1799
|
+
# # Call the query_metadata method.
|
1800
|
+
# result = client.query_metadata request
|
1801
|
+
#
|
1802
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1803
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1804
|
+
# # Here is how to wait for a response.
|
1805
|
+
# result.wait_until_done! timeout: 60
|
1806
|
+
# if result.response?
|
1807
|
+
# p result.response
|
1808
|
+
# else
|
1809
|
+
# puts "No response received."
|
1810
|
+
# end
|
1811
|
+
#
|
1812
|
+
def query_metadata request, options = nil
|
1813
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1814
|
+
|
1815
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1::QueryMetadataRequest
|
1816
|
+
|
1817
|
+
# Converts hash and nil to an options object
|
1818
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1819
|
+
|
1820
|
+
# Customize the options with defaults
|
1821
|
+
call_metadata = @config.rpcs.query_metadata.metadata.to_h
|
1822
|
+
|
1823
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1824
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1825
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1826
|
+
gapic_version: ::Google::Cloud::Metastore::V1::VERSION,
|
1827
|
+
transports_version_send: [:rest]
|
1828
|
+
|
1829
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1830
|
+
|
1831
|
+
options.apply_defaults timeout: @config.rpcs.query_metadata.timeout,
|
1832
|
+
metadata: call_metadata,
|
1833
|
+
retry_policy: @config.rpcs.query_metadata.retry_policy
|
1834
|
+
|
1835
|
+
options.apply_defaults timeout: @config.timeout,
|
1836
|
+
metadata: @config.metadata,
|
1837
|
+
retry_policy: @config.retry_policy
|
1838
|
+
|
1839
|
+
@dataproc_metastore_stub.query_metadata request, options do |result, operation|
|
1840
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1841
|
+
yield result, operation if block_given?
|
1842
|
+
return result
|
1843
|
+
end
|
1844
|
+
rescue ::Gapic::Rest::Error => e
|
1845
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1846
|
+
end
|
1847
|
+
|
1848
|
+
##
|
1849
|
+
# Move a table to another database.
|
1850
|
+
#
|
1851
|
+
# @overload move_table_to_database(request, options = nil)
|
1852
|
+
# Pass arguments to `move_table_to_database` via a request object, either of type
|
1853
|
+
# {::Google::Cloud::Metastore::V1::MoveTableToDatabaseRequest} or an equivalent Hash.
|
1854
|
+
#
|
1855
|
+
# @param request [::Google::Cloud::Metastore::V1::MoveTableToDatabaseRequest, ::Hash]
|
1856
|
+
# A request object representing the call parameters. Required. To specify no
|
1857
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1858
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1859
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1860
|
+
#
|
1861
|
+
# @overload move_table_to_database(service: nil, table_name: nil, db_name: nil, destination_db_name: nil)
|
1862
|
+
# Pass arguments to `move_table_to_database` via keyword arguments. Note that at
|
1863
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1864
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1865
|
+
#
|
1866
|
+
# @param service [::String]
|
1867
|
+
# Required. The relative resource name of the metastore service to mutate
|
1868
|
+
# metadata, in the following format:
|
1869
|
+
#
|
1870
|
+
# `projects/{project_id}/locations/{location_id}/services/{service_id}`.
|
1871
|
+
# @param table_name [::String]
|
1872
|
+
# Required. The name of the table to be moved.
|
1873
|
+
# @param db_name [::String]
|
1874
|
+
# Required. The name of the database where the table resides.
|
1875
|
+
# @param destination_db_name [::String]
|
1876
|
+
# Required. The name of the database where the table should be moved.
|
1877
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1878
|
+
# @yieldparam result [::Gapic::Operation]
|
1879
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1880
|
+
#
|
1881
|
+
# @return [::Gapic::Operation]
|
1882
|
+
#
|
1883
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1884
|
+
#
|
1885
|
+
# @example Basic example
|
1886
|
+
# require "google/cloud/metastore/v1"
|
1887
|
+
#
|
1888
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1889
|
+
# client = Google::Cloud::Metastore::V1::DataprocMetastore::Rest::Client.new
|
1890
|
+
#
|
1891
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1892
|
+
# request = Google::Cloud::Metastore::V1::MoveTableToDatabaseRequest.new
|
1893
|
+
#
|
1894
|
+
# # Call the move_table_to_database method.
|
1895
|
+
# result = client.move_table_to_database request
|
1896
|
+
#
|
1897
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1898
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1899
|
+
# # Here is how to wait for a response.
|
1900
|
+
# result.wait_until_done! timeout: 60
|
1901
|
+
# if result.response?
|
1902
|
+
# p result.response
|
1903
|
+
# else
|
1904
|
+
# puts "No response received."
|
1905
|
+
# end
|
1906
|
+
#
|
1907
|
+
def move_table_to_database request, options = nil
|
1908
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1909
|
+
|
1910
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1::MoveTableToDatabaseRequest
|
1911
|
+
|
1912
|
+
# Converts hash and nil to an options object
|
1913
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1914
|
+
|
1915
|
+
# Customize the options with defaults
|
1916
|
+
call_metadata = @config.rpcs.move_table_to_database.metadata.to_h
|
1917
|
+
|
1918
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1919
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1920
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1921
|
+
gapic_version: ::Google::Cloud::Metastore::V1::VERSION,
|
1922
|
+
transports_version_send: [:rest]
|
1923
|
+
|
1924
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1925
|
+
|
1926
|
+
options.apply_defaults timeout: @config.rpcs.move_table_to_database.timeout,
|
1927
|
+
metadata: call_metadata,
|
1928
|
+
retry_policy: @config.rpcs.move_table_to_database.retry_policy
|
1929
|
+
|
1930
|
+
options.apply_defaults timeout: @config.timeout,
|
1931
|
+
metadata: @config.metadata,
|
1932
|
+
retry_policy: @config.retry_policy
|
1933
|
+
|
1934
|
+
@dataproc_metastore_stub.move_table_to_database request, options do |result, operation|
|
1935
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1936
|
+
yield result, operation if block_given?
|
1937
|
+
return result
|
1938
|
+
end
|
1939
|
+
rescue ::Gapic::Rest::Error => e
|
1940
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1941
|
+
end
|
1942
|
+
|
1943
|
+
##
|
1944
|
+
# Alter metadata resource location. The metadata resource can be a database,
|
1945
|
+
# table, or partition. This functionality only updates the parent directory
|
1946
|
+
# for the respective metadata resource and does not transfer any existing
|
1947
|
+
# data to the new location.
|
1948
|
+
#
|
1949
|
+
# @overload alter_metadata_resource_location(request, options = nil)
|
1950
|
+
# Pass arguments to `alter_metadata_resource_location` via a request object, either of type
|
1951
|
+
# {::Google::Cloud::Metastore::V1::AlterMetadataResourceLocationRequest} or an equivalent Hash.
|
1952
|
+
#
|
1953
|
+
# @param request [::Google::Cloud::Metastore::V1::AlterMetadataResourceLocationRequest, ::Hash]
|
1954
|
+
# A request object representing the call parameters. Required. To specify no
|
1955
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1956
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1957
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1958
|
+
#
|
1959
|
+
# @overload alter_metadata_resource_location(service: nil, resource_name: nil, location_uri: nil)
|
1960
|
+
# Pass arguments to `alter_metadata_resource_location` via keyword arguments. Note that at
|
1961
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1962
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1963
|
+
#
|
1964
|
+
# @param service [::String]
|
1965
|
+
# Required. The relative resource name of the metastore service to mutate
|
1966
|
+
# metadata, in the following format:
|
1967
|
+
#
|
1968
|
+
# `projects/{project_id}/locations/{location_id}/services/{service_id}`.
|
1969
|
+
# @param resource_name [::String]
|
1970
|
+
# Required. The relative metadata resource name in the following format.
|
1971
|
+
#
|
1972
|
+
# `databases/{database_id}`
|
1973
|
+
# or
|
1974
|
+
# `databases/{database_id}/tables/{table_id}`
|
1975
|
+
# or
|
1976
|
+
# `databases/{database_id}/tables/{table_id}/partitions/{partition_id}`
|
1977
|
+
# @param location_uri [::String]
|
1978
|
+
# Required. The new location URI for the metadata resource.
|
1979
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1980
|
+
# @yieldparam result [::Gapic::Operation]
|
1981
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1982
|
+
#
|
1983
|
+
# @return [::Gapic::Operation]
|
1984
|
+
#
|
1985
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1986
|
+
#
|
1987
|
+
# @example Basic example
|
1988
|
+
# require "google/cloud/metastore/v1"
|
1989
|
+
#
|
1990
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1991
|
+
# client = Google::Cloud::Metastore::V1::DataprocMetastore::Rest::Client.new
|
1992
|
+
#
|
1993
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1994
|
+
# request = Google::Cloud::Metastore::V1::AlterMetadataResourceLocationRequest.new
|
1995
|
+
#
|
1996
|
+
# # Call the alter_metadata_resource_location method.
|
1997
|
+
# result = client.alter_metadata_resource_location request
|
1998
|
+
#
|
1999
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2000
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2001
|
+
# # Here is how to wait for a response.
|
2002
|
+
# result.wait_until_done! timeout: 60
|
2003
|
+
# if result.response?
|
2004
|
+
# p result.response
|
2005
|
+
# else
|
2006
|
+
# puts "No response received."
|
2007
|
+
# end
|
2008
|
+
#
|
2009
|
+
def alter_metadata_resource_location request, options = nil
|
2010
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
2011
|
+
|
2012
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Metastore::V1::AlterMetadataResourceLocationRequest
|
2013
|
+
|
2014
|
+
# Converts hash and nil to an options object
|
2015
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
2016
|
+
|
2017
|
+
# Customize the options with defaults
|
2018
|
+
call_metadata = @config.rpcs.alter_metadata_resource_location.metadata.to_h
|
2019
|
+
|
2020
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
2021
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
2022
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
2023
|
+
gapic_version: ::Google::Cloud::Metastore::V1::VERSION,
|
2024
|
+
transports_version_send: [:rest]
|
2025
|
+
|
2026
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
2027
|
+
|
2028
|
+
options.apply_defaults timeout: @config.rpcs.alter_metadata_resource_location.timeout,
|
2029
|
+
metadata: call_metadata,
|
2030
|
+
retry_policy: @config.rpcs.alter_metadata_resource_location.retry_policy
|
2031
|
+
|
2032
|
+
options.apply_defaults timeout: @config.timeout,
|
2033
|
+
metadata: @config.metadata,
|
2034
|
+
retry_policy: @config.retry_policy
|
2035
|
+
|
2036
|
+
@dataproc_metastore_stub.alter_metadata_resource_location request, options do |result, operation|
|
2037
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
2038
|
+
yield result, operation if block_given?
|
2039
|
+
return result
|
2040
|
+
end
|
2041
|
+
rescue ::Gapic::Rest::Error => e
|
2042
|
+
raise ::Google::Cloud::Error.from_error(e)
|
2043
|
+
end
|
2044
|
+
|
1441
2045
|
##
|
1442
2046
|
# Configuration class for the DataprocMetastore REST API.
|
1443
2047
|
#
|
@@ -1645,6 +2249,21 @@ module Google
|
|
1645
2249
|
# @return [::Gapic::Config::Method]
|
1646
2250
|
#
|
1647
2251
|
attr_reader :delete_backup
|
2252
|
+
##
|
2253
|
+
# RPC-specific configuration for `query_metadata`
|
2254
|
+
# @return [::Gapic::Config::Method]
|
2255
|
+
#
|
2256
|
+
attr_reader :query_metadata
|
2257
|
+
##
|
2258
|
+
# RPC-specific configuration for `move_table_to_database`
|
2259
|
+
# @return [::Gapic::Config::Method]
|
2260
|
+
#
|
2261
|
+
attr_reader :move_table_to_database
|
2262
|
+
##
|
2263
|
+
# RPC-specific configuration for `alter_metadata_resource_location`
|
2264
|
+
# @return [::Gapic::Config::Method]
|
2265
|
+
#
|
2266
|
+
attr_reader :alter_metadata_resource_location
|
1648
2267
|
|
1649
2268
|
# @private
|
1650
2269
|
def initialize parent_rpcs = nil
|
@@ -1678,6 +2297,12 @@ module Google
|
|
1678
2297
|
@create_backup = ::Gapic::Config::Method.new create_backup_config
|
1679
2298
|
delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup
|
1680
2299
|
@delete_backup = ::Gapic::Config::Method.new delete_backup_config
|
2300
|
+
query_metadata_config = parent_rpcs.query_metadata if parent_rpcs.respond_to? :query_metadata
|
2301
|
+
@query_metadata = ::Gapic::Config::Method.new query_metadata_config
|
2302
|
+
move_table_to_database_config = parent_rpcs.move_table_to_database if parent_rpcs.respond_to? :move_table_to_database
|
2303
|
+
@move_table_to_database = ::Gapic::Config::Method.new move_table_to_database_config
|
2304
|
+
alter_metadata_resource_location_config = parent_rpcs.alter_metadata_resource_location if parent_rpcs.respond_to? :alter_metadata_resource_location
|
2305
|
+
@alter_metadata_resource_location = ::Gapic::Config::Method.new alter_metadata_resource_location_config
|
1681
2306
|
|
1682
2307
|
yield self if block_given?
|
1683
2308
|
end
|