google-cloud-spanner-admin-database-v1 0.2.0 → 0.5.1

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.
@@ -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}.
80
+ # Defaults to 1 hour, 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
@@ -82,7 +113,8 @@ module Google
82
113
  end
83
114
  end
84
115
 
85
- # The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases ListDatabases}.
116
+ # The request for
117
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases ListDatabases}.
86
118
  # @!attribute [rw] parent
87
119
  # @return [::String]
88
120
  # Required. The instance whose databases should be listed.
@@ -94,28 +126,31 @@ module Google
94
126
  # @!attribute [rw] page_token
95
127
  # @return [::String]
96
128
  # If non-empty, `page_token` should contain a
97
- # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse#next_page_token next_page_token} from a
98
- # previous {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse ListDatabasesResponse}.
129
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse#next_page_token next_page_token}
130
+ # from a previous
131
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabasesResponse ListDatabasesResponse}.
99
132
  class ListDatabasesRequest
100
133
  include ::Google::Protobuf::MessageExts
101
134
  extend ::Google::Protobuf::MessageExts::ClassMethods
102
135
  end
103
136
 
104
- # The response for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases ListDatabases}.
137
+ # The response for
138
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases ListDatabases}.
105
139
  # @!attribute [rw] databases
106
140
  # @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::Database>]
107
141
  # Databases that matched the request.
108
142
  # @!attribute [rw] next_page_token
109
143
  # @return [::String]
110
144
  # `next_page_token` can be sent in a subsequent
111
- # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases ListDatabases} call to fetch more
112
- # of the matching databases.
145
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_databases ListDatabases}
146
+ # call to fetch more of the matching databases.
113
147
  class ListDatabasesResponse
114
148
  include ::Google::Protobuf::MessageExts
115
149
  extend ::Google::Protobuf::MessageExts::ClassMethods
116
150
  end
117
151
 
118
- # The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_database CreateDatabase}.
152
+ # The request for
153
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_database CreateDatabase}.
119
154
  # @!attribute [rw] parent
120
155
  # @return [::String]
121
156
  # Required. The name of the instance that will serve the new database.
@@ -133,6 +168,11 @@ module Google
133
168
  # database. Statements can create tables, indexes, etc. These
134
169
  # statements execute atomically with the creation of the database:
135
170
  # if there is an error in any statement, the database is not created.
171
+ # @!attribute [rw] encryption_config
172
+ # @return [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionConfig]
173
+ # Optional. The encryption configuration for the database. If this field is
174
+ # not specified, Cloud Spanner will encrypt/decrypt all data at rest using
175
+ # Google default encryption.
136
176
  class CreateDatabaseRequest
137
177
  include ::Google::Protobuf::MessageExts
138
178
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -148,7 +188,8 @@ module Google
148
188
  extend ::Google::Protobuf::MessageExts::ClassMethods
149
189
  end
150
190
 
151
- # The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database GetDatabase}.
191
+ # The request for
192
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database GetDatabase}.
152
193
  # @!attribute [rw] name
153
194
  # @return [::String]
154
195
  # Required. The name of the requested database. Values are of the form
@@ -172,8 +213,8 @@ module Google
172
213
  # Each batch of statements is assigned a name which can be used with
173
214
  # the Operations API to monitor
174
215
  # progress. See the
175
- # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#operation_id operation_id} field for more
176
- # details.
216
+ # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#operation_id operation_id}
217
+ # field for more details.
177
218
  # @!attribute [rw] database
178
219
  # @return [::String]
179
220
  # Required. The database to update.
@@ -189,18 +230,20 @@ module Google
189
230
  #
190
231
  # Specifying an explicit operation ID simplifies determining
191
232
  # whether the statements were executed in the event that the
192
- # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl} call is replayed,
193
- # or the return value is otherwise lost: the {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#database database} and
194
- # `operation_id` fields can be combined to form the
233
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}
234
+ # call is replayed, or the return value is otherwise lost: the
235
+ # {::Google::Cloud::Spanner::Admin::Database::V1::UpdateDatabaseDdlRequest#database database}
236
+ # and `operation_id` fields can be combined to form the
195
237
  # {::Google::Longrunning::Operation#name name} of the resulting
