google-cloud-bigtable-admin-v2 0.1.2 → 0.5.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/LICENSE.md +188 -190
- data/README.md +66 -2
- data/lib/google/bigtable/admin/v2/bigtable_instance_admin_services_pb.rb +20 -21
- data/lib/google/bigtable/admin/v2/bigtable_table_admin_pb.rb +27 -27
- data/lib/google/bigtable/admin/v2/bigtable_table_admin_services_pb.rb +30 -30
- data/lib/google/bigtable/admin/v2/instance_pb.rb +5 -0
- data/lib/google/bigtable/admin/v2/table_pb.rb +16 -0
- data/lib/google/cloud/bigtable/admin/v2.rb +3 -0
- data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin/client.rb +70 -62
- data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin/operations.rb +95 -10
- data/lib/google/cloud/bigtable/admin/v2/bigtable_instance_admin/paths.rb +21 -0
- data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/client.rb +119 -95
- data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/operations.rb +95 -10
- data/lib/google/cloud/bigtable/admin/v2/bigtable_table_admin/paths.rb +23 -0
- data/lib/google/cloud/bigtable/admin/v2/version.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +6 -0
- data/proto_docs/google/api/resource.rb +50 -14
- data/proto_docs/google/bigtable/admin/v2/bigtable_instance_admin.rb +1 -1
- data/proto_docs/google/bigtable/admin/v2/bigtable_table_admin.rb +114 -123
- data/proto_docs/google/bigtable/admin/v2/instance.rb +21 -1
- data/proto_docs/google/bigtable/admin/v2/table.rb +58 -4
- data/proto_docs/google/longrunning/operations.rb +17 -3
- data/proto_docs/google/protobuf/any.rb +5 -2
- data/proto_docs/google/protobuf/timestamp.rb +10 -1
- metadata +10 -7
@@ -104,8 +104,13 @@ module Google
|
|
104
104
|
# Lists operations that match the specified filter in the request. If the
|
105
105
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
106
106
|
#
|
107
|
-
# NOTE: the `name` binding
|
108
|
-
# to use different resource name schemes, such as `users/*/operations`.
|
107
|
+
# NOTE: the `name` binding allows API services to override the binding
|
108
|
+
# to use different resource name schemes, such as `users/*/operations`. To
|
109
|
+
# override the binding, API services can add a binding such as
|
110
|
+
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
111
|
+
# For backwards compatibility, the default name includes the operations
|
112
|
+
# collection id, however overriding users must ensure the name binding
|
113
|
+
# is the parent resource, without the operations collection id.
|
109
114
|
#
|
110
115
|
# @overload list_operations(request, options = nil)
|
111
116
|
# Pass arguments to `list_operations` via a request object, either of type
|
@@ -123,7 +128,7 @@ module Google
|
|
123
128
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
124
129
|
#
|
125
130
|
# @param name [::String]
|
126
|
-
# The name of the operation
|
131
|
+
# The name of the operation's parent resource.
|
127
132
|
# @param filter [::String]
|
128
133
|
# The standard list filter.
|
129
134
|
# @param page_size [::Integer]
|
@@ -391,6 +396,79 @@ module Google
|
|
391
396
|
raise ::Google::Cloud::Error.from_error(e)
|
392
397
|
end
|
393
398
|
|
399
|
+
##
|
400
|
+
# Waits for the specified long-running operation until it is done or reaches
|
401
|
+
# at most a specified timeout, returning the latest state. If the operation
|
402
|
+
# is already done, the latest state is immediately returned. If the timeout
|
403
|
+
# specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
|
404
|
+
# timeout is used. If the server does not support this method, it returns
|
405
|
+
# `google.rpc.Code.UNIMPLEMENTED`.
|
406
|
+
# Note that this method is on a best-effort basis. It may return the latest
|
407
|
+
# state before the specified timeout (including immediately), meaning even an
|
408
|
+
# immediate response is no guarantee that the operation is done.
|
409
|
+
#
|
410
|
+
# @overload wait_operation(request, options = nil)
|
411
|
+
# Pass arguments to `wait_operation` via a request object, either of type
|
412
|
+
# {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash.
|
413
|
+
#
|
414
|
+
# @param request [::Google::Longrunning::WaitOperationRequest, ::Hash]
|
415
|
+
# A request object representing the call parameters. Required. To specify no
|
416
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
417
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
418
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
419
|
+
#
|
420
|
+
# @overload wait_operation(name: nil, timeout: nil)
|
421
|
+
# Pass arguments to `wait_operation` via keyword arguments. Note that at
|
422
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
423
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
424
|
+
#
|
425
|
+
# @param name [::String]
|
426
|
+
# The name of the operation resource to wait on.
|
427
|
+
# @param timeout [::Google::Protobuf::Duration, ::Hash]
|
428
|
+
# The maximum duration to wait before timing out. If left blank, the wait
|
429
|
+
# will be at most the time permitted by the underlying HTTP/RPC protocol.
|
430
|
+
# If RPC context deadline is also specified, the shorter one will be used.
|
431
|
+
#
|
432
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
433
|
+
# @yieldparam response [::Gapic::Operation]
|
434
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
435
|
+
#
|
436
|
+
# @return [::Gapic::Operation]
|
437
|
+
#
|
438
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
439
|
+
#
|
440
|
+
def wait_operation request, options = nil
|
441
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
442
|
+
|
443
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest
|
444
|
+
|
445
|
+
# Converts hash and nil to an options object
|
446
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
447
|
+
|
448
|
+
# Customize the options with defaults
|
449
|
+
metadata = @config.rpcs.wait_operation.metadata.to_h
|
450
|
+
|
451
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
452
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
453
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
454
|
+
gapic_version: ::Google::Cloud::Bigtable::Admin::V2::VERSION
|
455
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
456
|
+
|
457
|
+
options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
|
458
|
+
metadata: metadata,
|
459
|
+
retry_policy: @config.rpcs.wait_operation.retry_policy
|
460
|
+
options.apply_defaults metadata: @config.metadata,
|
461
|
+
retry_policy: @config.retry_policy
|
462
|
+
|
463
|
+
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
464
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
465
|
+
yield response, operation if block_given?
|
466
|
+
return response
|
467
|
+
end
|
468
|
+
rescue ::GRPC::BadStatus => e
|
469
|
+
raise ::Google::Cloud::Error.from_error(e)
|
470
|
+
end
|
471
|
+
|
394
472
|
##
|
395
473
|
# Configuration class for the Operations API.
|
396
474
|
#
|
@@ -483,7 +561,7 @@ module Google
|
|
483
561
|
config_attr :scope, nil, ::String, ::Array, nil
|
484
562
|
config_attr :lib_name, nil, ::String, nil
|
485
563
|
config_attr :lib_version, nil, ::String, nil
|
486
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
564
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
487
565
|
config_attr :interceptors, nil, ::Array, nil
|
488
566
|
config_attr :timeout, nil, ::Numeric, nil
|
489
567
|
config_attr :metadata, nil, ::Hash, nil
|
@@ -504,7 +582,7 @@ module Google
|
|
504
582
|
def rpcs
|
505
583
|
@rpcs ||= begin
|
506
584
|
parent_rpcs = nil
|
507
|
-
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config
|
585
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
508
586
|
Rpcs.new parent_rpcs
|
509
587
|
end
|
510
588
|
end
|
@@ -516,7 +594,7 @@ module Google
|
|
516
594
|
# Each configuration object is of type `Gapic::Config::Method` and includes
|
517
595
|
# the following configuration fields:
|
518
596
|
#
|
519
|
-
# * `timeout` (*type:* `Numeric`) - The call timeout in
|
597
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
520
598
|
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
521
599
|
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
522
600
|
# include the following keys:
|
@@ -547,17 +625,24 @@ module Google
|
|
547
625
|
# @return [::Gapic::Config::Method]
|
548
626
|
#
|
549
627
|
attr_reader :cancel_operation
|
628
|
+
##
|
629
|
+
# RPC-specific configuration for `wait_operation`
|
630
|
+
# @return [::Gapic::Config::Method]
|
631
|
+
#
|
632
|
+
attr_reader :wait_operation
|
550
633
|
|
551
634
|
# @private
|
552
635
|
def initialize parent_rpcs = nil
|
553
|
-
list_operations_config = parent_rpcs
|
636
|
+
list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations
|
554
637
|
@list_operations = ::Gapic::Config::Method.new list_operations_config
|
555
|
-
get_operation_config = parent_rpcs
|
638
|
+
get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation
|
556
639
|
@get_operation = ::Gapic::Config::Method.new get_operation_config
|
557
|
-
delete_operation_config = parent_rpcs
|
640
|
+
delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation
|
558
641
|
@delete_operation = ::Gapic::Config::Method.new delete_operation_config
|
559
|
-
cancel_operation_config = parent_rpcs
|
642
|
+
cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation
|
560
643
|
@cancel_operation = ::Gapic::Config::Method.new cancel_operation_config
|
644
|
+
wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation
|
645
|
+
@wait_operation = ::Gapic::Config::Method.new wait_operation_config
|
561
646
|
|
562
647
|
yield self if block_given?
|
563
648
|
end
|
@@ -63,6 +63,27 @@ module Google
|
|
63
63
|
"projects/#{project}/instances/#{instance}/clusters/#{cluster}"
|
64
64
|
end
|
65
65
|
|
66
|
+
##
|
67
|
+
# Create a fully-qualified CryptoKey resource string.
|
68
|
+
#
|
69
|
+
# The resource will be in the following format:
|
70
|
+
#
|
71
|
+
# `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`
|
72
|
+
#
|
73
|
+
# @param project [String]
|
74
|
+
# @param location [String]
|
75
|
+
# @param key_ring [String]
|
76
|
+
# @param crypto_key [String]
|
77
|
+
#
|
78
|
+
# @return [::String]
|
79
|
+
def crypto_key_path project:, location:, key_ring:, crypto_key:
|
80
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
81
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
82
|
+
raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/"
|
83
|
+
|
84
|
+
"projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}"
|
85
|
+
end
|
86
|
+
|
66
87
|
##
|
67
88
|
# Create a fully-qualified Instance resource string.
|
68
89
|
#
|
@@ -65,29 +65,27 @@ module Google
|
|
65
65
|
parent_config = while namespace.any?
|
66
66
|
parent_name = namespace.join "::"
|
67
67
|
parent_const = const_get parent_name
|
68
|
-
break parent_const.configure if parent_const
|
68
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
69
69
|
namespace.pop
|
70
70
|
end
|
71
71
|
default_config = Client::Configuration.new parent_config
|
72
72
|
|
73
73
|
default_config.rpcs.create_table.timeout = 300.0
|
74
74
|
|
75
|
-
default_config.rpcs.create_table_from_snapshot.timeout = 60.0
|
76
|
-
|
77
75
|
default_config.rpcs.list_tables.timeout = 60.0
|
78
76
|
default_config.rpcs.list_tables.retry_policy = {
|
79
77
|
initial_delay: 1.0,
|
80
|
-
|
81
|
-
|
82
|
-
|
78
|
+
max_delay: 60.0,
|
79
|
+
multiplier: 2,
|
80
|
+
retry_codes: [14, 4]
|
83
81
|
}
|
84
82
|
|
85
83
|
default_config.rpcs.get_table.timeout = 60.0
|
86
84
|
default_config.rpcs.get_table.retry_policy = {
|
87
85
|
initial_delay: 1.0,
|
88
|
-
|
89
|
-
|
90
|
-
|
86
|
+
max_delay: 60.0,
|
87
|
+
multiplier: 2,
|
88
|
+
retry_codes: [14, 4]
|
91
89
|
}
|
92
90
|
|
93
91
|
default_config.rpcs.delete_table.timeout = 60.0
|
@@ -99,45 +97,67 @@ module Google
|
|
99
97
|
default_config.rpcs.generate_consistency_token.timeout = 60.0
|
100
98
|
default_config.rpcs.generate_consistency_token.retry_policy = {
|
101
99
|
initial_delay: 1.0,
|
102
|
-
|
103
|
-
|
104
|
-
|
100
|
+
max_delay: 60.0,
|
101
|
+
multiplier: 2,
|
102
|
+
retry_codes: [14, 4]
|
105
103
|
}
|
106
104
|
|
107
105
|
default_config.rpcs.check_consistency.timeout = 60.0
|
108
106
|
default_config.rpcs.check_consistency.retry_policy = {
|
109
107
|
initial_delay: 1.0,
|
110
|
-
|
111
|
-
|
112
|
-
|
108
|
+
max_delay: 60.0,
|
109
|
+
multiplier: 2,
|
110
|
+
retry_codes: [14, 4]
|
113
111
|
}
|
114
112
|
|
115
|
-
default_config.rpcs.snapshot_table.timeout = 60.0
|
116
|
-
|
117
113
|
default_config.rpcs.get_snapshot.timeout = 60.0
|
118
114
|
default_config.rpcs.get_snapshot.retry_policy = {
|
119
115
|
initial_delay: 1.0,
|
120
|
-
|
121
|
-
|
122
|
-
|
116
|
+
max_delay: 60.0,
|
117
|
+
multiplier: 2,
|
118
|
+
retry_codes: [14, 4]
|
123
119
|
}
|
124
120
|
|
125
121
|
default_config.rpcs.list_snapshots.timeout = 60.0
|
126
122
|
default_config.rpcs.list_snapshots.retry_policy = {
|
127
123
|
initial_delay: 1.0,
|
128
|
-
|
129
|
-
|
130
|
-
|
124
|
+
max_delay: 60.0,
|
125
|
+
multiplier: 2,
|
126
|
+
retry_codes: [14, 4]
|
131
127
|
}
|
132
128
|
|
133
129
|
default_config.rpcs.delete_snapshot.timeout = 60.0
|
134
130
|
|
131
|
+
default_config.rpcs.create_backup.timeout = 60.0
|
132
|
+
|
133
|
+
default_config.rpcs.get_backup.timeout = 60.0
|
134
|
+
default_config.rpcs.get_backup.retry_policy = {
|
135
|
+
initial_delay: 1.0,
|
136
|
+
max_delay: 60.0,
|
137
|
+
multiplier: 2,
|
138
|
+
retry_codes: [14, 4]
|
139
|
+
}
|
140
|
+
|
141
|
+
default_config.rpcs.update_backup.timeout = 60.0
|
142
|
+
|
143
|
+
default_config.rpcs.delete_backup.timeout = 60.0
|
144
|
+
|
145
|
+
default_config.rpcs.list_backups.timeout = 60.0
|
146
|
+
default_config.rpcs.list_backups.retry_policy = {
|
147
|
+
initial_delay: 1.0,
|
148
|
+
max_delay: 60.0,
|
149
|
+
multiplier: 2,
|
150
|
+
retry_codes: [14, 4]
|
151
|
+
}
|
152
|
+
|
153
|
+
default_config.rpcs.restore_table.timeout = 60.0
|
154
|
+
|
135
155
|
default_config.rpcs.get_iam_policy.timeout = 60.0
|
136
156
|
default_config.rpcs.get_iam_policy.retry_policy = {
|
137
157
|
initial_delay: 1.0,
|
138
|
-
|
139
|
-
|
140
|
-
|
158
|
+
max_delay: 60.0,
|
159
|
+
multiplier: 2,
|
160
|
+
retry_codes: [14, 4]
|
141
161
|
}
|
142
162
|
|
143
163
|
default_config.rpcs.set_iam_policy.timeout = 60.0
|
@@ -145,9 +165,9 @@ module Google
|
|
145
165
|
default_config.rpcs.test_iam_permissions.timeout = 60.0
|
146
166
|
default_config.rpcs.test_iam_permissions.retry_policy = {
|
147
167
|
initial_delay: 1.0,
|
148
|
-
|
149
|
-
|
150
|
-
|
168
|
+
max_delay: 60.0,
|
169
|
+
multiplier: 2,
|
170
|
+
retry_codes: [14, 4]
|
151
171
|
}
|
152
172
|
|
153
173
|
default_config
|
@@ -211,7 +231,13 @@ module Google
|
|
211
231
|
|
212
232
|
# Create credentials
|
213
233
|
credentials = @config.credentials
|
214
|
-
|
234
|
+
# Use self-signed JWT if the scope and endpoint are unchanged from default,
|
235
|
+
# but only if the default endpoint does not have a region prefix.
|
236
|
+
enable_self_signed_jwt = @config.scope == Client.configure.scope &&
|
237
|
+
@config.endpoint == Client.configure.endpoint &&
|
238
|
+
!@config.endpoint.split(".").first.include?("-")
|
239
|
+
credentials ||= Credentials.default scope: @config.scope,
|
240
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
215
241
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
216
242
|
credentials = Credentials.new credentials, scope: @config.scope
|
217
243
|
end
|
@@ -265,8 +291,8 @@ module Google
|
|
265
291
|
# Required. The unique name of the instance in which to create the table.
|
266
292
|
# Values are of the form `projects/{project}/instances/{instance}`.
|
267
293
|
# @param table_id [::String]
|
268
|
-
# Required. The name by which the new table should be referred to within the
|
269
|
-
#
|
294
|
+
# Required. The name by which the new table should be referred to within the parent
|
295
|
+
# instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
|
270
296
|
# Maximum 50 characters.
|
271
297
|
# @param table [::Google::Cloud::Bigtable::Admin::V2::Table, ::Hash]
|
272
298
|
# Required. The Table to create.
|
@@ -362,12 +388,12 @@ module Google
|
|
362
388
|
# Required. The unique name of the instance in which to create the table.
|
363
389
|
# Values are of the form `projects/{project}/instances/{instance}`.
|
364
390
|
# @param table_id [::String]
|
365
|
-
# Required. The name by which the new table should be referred to within the
|
366
|
-
#
|
391
|
+
# Required. The name by which the new table should be referred to within the parent
|
392
|
+
# instance, e.g., `foobar` rather than `{parent}/tables/foobar`.
|
367
393
|
# @param source_snapshot [::String]
|
368
|
-
# Required. The unique name of the snapshot from which to restore the table.
|
369
|
-
#
|
370
|
-
# form
|
394
|
+
# Required. The unique name of the snapshot from which to restore the table. The
|
395
|
+
# snapshot and the table must be in the same instance.
|
396
|
+
# Values are of the form
|
371
397
|
# `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
|
372
398
|
#
|
373
399
|
# @yield [response, operation] Access the result along with the RPC operation
|
@@ -435,8 +461,8 @@ module Google
|
|
435
461
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
436
462
|
#
|
437
463
|
# @param parent [::String]
|
438
|
-
# Required. The unique name of the instance for which tables should be
|
439
|
-
#
|
464
|
+
# Required. The unique name of the instance for which tables should be listed.
|
465
|
+
# Values are of the form `projects/{project}/instances/{instance}`.
|
440
466
|
# @param view [::Google::Cloud::Bigtable::Admin::V2::Table::View]
|
441
467
|
# The view to be applied to the returned tables' fields.
|
442
468
|
# Only NAME_ONLY view (default) and REPLICATION_VIEW are supported.
|
@@ -664,10 +690,10 @@ module Google
|
|
664
690
|
# Values are of the form
|
665
691
|
# `projects/{project}/instances/{instance}/tables/{table}`.
|
666
692
|
# @param modifications [::Array<::Google::Cloud::Bigtable::Admin::V2::ModifyColumnFamiliesRequest::Modification, ::Hash>]
|
667
|
-
# Required. Modifications to be atomically applied to the specified table's
|
668
|
-
#
|
669
|
-
#
|
670
|
-
#
|
693
|
+
# Required. Modifications to be atomically applied to the specified table's families.
|
694
|
+
# Entries are applied in order, meaning that earlier modifications can be
|
695
|
+
# masked by later ones (in the case of repeated updates to the same family,
|
696
|
+
# for example).
|
671
697
|
#
|
672
698
|
# @yield [response, operation] Access the result along with the RPC operation
|
673
699
|
# @yieldparam response [::Google::Cloud::Bigtable::Admin::V2::Table]
|
@@ -811,8 +837,8 @@ module Google
|
|
811
837
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
812
838
|
#
|
813
839
|
# @param name [::String]
|
814
|
-
# Required. The unique name of the Table for which to create a consistency
|
815
|
-
#
|
840
|
+
# Required. The unique name of the Table for which to create a consistency token.
|
841
|
+
# Values are of the form
|
816
842
|
# `projects/{project}/instances/{instance}/tables/{table}`.
|
817
843
|
#
|
818
844
|
# @yield [response, operation] Access the result along with the RPC operation
|
@@ -881,8 +907,8 @@ module Google
|
|
881
907
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
882
908
|
#
|
883
909
|
# @param name [::String]
|
884
|
-
# Required. The unique name of the Table for which to check replication
|
885
|
-
#
|
910
|
+
# Required. The unique name of the Table for which to check replication consistency.
|
911
|
+
# Values are of the form
|
886
912
|
# `projects/{project}/instances/{instance}/tables/{table}`.
|
887
913
|
# @param consistency_token [::String]
|
888
914
|
# Required. The token created using GenerateConsistencyToken for the Table.
|
@@ -966,9 +992,9 @@ module Google
|
|
966
992
|
# Values are of the form
|
967
993
|
# `projects/{project}/instances/{instance}/clusters/{cluster}`.
|
968
994
|
# @param snapshot_id [::String]
|
969
|
-
# Required. The ID by which the new snapshot should be referred to within the
|
970
|
-
#
|
971
|
-
#
|
995
|
+
# Required. The ID by which the new snapshot should be referred to within the parent
|
996
|
+
# cluster, e.g., `mysnapshot` of the form: `[_a-zA-Z0-9][-_.a-zA-Z0-9]*`
|
997
|
+
# rather than
|
972
998
|
# `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`.
|
973
999
|
# @param ttl [::Google::Protobuf::Duration, ::Hash]
|
974
1000
|
# The amount of time that the new snapshot can stay active after it is
|
@@ -1123,8 +1149,8 @@ module Google
|
|
1123
1149
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1124
1150
|
#
|
1125
1151
|
# @param parent [::String]
|
1126
|
-
# Required. The unique name of the cluster for which snapshots should be
|
1127
|
-
#
|
1152
|
+
# Required. The unique name of the cluster for which snapshots should be listed.
|
1153
|
+
# Values are of the form
|
1128
1154
|
# `projects/{project}/instances/{instance}/clusters/{cluster}`.
|
1129
1155
|
# Use `{cluster} = '-'` to list snapshots for all clusters in an instance,
|
1130
1156
|
# e.g., `projects/{project}/instances/{instance}/clusters/-`.
|
@@ -1255,14 +1281,14 @@ module Google
|
|
1255
1281
|
end
|
1256
1282
|
|
1257
1283
|
##
|
1258
|
-
# Starts creating a new Cloud Bigtable Backup.
|
1284
|
+
# Starts creating a new Cloud Bigtable Backup. The returned backup
|
1259
1285
|
# {::Google::Longrunning::Operation long-running operation} can be used to
|
1260
1286
|
# track creation of the backup. The
|
1261
1287
|
# {::Google::Longrunning::Operation#metadata metadata} field type is
|
1262
1288
|
# {::Google::Cloud::Bigtable::Admin::V2::CreateBackupMetadata CreateBackupMetadata}. The
|
1263
1289
|
# {::Google::Longrunning::Operation#response response} field type is
|
1264
|
-
# {::Google::Cloud::Bigtable::Admin::V2::Backup Backup}, if successful. Cancelling the
|
1265
|
-
#
|
1290
|
+
# {::Google::Cloud::Bigtable::Admin::V2::Backup Backup}, if successful. Cancelling the returned operation will stop the
|
1291
|
+
# creation and delete the backup.
|
1266
1292
|
#
|
1267
1293
|
# @overload create_backup(request, options = nil)
|
1268
1294
|
# Pass arguments to `create_backup` via a request object, either of type
|
@@ -1570,7 +1596,7 @@ module Google
|
|
1570
1596
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1571
1597
|
#
|
1572
1598
|
# @param parent [::String]
|
1573
|
-
# Required. The cluster to list backups from.
|
1599
|
+
# Required. The cluster to list backups from. Values are of the
|
1574
1600
|
# form `projects/{project}/instances/{instance}/clusters/{cluster}`.
|
1575
1601
|
# Use `{cluster} = '-'` to list backups for all clusters in an instance,
|
1576
1602
|
# e.g., `projects/{project}/instances/{instance}/clusters/-`.
|
@@ -1579,7 +1605,7 @@ module Google
|
|
1579
1605
|
# The expression must specify the field name, a comparison operator,
|
1580
1606
|
# and the value that you want to use for filtering. The value must be a
|
1581
1607
|
# string, a number, or a boolean. The comparison operator must be
|
1582
|
-
# <, >, <=, >=, !=, =, or :. Colon
|
1608
|
+
# <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is
|
1583
1609
|
# roughly synonymous with equality. Filter rules are case insensitive.
|
1584
1610
|
#
|
1585
1611
|
# The fields eligible for filtering are:
|
@@ -1609,9 +1635,8 @@ module Google
|
|
1609
1635
|
# * `size_bytes > 10000000000` --> The backup's size is greater than 10GB
|
1610
1636
|
# @param order_by [::String]
|
1611
1637
|
# An expression for specifying the sort order of the results of the request.
|
1612
|
-
# The string value should specify one or more fields in
|
1613
|
-
#
|
1614
|
-
# https://aip.dev/132#ordering.
|
1638
|
+
# The string value should specify one or more fields in {::Google::Cloud::Bigtable::Admin::V2::Backup Backup}. The full
|
1639
|
+
# syntax is described at https://aip.dev/132#ordering.
|
1615
1640
|
#
|
1616
1641
|
# Fields supported are:
|
1617
1642
|
# * name
|
@@ -1634,10 +1659,9 @@ module Google
|
|
1634
1659
|
# less, defaults to the server's maximum allowed page size.
|
1635
1660
|
# @param page_token [::String]
|
1636
1661
|
# If non-empty, `page_token` should contain a
|
1637
|
-
# {::Google::Cloud::Bigtable::Admin::V2::ListBackupsResponse#next_page_token next_page_token}
|
1638
|
-
#
|
1639
|
-
#
|
1640
|
-
# same `parent` and with the same `filter`.
|
1662
|
+
# {::Google::Cloud::Bigtable::Admin::V2::ListBackupsResponse#next_page_token next_page_token} from a
|
1663
|
+
# previous {::Google::Cloud::Bigtable::Admin::V2::ListBackupsResponse ListBackupsResponse} to the same `parent` and with the same
|
1664
|
+
# `filter`.
|
1641
1665
|
#
|
1642
1666
|
# @yield [response, operation] Access the result along with the RPC operation
|
1643
1667
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigtable::Admin::V2::Backup>]
|
@@ -1687,11 +1711,11 @@ module Google
|
|
1687
1711
|
|
1688
1712
|
##
|
1689
1713
|
# Create a new table by restoring from a completed backup. The new table
|
1690
|
-
# must be in the same instance as the instance containing the backup.
|
1714
|
+
# must be in the same instance as the instance containing the backup. The
|
1691
1715
|
# returned table {::Google::Longrunning::Operation long-running operation} can
|
1692
|
-
# be used to track the progress of the operation, and to cancel it.
|
1716
|
+
# be used to track the progress of the operation, and to cancel it. The
|
1693
1717
|
# {::Google::Longrunning::Operation#metadata metadata} field type is
|
1694
|
-
# [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata].
|
1718
|
+
# [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The
|
1695
1719
|
# {::Google::Longrunning::Operation#response response} type is
|
1696
1720
|
# {::Google::Cloud::Bigtable::Admin::V2::Table Table}, if successful.
|
1697
1721
|
#
|
@@ -1720,7 +1744,7 @@ module Google
|
|
1720
1744
|
# `parent` forms the full table name of the form
|
1721
1745
|
# `projects/<project>/instances/<instance>/tables/<table_id>`.
|
1722
1746
|
# @param backup [::String]
|
1723
|
-
# Name of the backup from which to restore.
|
1747
|
+
# Name of the backup from which to restore. Values are of the form
|
1724
1748
|
# `projects/<project>/instances/<instance>/clusters/<cluster>/backups/<backup>`.
|
1725
1749
|
#
|
1726
1750
|
# @yield [response, operation] Access the result along with the RPC operation
|
@@ -1770,7 +1794,7 @@ module Google
|
|
1770
1794
|
end
|
1771
1795
|
|
1772
1796
|
##
|
1773
|
-
# Gets the access control policy for a resource.
|
1797
|
+
# Gets the access control policy for a Table or Backup resource.
|
1774
1798
|
# Returns an empty policy if the resource exists but does not have a policy
|
1775
1799
|
# set.
|
1776
1800
|
#
|
@@ -1915,7 +1939,7 @@ module Google
|
|
1915
1939
|
end
|
1916
1940
|
|
1917
1941
|
##
|
1918
|
-
# Returns permissions that the caller has on the specified
|
1942
|
+
# Returns permissions that the caller has on the specified Table or Backup resource.
|
1919
1943
|
#
|
1920
1944
|
# @overload test_iam_permissions(request, options = nil)
|
1921
1945
|
# Pass arguments to `test_iam_permissions` via a request object, either of type
|
@@ -2078,7 +2102,7 @@ module Google
|
|
2078
2102
|
config_attr :scope, nil, ::String, ::Array, nil
|
2079
2103
|
config_attr :lib_name, nil, ::String, nil
|
2080
2104
|
config_attr :lib_version, nil, ::String, nil
|
2081
|
-
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
2105
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
2082
2106
|
config_attr :interceptors, nil, ::Array, nil
|
2083
2107
|
config_attr :timeout, nil, ::Numeric, nil
|
2084
2108
|
config_attr :metadata, nil, ::Hash, nil
|
@@ -2099,7 +2123,7 @@ module Google
|
|
2099
2123
|
def rpcs
|
2100
2124
|
@rpcs ||= begin
|
2101
2125
|
parent_rpcs = nil
|
2102
|
-
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config
|
2126
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
2103
2127
|
Rpcs.new parent_rpcs
|
2104
2128
|
end
|
2105
2129
|
end
|
@@ -2111,7 +2135,7 @@ module Google
|
|
2111
2135
|
# Each configuration object is of type `Gapic::Config::Method` and includes
|
2112
2136
|
# the following configuration fields:
|
2113
2137
|
#
|
2114
|
-
# * `timeout` (*type:* `Numeric`) - The call timeout in
|
2138
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
2115
2139
|
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
2116
2140
|
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
2117
2141
|
# include the following keys:
|
@@ -2235,49 +2259,49 @@ module Google
|
|
2235
2259
|
|
2236
2260
|
# @private
|
2237
2261
|
def initialize parent_rpcs = nil
|
2238
|
-
create_table_config = parent_rpcs
|
2262
|
+
create_table_config = parent_rpcs.create_table if parent_rpcs.respond_to? :create_table
|
2239
2263
|
@create_table = ::Gapic::Config::Method.new create_table_config
|
2240
|
-
create_table_from_snapshot_config = parent_rpcs
|
2264
|
+
create_table_from_snapshot_config = parent_rpcs.create_table_from_snapshot if parent_rpcs.respond_to? :create_table_from_snapshot
|
2241
2265
|
@create_table_from_snapshot = ::Gapic::Config::Method.new create_table_from_snapshot_config
|
2242
|
-
list_tables_config = parent_rpcs
|
2266
|
+
list_tables_config = parent_rpcs.list_tables if parent_rpcs.respond_to? :list_tables
|
2243
2267
|
@list_tables = ::Gapic::Config::Method.new list_tables_config
|
2244
|
-
get_table_config = parent_rpcs
|
2268
|
+
get_table_config = parent_rpcs.get_table if parent_rpcs.respond_to? :get_table
|
2245
2269
|
@get_table = ::Gapic::Config::Method.new get_table_config
|
2246
|
-
delete_table_config = parent_rpcs
|
2270
|
+
delete_table_config = parent_rpcs.delete_table if parent_rpcs.respond_to? :delete_table
|
2247
2271
|
@delete_table = ::Gapic::Config::Method.new delete_table_config
|
2248
|
-
modify_column_families_config = parent_rpcs
|
2272
|
+
modify_column_families_config = parent_rpcs.modify_column_families if parent_rpcs.respond_to? :modify_column_families
|
2249
2273
|
@modify_column_families = ::Gapic::Config::Method.new modify_column_families_config
|
2250
|
-
drop_row_range_config = parent_rpcs
|
2274
|
+
drop_row_range_config = parent_rpcs.drop_row_range if parent_rpcs.respond_to? :drop_row_range
|
2251
2275
|
@drop_row_range = ::Gapic::Config::Method.new drop_row_range_config
|
2252
|
-
generate_consistency_token_config = parent_rpcs
|
2276
|
+
generate_consistency_token_config = parent_rpcs.generate_consistency_token if parent_rpcs.respond_to? :generate_consistency_token
|
2253
2277
|
@generate_consistency_token = ::Gapic::Config::Method.new generate_consistency_token_config
|
2254
|
-
check_consistency_config = parent_rpcs
|
2278
|
+
check_consistency_config = parent_rpcs.check_consistency if parent_rpcs.respond_to? :check_consistency
|
2255
2279
|
@check_consistency = ::Gapic::Config::Method.new check_consistency_config
|
2256
|
-
snapshot_table_config = parent_rpcs
|
2280
|
+
snapshot_table_config = parent_rpcs.snapshot_table if parent_rpcs.respond_to? :snapshot_table
|
2257
2281
|
@snapshot_table = ::Gapic::Config::Method.new snapshot_table_config
|
2258
|
-
get_snapshot_config = parent_rpcs
|
2282
|
+
get_snapshot_config = parent_rpcs.get_snapshot if parent_rpcs.respond_to? :get_snapshot
|
2259
2283
|
@get_snapshot = ::Gapic::Config::Method.new get_snapshot_config
|
2260
|
-
list_snapshots_config = parent_rpcs
|
2284
|
+
list_snapshots_config = parent_rpcs.list_snapshots if parent_rpcs.respond_to? :list_snapshots
|
2261
2285
|
@list_snapshots = ::Gapic::Config::Method.new list_snapshots_config
|
2262
|
-
delete_snapshot_config = parent_rpcs
|
2286
|
+
delete_snapshot_config = parent_rpcs.delete_snapshot if parent_rpcs.respond_to? :delete_snapshot
|
2263
2287
|
@delete_snapshot = ::Gapic::Config::Method.new delete_snapshot_config
|
2264
|
-
create_backup_config = parent_rpcs
|
2288
|
+
create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup
|
2265
2289
|
@create_backup = ::Gapic::Config::Method.new create_backup_config
|
2266
|
-
get_backup_config = parent_rpcs
|
2290
|
+
get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup
|
2267
2291
|
@get_backup = ::Gapic::Config::Method.new get_backup_config
|
2268
|
-
update_backup_config = parent_rpcs
|
2292
|
+
update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup
|
2269
2293
|
@update_backup = ::Gapic::Config::Method.new update_backup_config
|
2270
|
-
delete_backup_config = parent_rpcs
|
2294
|
+
delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup
|
2271
2295
|
@delete_backup = ::Gapic::Config::Method.new delete_backup_config
|
2272
|
-
list_backups_config = parent_rpcs
|
2296
|
+
list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups
|
2273
2297
|
@list_backups = ::Gapic::Config::Method.new list_backups_config
|
2274
|
-
restore_table_config = parent_rpcs
|
2298
|
+
restore_table_config = parent_rpcs.restore_table if parent_rpcs.respond_to? :restore_table
|
2275
2299
|
@restore_table = ::Gapic::Config::Method.new restore_table_config
|
2276
|
-
get_iam_policy_config = parent_rpcs
|
2300
|
+
get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
|
2277
2301
|
@get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
|
2278
|
-
set_iam_policy_config = parent_rpcs
|
2302
|
+
set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
|
2279
2303
|
@set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
|
2280
|
-
test_iam_permissions_config = parent_rpcs
|
2304
|
+
test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
|
2281
2305
|
@test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
|
2282
2306
|
|
2283
2307
|
yield self if block_given?
|