google-cloud-bigtable-admin-v2 0.3.0 → 0.5.3

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.
@@ -83,7 +83,7 @@ module Google
83
83
  # Create credentials
84
84
  credentials = @config.credentials
85
85
  credentials ||= Credentials.default scope: @config.scope
86
- if credentials.is_a?(String) || credentials.is_a?(Hash)
86
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
87
87
  credentials = Credentials.new credentials, scope: @config.scope
88
88
  end
89
89
  @quota_project_id = @config.quota_project
@@ -397,9 +397,9 @@ module Google
397
397
  end
398
398
 
399
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
400
+ # Waits until the specified long-running operation is done or reaches at most
401
+ # a specified timeout, returning the latest state. If the operation is
402
+ # already done, the latest state is immediately returned. If the timeout
403
403
  # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
404
404
  # timeout is used. If the server does not support this method, it returns
405
405
  # `google.rpc.Code.UNIMPLEMENTED`.
@@ -561,7 +561,7 @@ module Google
561
561
  config_attr :scope, nil, ::String, ::Array, nil
562
562
  config_attr :lib_name, nil, ::String, nil
563
563
  config_attr :lib_version, nil, ::String, nil
564
- 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)
565
565
  config_attr :interceptors, nil, ::Array, nil
566
566
  config_attr :timeout, nil, ::Numeric, nil
567
567
  config_attr :metadata, nil, ::Hash, nil
@@ -582,7 +582,7 @@ module Google
582
582
  def rpcs
583
583
  @rpcs ||= begin
584
584
  parent_rpcs = nil
585
- parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config&.respond_to?(:rpcs)
585
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
586
586
  Rpcs.new parent_rpcs
587
587
  end
588
588
  end
@@ -633,15 +633,15 @@ module Google
633
633
 
634
634
  # @private
635
635
  def initialize parent_rpcs = nil
636
- list_operations_config = parent_rpcs&.list_operations if parent_rpcs&.respond_to? :list_operations
636
+ list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations
637
637
  @list_operations = ::Gapic::Config::Method.new list_operations_config
638
- get_operation_config = parent_rpcs&.get_operation if parent_rpcs&.respond_to? :get_operation
638
+ get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation
639
639
  @get_operation = ::Gapic::Config::Method.new get_operation_config
640
- delete_operation_config = parent_rpcs&.delete_operation if parent_rpcs&.respond_to? :delete_operation
640
+ delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation
641
641
  @delete_operation = ::Gapic::Config::Method.new delete_operation_config
642
- cancel_operation_config = parent_rpcs&.cancel_operation if parent_rpcs&.respond_to? :cancel_operation
642
+ cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation
643
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
644
+ wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation
645
645
  @wait_operation = ::Gapic::Config::Method.new wait_operation_config
646
646
 
647
647
  yield self if block_given?
@@ -65,6 +65,29 @@ module Google
65
65
  "projects/#{project}/instances/#{instance}/clusters/#{cluster}"
66
66
  end
67
67
 
68
+ ##
69
+ # Create a fully-qualified CryptoKeyVersion resource string.
70
+ #
71
+ # The resource will be in the following format:
72
+ #
73
+ # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`
74
+ #
75
+ # @param project [String]
76
+ # @param location [String]
77
+ # @param key_ring [String]
78
+ # @param crypto_key [String]
79
+ # @param crypto_key_version [String]
80
+ #
81
+ # @return [::String]
82
+ def crypto_key_version_path project:, location:, key_ring:, crypto_key:, crypto_key_version:
83
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
84
+ raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
85
+ raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/"
86
+ raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/"
87
+
88
+ "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}"
89
+ end
90
+
68
91
  ##
69
92
  # Create a fully-qualified Instance resource string.
70
93
  #
@@ -22,7 +22,7 @@ module Google
22
22
  module Bigtable
23
23
  module Admin
24
24
  module V2
25
- VERSION = "0.3.0"
25
+ VERSION = "0.5.3"
26
26
  end
27
27
  end
28
28
  end
@@ -57,9 +57,15 @@ module Google
57
57
 
58
58
  # Denotes that a (repeated) field is an unordered list.
59
59
  # This indicates that the service may provide the elements of the list
60
- # in any arbitrary order, rather than the order the user originally
60
+ # in any arbitrary order, rather than the order the user originally
61
61
  # provided. Additionally, the list's order may or may not be stable.
62
62
  UNORDERED_LIST = 6
