google-cloud-bigtable-admin-v2 0.14.0 → 0.16.0
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/AUTHENTICATION.md +1 -1
- data/README.md +3 -3
- data/lib/google/bigtable/admin/v2/bigtable_instance_admin_pb.rb +27 -129
- data/lib/google/bigtable/admin/v2/bigtable_table_admin_pb.rb +31 -156
- data/lib/google/bigtable/admin/v2/bigtable_table_admin_services_pb.rb +2 -0
- data/lib/google/bigtable/admin/v2/common_pb.rb +25 -11
- data/lib/google/bigtable/admin/v2/instance_pb.rb +25 -81
- data/lib/google/bigtable/admin/v2/table_pb.rb +28 -104
- data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin/client.rb +34 -38
- data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin/operations.rb +14 -16
- data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin.rb +1 -1
- data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/client.rb +148 -40
- data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/operations.rb +14 -16
- data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin.rb +1 -1
- data/lib/google/cloud/bigtable/admin/v2/version.rb +1 -1
- data/lib/google/cloud/bigtable/admin/v2.rb +2 -2
- data/proto_docs/google/api/client.rb +381 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/bigtable/admin/v2/bigtable_table_admin.rb +41 -0
- data/proto_docs/google/bigtable/admin/v2/table.rb +26 -0
- data/proto_docs/google/iam/v1/policy.rb +8 -4
- data/proto_docs/google/protobuf/any.rb +7 -4
- data/proto_docs/google/protobuf/timestamp.rb +1 -3
- data/proto_docs/google/rpc/status.rb +4 -2
- metadata +10 -8
@@ -400,14 +400,14 @@ module Google
|
|
400
400
|
# # Call the create_table_from_snapshot method.
|
401
401
|
# result = client.create_table_from_snapshot request
|
402
402
|
#
|
403
|
-
# # The returned object is of type Gapic::Operation. You can use
|
404
|
-
# #
|
405
|
-
# #
|
403
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
404
|
+
# # check the status of an operation, cancel it, or wait for results.
|
405
|
+
# # Here is how to wait for a response.
|
406
406
|
# result.wait_until_done! timeout: 60
|
407
407
|
# if result.response?
|
408
408
|
# p result.response
|
409
409
|
# else
|
410
|
-
# puts "
|
410
|
+
# puts "No response received."
|
411
411
|
# end
|
412
412
|
#
|
413
413
|
def create_table_from_snapshot request, options = nil
|
@@ -509,13 +509,11 @@ module Google
|
|
509
509
|
# # Call the list_tables method.
|
510
510
|
# result = client.list_tables request
|
511
511
|
#
|
512
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
513
|
-
# #
|
514
|
-
#
|
515
|
-
# # methods are also available for managing paging directly.
|
516
|
-
# result.each do |response|
|
512
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
513
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
514
|
+
# result.each do |item|
|
517
515
|
# # Each element is of type ::Google::Cloud::Bigtable::Admin::V2::Table.
|
518
|
-
# p
|
516
|
+
# p item
|
519
517
|
# end
|
520
518
|
#
|
521
519
|
def list_tables request, options = nil
|
@@ -650,6 +648,113 @@ module Google
|
|
650
648
|
raise ::Google::Cloud::Error.from_error(e)
|
651
649
|
end
|
652
650
|
|
651
|
+
##
|
652
|
+
# Updates a specified table.
|
653
|
+
#
|
654
|
+
# @overload update_table(request, options = nil)
|
655
|
+
# Pass arguments to `update_table` via a request object, either of type
|
656
|
+
# {::Google::Cloud::Bigtable::Admin::V2::UpdateTableRequest} or an equivalent Hash.
|
657
|
+
#
|
658
|
+
# @param request [::Google::Cloud::Bigtable::Admin::V2::UpdateTableRequest, ::Hash]
|
659
|
+
# A request object representing the call parameters. Required. To specify no
|
660
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
661
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
662
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
663
|
+
#
|
664
|
+
# @overload update_table(table: nil, update_mask: nil)
|
665
|
+
# Pass arguments to `update_table` via keyword arguments. Note that at
|
666
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
667
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
668
|
+
#
|
669
|
+
# @param table [::Google::Cloud::Bigtable::Admin::V2::Table, ::Hash]
|
670
|
+
# Required. The table to update.
|
671
|
+
# The table's `name` field is used to identify the table to update.
|
672
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
673
|
+
# Required. The list of fields to update.
|
674
|
+
# A mask specifying which fields (e.g. `change_stream_config`) in the `table`
|
675
|
+
# field should be updated. This mask is relative to the `table` field, not to
|
676
|
+
# the request message. The wildcard (*) path is currently not supported.
|
677
|
+
# Currently UpdateTable is only supported for the following fields:
|
678
|
+
#
|
679
|
+
# * `change_stream_config`
|
680
|
+
# * `change_stream_config.retention_period`
|
681
|
+
# * `deletion_protection`
|
682
|
+
#
|
683
|
+
# If `column_families` is set in `update_mask`, it will return an
|
684
|
+
# UNIMPLEMENTED error.
|
685
|
+
#
|
686
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
687
|
+
# @yieldparam response [::Gapic::Operation]
|
688
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
689
|
+
#
|
690
|
+
# @return [::Gapic::Operation]
|
691
|
+
#
|
692
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
693
|
+
#
|
694
|
+
# @example Basic example
|
695
|
+
# require "google/cloud/bigtable/admin/v2"
|
696
|
+
#
|
697
|
+
# # Create a client object. The client can be reused for multiple calls.
|
698
|
+
# client = Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new
|
699
|
+
#
|
700
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
701
|
+
# request = Google::Cloud::Bigtable::Admin::V2::UpdateTableRequest.new
|
702
|
+
#
|
703
|
+
# # Call the update_table method.
|
704
|
+
# result = client.update_table request
|
705
|
+
#
|
706
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
707
|
+
# # check the status of an operation, cancel it, or wait for results.
|
708
|
+
# # Here is how to wait for a response.
|
709
|
+
# result.wait_until_done! timeout: 60
|
710
|
+
# if result.response?
|
711
|
+
# p result.response
|
712
|
+
# else
|
713
|
+
# puts "No response received."
|
714
|
+
# end
|
715
|
+
#
|
716
|
+
def update_table request, options = nil
|
717
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
718
|
+
|
719
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::Admin::V2::UpdateTableRequest
|
720
|
+
|
721
|
+
# Converts hash and nil to an options object
|
722
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
723
|
+
|
724
|
+
# Customize the options with defaults
|
725
|
+
metadata = @config.rpcs.update_table.metadata.to_h
|
726
|
+
|
727
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
728
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
729
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
730
|
+
gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
|
731
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
732
|
+
|
733
|
+
header_params = {}
|
734
|
+
if request.table&.name
|
735
|
+
header_params["table.name"] = request.table.name
|
736
|
+
end
|
737
|
+
|
738
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
739
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
740
|
+
|
741
|
+
options.apply_defaults timeout: @config.rpcs.update_table.timeout,
|
742
|
+
metadata: metadata,
|
743
|
+
retry_policy: @config.rpcs.update_table.retry_policy
|
744
|
+
|
745
|
+
options.apply_defaults timeout: @config.timeout,
|
746
|
+
metadata: @config.metadata,
|
747
|
+
retry_policy: @config.retry_policy
|
748
|
+
|
749
|
+
@bigtable_table_admin_stub.call_rpc :update_table, request, options: options do |response, operation|
|
750
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
751
|
+
yield response, operation if block_given?
|
752
|
+
return response
|
753
|
+
end
|
754
|
+
rescue ::GRPC::BadStatus => e
|
755
|
+
raise ::Google::Cloud::Error.from_error(e)
|
756
|
+
end
|
757
|
+
|
653
758
|
##
|
654
759
|
# Permanently deletes a specified table and all of its data.
|
655
760
|
#
|
@@ -780,14 +885,14 @@ module Google
|
|
780
885
|
# # Call the undelete_table method.
|
781
886
|
# result = client.undelete_table request
|
782
887
|
#
|
783
|
-
# # The returned object is of type Gapic::Operation. You can use
|
784
|
-
# #
|
785
|
-
# #
|
888
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
889
|
+
# # check the status of an operation, cancel it, or wait for results.
|
890
|
+
# # Here is how to wait for a response.
|
786
891
|
# result.wait_until_done! timeout: 60
|
787
892
|
# if result.response?
|
788
893
|
# p result.response
|
789
894
|
# else
|
790
|
-
# puts "
|
895
|
+
# puts "No response received."
|
791
896
|
# end
|
792
897
|
#
|
793
898
|
def undelete_table request, options = nil
|
@@ -1268,14 +1373,14 @@ module Google
|
|
1268
1373
|
# # Call the snapshot_table method.
|
1269
1374
|
# result = client.snapshot_table request
|
1270
1375
|
#
|
1271
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1272
|
-
# #
|
1273
|
-
# #
|
1376
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1377
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1378
|
+
# # Here is how to wait for a response.
|
1274
1379
|
# result.wait_until_done! timeout: 60
|
1275
1380
|
# if result.response?
|
1276
1381
|
# p result.response
|
1277
1382
|
# else
|
1278
|
-
# puts "
|
1383
|
+
# puts "No response received."
|
1279
1384
|
# end
|
1280
1385
|
#
|
1281
1386
|
def snapshot_table request, options = nil
|
@@ -1469,13 +1574,11 @@ module Google
|
|
1469
1574
|
# # Call the list_snapshots method.
|
1470
1575
|
# result = client.list_snapshots request
|
1471
1576
|
#
|
1472
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1473
|
-
# #
|
1474
|
-
#
|
1475
|
-
# # methods are also available for managing paging directly.
|
1476
|
-
# result.each do |response|
|
1577
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
1578
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
1579
|
+
# result.each do |item|
|
1477
1580
|
# # Each element is of type ::Google::Cloud::Bigtable::Admin::V2::Snapshot.
|
1478
|
-
# p
|
1581
|
+
# p item
|
1479
1582
|
# end
|
1480
1583
|
#
|
1481
1584
|
def list_snapshots request, options = nil
|
@@ -1672,14 +1775,14 @@ module Google
|
|
1672
1775
|
# # Call the create_backup method.
|
1673
1776
|
# result = client.create_backup request
|
1674
1777
|
#
|
1675
|
-
# # The returned object is of type Gapic::Operation. You can use
|
1676
|
-
# #
|
1677
|
-
# #
|
1778
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1779
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1780
|
+
# # Here is how to wait for a response.
|
1678
1781
|
# result.wait_until_done! timeout: 60
|
1679
1782
|
# if result.response?
|
1680
1783
|
# p result.response
|
1681
1784
|
# else
|
1682
|
-
# puts "
|
1785
|
+
# puts "No response received."
|
1683
1786
|
# end
|
1684
1787
|
#
|
1685
1788
|
def create_backup request, options = nil
|
@@ -2099,13 +2202,11 @@ module Google
|
|
2099
2202
|
# # Call the list_backups method.
|
2100
2203
|
# result = client.list_backups request
|
2101
2204
|
#
|
2102
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
2103
|
-
# #
|
2104
|
-
#
|
2105
|
-
# # methods are also available for managing paging directly.
|
2106
|
-
# result.each do |response|
|
2205
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
2206
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
2207
|
+
# result.each do |item|
|
2107
2208
|
# # Each element is of type ::Google::Cloud::Bigtable::Admin::V2::Backup.
|
2108
|
-
# p
|
2209
|
+
# p item
|
2109
2210
|
# end
|
2110
2211
|
#
|
2111
2212
|
def list_backups request, options = nil
|
@@ -2208,14 +2309,14 @@ module Google
|
|
2208
2309
|
# # Call the restore_table method.
|
2209
2310
|
# result = client.restore_table request
|
2210
2311
|
#
|
2211
|
-
# # The returned object is of type Gapic::Operation. You can use
|
2212
|
-
# #
|
2213
|
-
# #
|
2312
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
2313
|
+
# # check the status of an operation, cancel it, or wait for results.
|
2314
|
+
# # Here is how to wait for a response.
|
2214
2315
|
# result.wait_until_done! timeout: 60
|
2215
2316
|
# if result.response?
|
2216
2317
|
# p result.response
|
2217
2318
|
# else
|
2218
|
-
# puts "
|
2319
|
+
# puts "No response received."
|
2219
2320
|
# end
|
2220
2321
|
#
|
2221
2322
|
def restore_table request, options = nil
|
@@ -2578,9 +2679,9 @@ module Google
|
|
2578
2679
|
# * (`String`) The path to a service account key file in JSON format
|
2579
2680
|
# * (`Hash`) A service account key as a Hash
|
2580
2681
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
2581
|
-
# (see the [googleauth docs](https://
|
2682
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
2582
2683
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
2583
|
-
# (see the [signet docs](https://
|
2684
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
2584
2685
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
2585
2686
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
2586
2687
|
# * (`nil`) indicating no credentials
|
@@ -2696,6 +2797,11 @@ module Google
|
|
2696
2797
|
#
|
2697
2798
|
attr_reader :get_table
|
2698
2799
|
##
|
2800
|
+
# RPC-specific configuration for `update_table`
|
2801
|
+
# @return [::Gapic::Config::Method]
|
2802
|
+
#
|
2803
|
+
attr_reader :update_table
|
2804
|
+
##
|
2699
2805
|
# RPC-specific configuration for `delete_table`
|
2700
2806
|
# @return [::Gapic::Config::Method]
|
2701
2807
|
#
|
@@ -2801,6 +2907,8 @@ module Google
|
|
2801
2907
|
@list_tables = ::Gapic::Config::Method.new list_tables_config
|
2802
2908
|
get_table_config = parent_rpcs.get_table if parent_rpcs.respond_to? :get_table
|
2803
2909
|
@get_table = ::Gapic::Config::Method.new get_table_config
|
2910
|
+
update_table_config = parent_rpcs.update_table if parent_rpcs.respond_to? :update_table
|
2911
|
+
@update_table = ::Gapic::Config::Method.new update_table_config
|
2804
2912
|
delete_table_config = parent_rpcs.delete_table if parent_rpcs.respond_to? :delete_table
|
2805
2913
|
@delete_table = ::Gapic::Config::Method.new delete_table_config
|
2806
2914
|
undelete_table_config = parent_rpcs.undelete_table if parent_rpcs.respond_to? :undelete_table
|
@@ -159,13 +159,11 @@ module Google
|
|
159
159
|
# # Call the list_operations method.
|
160
160
|
# result = client.list_operations request
|
161
161
|
#
|
162
|
-
# # The returned object is of type Gapic::PagedEnumerable. You can
|
163
|
-
# #
|
164
|
-
#
|
165
|
-
# # methods are also available for managing paging directly.
|
166
|
-
# result.each do |response|
|
162
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
163
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
164
|
+
# result.each do |item|
|
167
165
|
# # Each element is of type ::Google::Longrunning::Operation.
|
168
|
-
# p
|
166
|
+
# p item
|
169
167
|
# end
|
170
168
|
#
|
171
169
|
def list_operations request, options = nil
|
@@ -254,14 +252,14 @@ module Google
|
|
254
252
|
# # Call the get_operation method.
|
255
253
|
# result = client.get_operation request
|
256
254
|
#
|
257
|
-
# # The returned object is of type Gapic::Operation. You can use
|
258
|
-
# #
|
259
|
-
# #
|
255
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
256
|
+
# # check the status of an operation, cancel it, or wait for results.
|
257
|
+
# # Here is how to wait for a response.
|
260
258
|
# result.wait_until_done! timeout: 60
|
261
259
|
# if result.response?
|
262
260
|
# p result.response
|
263
261
|
# else
|
264
|
-
# puts "
|
262
|
+
# puts "No response received."
|
265
263
|
# end
|
266
264
|
#
|
267
265
|
def get_operation request, options = nil
|
@@ -541,14 +539,14 @@ module Google
|
|
541
539
|
# # Call the wait_operation method.
|
542
540
|
# result = client.wait_operation request
|
543
541
|
#
|
544
|
-
# # The returned object is of type Gapic::Operation. You can use
|
545
|
-
# #
|
546
|
-
# #
|
542
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
543
|
+
# # check the status of an operation, cancel it, or wait for results.
|
544
|
+
# # Here is how to wait for a response.
|
547
545
|
# result.wait_until_done! timeout: 60
|
548
546
|
# if result.response?
|
549
547
|
# p result.response
|
550
548
|
# else
|
551
|
-
# puts "
|
549
|
+
# puts "No response received."
|
552
550
|
# end
|
553
551
|
#
|
554
552
|
def wait_operation request, options = nil
|
@@ -623,9 +621,9 @@ module Google
|
|
623
621
|
# * (`String`) The path to a service account key file in JSON format
|
624
622
|
# * (`Hash`) A service account key as a Hash
|
625
623
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
626
|
-
# (see the [googleauth docs](https://
|
624
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
627
625
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
628
|
-
# (see the [signet docs](https://
|
626
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
629
627
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
630
628
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
631
629
|
# * (`nil`) indicating no credentials
|
@@ -39,7 +39,7 @@ module Google
|
|
39
39
|
# Provides access to the table schemas only, not the data stored within
|
40
40
|
# the tables.
|
41
41
|
#
|
42
|
-
#
|
42
|
+
# @example Load this service and instantiate a gRPC client
|
43
43
|
#
|
44
44
|
# require "google/cloud/bigtable/admin/v2/bigtable_table_admin"
|
45
45
|
# client = ::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client.new
|
@@ -25,9 +25,9 @@ module Google
|
|
25
25
|
module Bigtable
|
26
26
|
module Admin
|
27
27
|
##
|
28
|
-
#
|
28
|
+
# API client module.
|
29
29
|
#
|
30
|
-
# @example
|
30
|
+
# @example Load this package, including all its services, and instantiate a gRPC client
|
31
31
|
#
|
32
32
|
# require "google/cloud/bigtable/admin/v2"
|
33
33
|
# client = ::Google::Cloud::Bigtable::Admin::V2::BigtableInstanceAdmin::Client.new
|