@google-cloud/spanner 7.17.1 → 7.18.0

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.
Files changed (81) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/package.json +1 -1
  3. package/build/protos/google/spanner/admin/database/v1/backup.proto +0 -757
  4. package/build/protos/google/spanner/admin/database/v1/backup_schedule.proto +0 -230
  5. package/build/protos/google/spanner/admin/database/v1/common.proto +0 -132
  6. package/build/protos/google/spanner/admin/database/v1/spanner_database_admin.proto +0 -1209
  7. package/build/protos/google/spanner/admin/instance/v1/common.proto +0 -63
  8. package/build/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto +0 -1983
  9. package/build/protos/google/spanner/executor/v1/cloud_executor.proto +0 -1520
  10. package/build/protos/google/spanner/v1/commit_response.proto +0 -59
  11. package/build/protos/google/spanner/v1/keys.proto +0 -163
  12. package/build/protos/google/spanner/v1/mutation.proto +0 -107
  13. package/build/protos/google/spanner/v1/query_plan.proto +0 -128
  14. package/build/protos/google/spanner/v1/result_set.proto +0 -237
  15. package/build/protos/google/spanner/v1/spanner.proto +0 -1389
  16. package/build/protos/google/spanner/v1/transaction.proto +0 -575
  17. package/build/protos/google/spanner/v1/type.proto +0 -210
  18. package/build/protos/protos.d.ts +0 -38999
  19. package/build/protos/protos.js +0 -99538
  20. package/build/protos/protos.json +0 -10182
  21. package/build/src/backup.d.ts +0 -349
  22. package/build/src/backup.js +0 -246
  23. package/build/src/batch-transaction.d.ts +0 -247
  24. package/build/src/batch-transaction.js +0 -384
  25. package/build/src/codec.d.ts +0 -362
  26. package/build/src/codec.js +0 -791
  27. package/build/src/common-grpc/service-object.d.ts +0 -80
  28. package/build/src/common-grpc/service-object.js +0 -101
  29. package/build/src/common-grpc/service.d.ts +0 -445
  30. package/build/src/common-grpc/service.js +0 -826
  31. package/build/src/common.d.ts +0 -66
  32. package/build/src/common.js +0 -54
  33. package/build/src/database.d.ts +0 -2104
  34. package/build/src/database.js +0 -1655
  35. package/build/src/extra_proto_list.json +0 -1
  36. package/build/src/helper.d.ts +0 -45
  37. package/build/src/helper.js +0 -71
  38. package/build/src/index.d.ts +0 -1195
  39. package/build/src/index.js +0 -1059
  40. package/build/src/instance-config.d.ts +0 -295
  41. package/build/src/instance-config.js +0 -216
  42. package/build/src/instance.d.ts +0 -833
  43. package/build/src/instance.js +0 -781
  44. package/build/src/instrument.d.ts +0 -85
  45. package/build/src/instrument.js +0 -212
  46. package/build/src/multiplexed-session.d.ts +0 -136
  47. package/build/src/multiplexed-session.js +0 -197
  48. package/build/src/partial-result-stream.d.ts +0 -253
  49. package/build/src/partial-result-stream.js +0 -400
  50. package/build/src/session-factory.d.ts +0 -101
  51. package/build/src/session-factory.js +0 -93
  52. package/build/src/session-pool.d.ts +0 -471
  53. package/build/src/session-pool.js +0 -754
  54. package/build/src/session.d.ts +0 -259
  55. package/build/src/session.js +0 -348
  56. package/build/src/spanner_grpc_config.json +0 -92
  57. package/build/src/table.d.ts +0 -831
  58. package/build/src/table.js +0 -277
  59. package/build/src/transaction-runner.d.ts +0 -185
  60. package/build/src/transaction-runner.js +0 -282
  61. package/build/src/transaction.d.ts +0 -1691
  62. package/build/src/transaction.js +0 -2004
  63. package/build/src/v1/database_admin_client.d.ts +0 -2301
  64. package/build/src/v1/database_admin_client.js +0 -2286
  65. package/build/src/v1/database_admin_client_config.json +0 -160
  66. package/build/src/v1/database_admin_proto_list.json +0 -6
  67. package/build/src/v1/gapic_metadata.json +0 -27
  68. package/build/src/v1/index.d.ts +0 -4
  69. package/build/src/v1/index.js +0 -29
  70. package/build/src/v1/instance_admin_client.d.ts +0 -1982
  71. package/build/src/v1/instance_admin_client.js +0 -1766
  72. package/build/src/v1/instance_admin_client_config.json +0 -129
  73. package/build/src/v1/instance_admin_proto_list.json +0 -4
  74. package/build/src/v1/spanner_client.d.ts +0 -1250
  75. package/build/src/v1/spanner_client.js +0 -1086
  76. package/build/src/v1/spanner_client_config.json +0 -119
  77. package/build/src/v1/spanner_executor_proxy_client.d.ts +0 -418
  78. package/build/src/v1/spanner_executor_proxy_client.js +0 -706
  79. package/build/src/v1/spanner_executor_proxy_client_config.json +0 -30
  80. package/build/src/v1/spanner_executor_proxy_proto_list.json +0 -14
  81. package/build/src/v1/spanner_proto_list.json +0 -10
