google-cloud-spanner-admin-database-v1 0.2.1 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.md +188 -190
- data/README.md +66 -2
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb +96 -70
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/operations.rb +94 -9
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/paths.rb +44 -0
- data/lib/google/cloud/spanner/admin/database/v1/version.rb +1 -1
- data/lib/google/spanner/admin/database/v1/backup_pb.rb +16 -0
- data/lib/google/spanner/admin/database/v1/common_pb.rb +18 -0
- data/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb +19 -0
- data/proto_docs/google/api/field_behavior.rb +6 -0
- data/proto_docs/google/longrunning/operations.rb +17 -3
- data/proto_docs/google/protobuf/any.rb +5 -2
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/timestamp.rb +10 -1
- data/proto_docs/google/spanner/admin/database/v1/backup.rb +72 -12
- data/proto_docs/google/spanner/admin/database/v1/common.rb +45 -0
- data/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb +94 -5
- metadata +13 -9
@@ -40,6 +40,51 @@ module Google
|
|
40
40
|
include ::Google::Protobuf::MessageExts
|
41
41
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
42
42
|
end
|
43
|
+
|
44
|
+
# Encryption configuration for a Cloud Spanner database.
|
45
|
+
# @!attribute [rw] kms_key_name
|
46
|
+
# @return [::String]
|
47
|
+
# The Cloud KMS key to be used for encrypting and decrypting
|
48
|
+
# the database. Values are of the form
|
49
|
+
# `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
|
50
|
+
class EncryptionConfig
|
51
|
+
include ::Google::Protobuf::MessageExts
|
52
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
53
|
+
end
|
54
|
+
|
55
|
+
# Encryption information for a Cloud Spanner database or backup.
|
56
|
+
# @!attribute [r] encryption_type
|
57
|
+
# @return [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionInfo::Type]
|
58
|
+
# Output only. The type of encryption.
|
59
|
+
# @!attribute [r] encryption_status
|
60
|
+
# @return [::Google::Rpc::Status]
|
61
|
+
# Output only. If present, the status of a recent encrypt/decrypt call on underlying data
|
62
|
+
# for this database or backup. Regardless of status, data is always encrypted
|
63
|
+
# at rest.
|
64
|
+
# @!attribute [r] kms_key_version
|
65
|
+
# @return [::String]
|
66
|
+
# Output only. A Cloud KMS key version that is being used to protect the database or
|
67
|
+
# backup.
|
68
|
+
class EncryptionInfo
|
69
|
+
include ::Google::Protobuf::MessageExts
|
70
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
71
|
+
|
72
|
+
# Possible encryption types.
|
73
|
+
module Type
|
74
|
+
# Encryption type was not specified, though data at rest remains encrypted.
|
75
|
+
TYPE_UNSPECIFIED = 0
|
76
|
+
|
77
|
+
# The data is encrypted at rest with a key that is
|
78
|
+
# fully managed by Google. No key version or status will be populated.
|
79
|
+
# This is the default state.
|
80
|
+
GOOGLE_DEFAULT_ENCRYPTION = 1
|
81
|
+
|
82
|
+
# The data is encrypted at rest with a key that is
|
83
|
+
# managed by the customer. The active version of the key. `kms_key_version`
|
84
|
+
# will be populated, and `encryption_status` may be populated.
|
85
|
+
CUSTOMER_MANAGED_ENCRYPTION = 2
|
86
|
+
end
|
87
|
+
end
|
43
88
|
end
|
44
89
|
end
|
45
90
|
end
|
@@ -54,6 +54,37 @@ module Google
|
|
54
54
|
# @return [::Google::Cloud::Spanner::Admin::Database::V1::RestoreInfo]
|
55
55
|
# Output only. Applicable only for restored databases. Contains information
|
56
56
|
# about the restore source.
|
57
|
+
# @!attribute [r] encryption_config
|
58
|
+
# @return [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionConfig]
|
59
|
+
# Output only. For databases that are using customer managed encryption, this
|
60
|
+
# field contains the encryption configuration for the database.
|
61
|
+
# For databases that are using Google default or other types of encryption,
|
62
|
+
# this field is empty.
|
63
|
+
# @!attribute [r] encryption_info
|
64
|
+
# @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::EncryptionInfo>]
|
65
|
+
# Output only. For databases that are using customer managed encryption, this
|
66
|
+
# field contains the encryption information for the database, such as
|
67
|
+
# encryption state and the Cloud KMS key versions that are in use.
|
68
|
+
#
|
69
|
+
# For databases that are using Google default or other types of encryption,
|
70
|
+
# this field is empty.
|
71
|
+
#
|
72
|
+
# This field is propagated lazily from the backend. There might be a delay
|
73
|
+
# from when a key version is being used and when it appears in this field.
|
74
|
+
# @!attribute [r] version_retention_period
|
75
|
+
# @return [::String]
|
76
|
+
# Output only. The period in which Cloud Spanner retains all versions of data
|
77
|
+
# for the database. This is the same as the value of version_retention_period
|
78
|
+
# database option set using
|
79
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}. Defaults to 1 hour,
|
80
|
+
# if not set.
|
81
|
+
# @!attribute [r] earliest_version_time
|
82
|
+
# @return [::Google::Protobuf::Timestamp]
|
83
|
+
# Output only. Earliest timestamp at which older versions of the data can be
|
84
|
+
# read. This value is continuously updated by Cloud Spanner and becomes stale
|
85
|
+
# the moment it is queried. If you are using this value to recover data, make
|
86
|
+
# sure to account for the time from the moment when the value is queried to
|
87
|
+
# the moment when you initiate the recovery.
|
57
88
|
class Database
|
58
89
|
include ::Google::Protobuf::MessageExts
|
59
90
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -133,6 +164,11 @@ module Google
|
|
133
164
|
# database. Statements can create tables, indexes, etc. These
|
134
165
|
# statements execute atomically with the creation of the database:
|
135
166
|
# if there is an error in any statement, the database is not created.
|
167
|
+
# @!attribute [rw] encryption_config
|
168
|
+
# @return [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionConfig]
|
169
|
+
# Optional. The encryption configuration for the database. If this field is not
|
170
|
+
# specified, Cloud Spanner will encrypt/decrypt all data at rest using
|
171
|
+
# Google default encryption.
|
136
172
|
class CreateDatabaseRequest
|
137
173
|
include ::Google::Protobuf::MessageExts
|
138
174
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -225,6 +261,16 @@ module Google
|
|
225
261
|
# Output only. When true, indicates that the operation is throttled e.g
|
226
262
|
# due to resource constraints. When resources become available the operation
|
227
263
|
# will resume and this field will be false again.
|
264
|
+
# @!attribute [rw] progress
|
265
|
+
# @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::OperationProgress>]
|
266
|
+
# The progress of the
|
267
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl} operations.
|
268
|
+
# Currently, only index creation statements will have a continuously
|
269
|
+
# updating progress.
|
270
|
+
# For non-index creation statements, `progress[i]` will have start time
|
271
|
+
# and end time populated with commit timestamp of operation,
|
272
|
+
# as well as a progress of 100% once the operation has completed.
|
273
|
+
# `progress[i]` is the operation progress for `statements[i]`.
|
228
274
|
class UpdateDatabaseDdlMetadata
|
229
275
|
include ::Google::Protobuf::MessageExts
|
230
276
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -243,6 +289,8 @@ module Google
|
|
243
289
|
# @!attribute [rw] database
|
244
290
|
# @return [::String]
|
245
291
|
# Required. The database whose schema we wish to get.
|
292
|
+
# Values are of the form
|
293
|
+
# `projects/<project>/instances/<instance>/databases/<database>`
|
246
294
|
class GetDatabaseDdlRequest
|
247
295
|
include ::Google::Protobuf::MessageExts
|
248
296
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -294,11 +342,11 @@ module Google
|
|
294
342
|
# Here are a few examples:
|
295
343
|
#
|
296
344
|
# * `done:true` - The operation is complete.
|
297
|
-
# * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND`
|
298
|
-
# `(metadata.source_type:BACKUP) AND`
|
299
|
-
# `(metadata.backup_info.backup:backup_howl) AND`
|
300
|
-
# `(metadata.name:restored_howl) AND`
|
301
|
-
# `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND`
|
345
|
+
# * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \
|
346
|
+
# `(metadata.source_type:BACKUP) AND` \
|
347
|
+
# `(metadata.backup_info.backup:backup_howl) AND` \
|
348
|
+
# `(metadata.name:restored_howl) AND` \
|
349
|
+
# `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
|
302
350
|
# `(error:*)` - Return operations where:
|
303
351
|
# * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}.
|
304
352
|
# * The database is restored from a backup.
|
@@ -359,11 +407,52 @@ module Google
|
|
359
407
|
# @return [::String]
|
360
408
|
# Name of the backup from which to restore. Values are of the form
|
361
409
|
# `projects/<project>/instances/<instance>/backups/<backup>`.
|
410
|
+
# @!attribute [rw] encryption_config
|
411
|
+
# @return [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig]
|
412
|
+
# Optional. An encryption configuration describing the encryption type and key
|
413
|
+
# resources in Cloud KMS used to encrypt/decrypt the database to restore to.
|
414
|
+
# If this field is not specified, the restored database will use
|
415
|
+
# the same encryption configuration as the backup by default, namely
|
416
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type} =
|
417
|
+
# `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
|
362
418
|
class RestoreDatabaseRequest
|
363
419
|
include ::Google::Protobuf::MessageExts
|
364
420
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
365
421
|
end
|
366
422
|
|
423
|
+
# Encryption configuration for the restored database.
|
424
|
+
# @!attribute [rw] encryption_type
|
425
|
+
# @return [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig::EncryptionType]
|
426
|
+
# Required. The encryption type of the restored database.
|
427
|
+
# @!attribute [rw] kms_key_name
|
428
|
+
# @return [::String]
|
429
|
+
# Optional. The Cloud KMS key that will be used to encrypt/decrypt the restored
|
430
|
+
# database. This field should be set only when
|
431
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type} is
|
432
|
+
# `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
|
433
|
+
# `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
|
434
|
+
class RestoreDatabaseEncryptionConfig
|
435
|
+
include ::Google::Protobuf::MessageExts
|
436
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
437
|
+
|
438
|
+
# Encryption types for the database to be restored.
|
439
|
+
module EncryptionType
|
440
|
+
# Unspecified. Do not use.
|
441
|
+
ENCRYPTION_TYPE_UNSPECIFIED = 0
|
442
|
+
|
443
|
+
# This is the default option when
|
444
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig encryption_config} is not specified.
|
445
|
+
USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION = 1
|
446
|
+
|
447
|
+
# Use Google default encryption.
|
448
|
+
GOOGLE_DEFAULT_ENCRYPTION = 2
|
449
|
+
|
450
|
+
# Use customer managed encryption. If specified, `kms_key_name` must
|
451
|
+
# must contain a valid Cloud KMS key.
|
452
|
+
CUSTOMER_MANAGED_ENCRYPTION = 3
|
453
|
+
end
|
454
|
+
end
|
455
|
+
|
367
456
|
# Metadata type for the long-running operation returned by
|
368
457
|
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#restore_database RestoreDatabase}.
|
369
458
|
# @!attribute [rw] name
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-spanner-admin-database-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.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: 2021-
|
11
|
+
date: 2021-04-23 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.
|
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.
|
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.
|
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.
|
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 Spanner is a managed, mission-critical, globally consistent and
|
174
|
-
scalable relational database service.
|
174
|
+
scalable relational database service. Note that google-cloud-spanner-admin-database-v1
|
175
|
+
is a version-specific client library. For most uses, we recommend installing the
|
176
|
+
main client library google-cloud-spanner-admin-database instead. See the readme
|
177
|
+
for more details.
|
175
178
|
email: googleapis-packages@google.com
|
176
179
|
executables: []
|
177
180
|
extensions: []
|
@@ -201,6 +204,7 @@ files:
|
|
201
204
|
- proto_docs/google/iam/v1/policy.rb
|
202
205
|
- proto_docs/google/longrunning/operations.rb
|
203
206
|
- proto_docs/google/protobuf/any.rb
|
207
|
+
- proto_docs/google/protobuf/duration.rb
|
204
208
|
- proto_docs/google/protobuf/empty.rb
|
205
209
|
- proto_docs/google/protobuf/field_mask.rb
|
206
210
|
- proto_docs/google/protobuf/timestamp.rb
|
@@ -221,14 +225,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
221
225
|
requirements:
|
222
226
|
- - ">="
|
223
227
|
- !ruby/object:Gem::Version
|
224
|
-
version: '2.
|
228
|
+
version: '2.5'
|
225
229
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
226
230
|
requirements:
|
227
231
|
- - ">="
|
228
232
|
- !ruby/object:Gem::Version
|
229
233
|
version: '0'
|
230
234
|
requirements: []
|
231
|
-
rubygems_version: 3.2.
|
235
|
+
rubygems_version: 3.2.13
|
232
236
|
signing_key:
|
233
237
|
specification_version: 4
|
234
238
|
summary: API Client library for the Cloud Spanner Database Admin V1 API
|