63
+
64
+ # Denotes that this field returns a non-empty default value if not set.
65
+ # This indicates that if the user provides the empty value in a request,
66
+ # a non-empty value will be returned. The user will not be aware of what
67
+ # non-empty value to expect.
68
+ NON_EMPTY_DEFAULT = 7
63
69
  end
64
70
  end
65
71
  end
@@ -27,8 +27,8 @@ module Google
27
27
  # @!attribute [rw] parent
28
28
  # @return [::String]
29
29
  # Required. The name of the instance in which to create the restored
30
- # table. This instance must be the parent of the source backup. Values are
31
- # of the form `projects/<project>/instances/<instance>`.
30
+ # table. This instance must be in the same project as the source backup.
31
+ # Values are of the form `projects/<project>/instances/<instance>`.
32
32
  # @!attribute [rw] table_id
33
33
  # @return [::String]
34
34
  # Required. The id of the table to create and restore to. This
@@ -130,10 +130,30 @@ module Google
130
130
  # (`CreationOnly`)
131
131
  # The type of storage used by this cluster to serve its
132
132
  # parent instance's tables, unless explicitly overridden.
133
+ # @!attribute [rw] encryption_config
134
+ # @return [::Google::Cloud::Bigtable::Admin::V2::Cluster::EncryptionConfig]
135
+ # Immutable. The encryption configuration for CMEK-protected clusters.
133
136
  class Cluster
134
137
  include ::Google::Protobuf::MessageExts
135
138
  extend ::Google::Protobuf::MessageExts::ClassMethods
136
139
 
140
+ # Cloud Key Management Service (Cloud KMS) settings for a CMEK-protected
141
+ # cluster.
142
+ # @!attribute [rw] kms_key_name
143
+ # @return [::String]
144
+ # Describes the Cloud KMS encryption key that will be used to protect the
145
+ # destination Bigtable cluster. The requirements for this key are:
146
+ # 1) The Cloud Bigtable service account associated with the project that
147
+ # contains this cluster must be granted the
148
+ # `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key.
149
+ # 2) Only regional keys can be used and the region of the CMEK key must
150
+ # match the region of the cluster.
151
+ # 3) All clusters within an instance must use the same CMEK key.
152
+ class EncryptionConfig
153
+ include ::Google::Protobuf::MessageExts
154
+ extend ::Google::Protobuf::MessageExts::ClassMethods
155
+ end
156
+
137
157
  # Possible states of a cluster.
138
158
  module State
139
159
  # The state of the cluster could not be determined.
@@ -166,7 +186,7 @@ module Google
166
186
  # @return [::String]
167
187
  # (`OutputOnly`)
168
188
  # The unique name of the app profile. Values are of the form
169
- # `projects/<project>/instances/<instance>/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
189
+ # `projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
170
190
  # @!attribute [rw] etag
171
191
  # @return [::String]
172
192
  # Strongly validated etag for optimistic concurrency control. Preserve the
@@ -39,8 +39,8 @@ module Google
39
39
  # Each table is served using the resources of its parent cluster.
40
40
  # @!attribute [rw] name
41
41
  # @return [::String]
42
- # Output only. The unique name of the table. Values are of the form
43
- # `projects/<project>/instances/<instance>/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
42
+ # The unique name of the table. Values are of the form
43
+ # `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
44
44
  # Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL`
45
45
  # @!attribute [rw] cluster_states
46
46
  # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Bigtable::Admin::V2::Table::ClusterState}]
@@ -48,7 +48,7 @@ module Google
48
48
  # If it could not be determined whether or not the table has data in a
49
49
  # particular cluster (for example, if its zone is unavailable), then
50
50
  # there will be an entry for the cluster with UNKNOWN `replication_status`.
51
- # Views: `REPLICATION_VIEW`, `FULL`
51
+ # Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL`
52
52
  # @!attribute [rw] column_families
53
53
  # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Bigtable::Admin::V2::ColumnFamily}]
54
54
  # (`CreationOnly`)
@@ -73,6 +73,13 @@ module Google
73
73
  # @!attribute [rw] replication_state
74
74
  # @return [::Google::Cloud::Bigtable::Admin::V2::Table::ClusterState::ReplicationState]
75
75
  # Output only. The state of replication for the table in this cluster.
76
+ # @!attribute [r] encryption_info
77
+ # @return [::Array<::Google::Cloud::Bigtable::Admin::V2::EncryptionInfo>]
78
+ # Output only. The encryption information for the table in this cluster.
79
+ # If the encryption key protecting this resource is customer managed, then
80
+ # its version can be rotated in Cloud Key Management Service (Cloud KMS).
81
+ # The primary version of the key and its status will be reflected here when
82
+ # changes propagate from Cloud KMS.
76
83
  class ClusterState
