google-cloud-bigtable-admin-v2 0.2.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.2.0"
25
+ VERSION = "0.5.1"
26
26
  end
27
27
  end
28
28
  end
@@ -54,6 +54,12 @@ module Google
54
54
  # This indicates that the field may be set once in a request to create a
55
55
  # resource, but may not be changed thereafter.
56
56
  IMMUTABLE = 5
57
+
58
+ # Denotes that a (repeated) field is an unordered list.
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
61
+ # provided. Additionally, the list's order may or may not be stable.
62
+ UNORDERED_LIST = 6
57
63
  end
58
64
  end
59
65
  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
@@ -25,7 +25,7 @@ module Google
25
25
  # @return [::String]
26
26
  # The server-assigned name, which is only unique within the same service that
27
27
  # originally returns it. If you use the default HTTP mapping, the
28
- # `name` should have the format of `operations/some/unique/name`.
28
+ # `name` should be a resource name ending with `operations/{unique_id}`.
29
29
  # @!attribute [rw] metadata
30
30
  # @return [::Google::Protobuf::Any]
31
31
  # Service-specific metadata associated with the operation. It typically
@@ -35,7 +35,7 @@ module Google
35
35
  # @!attribute [rw] done
36
36
  # @return [::Boolean]
37
37
  # If the value is `false`, it means the operation is still in progress.
38
- # If true, the operation is completed, and either `error` or `response` is
38
+ # If `true`, the operation is completed, and either `error` or `response` is
39
39
  # available.
40
40
  # @!attribute [rw] error
41
41
  # @return [::Google::Rpc::Status]
@@ -67,7 +67,7 @@ module Google
67
67
  # The request message for Operations.ListOperations.
68
68
  # @!attribute [rw] name
69
69
  # @return [::String]
70
- # The name of the operation collection.
70
+ # The name of the operation's parent resource.
71
71
  # @!attribute [rw] filter
72
72
  # @return [::String]
73
73
  # The standard list filter.
@@ -112,6 +112,20 @@ module Google
112
112
  extend ::Google::Protobuf::MessageExts::ClassMethods
113
113
  end
114
114
 
115
+ # The request message for Operations.WaitOperation.
116
+ # @!attribute [rw] name
117
+ # @return [::String]
118
+ # The name of the operation resource to wait on.
119
+ # @!attribute [rw] timeout
120
+ # @return [::Google::Protobuf::Duration]
121
+ # The maximum duration to wait before timing out. If left blank, the wait
122
+ # will be at most the time permitted by the underlying HTTP/RPC protocol.
123
+ # If RPC context deadline is also specified, the shorter one will be used.
124
+ class WaitOperationRequest
125
+ include ::Google::Protobuf::MessageExts
126
+ extend ::Google::Protobuf::MessageExts::ClassMethods
127
+ end
128
+
115
129
  # A message representing the message types used by a long-running operation.
116
130
  #
117
131
  # Example:
@@ -57,10 +57,13 @@ module Google
57
57
  # Example 4: Pack and unpack a message in Go
58
58
  #
59
59
  # foo := &pb.Foo{...}
60
- # any, err := ptypes.MarshalAny(foo)
60
+ # any, err := anypb.New(foo)
61
+ # if err != nil {
62
+ # ...
63
+ # }
61
64
  # ...
62
65
  # foo := &pb.Foo{}
63
- # if err := ptypes.UnmarshalAny(any, foo); err != nil {
66
+ # if err := any.UnmarshalTo(foo); err != nil {
64
67
  # ...
65
68
  # }
66
69
  #
@@ -70,7 +70,16 @@ module Google
70
70
  # .setNanos((int) ((millis % 1000) * 1000000)).build();
71
71
  #
72
72
  #
73
- # Example 5: Compute Timestamp from current time in Python.
73
+ # Example 5: Compute Timestamp from Java `Instant.now()`.
74
+ #
75
+ # Instant now = Instant.now();
76
+ #
77
+ # Timestamp timestamp =
78
+ # Timestamp.newBuilder().setSeconds(now.getEpochSecond())
79
+ # .setNanos(now.getNano()).build();
80
+ #
81
+ #
82
+ # Example 6: Compute Timestamp from current time in Python.
74
83
  #
75
84
  # timestamp = Timestamp()
76
85
  # timestamp.GetCurrentTime()
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.2.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-29 00:00:00.000000000 Z
11
+ date: 2021-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.3'
19
+ version: '0.4'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0.3'
26
+ version: '0.4'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: google-cloud-errors
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -64,14 +64,14 @@ dependencies:
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: 1.24.0
67
+ version: 1.25.1
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: 1.24.0
74
+ version: 1.25.1
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: minitest
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -171,7 +171,10 @@ dependencies:
171
171
  - !ruby/object:Gem::Version
172
172
  version: '0.9'
173
173
  description: Cloud Bigtable is a fully managed, scalable NoSQL database service for
174
- large analytical and operational workloads.
174
+ large analytical and operational workloads. Note that google-cloud-bigtable-admin-v2
175
+ is a version-specific client library. For most uses, we recommend installing the
176
+ main client library google-cloud-bigtable-admin instead. See the readme for more
177
+ details.
175
178
  email: googleapis-packages@google.com
176
179
  executables: []
177
180
  extensions: []
@@ -232,14 +235,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
232
235
  requirements:
233
236
  - - ">="
234
237
  - !ruby/object:Gem::Version
235
- version: '2.4'
238
+ version: '2.5'
236
239
  required_rubygems_version: !ruby/object:Gem::Requirement
237
240
  requirements:
238
241
  - - ">="
239
242
  - !ruby/object:Gem::Version
240
243
  version: '0'
241
244
  requirements: []
242
- rubygems_version: 3.1.4
245
+ rubygems_version: 3.2.17
243
246
  signing_key:
244
247
  specification_version: 4
245
248
  summary: API Client library for the Cloud Bigtable Admin V2 API