google-cloud-spanner-admin-database-v1 0.18.0 → 0.20.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/client.rb +658 -90
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/operations.rb +13 -5
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/paths.rb +21 -0
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/client.rb +623 -90
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/operations.rb +11 -4
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/rest/service_stub.rb +321 -0
- data/lib/google/cloud/spanner/admin/database/v1/database_admin/rest.rb +1 -1
- data/lib/google/cloud/spanner/admin/database/v1/database_admin.rb +1 -1
- data/lib/google/cloud/spanner/admin/database/v1/version.rb +1 -1
- data/lib/google/spanner/admin/database/v1/backup_pb.rb +2 -1
- data/lib/google/spanner/admin/database/v1/backup_schedule_pb.rb +65 -0
- data/lib/google/spanner/admin/database/v1/common_pb.rb +1 -1
- data/lib/google/spanner/admin/database/v1/spanner_database_admin_pb.rb +2 -1
- data/lib/google/spanner/admin/database/v1/spanner_database_admin_services_pb.rb +31 -16
- data/proto_docs/google/api/client.rb +4 -0
- data/proto_docs/google/spanner/admin/database/v1/backup.rb +158 -69
- data/proto_docs/google/spanner/admin/database/v1/backup_schedule.rb +213 -0
- data/proto_docs/google/spanner/admin/database/v1/common.rb +23 -6
- data/proto_docs/google/spanner/admin/database/v1/spanner_database_admin.rb +91 -54
- metadata +4 -2
@@ -26,10 +26,10 @@ module Google
|
|
26
26
|
# A backup of a Cloud Spanner database.
|
27
27
|
# @!attribute [rw] database
|
28
28
|
# @return [::String]
|
29
|
-
# Required for the
|
30
|
-
#
|
31
|
-
#
|
32
|
-
# Values are of the form
|
29
|
+
# Required for the
|
30
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
|
31
|
+
# operation. Name of the database from which this backup was created. This
|
32
|
+
# needs to be in the same instance as the backup. Values are of the form
|
33
33
|
# `projects/<project>/instances/<instance>/databases/<database>`.
|
34
34
|
# @!attribute [rw] version_time
|
35
35
|
# @return [::Google::Protobuf::Timestamp]
|
@@ -39,7 +39,8 @@ module Google
|
|
39
39
|
# backup.
|
40
40
|
# @!attribute [rw] expire_time
|
41
41
|
# @return [::Google::Protobuf::Timestamp]
|
42
|
-
# Required for the
|
42
|
+
# Required for the
|
43
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
|
43
44
|
# operation. The expiration time of the backup, with microseconds
|
44
45
|
# granularity that must be at least 6 hours and at most 366 days
|
45
46
|
# from the time the CreateBackup request is processed. Once the `expire_time`
|
@@ -47,8 +48,11 @@ module Google
|
|
47
48
|
# Spanner to free the resources used by the backup.
|
48
49
|
# @!attribute [rw] name
|
49
50
|
# @return [::String]
|
50
|
-
# Output only for the
|
51
|
-
#
|
51
|
+
# Output only for the
|
52
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
|
53
|
+
# operation. Required for the
|
54
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup UpdateBackup}
|
55
|
+
# operation.
|
52
56
|
#
|
53
57
|
# A globally unique identifier for the backup which cannot be
|
54
58
|
# changed. Values are of the form
|
@@ -62,7 +66,8 @@ module Google
|
|
62
66
|
# `projects/<project>/instances/<instance>`.
|
63
67
|
# @!attribute [r] create_time
|
64
68
|
# @return [::Google::Protobuf::Timestamp]
|
65
|
-
# Output only. The time the
|
69
|
+
# Output only. The time the
|
70
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
|
66
71
|
# request is received. If the request does not specify `version_time`, the
|
67
72
|
# `version_time` of the backup will be equivalent to the `create_time`.
|
68
73
|
# @!attribute [r] size_bytes
|
@@ -83,6 +88,14 @@ module Google
|
|
83
88
|
# @!attribute [r] encryption_info
|
84
89
|
# @return [::Google::Cloud::Spanner::Admin::Database::V1::EncryptionInfo]
|
85
90
|
# Output only. The encryption information for the backup.
|
91
|
+
# @!attribute [r] encryption_information
|
92
|
+
# @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::EncryptionInfo>]
|
93
|
+
# Output only. The encryption information for the backup, whether it is
|
94
|
+
# protected by one or more KMS keys. The information includes all Cloud
|
95
|
+
# KMS key versions used to encrypt the backup. The `encryption_status' field
|
96
|
+
# inside of each `EncryptionInfo` is not populated. At least one of the key
|
97
|
+
# versions must be available for the backup to be restored. If a key version
|
98
|
+
# is revoked in the middle of a restore, the restore behavior is undefined.
|
86
99
|
# @!attribute [r] database_dialect
|
87
100
|
# @return [::Google::Cloud::Spanner::Admin::Database::V1::DatabaseDialect]
|
88
101
|
# Output only. The database dialect information for the backup.
|
@@ -102,6 +115,17 @@ module Google
|
|
102
115
|
# multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or
|
103
116
|
# copying an existing backup, the expiration time specified must be
|
104
117
|
# less than `Backup.max_expire_time`.
|
118
|
+
# @!attribute [r] backup_schedules
|
119
|
+
# @return [::Array<::String>]
|
120
|
+
# Output only. List of backup schedule URIs that are associated with
|
121
|
+
# creating this backup. This is only applicable for scheduled backups, and
|
122
|
+
# is empty for on-demand backups.
|
123
|
+
#
|
124
|
+
# To optimize for storage, whenever possible, multiple schedules are
|
125
|
+
# collapsed together to create one backup. In such cases, this field captures
|
126
|
+
# the list of all backup schedule URIs that are associated with creating
|
127
|
+
# this backup. If collapsing is not done, then this field captures the
|
128
|
+
# single backup schedule URI associated with creating this backup.
|
105
129
|
class Backup
|
106
130
|
include ::Google::Protobuf::MessageExts
|
107
131
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -120,7 +144,8 @@ module Google
|
|
120
144
|
end
|
121
145
|
end
|
122
146
|
|
123
|
-
# The request for
|
147
|
+
# The request for
|
148
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}.
|
124
149
|
# @!attribute [rw] parent
|
125
150
|
# @return [::String]
|
126
151
|
# Required. The name of the instance in which the backup will be
|
@@ -139,11 +164,11 @@ module Google
|
|
139
164
|
# Required. The backup to create.
|
140
165
|
# @!attribute [rw] encryption_config
|
141
166
|
# @return [::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig]
|
142
|
-
# Optional. The encryption configuration used to encrypt the backup. If this
|
143
|
-
# not specified, the backup will use the same
|
144
|
-
#
|
145
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type}
|
146
|
-
# `USE_DATABASE_ENCRYPTION`.
|
167
|
+
# Optional. The encryption configuration used to encrypt the backup. If this
|
168
|
+
# field is not specified, the backup will use the same encryption
|
169
|
+
# configuration as the database by default, namely
|
170
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type}
|
171
|
+
# = `USE_DATABASE_ENCRYPTION`.
|
147
172
|
class CreateBackupRequest
|
148
173
|
include ::Google::Protobuf::MessageExts
|
149
174
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -160,7 +185,8 @@ module Google
|
|
160
185
|
# @!attribute [rw] progress
|
161
186
|
# @return [::Google::Cloud::Spanner::Admin::Database::V1::OperationProgress]
|
162
187
|
# The progress of the
|
163
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
|
188
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
|
189
|
+
# operation.
|
164
190
|
# @!attribute [rw] cancel_time
|
165
191
|
# @return [::Google::Protobuf::Timestamp]
|
166
192
|
# The time at which cancellation of this operation was received.
|
@@ -180,11 +206,12 @@ module Google
|
|
180
206
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
181
207
|
end
|
182
208
|
|
183
|
-
# The request for
|
209
|
+
# The request for
|
210
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#copy_backup CopyBackup}.
|
184
211
|
# @!attribute [rw] parent
|
185
212
|
# @return [::String]
|
186
|
-
# Required. The name of the destination instance that will contain the backup
|
187
|
-
# Values are of the form: `projects/<project>/instances/<instance>`.
|
213
|
+
# Required. The name of the destination instance that will contain the backup
|
214
|
+
# copy. Values are of the form: `projects/<project>/instances/<instance>`.
|
188
215
|
# @!attribute [rw] backup_id
|
189
216
|
# @return [::String]
|
190
217
|
# Required. The id of the backup copy.
|
@@ -207,17 +234,17 @@ module Google
|
|
207
234
|
# to free the resources used by the backup.
|
208
235
|
# @!attribute [rw] encryption_config
|
209
236
|
# @return [::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig]
|
210
|
-
# Optional. The encryption configuration used to encrypt the backup. If this
|
211
|
-
# not specified, the backup will use the same
|
212
|
-
#
|
213
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig#encryption_type encryption_type}
|
214
|
-
# `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
|
237
|
+
# Optional. The encryption configuration used to encrypt the backup. If this
|
238
|
+
# field is not specified, the backup will use the same encryption
|
239
|
+
# configuration as the source backup by default, namely
|
240
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig#encryption_type encryption_type}
|
241
|
+
# = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
|
215
242
|
class CopyBackupRequest
|
216
243
|
include ::Google::Protobuf::MessageExts
|
217
244
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
218
245
|
end
|
219
246
|
|
220
|
-
# Metadata type for the
|
247
|
+
# Metadata type for the operation returned by
|
221
248
|
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#copy_backup CopyBackup}.
|
222
249
|
# @!attribute [rw] name
|
223
250
|
# @return [::String]
|
@@ -232,7 +259,8 @@ module Google
|
|
232
259
|
# @!attribute [rw] progress
|
233
260
|
# @return [::Google::Cloud::Spanner::Admin::Database::V1::OperationProgress]
|
234
261
|
# The progress of the
|
235
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#copy_backup CopyBackup}
|
262
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#copy_backup CopyBackup}
|
263
|
+
# operation.
|
236
264
|
# @!attribute [rw] cancel_time
|
237
265
|
# @return [::Google::Protobuf::Timestamp]
|
238
266
|
# The time at which cancellation of CopyBackup operation was received.
|
@@ -252,7 +280,8 @@ module Google
|
|
252
280
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
253
281
|
end
|
254
282
|
|
255
|
-
# The request for
|
283
|
+
# The request for
|
284
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#update_backup UpdateBackup}.
|
256
285
|
# @!attribute [rw] backup
|
257
286
|
# @return [::Google::Cloud::Spanner::Admin::Database::V1::Backup]
|
258
287
|
# Required. The backup to update. `backup.name`, and the fields to be updated
|
@@ -271,7 +300,8 @@ module Google
|
|
271
300
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
272
301
|
end
|
273
302
|
|
274
|
-
# The request for
|
303
|
+
# The request for
|
304
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#get_backup GetBackup}.
|
275
305
|
# @!attribute [rw] name
|
276
306
|
# @return [::String]
|
277
307
|
# Required. Name of the backup.
|
@@ -282,7 +312,8 @@ module Google
|
|
282
312
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
283
313
|
end
|
284
314
|
|
285
|
-
# The request for
|
315
|
+
# The request for
|
316
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#delete_backup DeleteBackup}.
|
286
317
|
# @!attribute [rw] name
|
287
318
|
# @return [::String]
|
288
319
|
# Required. Name of the backup to delete.
|
@@ -293,7 +324,8 @@ module Google
|
|
293
324
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
294
325
|
end
|
295
326
|
|
296
|
-
# The request for
|
327
|
+
# The request for
|
328
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups}.
|
297
329
|
# @!attribute [rw] parent
|
298
330
|
# @return [::String]
|
299
331
|
# Required. The instance to list backups from. Values are of the
|
@@ -308,7 +340,9 @@ module Google
|
|
308
340
|
# must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
|
309
341
|
# Colon `:` is the contains operator. Filter rules are not case sensitive.
|
310
342
|
#
|
311
|
-
# The following fields in the
|
343
|
+
# The following fields in the
|
344
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::Backup Backup} are eligible for
|
345
|
+
# filtering:
|
312
346
|
#
|
313
347
|
# * `name`
|
314
348
|
# * `database`
|
@@ -342,15 +376,17 @@ module Google
|
|
342
376
|
# @!attribute [rw] page_token
|
343
377
|
# @return [::String]
|
344
378
|
# If non-empty, `page_token` should contain a
|
345
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse#next_page_token next_page_token}
|
346
|
-
#
|
347
|
-
#
|
379
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse#next_page_token next_page_token}
|
380
|
+
# from a previous
|
381
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupsResponse ListBackupsResponse}
|
382
|
+
# to the same `parent` and with the same `filter`.
|
348
383
|
class ListBackupsRequest
|
349
384
|
include ::Google::Protobuf::MessageExts
|
350
385
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
351
386
|
end
|
352
387
|
|
353
|
-
# The response for
|
388
|
+
# The response for
|
389
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups}.
|
354
390
|
# @!attribute [rw] backups
|
355
391
|
# @return [::Array<::Google::Cloud::Spanner::Admin::Database::V1::Backup>]
|
356
392
|
# The list of matching backups. Backups returned are ordered by `create_time`
|
@@ -358,8 +394,8 @@ module Google
|
|
358
394
|
# @!attribute [rw] next_page_token
|
359
395
|
# @return [::String]
|
360
396
|
# `next_page_token` can be sent in a subsequent
|
361
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups}
|
362
|
-
# of the matching backups.
|
397
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#list_backups ListBackups}
|
398
|
+
# call to fetch more of the matching backups.
|
363
399
|
class ListBackupsResponse
|
364
400
|
include ::Google::Protobuf::MessageExts
|
365
401
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -387,7 +423,9 @@ module Google
|
|
387
423
|
# * `name` - The name of the long-running operation
|
388
424
|
# * `done` - False if the operation is in progress, else true.
|
389
425
|
# * `metadata.@type` - the type of metadata. For example, the type string
|
390
|
-
# for
|
426
|
+
# for
|
427
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}
|
428
|
+
# is
|
391
429
|
# `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`.
|
392
430
|
# * `metadata.<field_name>` - any field in metadata.value.
|
393
431
|
# `metadata.@type` must be specified first if filtering on metadata
|
@@ -405,14 +443,15 @@ module Google
|
|
405
443
|
# * `done:true` - The operation is complete.
|
406
444
|
# * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
|
407
445
|
# `metadata.database:prod` - Returns operations where:
|
408
|
-
# * The operation's metadata type is
|
409
|
-
#
|
410
|
-
# string "prod".
|
446
|
+
# * The operation's metadata type is
|
447
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
|
448
|
+
# * The source database name of backup contains the string "prod".
|
411
449
|
# * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
|
412
450
|
# `(metadata.name:howl) AND` \
|
413
451
|
# `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
|
414
452
|
# `(error:*)` - Returns operations where:
|
415
|
-
# * The operation's metadata type is
|
453
|
+
# * The operation's metadata type is
|
454
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}.
|
416
455
|
# * The backup name contains the string "howl".
|
417
456
|
# * The operation started before 2018-03-28T14:50:00Z.
|
418
457
|
# * The operation resulted in an error.
|
@@ -420,9 +459,9 @@ module Google
|
|
420
459
|
# `(metadata.source_backup:test) AND` \
|
421
460
|
# `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \
|
422
461
|
# `(error:*)` - Returns operations where:
|
423
|
-
# * The operation's metadata type is
|
424
|
-
#
|
425
|
-
# "test".
|
462
|
+
# * The operation's metadata type is
|
463
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata}.
|
464
|
+
# * The source backup name contains the string "test".
|
426
465
|
# * The operation started before 2022-01-18T14:50:00Z.
|
427
466
|
# * The operation resulted in an error.
|
428
467
|
# * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
|
@@ -432,12 +471,13 @@ module Google
|
|
432
471
|
# `(metadata.source_backup:test_bkp)) AND` \
|
433
472
|
# `(error:*)` - Returns operations where:
|
434
473
|
# * The operation's metadata matches either of criteria:
|
435
|
-
# * The operation's metadata type is
|
436
|
-
#
|
474
|
+
# * The operation's metadata type is
|
475
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupMetadata CreateBackupMetadata}
|
476
|
+
# AND the source database name of the backup contains the string
|
437
477
|
# "test_db"
|
438
|
-
# * The operation's metadata type is
|
439
|
-
#
|
440
|
-
# "test_bkp"
|
478
|
+
# * The operation's metadata type is
|
479
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupMetadata CopyBackupMetadata}
|
480
|
+
# AND the source backup name contains the string "test_bkp"
|
441
481
|
# * The operation resulted in an error.
|
442
482
|
# @!attribute [rw] page_size
|
443
483
|
# @return [::Integer]
|
@@ -447,8 +487,9 @@ module Google
|
|
447
487
|
# @return [::String]
|
448
488
|
# If non-empty, `page_token` should contain a
|
449
489
|
# {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse#next_page_token next_page_token}
|
450
|
-
# from a previous
|
451
|
-
#
|
490
|
+
# from a previous
|
491
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::ListBackupOperationsResponse ListBackupOperationsResponse}
|
492
|
+
# to the same `parent` and with the same `filter`.
|
452
493
|
class ListBackupOperationsRequest
|
453
494
|
include ::Google::Protobuf::MessageExts
|
454
495
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -485,13 +526,14 @@ module Google
|
|
485
526
|
# @return [::Google::Protobuf::Timestamp]
|
486
527
|
# The backup contains an externally consistent copy of `source_database` at
|
487
528
|
# the timestamp specified by `version_time`. If the
|
488
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
|
489
|
-
# `version_time`, the `version_time` of the backup is
|
490
|
-
# `create_time`.
|
529
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
|
530
|
+
# request did not specify `version_time`, the `version_time` of the backup is
|
531
|
+
# equivalent to the `create_time`.
|
491
532
|
# @!attribute [rw] create_time
|
492
533
|
# @return [::Google::Protobuf::Timestamp]
|
493
|
-
# The time the
|
494
|
-
#
|
534
|
+
# The time the
|
535
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#create_backup CreateBackup}
|
536
|
+
# request was received.
|
495
537
|
# @!attribute [rw] source_database
|
496
538
|
# @return [::String]
|
497
539
|
# Name of the database the backup was created from.
|
@@ -508,9 +550,26 @@ module Google
|
|
508
550
|
# @return [::String]
|
509
551
|
# Optional. The Cloud KMS key that will be used to protect the backup.
|
510
552
|
# This field should be set only when
|
511
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type}
|
512
|
-
# `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
|
553
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig#encryption_type encryption_type}
|
554
|
+
# is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
|
513
555
|
# `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
|
556
|
+
# @!attribute [rw] kms_key_names
|
557
|
+
# @return [::Array<::String>]
|
558
|
+
# Optional. Specifies the KMS configuration for the one or more keys used to
|
559
|
+
# protect the backup. Values are of the form
|
560
|
+
# `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
|
561
|
+
#
|
562
|
+
# The keys referenced by kms_key_names must fully cover all
|
563
|
+
# regions of the backup's instance configuration. Some examples:
|
564
|
+
# * For single region instance configs, specify a single regional
|
565
|
+
# location KMS key.
|
566
|
+
# * For multi-regional instance configs of type GOOGLE_MANAGED,
|
567
|
+
# either specify a multi-regional location KMS key or multiple regional
|
568
|
+
# location KMS keys that cover all regions in the instance config.
|
569
|
+
# * For an instance config of type USER_MANAGED, please specify only
|
570
|
+
# regional location KMS keys to cover each region in the instance config.
|
571
|
+
# Multi-regional location KMS keys are not supported for USER_MANAGED
|
572
|
+
# instance configs.
|
514
573
|
class CreateBackupEncryptionConfig
|
515
574
|
include ::Google::Protobuf::MessageExts
|
516
575
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -522,9 +581,10 @@ module Google
|
|
522
581
|
|
523
582
|
# Use the same encryption configuration as the database. This is the
|
524
583
|
# default option when
|
525
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig encryption_config}
|
526
|
-
# For example, if the database is using
|
527
|
-
# backup will be using the same Cloud
|
584
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::CreateBackupEncryptionConfig encryption_config}
|
585
|
+
# is empty. For example, if the database is using
|
586
|
+
# `Customer_Managed_Encryption`, the backup will be using the same Cloud
|
587
|
+
# KMS key as the database.
|
528
588
|
USE_DATABASE_ENCRYPTION = 1
|
529
589
|
|
530
590
|
# Use Google default encryption.
|
@@ -544,9 +604,27 @@ module Google
|
|
544
604
|
# @return [::String]
|
545
605
|
# Optional. The Cloud KMS key that will be used to protect the backup.
|
546
606
|
# This field should be set only when
|
547
|
-
# {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig#encryption_type encryption_type}
|
548
|
-
# `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
|
607
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig#encryption_type encryption_type}
|
608
|
+
# is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
|
549
609
|
# `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
|
610
|
+
# @!attribute [rw] kms_key_names
|
611
|
+
# @return [::Array<::String>]
|
612
|
+
# Optional. Specifies the KMS configuration for the one or more keys used to
|
613
|
+
# protect the backup. Values are of the form
|
614
|
+
# `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
|
615
|
+
# Kms keys specified can be in any order.
|
616
|
+
#
|
617
|
+
# The keys referenced by kms_key_names must fully cover all
|
618
|
+
# regions of the backup's instance configuration. Some examples:
|
619
|
+
# * For single region instance configs, specify a single regional
|
620
|
+
# location KMS key.
|
621
|
+
# * For multi-regional instance configs of type GOOGLE_MANAGED,
|
622
|
+
# either specify a multi-regional location KMS key or multiple regional
|
623
|
+
# location KMS keys that cover all regions in the instance config.
|
624
|
+
# * For an instance config of type USER_MANAGED, please specify only
|
625
|
+
# regional location KMS keys to cover each region in the instance config.
|
626
|
+
# Multi-regional location KMS keys are not supported for USER_MANAGED
|
627
|
+
# instance configs.
|
550
628
|
class CopyBackupEncryptionConfig
|
551
629
|
include ::Google::Protobuf::MessageExts
|
552
630
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -556,20 +634,31 @@ module Google
|
|
556
634
|
# Unspecified. Do not use.
|
557
635
|
ENCRYPTION_TYPE_UNSPECIFIED = 0
|
558
636
|
|
559
|
-
# This is the default option for
|
560
|
-
#
|
561
|
-
#
|
562
|
-
#
|
637
|
+
# This is the default option for
|
638
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::DatabaseAdmin::Client#copy_backup CopyBackup}
|
639
|
+
# when
|
640
|
+
# {::Google::Cloud::Spanner::Admin::Database::V1::CopyBackupEncryptionConfig encryption_config}
|
641
|
+
# is not specified. For example, if the source backup is using
|
642
|
+
# `Customer_Managed_Encryption`, the backup will be using the same Cloud
|
643
|
+
# KMS key as the source backup.
|
563
644
|
USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION = 1
|
564
645
|
|
565
646
|
# Use Google default encryption.
|
566
647
|
GOOGLE_DEFAULT_ENCRYPTION = 2
|
567
648
|
|
568
|
-
# Use customer managed encryption. If specified, `kms_key_name`
|
569
|
-
# must contain
|
649
|
+
# Use customer managed encryption. If specified, either `kms_key_name` or
|
650
|
+
# `kms_key_names` must contain valid Cloud KMS key(s).
|
570
651
|
CUSTOMER_MANAGED_ENCRYPTION = 3
|
571
652
|
end
|
572
653
|
end
|
654
|
+
|
655
|
+
# The specification for full backups.
|
656
|
+
# A full backup stores the entire contents of the database at a given
|
657
|
+
# version time.
|
658
|
+
class FullBackupSpec
|
659
|
+
include ::Google::Protobuf::MessageExts
|
660
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
661
|
+
end
|
573
662
|
end
|
574
663
|
end
|
575
664
|
end
|