77
84
  include ::Google::Protobuf::MessageExts
78
85
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -151,6 +158,9 @@ module Google
151
158
  # state.
152
159
  REPLICATION_VIEW = 3
153
160
 
161
+ # Only populates 'name' and fields related to the table's encryption state.
162
+ ENCRYPTION_VIEW = 5
163
+
154
164
  # Populates all fields.
155
165
  FULL = 4
156
166
  end
@@ -208,6 +218,47 @@ module Google
208
218
  end
209
219
  end
210
220
 
221
+ # Encryption information for a given resource.
222
+ # If this resource is protected with customer managed encryption, the in-use
223
+ # Cloud Key Management Service (Cloud KMS) key version is specified along with
224
+ # its status.
225
+ # @!attribute [r] encryption_type
226
+ # @return [::Google::Cloud::Bigtable::Admin::V2::EncryptionInfo::EncryptionType]
227
+ # Output only. The type of encryption used to protect this resource.
228
+ # @!attribute [r] encryption_status
229
+ # @return [::Google::Rpc::Status]
230
+ # Output only. The status of encrypt/decrypt calls on underlying data for
231
+ # this resource. Regardless of status, the existing data is always encrypted
232
+ # at rest.
233
+ # @!attribute [r] kms_key_version
234
+ # @return [::String]
235
+ # Output only. The version of the Cloud KMS key specified in the parent
236
+ # cluster that is in use for the data underlying this table.
237
+ class EncryptionInfo
238
+ include ::Google::Protobuf::MessageExts
239
+ extend ::Google::Protobuf::MessageExts::ClassMethods
240
+
241
+ # Possible encryption types for a resource.
242
+ module EncryptionType
243
+ # Encryption type was not specified, though data at rest remains encrypted.
244
+ ENCRYPTION_TYPE_UNSPECIFIED = 0
245
+
246
+ # The data backing this resource is encrypted at rest with a key that is
247
+ # fully managed by Google. No key version or status will be populated.
248
+ # This is the default state.
249
+ GOOGLE_DEFAULT_ENCRYPTION = 1
250
+
251
+ # The data backing this resource is encrypted at rest with a key that is
252
+ # managed by the customer.
253
+ # The in-use version of the key and its status are populated for
254
+ # CMEK-protected tables.
255
+ # CMEK-protected backups are pinned to the key version that was in use at
256
+ # the time the backup was taken. This key version is populated but its
257
+ # status is not tracked and is reported as `UNKNOWN`.
258
+ CUSTOMER_MANAGED_ENCRYPTION = 2
259
+ end
260
+ end
261
+
211
262
  # A snapshot of a table at a particular time. A snapshot can be used as a
212
263
  # checkpoint for data restoration or a data source for a new table.
213
264
  #
@@ -219,7 +270,7 @@ module Google
219
270
  # @return [::String]
220
271
  # Output only. The unique name of the snapshot.
221
272
  # Values are of the form
222
- # `projects/<project>/instances/<instance>/clusters/<cluster>/snapshots/<snapshot>`.
273
+ # `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`.
223
274
  # @!attribute [rw] source_table
224
275
  # @return [::Google::Cloud::Bigtable::Admin::V2::Table]
225
276
  # Output only. The source table at the time the snapshot was taken.
@@ -304,6 +355,9 @@ module Google
304
355
  # @!attribute [r] state
305
356
  # @return [::Google::Cloud::Bigtable::Admin::V2::Backup::State]
306
357
  # Output only. The current state of the backup.
358
+ # @!attribute [r] encryption_info
359
+ # @return [::Google::Cloud::Bigtable::Admin::V2::EncryptionInfo]
360
+ # Output only. The encryption information for the backup.
307
361
  class Backup
308
362
  include ::Google::Protobuf::MessageExts
309
363
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -19,30 +19,53 @@
19
19
 
20
20
  module Google
21
21
  module Type
22
- # Represents an expression text. Example:
22
+ # Represents a textual expression in the Common Expression Language (CEL)
23
+ # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
24
+ # are documented at https://github.com/google/cel-spec.
23
25
  #