196
- # {::Google::Longrunning::Operation longrunning.Operation}: `<database>/operations/<operation_id>`.
238
+ # {::Google::Longrunning::Operation longrunning.Operation}:
239
+ # `<database>/operations/<operation_id>`.
197
240
  #
198
241
  # `operation_id` should be unique within the database, and must be
199
242
  # a valid identifier: `[a-z][a-z0-9_]*`. Note that
200
243
  # automatically-generated operation IDs always begin with an
201
244
  # underscore. If the named operation already exists,
202
- # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl} returns
203
- # `ALREADY_EXISTS`.
245
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_database_ddl UpdateDatabaseDdl}
246
+ # returns `ALREADY_EXISTS`.
204
247
  class UpdateDatabaseDdlRequest
205
248
  include ::Google::Protobuf::MessageExts
206
249
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -230,7 +273,8 @@ module Google
230
273
  extend ::Google::Protobuf::MessageExts::ClassMethods
231
274
  end
232
275
 
233
- # The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#drop_database DropDatabase}.
276
+ # The request for
277
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#drop_database DropDatabase}.
234
278
  # @!attribute [rw] database
235
279
  # @return [::String]
236
280
  # Required. The database to be dropped.
@@ -239,16 +283,20 @@ module Google
239
283
  extend ::Google::Protobuf::MessageExts::ClassMethods
240
284
  end
241
285
 
242
- # The request for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database_ddl GetDatabaseDdl}.
286
+ # The request for
287
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database_ddl GetDatabaseDdl}.
243
288
  # @!attribute [rw] database
244
289
  # @return [::String]
245
290
  # Required. The database whose schema we wish to get.
291
+ # Values are of the form
292
+ # `projects/<project>/instances/<instance>/databases/<database>`
246
293
  class GetDatabaseDdlRequest
247
294
  include ::Google::Protobuf::MessageExts
248
295
  extend ::Google::Protobuf::MessageExts::ClassMethods
249
296
  end
250
297
 
251
- # The response for {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database_ddl GetDatabaseDdl}.
298
+ # The response for
299
+ # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_database_ddl GetDatabaseDdl}.
252
300
  # @!attribute [rw] statements
253
301
  # @return [::Array<::String>]
254
302
  # A list of formatted DDL statements defining the schema of the database
@@ -280,7 +328,9 @@ module Google
280
328
  # * `name` - The name of the long-running operation
281
329
  # * `done` - False if the operation is in progress, else true.
282
330
  # * `metadata.@type` - the type of metadata. For example, the type string
283
- # for {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata} is
331
+ # for
332
+ # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}
333
+ # is
284
334
  # `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`.
285
335
  # * `metadata.<field_name>` - any field in metadata.value.
286
336
  # * `error` - Error associated with the long-running operation.
@@ -294,13 +344,14 @@ module Google
294
344
  # Here are a few examples:
295
345
  #
296
346
  # * `done:true` - The operation is complete.
297
- # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` <br/>
298
- # `(metadata.source_type:BACKUP) AND` <br/>
299
- # `(metadata.backup_info.backup:backup_howl) AND` <br/>
300
- # `(metadata.name:restored_howl) AND` <br/>
301
- # `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` <br/>
347
+ # * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \
348
+ # `(metadata.source_type:BACKUP) AND` \
349
+ # `(metadata.backup_info.backup:backup_howl) AND` \
350
+ # `(metadata.name:restored_howl) AND` \
351
+ # `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
302
352
  # `(error:*)` - Return operations where:
303
- # * The operation's metadata type is {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}.
353
+ # * The operation's metadata type is
354
+ # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}.
304
355
  # * The database is restored from a backup.
305
356
  # * The backup name contains "backup_howl".
306
357
  # * The restored database's name contains "restored_howl".
@@ -314,8 +365,9 @@ module Google
314
365
  # @return [::String]
315
366
  # If non-empty, `page_token` should contain a
316
367
  # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse#next_page_token next_page_token}
317
- # from a previous {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse ListDatabaseOperationsResponse} to the
318
- # same `parent` and with the same `filter`.
368
+ # from a previous
369
+ # {::Google::Cloud::Spanner::Admin::Database::V1::ListDatabaseOperationsResponse ListDatabaseOperationsResponse}
370
+ # to the same `parent` and with the same `filter`.
319
371
  class ListDatabaseOperationsRequest
320
372
  include ::Google::Protobuf::MessageExts
