google-cloud-bigtable-admin-v2 0.14.0 → 0.15.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/lib/google/bigtable/admin/v2/bigtable_table_admin_pb.rb +11 -0
- data/lib/google/bigtable/admin/v2/bigtable_table_admin_services_pb.rb +2 -0
- data/lib/google/bigtable/admin/v2/table_pb.rb +1 -0
- data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/client.rb +112 -0
- data/lib/google/cloud/bigtable/admin/v2/version.rb +1 -1
- data/proto_docs/google/bigtable/admin/v2/bigtable_table_admin.rb +39 -0
- data/proto_docs/google/bigtable/admin/v2/table.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a36854ab75416bb8d7df4c625f9238b0bd3a9a127d10ae5921ba92bfe5cb642
|
4
|
+
data.tar.gz: f0407632dd39f28dfaf66c11171c449f8945a28abc96d7a2c5edd721ce303436
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 688686323173b62dbbe9ac1d7f1825207e0a51a9427107f59255f7697c84a4203ea30c53f91d3a45b54e4d0cc335fa26f31cc3a3490d7090de1afa0ea801f4c4
|
7
|
+
data.tar.gz: 46816272421278ad199192cc3ddb4c120fe55e281357aec3b335cd987c69741fa38c1e1ac3cdf601f25d76844f7473319e5af3a8f0b4226f00049c21fa8a89dc
|
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
|
@@ -74,6 +74,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
74
74
|
optional :name, :string, 1
|
75
75
|
optional :view, :enum, 2, "google.bigtable.admin.v2.Table.View"
|
76
76
|
end
|
77
|
+
add_message "google.bigtable.admin.v2.UpdateTableRequest" do
|
78
|
+
optional :table, :message, 1, "google.bigtable.admin.v2.Table"
|
79
|
+
optional :update_mask, :message, 2, "google.protobuf.FieldMask"
|
80
|
+
end
|
81
|
+
add_message "google.bigtable.admin.v2.UpdateTableMetadata" do
|
82
|
+
optional :name, :string, 1
|
83
|
+
optional :start_time, :message, 2, "google.protobuf.Timestamp"
|
84
|
+
optional :end_time, :message, 3, "google.protobuf.Timestamp"
|
85
|
+
end
|
77
86
|
add_message "google.bigtable.admin.v2.DeleteTableRequest" do
|
78
87
|
optional :name, :string, 1
|
79
88
|
end
|
@@ -192,6 +201,8 @@ module Google
|
|
192
201
|
ListTablesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.ListTablesRequest").msgclass
|
193
202
|
ListTablesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.ListTablesResponse").msgclass
|
194
203
|
GetTableRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.GetTableRequest").msgclass
|
204
|
+
UpdateTableRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.UpdateTableRequest").msgclass
|
205
|
+
UpdateTableMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.UpdateTableMetadata").msgclass
|
195
206
|
DeleteTableRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.DeleteTableRequest").msgclass
|
196
207
|
UndeleteTableRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.UndeleteTableRequest").msgclass
|
197
208
|
UndeleteTableMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.admin.v2.UndeleteTableMetadata").msgclass
|
@@ -55,6 +55,8 @@ module Google
|
|
55
55
|
rpc :ListTables, ::Google::Cloud::Bigtable::Admin::V2::ListTablesRequest, ::Google::Cloud::Bigtable::Admin::V2::ListTablesResponse
|
56
56
|
# Gets metadata information about the specified table.
|
57
57
|
rpc :GetTable, ::Google::Cloud::Bigtable::Admin::V2::GetTableRequest, ::Google::Cloud::Bigtable::Admin::V2::Table
|
58
|
+
# Updates a specified table.
|
59
|
+
rpc :UpdateTable, ::Google::Cloud::Bigtable::Admin::V2::UpdateTableRequest, ::Google::Longrunning::Operation
|
58
60
|
# Permanently deletes a specified table and all of its data.
|
59
61
|
rpc :DeleteTable, ::Google::Cloud::Bigtable::Admin::V2::DeleteTableRequest, ::Google::Protobuf::Empty
|
60
62
|
# Restores a specified table which was accidentally deleted.
|
@@ -23,6 +23,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
23
23
|
map :column_families, :string, :message, 3, "google.bigtable.admin.v2.ColumnFamily"
|
24
24
|
optional :granularity, :enum, 4, "google.bigtable.admin.v2.Table.TimestampGranularity"
|
25
25
|
optional :restore_info, :message, 6, "google.bigtable.admin.v2.RestoreInfo"
|
26
|
+
optional :deletion_protection, :bool, 9
|
26
27
|
end
|
27
28
|
add_message "google.bigtable.admin.v2.Table.ClusterState" do
|
28
29
|
optional :replication_state, :enum, 1, "google.bigtable.admin.v2.Table.ClusterState.ReplicationState"
|
@@ -650,6 +650,111 @@ module Google
|
|
650
650
|
raise ::Google::Cloud::Error.from_error(e)
|
651
651
|
end
|
652
652
|
|
653
|
+
##
|
654
|
+
# Updates a specified table.
|
655
|
+
#
|
656
|
+
# @overload update_table(request, options = nil)
|
657
|
+
# Pass arguments to `update_table` via a request object, either of type
|
658
|
+
# {::Google::Cloud::Bigtable::Admin::V2::UpdateTableRequest} or an equivalent Hash.
|
659
|
+
#
|
660
|
+
# @param request [::Google::Cloud::Bigtable::Admin::V2::UpdateTableRequest, ::Hash]
|
661
|
+
# A request object representing the call parameters. Required. To specify no
|
662
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
663
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
664
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
665
|
+
#
|
666
|
+
# @overload update_table(table: nil, update_mask: nil)
|
667
|
+
# Pass arguments to `update_table` via keyword arguments. Note that at
|
668
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
669
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
670
|
+
#
|
671
|
+
# @param table [::Google::Cloud::Bigtable::Admin::V2::Table, ::Hash]
|
672
|
+
# Required. The table to update.
|
673
|
+
# The table's `name` field is used to identify the table to update.
|
674
|
+
# Format:
|
675
|
+
# `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`
|
676
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
677
|
+
# Required. The list of fields to update.
|
678
|
+
# A mask specifying which fields (e.g. `deletion_protection`) in the `table`
|
679
|
+
# field should be updated. This mask is relative to the `table` field, not to
|
680
|
+
# the request message. The wildcard (*) path is currently not supported.
|
681
|
+
# Currently UpdateTable is only supported for the following field:
|
682
|
+
# * `deletion_protection`
|
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 this
|
707
|
+
# # object to check the status of an operation, cancel it, or wait
|
708
|
+
# # for results. Here is how to block until completion:
|
709
|
+
# result.wait_until_done! timeout: 60
|
710
|
+
# if result.response?
|
711
|
+
# p result.response
|
712
|
+
# else
|
713
|
+
# puts "Error!"
|
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
|
#
|
@@ -2696,6 +2801,11 @@ module Google
|
|
2696
2801
|
#
|
2697
2802
|
attr_reader :get_table
|
2698
2803
|
##
|
2804
|
+
# RPC-specific configuration for `update_table`
|
2805
|
+
# @return [::Gapic::Config::Method]
|
2806
|
+
#
|
2807
|
+
attr_reader :update_table
|
2808
|
+
##
|
2699
2809
|
# RPC-specific configuration for `delete_table`
|
2700
2810
|
# @return [::Gapic::Config::Method]
|
2701
2811
|
#
|
@@ -2801,6 +2911,8 @@ module Google
|
|
2801
2911
|
@list_tables = ::Gapic::Config::Method.new list_tables_config
|
2802
2912
|
get_table_config = parent_rpcs.get_table if parent_rpcs.respond_to? :get_table
|
2803
2913
|
@get_table = ::Gapic::Config::Method.new get_table_config
|
2914
|
+
update_table_config = parent_rpcs.update_table if parent_rpcs.respond_to? :update_table
|
2915
|
+
@update_table = ::Gapic::Config::Method.new update_table_config
|
2804
2916
|
delete_table_config = parent_rpcs.delete_table if parent_rpcs.respond_to? :delete_table
|
2805
2917
|
@delete_table = ::Gapic::Config::Method.new delete_table_config
|
2806
2918
|
undelete_table_config = parent_rpcs.undelete_table if parent_rpcs.respond_to? :undelete_table
|
@@ -240,6 +240,45 @@ module Google
|
|
240
240
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
241
241
|
end
|
242
242
|
|
243
|
+
# The request for
|
244
|
+
# {::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client#update_table UpdateTable}.
|
245
|
+
# @!attribute [rw] table
|
246
|
+
# @return [::Google::Cloud::Bigtable::Admin::V2::Table]
|
247
|
+
# Required. The table to update.
|
248
|
+
# The table's `name` field is used to identify the table to update.
|
249
|
+
# Format:
|
250
|
+
# `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`
|
251
|
+
# @!attribute [rw] update_mask
|
252
|
+
# @return [::Google::Protobuf::FieldMask]
|
253
|
+
# Required. The list of fields to update.
|
254
|
+
# A mask specifying which fields (e.g. `deletion_protection`) in the `table`
|
255
|
+
# field should be updated. This mask is relative to the `table` field, not to
|
256
|
+
# the request message. The wildcard (*) path is currently not supported.
|
257
|
+
# Currently UpdateTable is only supported for the following field:
|
258
|
+
# * `deletion_protection`
|
259
|
+
# If `column_families` is set in `update_mask`, it will return an
|
260
|
+
# UNIMPLEMENTED error.
|
261
|
+
class UpdateTableRequest
|
262
|
+
include ::Google::Protobuf::MessageExts
|
263
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
264
|
+
end
|
265
|
+
|
266
|
+
# Metadata type for the operation returned by
|
267
|
+
# {::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client#update_table UpdateTable}.
|
268
|
+
# @!attribute [rw] name
|
269
|
+
# @return [::String]
|
270
|
+
# The name of the table being updated.
|
271
|
+
# @!attribute [rw] start_time
|
272
|
+
# @return [::Google::Protobuf::Timestamp]
|
273
|
+
# The time at which this operation started.
|
274
|
+
# @!attribute [rw] end_time
|
275
|
+
# @return [::Google::Protobuf::Timestamp]
|
276
|
+
# If set, the time at which this operation finished or was canceled.
|
277
|
+
class UpdateTableMetadata
|
278
|
+
include ::Google::Protobuf::MessageExts
|
279
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
280
|
+
end
|
281
|
+
|
243
282
|
# Request message for
|
244
283
|
# {::Google::Cloud::Bigtable::Admin::V2::BigtableTableAdmin::Client#delete_table google.bigtable.admin.v2.BigtableTableAdmin.DeleteTable}
|
245
284
|
# @!attribute [rw] name
|
@@ -63,6 +63,14 @@ module Google
|
|
63
63
|
# @return [::Google::Cloud::Bigtable::Admin::V2::RestoreInfo]
|
64
64
|
# Output only. If this table was restored from another data source (e.g. a backup), this
|
65
65
|
# field will be populated with information about the restore.
|
66
|
+
# @!attribute [rw] deletion_protection
|
67
|
+
# @return [::Boolean]
|
68
|
+
# Set to true to make the table protected against data loss. i.e. deleting
|
69
|
+
# the following resources through Admin APIs are prohibited:
|
70
|
+
# - The table.
|
71
|
+
# - The column families in the table.
|
72
|
+
# - The instance containing the table.
|
73
|
+
# Note one can still delete the data stored in the table through Data APIs.
|
66
74
|
class Table
|
67
75
|
include ::Google::Protobuf::MessageExts
|
68
76
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-bigtable-admin-v2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|