24
- # title: "User account presence"
25
- # description: "Determines whether the request has a user account"
26
- # expression: "size(request.user) > 0"
26
+ # Example (Comparison):
27
+ #
28
+ # title: "Summary size limit"
29
+ # description: "Determines if a summary is less than 100 chars"
30
+ # expression: "document.summary.size() < 100"
31
+ #
32
+ # Example (Equality):
33
+ #
34
+ # title: "Requestor is owner"
35
+ # description: "Determines if requestor is the document owner"
36
+ # expression: "document.owner == request.auth.claims.email"
37
+ #
38
+ # Example (Logic):
39
+ #
40
+ # title: "Public documents"
41
+ # description: "Determine whether the document should be publicly visible"
42
+ # expression: "document.type != 'private' && document.type != 'internal'"
43
+ #
44
+ # Example (Data Manipulation):
45
+ #
46
+ # title: "Notification string"
47
+ # description: "Create a notification string with a timestamp."
48
+ # expression: "'New message received at ' + string(document.create_time)"
49
+ #
50
+ # The exact variables and functions that may be referenced within an expression
51
+ # are determined by the service that evaluates it. See the service
52
+ # documentation for additional information.
27
53
  # @!attribute [rw] expression
28
54
  # @return [::String]
29
- # Textual representation of an expression in
30
- # Common Expression Language syntax.
31
- #
32
- # The application context of the containing message determines which
33
- # well-known feature set of CEL is supported.
55
+ # Textual representation of an expression in Common Expression Language
56
+ # syntax.
34
57
  # @!attribute [rw] title
35
58
  # @return [::String]
36
- # An optional title for the expression, i.e. a short string describing
59
+ # Optional. Title for the expression, i.e. a short string describing
37
60
  # its purpose. This can be used e.g. in UIs which allow to enter the
38
61
  # expression.
39
62
  # @!attribute [rw] description
40
63
  # @return [::String]
41
- # An optional description of the expression. This is a longer text which
64
+ # Optional. Description of the expression. This is a longer text which
42
65
  # describes the expression, e.g. when hovered over it in a UI.
43
66
  # @!attribute [rw] location
44
67
  # @return [::String]
45
- # An optional string indicating the location of the expression for error
68
+ # Optional. String indicating the location of the expression for error
46
69
  # reporting, e.g. a file name and a position in the file.
47
70
  class Expr
48
71
  include ::Google::Protobuf::MessageExts
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-bigtable-admin-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-02 00:00:00.000000000 Z
11
+ date: 2021-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0.5'
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: '0.3'
22
+ version: 2.a
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '0.5'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: '0.3'
32
+ version: 2.a
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: google-cloud-errors
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -47,7 +53,7 @@ dependencies:
47
53
  version: 0.6.10
48
54
  - - "<"
49
55
  - !ruby/object:Gem::Version
50
- version: '2.0'
56
+ version: 2.a
51
57
  type: :runtime
52
58
  prerelease: false
53
59
  version_requirements: !ruby/object:Gem::Requirement
@@ -57,21 +63,21 @@ dependencies:
57
63
  version: 0.6.10
58
64
  - - "<"
59
65
  - !ruby/object:Gem::Version
60
- version: '2.0'
66
+ version: 2.a
61
67
  - !ruby/object:Gem::Dependency
62
68
  name: google-style
63
69
  requirement: !ruby/object:Gem::Requirement
64
70
  requirements:
65
71
  - - "~>"
66
72
  - !ruby/object:Gem::Version
67
- version: 1.24.0
73
+ version: 1.25.1
68
74
  type: :development
69
75
  prerelease: false
70
76
  version_requirements: !ruby/object:Gem::Requirement
71
77
  requirements:
72
78
  - - "~>"
73
79
  - !ruby/object:Gem::Version
74
- version: 1.24.0
80
+ version: 1.25.1
75
81
  - !ruby/object:Gem::Dependency
76
82
  name: minitest
77
83
  requirement: !ruby/object:Gem::Requirement
@@ -235,14 +241,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
235
241
  requirements:
236
242
  - - ">="
237
243
  - !ruby/object:Gem::Version
238
- version: '2.4'
244
+ version: '2.5'
239
245
  required_rubygems_version: !ruby/object:Gem::Requirement
240
246
  requirements:
241
247
  - - ">="
242
248
  - !ruby/object:Gem::Version
243
249
  version: '0'
244
250
  requirements: []
245
- rubygems_version: 3.2.6
251
+ rubygems_version: 3.2.17
246
252
  signing_key:
247
253
  specification_version: 4
248
254
  summary: API Client library for the Cloud Bigtable Admin V2 API