321
373
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -359,11 +411,53 @@ module Google
359
411
  # @return [::String]
360
412
  # Name of the backup from which to restore. Values are of the form
361
413
  # `projects/<project>/instances/<instance>/backups/<backup>`.
414
+ # @!attribute [rw] encryption_config
415
+ # @return [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig]
416
+ # Optional. An encryption configuration describing the encryption type and
417
+ # key resources in Cloud KMS used to encrypt/decrypt the database to restore
418
+ # to. If this field is not specified, the restored database will use the same
419
+ # encryption configuration as the backup by default, namely
420
+ # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type}
421
+ # = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
362
422
  class RestoreDatabaseRequest
363
423
  include ::Google::Protobuf::MessageExts
364
424
  extend ::Google::Protobuf::MessageExts::ClassMethods
365
425
  end
366
426
 
427
+ # Encryption configuration for the restored database.
428
+ # @!attribute [rw] encryption_type
429
+ # @return [::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig::EncryptionType]
430
+ # Required. The encryption type of the restored database.
431
+ # @!attribute [rw] kms_key_name
432
+ # @return [::String]
433
+ # Optional. The Cloud KMS key that will be used to encrypt/decrypt the
434
+ # restored database. This field should be set only when
435
+ # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig#encryption_type encryption_type}
436
+ # is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
437
+ # `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
438
+ class RestoreDatabaseEncryptionConfig
439
+ include ::Google::Protobuf::MessageExts
440
+ extend ::Google::Protobuf::MessageExts::ClassMethods
441
+
442
+ # Encryption types for the database to be restored.
443
+ module EncryptionType
444
+ # Unspecified. Do not use.
445
+ ENCRYPTION_TYPE_UNSPECIFIED = 0
446
+
447
+ # This is the default option when
448
+ # {::Google::Cloud::Spanner::Admin::Database::V1::RestoreDatabaseEncryptionConfig encryption_config}
449
+ # is not specified.
450
+ USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION = 1
451
+
452
+ # Use Google default encryption.
453
+ GOOGLE_DEFAULT_ENCRYPTION = 2
454
+
455
+ # Use customer managed encryption. If specified, `kms_key_name` must
456
+ # must contain a valid Cloud KMS key.
457
+ CUSTOMER_MANAGED_ENCRYPTION = 3
458
+ end
459
+ end
460
+
367
461
  # Metadata type for the long-running operation returned by
368
462
  # {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#restore_database RestoreDatabase}.
369
463
  # @!attribute [rw] name
@@ -392,7 +486,8 @@ module Google
392
486
  # operation completed despite cancellation. On successful cancellation,
393
487
  # the operation is not deleted; instead, it becomes an operation with
394
488
  # an {::Google::Longrunning::Operation#error Operation.error} value with a
395
- # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to `Code.CANCELLED`.
489
+ # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to
490
+ # `Code.CANCELLED`.
396
491
  # @!attribute [rw] optimize_database_operation_name
397
492
  # @return [::String]
398
493
  # If exists, the name of the long-running operation that will be used to
@@ -402,10 +497,10 @@ module Google
402
497
  # `projects/<project>/instances/<instance>/databases/<database>/operations/<operation>`
403
498
  # where the <database> is the name of database being created and restored to.
404
499
  # The metadata type of the long-running operation is
405
- # {::Google::Cloud::Spanner::Admin::Database::V1::OptimizeRestoredDatabaseMetadata OptimizeRestoredDatabaseMetadata}. This long-running operation will be
406
- # automatically created by the system after the RestoreDatabase long-running
407
- # operation completes successfully. This operation will not be created if the
408
- # restore was not successful.
500
+ # {::Google::Cloud::Spanner::Admin::Database::V1::OptimizeRestoredDatabaseMetadata OptimizeRestoredDatabaseMetadata}.
501
+ # This long-running operation will be automatically created by the system
502
+ # after the RestoreDatabase long-running operation completes successfully.
503
+ # This operation will not be created if the restore was not successful.
409
504
  class RestoreDatabaseMetadata
410
505
  include ::Google::Protobuf::MessageExts
411
506
  extend ::Google::Protobuf::MessageExts::ClassMethods
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.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-12-02 00:00:00.000000000 Z
11
+ date: 2021-04-05 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 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.4'
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.1.4
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