@@ -1,757 +0,0 @@
1
- // Copyright 2024 Google LLC
2
- //
3
- // Licensed under the Apache License, Version 2.0 (the "License");
4
- // you may not use this file except in compliance with the License.
5
- // You may obtain a copy of the License at
6
- //
7
- // http://www.apache.org/licenses/LICENSE-2.0
8
- //
9
- // Unless required by applicable law or agreed to in writing, software
10
- // distributed under the License is distributed on an "AS IS" BASIS,
11
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- // See the License for the specific language governing permissions and
13
- // limitations under the License.
14
-
15
- syntax = "proto3";
16
-
17
- package google.spanner.admin.database.v1;
18
-
19
- import "google/api/field_behavior.proto";
20
- import "google/api/resource.proto";
21
- import "google/longrunning/operations.proto";
22
- import "google/protobuf/field_mask.proto";
23
- import "google/protobuf/timestamp.proto";
24
- import "google/spanner/admin/database/v1/common.proto";
25
-
26
- option csharp_namespace = "Google.Cloud.Spanner.Admin.Database.V1";
27
- option go_package = "cloud.google.com/go/spanner/admin/database/apiv1/databasepb;databasepb";
28
- option java_multiple_files = true;
29
- option java_outer_classname = "BackupProto";
30
- option java_package = "com.google.spanner.admin.database.v1";
31
- option php_namespace = "Google\\Cloud\\Spanner\\Admin\\Database\\V1";
32
- option ruby_package = "Google::Cloud::Spanner::Admin::Database::V1";
33
-
34
- // A backup of a Cloud Spanner database.
35
- message Backup {
36
- option (google.api.resource) = {
37
- type: "spanner.googleapis.com/Backup"
38
- pattern: "projects/{project}/instances/{instance}/backups/{backup}"
39
- };
40
-
41
- // Indicates the current state of the backup.
42
- enum State {
43
- // Not specified.
44
- STATE_UNSPECIFIED = 0;
45
-
46
- // The pending backup is still being created. Operations on the
47
- // backup may fail with `FAILED_PRECONDITION` in this state.
48
- CREATING = 1;
49
-
50
- // The backup is complete and ready for use.
51
- READY = 2;
52
- }
53
-
54
- // Required for the
55
- // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]
56
- // operation. Name of the database from which this backup was created. This
57
- // needs to be in the same instance as the backup. Values are of the form
58
- // `projects/<project>/instances/<instance>/databases/<database>`.
59
- string database = 2 [(google.api.resource_reference) = {
60
- type: "spanner.googleapis.com/Database"
61
- }];
62
-
63
- // The backup will contain an externally consistent copy of the database at
64
- // the timestamp specified by `version_time`. If `version_time` is not
65
- // specified, the system will set `version_time` to the `create_time` of the
66
- // backup.
67
- google.protobuf.Timestamp version_time = 9;
68
-
69
- // Required for the
70
- // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]
71
- // operation. The expiration time of the backup, with microseconds
72
- // granularity that must be at least 6 hours and at most 366 days
73
- // from the time the CreateBackup request is processed. Once the `expire_time`
74
- // has passed, the backup is eligible to be automatically deleted by Cloud
75
- // Spanner to free the resources used by the backup.
76
- google.protobuf.Timestamp expire_time = 3;
77
-
78
- // Output only for the
79
- // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]
80
- // operation. Required for the
81
- // [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup]
82
- // operation.
83
- //
84
- // A globally unique identifier for the backup which cannot be
85
- // changed. Values are of the form
86
- // `projects/<project>/instances/<instance>/backups/[a-z][a-z0-9_\-]*[a-z0-9]`
87
- // The final segment of the name must be between 2 and 60 characters
88
- // in length.
89
- //
90
- // The backup is stored in the location(s) specified in the instance
91
- // configuration of the instance containing the backup, identified
92
- // by the prefix of the backup name of the form
93
- // `projects/<project>/instances/<instance>`.
94
- string name = 1;
95
-
96
- // Output only. The time the
97
- // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]
98
- // request is received. If the request does not specify `version_time`, the
99
- // `version_time` of the backup will be equivalent to the `create_time`.
100
- google.protobuf.Timestamp create_time = 4
101
- [(google.api.field_behavior) = OUTPUT_ONLY];
102
-
103
- // Output only. Size of the backup in bytes.
104
- int64 size_bytes = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
105
-
106
- // Output only. The number of bytes that will be freed by deleting this
107
- // backup. This value will be zero if, for example, this backup is part of an
108
- // incremental backup chain and younger backups in the chain require that we
109
- // keep its data. For backups not in an incremental backup chain, this is
110
- // always the size of the backup. This value may change if backups on the same
111
- // chain get created, deleted or expired.
112
- int64 freeable_size_bytes = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
113
-
114
- // Output only. For a backup in an incremental backup chain, this is the
115
- // storage space needed to keep the data that has changed since the previous
116
- // backup. For all other backups, this is always the size of the backup. This
117
- // value may change if backups on the same chain get deleted or expired.
118
- //
119
- // This field can be used to calculate the total storage space used by a set
120
- // of backups. For example, the total space used by all backups of a database
121
- // can be computed by summing up this field.
122
- int64 exclusive_size_bytes = 16 [(google.api.field_behavior) = OUTPUT_ONLY];
123
-
124
- // Output only. The current state of the backup.
125
- State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
126
-
127
- // Output only. The names of the restored databases that reference the backup.
128
- // The database names are of
129
- // the form `projects/<project>/instances/<instance>/databases/<database>`.
130
- // Referencing databases may exist in different instances. The existence of
131
- // any referencing database prevents the backup from being deleted. When a
132
- // restored database from the backup enters the `READY` state, the reference
133
- // to the backup is removed.
134
- repeated string referencing_databases = 7 [
135
- (google.api.field_behavior) = OUTPUT_ONLY,
136
- (google.api.resource_reference) = {
137
- type: "spanner.googleapis.com/Database"
138
- }
139
- ];
140
-
141
- // Output only. The encryption information for the backup.
142
- EncryptionInfo encryption_info = 8
143
- [(google.api.field_behavior) = OUTPUT_ONLY];
144
-
145
- // Output only. The encryption information for the backup, whether it is
146
- // protected by one or more KMS keys. The information includes all Cloud
147
- // KMS key versions used to encrypt the backup. The `encryption_status' field
148
- // inside of each `EncryptionInfo` is not populated. At least one of the key
149
- // versions must be available for the backup to be restored. If a key version
150
- // is revoked in the middle of a restore, the restore behavior is undefined.
151
- repeated EncryptionInfo encryption_information = 13
152
- [(google.api.field_behavior) = OUTPUT_ONLY];
153
-
154
- // Output only. The database dialect information for the backup.
155
- DatabaseDialect database_dialect = 10
156
- [(google.api.field_behavior) = OUTPUT_ONLY];
157
-
158
- // Output only. The names of the destination backups being created by copying
159
- // this source backup. The backup names are of the form
160
- // `projects/<project>/instances/<instance>/backups/<backup>`.
161
- // Referencing backups may exist in different instances. The existence of
162
- // any referencing backup prevents the backup from being deleted. When the
163
- // copy operation is done (either successfully completed or cancelled or the
164
- // destination backup is deleted), the reference to the backup is removed.
165
- repeated string referencing_backups = 11 [
166
- (google.api.field_behavior) = OUTPUT_ONLY,
167
- (google.api.resource_reference) = { type: "spanner.googleapis.com/Backup" }
168
- ];
169
-
170
- // Output only. The max allowed expiration time of the backup, with
171
- // microseconds granularity. A backup's expiration time can be configured in
172
- // multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or
173
- // copying an existing backup, the expiration time specified must be
174
- // less than `Backup.max_expire_time`.
175
- google.protobuf.Timestamp max_expire_time = 12
176
- [(google.api.field_behavior) = OUTPUT_ONLY];
177
-
178
- // Output only. List of backup schedule URIs that are associated with
179
- // creating this backup. This is only applicable for scheduled backups, and
180
- // is empty for on-demand backups.
181
- //
182
- // To optimize for storage, whenever possible, multiple schedules are
183
- // collapsed together to create one backup. In such cases, this field captures
184
- // the list of all backup schedule URIs that are associated with creating
185
- // this backup. If collapsing is not done, then this field captures the
186
- // single backup schedule URI associated with creating this backup.
187
- repeated string backup_schedules = 14 [
188
- (google.api.field_behavior) = OUTPUT_ONLY,
189
- (google.api.resource_reference) = {
190
- type: "spanner.googleapis.com/BackupSchedule"
191
- }
192
- ];
193
-
194
- // Output only. Populated only for backups in an incremental backup chain.
195
- // Backups share the same chain id if and only if they belong to the same
196
- // incremental backup chain. Use this field to determine which backups are
197
- // part of the same incremental backup chain. The ordering of backups in the
198
- // chain can be determined by ordering the backup `version_time`.
199
- string incremental_backup_chain_id = 17
200
- [(google.api.field_behavior) = OUTPUT_ONLY];
201
-
202
- // Output only. Data deleted at a time older than this is guaranteed not to be
203
- // retained in order to support this backup. For a backup in an incremental
204
- // backup chain, this is the version time of the oldest backup that exists or
205
- // ever existed in the chain. For all other backups, this is the version time
206
- // of the backup. This field can be used to understand what data is being
207
- // retained by the backup system.
208
- google.protobuf.Timestamp oldest_version_time = 18
209
- [(google.api.field_behavior) = OUTPUT_ONLY];
210
- }
211
-
212
- // The request for
213
- // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup].
214
- message CreateBackupRequest {
215
- // Required. The name of the instance in which the backup will be
216
- // created. This must be the same instance that contains the database the
217
- // backup will be created from. The backup will be stored in the
218
- // location(s) specified in the instance configuration of this
219
- // instance. Values are of the form
220
- // `projects/<project>/instances/<instance>`.
221
- string parent = 1 [
222
- (google.api.field_behavior) = REQUIRED,
223
- (google.api.resource_reference) = {
224
- type: "spanner.googleapis.com/Instance"
225
- }
226
- ];
227
-
228
- // Required. The id of the backup to be created. The `backup_id` appended to
229
- // `parent` forms the full backup name of the form
230
- // `projects/<project>/instances/<instance>/backups/<backup_id>`.
231
- string backup_id = 2 [(google.api.field_behavior) = REQUIRED];
232
-
233
- // Required. The backup to create.
234
- Backup backup = 3 [(google.api.field_behavior) = REQUIRED];
235
-
236
- // Optional. The encryption configuration used to encrypt the backup. If this
237
- // field is not specified, the backup will use the same encryption
238
- // configuration as the database by default, namely
239
- // [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type]
240
- // = `USE_DATABASE_ENCRYPTION`.
241
- CreateBackupEncryptionConfig encryption_config = 4
242
- [(google.api.field_behavior) = OPTIONAL];
243
- }
244
-
245
- // Metadata type for the operation returned by
246
- // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup].
247
- message CreateBackupMetadata {
248
- // The name of the backup being created.
249
- string name = 1 [
250
- (google.api.resource_reference) = { type: "spanner.googleapis.com/Backup" }
251
- ];
252
-
253
- // The name of the database the backup is created from.
254
- string database = 2 [(google.api.resource_reference) = {
255
- type: "spanner.googleapis.com/Database"
256
- }];
257
-
258
- // The progress of the
259
- // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]
260
- // operation.
261
- OperationProgress progress = 3;
262
-
263
- // The time at which cancellation of this operation was received.
264
- // [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]
265
- // starts asynchronous cancellation on a long-running operation. The server
266
- // makes a best effort to cancel the operation, but success is not guaranteed.
267
- // Clients can use
268
- // [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
269
- // other methods to check whether the cancellation succeeded or whether the
270
- // operation completed despite cancellation. On successful cancellation,
271
- // the operation is not deleted; instead, it becomes an operation with
272
- // an [Operation.error][google.longrunning.Operation.error] value with a
273
- // [google.rpc.Status.code][google.rpc.Status.code] of 1,
274
- // corresponding to `Code.CANCELLED`.
275
- google.protobuf.Timestamp cancel_time = 4;
276
- }
277
-
278
- // The request for
279
- // [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup].
280
- message CopyBackupRequest {
281
- // Required. The name of the destination instance that will contain the backup
282
- // copy. Values are of the form: `projects/<project>/instances/<instance>`.
283
- string parent = 1 [
284
- (google.api.field_behavior) = REQUIRED,
285
- (google.api.resource_reference) = {
286
- type: "spanner.googleapis.com/Instance"
287
- }
288
- ];
289
-
290
- // Required. The id of the backup copy.
291
- // The `backup_id` appended to `parent` forms the full backup_uri of the form
292
- // `projects/<project>/instances/<instance>/backups/<backup>`.
293
- string backup_id = 2 [(google.api.field_behavior) = REQUIRED];
294
-
295
- // Required. The source backup to be copied.
296
- // The source backup needs to be in READY state for it to be copied.
297
- // Once CopyBackup is in progress, the source backup cannot be deleted or
298
- // cleaned up on expiration until CopyBackup is finished.
299
- // Values are of the form:
300
- // `projects/<project>/instances/<instance>/backups/<backup>`.
301
- string source_backup = 3 [
302
- (google.api.field_behavior) = REQUIRED,
303
- (google.api.resource_reference) = { type: "spanner.googleapis.com/Backup" }
304
- ];
305
-
306
- // Required. The expiration time of the backup in microsecond granularity.
307
- // The expiration time must be at least 6 hours and at most 366 days
308
- // from the `create_time` of the source backup. Once the `expire_time` has
309
- // passed, the backup is eligible to be automatically deleted by Cloud Spanner
310
- // to free the resources used by the backup.
311
- google.protobuf.Timestamp expire_time = 4
312
- [(google.api.field_behavior) = REQUIRED];
313
-
314
- // Optional. The encryption configuration used to encrypt the backup. If this
315
- // field is not specified, the backup will use the same encryption
316
- // configuration as the source backup by default, namely
317
- // [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type]
318
- // = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
319
- CopyBackupEncryptionConfig encryption_config = 5
320
- [(google.api.field_behavior) = OPTIONAL];
321
- }
322
-
323
- // Metadata type for the operation returned by
324
- // [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup].
325
- message CopyBackupMetadata {
326
- // The name of the backup being created through the copy operation.
327
- // Values are of the form
328
- // `projects/<project>/instances/<instance>/backups/<backup>`.
329
- string name = 1 [
330
- (google.api.resource_reference) = { type: "spanner.googleapis.com/Backup" }
331
- ];
332
-
333
- // The name of the source backup that is being copied.
334
- // Values are of the form
335
- // `projects/<project>/instances/<instance>/backups/<backup>`.
336
- string source_backup = 2 [
337
- (google.api.resource_reference) = { type: "spanner.googleapis.com/Backup" }
338
- ];
339
-
340
- // The progress of the
341
- // [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup]
342
- // operation.
343
- OperationProgress progress = 3;
344
-
345
- // The time at which cancellation of CopyBackup operation was received.
346
- // [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]
347
- // starts asynchronous cancellation on a long-running operation. The server
348
- // makes a best effort to cancel the operation, but success is not guaranteed.
349
- // Clients can use
350
- // [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
351
- // other methods to check whether the cancellation succeeded or whether the
352
- // operation completed despite cancellation. On successful cancellation,
353
- // the operation is not deleted; instead, it becomes an operation with
354
- // an [Operation.error][google.longrunning.Operation.error] value with a
355
- // [google.rpc.Status.code][google.rpc.Status.code] of 1,
356
- // corresponding to `Code.CANCELLED`.
357
- google.protobuf.Timestamp cancel_time = 4;
358
- }
359
-
360
- // The request for
361
- // [UpdateBackup][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackup].
362
- message UpdateBackupRequest {
363
- // Required. The backup to update. `backup.name`, and the fields to be updated
364
- // as specified by `update_mask` are required. Other fields are ignored.
365
- // Update is only supported for the following fields:
366
- // * `backup.expire_time`.
367
- Backup backup = 1 [(google.api.field_behavior) = REQUIRED];
368
-
369
- // Required. A mask specifying which fields (e.g. `expire_time`) in the
370
- // Backup resource should be updated. This mask is relative to the Backup
371
- // resource, not to the request message. The field mask must always be
372
- // specified; this prevents any future fields from being erased accidentally
373
- // by clients that do not know about them.
374
- google.protobuf.FieldMask update_mask = 2
375
- [(google.api.field_behavior) = REQUIRED];
376
- }
377
-
378
- // The request for
379
- // [GetBackup][google.spanner.admin.database.v1.DatabaseAdmin.GetBackup].
380
- message GetBackupRequest {
381
- // Required. Name of the backup.
382
- // Values are of the form
383
- // `projects/<project>/instances/<instance>/backups/<backup>`.
384
- string name = 1 [
385
- (google.api.field_behavior) = REQUIRED,
386
- (google.api.resource_reference) = { type: "spanner.googleapis.com/Backup" }
387
- ];
388
- }
389
-
390
- // The request for
391
- // [DeleteBackup][google.spanner.admin.database.v1.DatabaseAdmin.DeleteBackup].
392
- message DeleteBackupRequest {
393
- // Required. Name of the backup to delete.
394
- // Values are of the form
395
- // `projects/<project>/instances/<instance>/backups/<backup>`.
396
- string name = 1 [
397
- (google.api.field_behavior) = REQUIRED,
398
- (google.api.resource_reference) = { type: "spanner.googleapis.com/Backup" }
399
- ];
400
- }
401
-
402
- // The request for
403
- // [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups].
404
- message ListBackupsRequest {
405
- // Required. The instance to list backups from. Values are of the
406
- // form `projects/<project>/instances/<instance>`.
407
- string parent = 1 [
408
- (google.api.field_behavior) = REQUIRED,
409
- (google.api.resource_reference) = {
410
- type: "spanner.googleapis.com/Instance"
411
- }
412
- ];
413
-
414
- // An expression that filters the list of returned backups.
415
- //
416
- // A filter expression consists of a field name, a comparison operator, and a
417
- // value for filtering.
418
- // The value must be a string, a number, or a boolean. The comparison operator
419
- // must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
420
- // Colon `:` is the contains operator. Filter rules are not case sensitive.
421
- //
422
- // The following fields in the
423
- // [Backup][google.spanner.admin.database.v1.Backup] are eligible for
424
- // filtering:
425
- //
426
- // * `name`
427
- // * `database`
428
- // * `state`
429
- // * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
430
- // * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
431
- // * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ)
432
- // * `size_bytes`
433
- // * `backup_schedules`
434
- //
435
- // You can combine multiple expressions by enclosing each expression in
436
- // parentheses. By default, expressions are combined with AND logic, but
437
- // you can specify AND, OR, and NOT logic explicitly.
438
- //
439
- // Here are a few examples:
440
- //
441
- // * `name:Howl` - The backup's name contains the string "howl".
442
- // * `database:prod`
443
- // - The database's name contains the string "prod".
444
- // * `state:CREATING` - The backup is pending creation.
445
- // * `state:READY` - The backup is fully created and ready for use.
446
- // * `(name:howl) AND (create_time < \"2018-03-28T14:50:00Z\")`
447
- // - The backup name contains the string "howl" and `create_time`
448
- // of the backup is before 2018-03-28T14:50:00Z.
449
- // * `expire_time < \"2018-03-28T14:50:00Z\"`
450
- // - The backup `expire_time` is before 2018-03-28T14:50:00Z.
451
- // * `size_bytes > 10000000000` - The backup's size is greater than 10GB
452
- // * `backup_schedules:daily`
453
- // - The backup is created from a schedule with "daily" in its name.
454
- string filter = 2;
455
-
456
- // Number of backups to be returned in the response. If 0 or
457
- // less, defaults to the server's maximum allowed page size.
458
- int32 page_size = 3;
459
-
460
- // If non-empty, `page_token` should contain a
461
- // [next_page_token][google.spanner.admin.database.v1.ListBackupsResponse.next_page_token]
462
- // from a previous
463
- // [ListBackupsResponse][google.spanner.admin.database.v1.ListBackupsResponse]
464
- // to the same `parent` and with the same `filter`.
465
- string page_token = 4;
466
- }
467
-
468
- // The response for
469
- // [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups].
470
- message ListBackupsResponse {
471
- // The list of matching backups. Backups returned are ordered by `create_time`
472
- // in descending order, starting from the most recent `create_time`.
473
- repeated Backup backups = 1;
474
-
475
- // `next_page_token` can be sent in a subsequent
476
- // [ListBackups][google.spanner.admin.database.v1.DatabaseAdmin.ListBackups]
477
- // call to fetch more of the matching backups.
478
- string next_page_token = 2;
479
- }
480
-
481
- // The request for
482
- // [ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations].
483
- message ListBackupOperationsRequest {
484
- // Required. The instance of the backup operations. Values are of
485
- // the form `projects/<project>/instances/<instance>`.
486
- string parent = 1 [
487
- (google.api.field_behavior) = REQUIRED,
488
- (google.api.resource_reference) = {
489
- type: "spanner.googleapis.com/Instance"
490
- }
491
- ];
492
-
493
- // An expression that filters the list of returned backup operations.
494
- //
495
- // A filter expression consists of a field name, a
496
- // comparison operator, and a value for filtering.
497
- // The value must be a string, a number, or a boolean. The comparison operator
498
- // must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
499
- // Colon `:` is the contains operator. Filter rules are not case sensitive.
500
- //
501
- // The following fields in the [operation][google.longrunning.Operation]
502
- // are eligible for filtering:
503
- //
504
- // * `name` - The name of the long-running operation
505
- // * `done` - False if the operation is in progress, else true.
506
- // * `metadata.@type` - the type of metadata. For example, the type string
507
- // for
508
- // [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]
509
- // is
510
- // `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`.
511
- // * `metadata.<field_name>` - any field in metadata.value.
512
- // `metadata.@type` must be specified first if filtering on metadata
513
- // fields.
514
- // * `error` - Error associated with the long-running operation.
515
- // * `response.@type` - the type of response.
516
- // * `response.<field_name>` - any field in response.value.
517
- //
518
- // You can combine multiple expressions by enclosing each expression in
519
- // parentheses. By default, expressions are combined with AND logic, but
520
- // you can specify AND, OR, and NOT logic explicitly.
521
- //
522
- // Here are a few examples:
523
- //
524
- // * `done:true` - The operation is complete.
525
- // * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
526
- // `metadata.database:prod` - Returns operations where:
527
- // * The operation's metadata type is
528
- // [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
529
- // * The source database name of backup contains the string "prod".
530
- // * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
531
- // `(metadata.name:howl) AND` \
532
- // `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \
533
- // `(error:*)` - Returns operations where:
534
- // * The operation's metadata type is
535
- // [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
536
- // * The backup name contains the string "howl".
537
- // * The operation started before 2018-03-28T14:50:00Z.
538
- // * The operation resulted in an error.
539
- // * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \
540
- // `(metadata.source_backup:test) AND` \
541
- // `(metadata.progress.start_time < \"2022-01-18T14:50:00Z\") AND` \
542
- // `(error:*)` - Returns operations where:
543
- // * The operation's metadata type is
544
- // [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata].
545
- // * The source backup name contains the string "test".
546
- // * The operation started before 2022-01-18T14:50:00Z.
547
- // * The operation resulted in an error.
548
- // * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \
549
- // `(metadata.database:test_db)) OR` \
550
- // `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata)
551
- // AND` \
552
- // `(metadata.source_backup:test_bkp)) AND` \
553
- // `(error:*)` - Returns operations where:
554
- // * The operation's metadata matches either of criteria:
555
- // * The operation's metadata type is
556
- // [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata]
557
- // AND the source database name of the backup contains the string
558
- // "test_db"
559
- // * The operation's metadata type is
560
- // [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata]
561
- // AND the source backup name contains the string "test_bkp"
562
- // * The operation resulted in an error.
563
- string filter = 2;
564
-
565
- // Number of operations to be returned in the response. If 0 or
566
- // less, defaults to the server's maximum allowed page size.
567
- int32 page_size = 3;
568
-
569
- // If non-empty, `page_token` should contain a
570
- // [next_page_token][google.spanner.admin.database.v1.ListBackupOperationsResponse.next_page_token]
571
- // from a previous
572
- // [ListBackupOperationsResponse][google.spanner.admin.database.v1.ListBackupOperationsResponse]
573
- // to the same `parent` and with the same `filter`.
574
- string page_token = 4;
575
- }
576
-
577
- // The response for
578
- // [ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations].
579
- message ListBackupOperationsResponse {
580
- // The list of matching backup [long-running
581
- // operations][google.longrunning.Operation]. Each operation's name will be
582
- // prefixed by the backup's name. The operation's
583
- // [metadata][google.longrunning.Operation.metadata] field type
584
- // `metadata.type_url` describes the type of the metadata. Operations returned
585
- // include those that are pending or have completed/failed/canceled within the
586
- // last 7 days. Operations returned are ordered by
587
- // `operation.metadata.value.progress.start_time` in descending order starting
588
- // from the most recently started operation.
589
- repeated google.longrunning.Operation operations = 1;
590
-
591
- // `next_page_token` can be sent in a subsequent
592
- // [ListBackupOperations][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupOperations]
593
- // call to fetch more of the matching metadata.
594
- string next_page_token = 2;
595
- }
596
-
597
- // Information about a backup.
598
- message BackupInfo {
599
- // Name of the backup.
600
- string backup = 1 [
601
- (google.api.resource_reference) = { type: "spanner.googleapis.com/Backup" }
602
- ];
603
-
604
- // The backup contains an externally consistent copy of `source_database` at
605
- // the timestamp specified by `version_time`. If the
606
- // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]
607
- // request did not specify `version_time`, the `version_time` of the backup is
608
- // equivalent to the `create_time`.
609
- google.protobuf.Timestamp version_time = 4;
610
-
611
- // The time the
612
- // [CreateBackup][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackup]
613
- // request was received.
614
- google.protobuf.Timestamp create_time = 2;
615
-
616
- // Name of the database the backup was created from.
617
- string source_database = 3 [(google.api.resource_reference) = {
618
- type: "spanner.googleapis.com/Database"
619
- }];
620
- }
621
-
622
- // Encryption configuration for the backup to create.
623
- message CreateBackupEncryptionConfig {
624
- // Encryption types for the backup.
625
- enum EncryptionType {
626
- // Unspecified. Do not use.
627
- ENCRYPTION_TYPE_UNSPECIFIED = 0;
628
-
629
- // Use the same encryption configuration as the database. This is the
630
- // default option when
631
- // [encryption_config][google.spanner.admin.database.v1.CreateBackupEncryptionConfig]
632
- // is empty. For example, if the database is using
633
- // `Customer_Managed_Encryption`, the backup will be using the same Cloud
634
- // KMS key as the database.
635
- USE_DATABASE_ENCRYPTION = 1;
636
-
637
- // Use Google default encryption.
638
- GOOGLE_DEFAULT_ENCRYPTION = 2;
639
-
640
- // Use customer managed encryption. If specified, `kms_key_name`
641
- // must contain a valid Cloud KMS key.
642
- CUSTOMER_MANAGED_ENCRYPTION = 3;
643
- }
644
-
645
- // Required. The encryption type of the backup.
646
- EncryptionType encryption_type = 1 [(google.api.field_behavior) = REQUIRED];
647
-
648
- // Optional. The Cloud KMS key that will be used to protect the backup.
649
- // This field should be set only when
650
- // [encryption_type][google.spanner.admin.database.v1.CreateBackupEncryptionConfig.encryption_type]
651
- // is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
652
- // `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
653
- string kms_key_name = 2 [
654
- (google.api.field_behavior) = OPTIONAL,
655
- (google.api.resource_reference) = {
656
- type: "cloudkms.googleapis.com/CryptoKey"
657
- }
658
- ];
659
-
660
- // Optional. Specifies the KMS configuration for the one or more keys used to
661
- // protect the backup. Values are of the form
662
- // `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
663
- //
664
- // The keys referenced by kms_key_names must fully cover all
665
- // regions of the backup's instance configuration. Some examples:
666
- // * For single region instance configs, specify a single regional
667
- // location KMS key.
668
- // * For multi-regional instance configs of type GOOGLE_MANAGED,
669
- // either specify a multi-regional location KMS key or multiple regional
670
- // location KMS keys that cover all regions in the instance config.
671
- // * For an instance config of type USER_MANAGED, please specify only
672
- // regional location KMS keys to cover each region in the instance config.
673
- // Multi-regional location KMS keys are not supported for USER_MANAGED
674
- // instance configs.
675
- repeated string kms_key_names = 3 [
676
- (google.api.field_behavior) = OPTIONAL,
677
- (google.api.resource_reference) = {
678
- type: "cloudkms.googleapis.com/CryptoKey"
679
- }
680
- ];
681
- }
682
-
683
- // Encryption configuration for the copied backup.
684
- message CopyBackupEncryptionConfig {
685
- // Encryption types for the backup.
686
- enum EncryptionType {
687
- // Unspecified. Do not use.
688
- ENCRYPTION_TYPE_UNSPECIFIED = 0;
689
-
690
- // This is the default option for
691
- // [CopyBackup][google.spanner.admin.database.v1.DatabaseAdmin.CopyBackup]
692
- // when
693
- // [encryption_config][google.spanner.admin.database.v1.CopyBackupEncryptionConfig]
694
- // is not specified. For example, if the source backup is using
695
- // `Customer_Managed_Encryption`, the backup will be using the same Cloud
696
- // KMS key as the source backup.
697
- USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION = 1;
698
-
699
- // Use Google default encryption.
700
- GOOGLE_DEFAULT_ENCRYPTION = 2;
701
-
702
- // Use customer managed encryption. If specified, either `kms_key_name` or
703
- // `kms_key_names` must contain valid Cloud KMS key(s).
704
- CUSTOMER_MANAGED_ENCRYPTION = 3;
705
- }
706
-
707
- // Required. The encryption type of the backup.
708
- EncryptionType encryption_type = 1 [(google.api.field_behavior) = REQUIRED];
709
-
710
- // Optional. The Cloud KMS key that will be used to protect the backup.
711
- // This field should be set only when
712
- // [encryption_type][google.spanner.admin.database.v1.CopyBackupEncryptionConfig.encryption_type]
713
- // is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form
714
- // `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
715
- string kms_key_name = 2 [
716
- (google.api.field_behavior) = OPTIONAL,
717
- (google.api.resource_reference) = {
718
- type: "cloudkms.googleapis.com/CryptoKey"
719
- }
720
- ];
721
-
722
- // Optional. Specifies the KMS configuration for the one or more keys used to
723
- // protect the backup. Values are of the form
724
- // `projects/<project>/locations/<location>/keyRings/<key_ring>/cryptoKeys/<kms_key_name>`.
725
- // Kms keys specified can be in any order.
726
- //
727
- // The keys referenced by kms_key_names must fully cover all
728
- // regions of the backup's instance configuration. Some examples:
729
- // * For single region instance configs, specify a single regional
730
- // location KMS key.
731
- // * For multi-regional instance configs of type GOOGLE_MANAGED,
732
- // either specify a multi-regional location KMS key or multiple regional
733
- // location KMS keys that cover all regions in the instance config.
734
- // * For an instance config of type USER_MANAGED, please specify only
735
- // regional location KMS keys to cover each region in the instance config.
736
- // Multi-regional location KMS keys are not supported for USER_MANAGED
737
- // instance configs.
738
- repeated string kms_key_names = 3 [
739
- (google.api.field_behavior) = OPTIONAL,
740
- (google.api.resource_reference) = {
741
- type: "cloudkms.googleapis.com/CryptoKey"
742
- }
743
- ];
744
- }
745
-
746
- // The specification for full backups.
747
- // A full backup stores the entire contents of the database at a given
748
- // version time.
749
- message FullBackupSpec {}
750
-
751
- // The specification for incremental backup chains.
752
- // An incremental backup stores the delta of changes between a previous
753
- // backup and the database contents at a given version time. An
754
- // incremental backup chain consists of a full backup and zero or more
755
- // successive incremental backups. The first backup created for an
756
- // incremental backup chain is always a full backup.
757
- message IncrementalBackupSpec {}