@google-cloud/spanner 7.18.0 → 7.18.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.
Files changed (82) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +1 -0
  3. package/build/protos/google/spanner/admin/database/v1/backup.proto +757 -0
  4. package/build/protos/google/spanner/admin/database/v1/backup_schedule.proto +230 -0
  5. package/build/protos/google/spanner/admin/database/v1/common.proto +132 -0
  6. package/build/protos/google/spanner/admin/database/v1/spanner_database_admin.proto +1209 -0
  7. package/build/protos/google/spanner/admin/instance/v1/common.proto +64 -0
  8. package/build/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto +2110 -0
  9. package/build/protos/google/spanner/executor/v1/cloud_executor.proto +1520 -0
  10. package/build/protos/google/spanner/v1/commit_response.proto +59 -0
  11. package/build/protos/google/spanner/v1/keys.proto +163 -0
  12. package/build/protos/google/spanner/v1/mutation.proto +107 -0
  13. package/build/protos/google/spanner/v1/query_plan.proto +128 -0
  14. package/build/protos/google/spanner/v1/result_set.proto +237 -0
  15. package/build/protos/google/spanner/v1/spanner.proto +1389 -0
  16. package/build/protos/google/spanner/v1/transaction.proto +575 -0
  17. package/build/protos/google/spanner/v1/type.proto +214 -0
  18. package/build/protos/protos.d.ts +39317 -0
  19. package/build/protos/protos.js +100360 -0
  20. package/build/protos/protos.json +10271 -0
  21. package/build/src/backup.d.ts +349 -0
  22. package/build/src/backup.js +246 -0
  23. package/build/src/batch-transaction.d.ts +247 -0
  24. package/build/src/batch-transaction.js +384 -0
  25. package/build/src/codec.d.ts +362 -0
  26. package/build/src/codec.js +791 -0
  27. package/build/src/common-grpc/service-object.d.ts +80 -0
  28. package/build/src/common-grpc/service-object.js +101 -0
  29. package/build/src/common-grpc/service.d.ts +445 -0
  30. package/build/src/common-grpc/service.js +826 -0
  31. package/build/src/common.d.ts +66 -0
  32. package/build/src/common.js +54 -0
  33. package/build/src/database.d.ts +2103 -0
  34. package/build/src/database.js +1655 -0
  35. package/build/src/extra_proto_list.json +1 -0
  36. package/build/src/helper.d.ts +45 -0
  37. package/build/src/helper.js +71 -0
  38. package/build/src/index.d.ts +1195 -0
  39. package/build/src/index.js +1059 -0
  40. package/build/src/instance-config.d.ts +294 -0
  41. package/build/src/instance-config.js +216 -0
  42. package/build/src/instance.d.ts +832 -0
  43. package/build/src/instance.js +781 -0
  44. package/build/src/instrument.d.ts +85 -0
  45. package/build/src/instrument.js +215 -0
  46. package/build/src/multiplexed-session.d.ts +136 -0
  47. package/build/src/multiplexed-session.js +197 -0
  48. package/build/src/partial-result-stream.d.ts +253 -0
  49. package/build/src/partial-result-stream.js +400 -0
  50. package/build/src/session-factory.d.ts +100 -0
  51. package/build/src/session-factory.js +93 -0
  52. package/build/src/session-pool.d.ts +471 -0
  53. package/build/src/session-pool.js +754 -0
  54. package/build/src/session.d.ts +258 -0
  55. package/build/src/session.js +348 -0
  56. package/build/src/spanner_grpc_config.json +92 -0
  57. package/build/src/table.d.ts +831 -0
  58. package/build/src/table.js +277 -0
  59. package/build/src/transaction-runner.d.ts +185 -0
  60. package/build/src/transaction-runner.js +282 -0
  61. package/build/src/transaction.d.ts +1691 -0
  62. package/build/src/transaction.js +2004 -0
  63. package/build/src/v1/database_admin_client.d.ts +2301 -0
  64. package/build/src/v1/database_admin_client.js +2286 -0
  65. package/build/src/v1/database_admin_client_config.json +160 -0
  66. package/build/src/v1/database_admin_proto_list.json +6 -0
  67. package/build/src/v1/gapic_metadata.json +27 -0
  68. package/build/src/v1/index.d.ts +4 -0
  69. package/build/src/v1/index.js +29 -0
  70. package/build/src/v1/instance_admin_client.d.ts +1985 -0
  71. package/build/src/v1/instance_admin_client.js +1768 -0
  72. package/build/src/v1/instance_admin_client_config.json +129 -0
  73. package/build/src/v1/instance_admin_proto_list.json +4 -0
  74. package/build/src/v1/spanner_client.d.ts +1250 -0
  75. package/build/src/v1/spanner_client.js +1086 -0
  76. package/build/src/v1/spanner_client_config.json +119 -0
  77. package/build/src/v1/spanner_executor_proxy_client.d.ts +418 -0
  78. package/build/src/v1/spanner_executor_proxy_client.js +706 -0
  79. package/build/src/v1/spanner_executor_proxy_client_config.json +30 -0
  80. package/build/src/v1/spanner_executor_proxy_proto_list.json +14 -0
  81. package/build/src/v1/spanner_proto_list.json +10 -0
  82. package/package.json +1 -1
@@ -0,0 +1,2110 @@
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.instance.v1;
18
+
19
+ import "google/api/annotations.proto";
20
+ import "google/api/client.proto";
21
+ import "google/api/field_behavior.proto";
22
+ import "google/api/resource.proto";
23
+ import "google/iam/v1/iam_policy.proto";
24
+ import "google/iam/v1/policy.proto";
25
+ import "google/longrunning/operations.proto";
26
+ import "google/protobuf/empty.proto";
27
+ import "google/protobuf/field_mask.proto";
28
+ import "google/protobuf/timestamp.proto";
29
+ import "google/spanner/admin/instance/v1/common.proto";
30
+
31
+ option csharp_namespace = "Google.Cloud.Spanner.Admin.Instance.V1";
32
+ option go_package = "cloud.google.com/go/spanner/admin/instance/apiv1/instancepb;instancepb";
33
+ option java_multiple_files = true;
34
+ option java_outer_classname = "SpannerInstanceAdminProto";
35
+ option java_package = "com.google.spanner.admin.instance.v1";
36
+ option php_namespace = "Google\\Cloud\\Spanner\\Admin\\Instance\\V1";
37
+ option ruby_package = "Google::Cloud::Spanner::Admin::Instance::V1";
38
+
39
+ // Cloud Spanner Instance Admin API
40
+ //
41
+ // The Cloud Spanner Instance Admin API can be used to create, delete,
42
+ // modify and list instances. Instances are dedicated Cloud Spanner serving
43
+ // and storage resources to be used by Cloud Spanner databases.
44
+ //
45
+ // Each instance has a "configuration", which dictates where the
46
+ // serving resources for the Cloud Spanner instance are located (e.g.,
47
+ // US-central, Europe). Configurations are created by Google based on
48
+ // resource availability.
49
+ //
50
+ // Cloud Spanner billing is based on the instances that exist and their
51
+ // sizes. After an instance exists, there are no additional
52
+ // per-database or per-operation charges for use of the instance
53
+ // (though there may be additional network bandwidth charges).
54
+ // Instances offer isolation: problems with databases in one instance
55
+ // will not affect other instances. However, within an instance
56
+ // databases can affect each other. For example, if one database in an
57
+ // instance receives a lot of requests and consumes most of the
58
+ // instance resources, fewer resources are available for other
59
+ // databases in that instance, and their performance may suffer.
60
+ service InstanceAdmin {
61
+ option (google.api.default_host) = "spanner.googleapis.com";
62
+ option (google.api.oauth_scopes) =
63
+ "https://www.googleapis.com/auth/cloud-platform,"
64
+ "https://www.googleapis.com/auth/spanner.admin";
65
+
66
+ // Lists the supported instance configurations for a given project.
67
+ //
68
+ // Returns both Google-managed configurations and user-managed
69
+ // configurations.
70
+ rpc ListInstanceConfigs(ListInstanceConfigsRequest)
71
+ returns (ListInstanceConfigsResponse) {
72
+ option (google.api.http) = {
73
+ get: "/v1/{parent=projects/*}/instanceConfigs"
74
+ };
75
+ option (google.api.method_signature) = "parent";
76
+ }
77
+
78
+ // Gets information about a particular instance configuration.
79
+ rpc GetInstanceConfig(GetInstanceConfigRequest) returns (InstanceConfig) {
80
+ option (google.api.http) = {
81
+ get: "/v1/{name=projects/*/instanceConfigs/*}"
82
+ };
83
+ option (google.api.method_signature) = "name";
84
+ }
85
+
86
+ // Creates an instance configuration and begins preparing it to be used. The
87
+ // returned long-running operation
88
+ // can be used to track the progress of preparing the new
89
+ // instance configuration. The instance configuration name is assigned by the
90
+ // caller. If the named instance configuration already exists,
91
+ // `CreateInstanceConfig` returns `ALREADY_EXISTS`.
92
+ //
93
+ // Immediately after the request returns:
94
+ //
95
+ // * The instance configuration is readable via the API, with all requested
96
+ // attributes. The instance configuration's
97
+ // [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]
98
+ // field is set to true. Its state is `CREATING`.
99
+ //
100
+ // While the operation is pending:
101
+ //
102
+ // * Cancelling the operation renders the instance configuration immediately
103
+ // unreadable via the API.
104
+ // * Except for deleting the creating resource, all other attempts to modify
105
+ // the instance configuration are rejected.
106
+ //
107
+ // Upon completion of the returned operation:
108
+ //
109
+ // * Instances can be created using the instance configuration.
110
+ // * The instance configuration's
111
+ // [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]
112
+ // field becomes false. Its state becomes `READY`.
113
+ //
114
+ // The returned long-running operation will
115
+ // have a name of the format
116
+ // `<instance_config_name>/operations/<operation_id>` and can be used to track
117
+ // creation of the instance configuration. The
118
+ // metadata field type is
119
+ // [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata].
120
+ // The response field type is
121
+ // [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if
122
+ // successful.
123
+ //
124
+ // Authorization requires `spanner.instanceConfigs.create` permission on
125
+ // the resource
126
+ // [parent][google.spanner.admin.instance.v1.CreateInstanceConfigRequest.parent].
127
+ rpc CreateInstanceConfig(CreateInstanceConfigRequest)
128
+ returns (google.longrunning.Operation) {
129
+ option (google.api.http) = {
130
+ post: "/v1/{parent=projects/*}/instanceConfigs"
131
+ body: "*"
132
+ };
133
+ option (google.api.method_signature) =
134
+ "parent,instance_config,instance_config_id";
135
+ option (google.longrunning.operation_info) = {
136
+ response_type: "google.spanner.admin.instance.v1.InstanceConfig"
137
+ metadata_type: "google.spanner.admin.instance.v1.CreateInstanceConfigMetadata"
138
+ };
139
+ }
140
+
141
+ // Updates an instance configuration. The returned
142
+ // long-running operation can be used to track
143
+ // the progress of updating the instance. If the named instance configuration
144
+ // does not exist, returns `NOT_FOUND`.
145
+ //
146
+ // Only user-managed configurations can be updated.
147
+ //
148
+ // Immediately after the request returns:
149
+ //
150
+ // * The instance configuration's
151
+ // [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]
152
+ // field is set to true.
153
+ //
154
+ // While the operation is pending:
155
+ //
156
+ // * Cancelling the operation sets its metadata's
157
+ // [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata.cancel_time].
158
+ // The operation is guaranteed to succeed at undoing all changes, after
159
+ // which point it terminates with a `CANCELLED` status.
160
+ // * All other attempts to modify the instance configuration are rejected.
161
+ // * Reading the instance configuration via the API continues to give the
162
+ // pre-request values.
163
+ //
164
+ // Upon completion of the returned operation:
165
+ //
166
+ // * Creating instances using the instance configuration uses the new
167
+ // values.
168
+ // * The new values of the instance configuration are readable via the API.
169
+ // * The instance configuration's
170
+ // [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]
171
+ // field becomes false.
172
+ //
173
+ // The returned long-running operation will
174
+ // have a name of the format
175
+ // `<instance_config_name>/operations/<operation_id>` and can be used to track
176
+ // the instance configuration modification. The
177
+ // metadata field type is
178
+ // [UpdateInstanceConfigMetadata][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata].
179
+ // The response field type is
180
+ // [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if
181
+ // successful.
182
+ //
183
+ // Authorization requires `spanner.instanceConfigs.update` permission on
184
+ // the resource [name][google.spanner.admin.instance.v1.InstanceConfig.name].
185
+ rpc UpdateInstanceConfig(UpdateInstanceConfigRequest)
186
+ returns (google.longrunning.Operation) {
187
+ option (google.api.http) = {
188
+ patch: "/v1/{instance_config.name=projects/*/instanceConfigs/*}"
189
+ body: "*"
190
+ };
191
+ option (google.api.method_signature) = "instance_config,update_mask";
192
+ option (google.longrunning.operation_info) = {
193
+ response_type: "google.spanner.admin.instance.v1.InstanceConfig"
194
+ metadata_type: "google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata"
195
+ };
196
+ }
197
+
198
+ // Deletes the instance configuration. Deletion is only allowed when no
199
+ // instances are using the configuration. If any instances are using
200
+ // the configuration, returns `FAILED_PRECONDITION`.
201
+ //
202
+ // Only user-managed configurations can be deleted.
203
+ //
204
+ // Authorization requires `spanner.instanceConfigs.delete` permission on
205
+ // the resource [name][google.spanner.admin.instance.v1.InstanceConfig.name].
206
+ rpc DeleteInstanceConfig(DeleteInstanceConfigRequest)
207
+ returns (google.protobuf.Empty) {
208
+ option (google.api.http) = {
209
+ delete: "/v1/{name=projects/*/instanceConfigs/*}"
210
+ };
211
+ option (google.api.method_signature) = "name";
212
+ }
213
+
214
+ // Lists the user-managed instance configuration long-running
215
+ // operations in the given project. An instance
216
+ // configuration operation has a name of the form
217
+ // `projects/<project>/instanceConfigs/<instance_config>/operations/<operation>`.
218
+ // The long-running operation
219
+ // metadata field type
220
+ // `metadata.type_url` describes the type of the metadata. Operations returned
221
+ // include those that have completed/failed/canceled within the last 7 days,
222
+ // and pending operations. Operations returned are ordered by
223
+ // `operation.metadata.value.start_time` in descending order starting
224
+ // from the most recently started operation.
225
+ rpc ListInstanceConfigOperations(ListInstanceConfigOperationsRequest)
226
+ returns (ListInstanceConfigOperationsResponse) {
227
+ option (google.api.http) = {
228
+ get: "/v1/{parent=projects/*}/instanceConfigOperations"
229
+ };
230
+ option (google.api.method_signature) = "parent";
231
+ }
232
+
233
+ // Lists all instances in the given project.
234
+ rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) {
235
+ option (google.api.http) = {
236
+ get: "/v1/{parent=projects/*}/instances"
237
+ };
238
+ option (google.api.method_signature) = "parent";
239
+ }
240
+
241
+ // Lists all instance partitions for the given instance.
242
+ rpc ListInstancePartitions(ListInstancePartitionsRequest)
243
+ returns (ListInstancePartitionsResponse) {
244
+ option (google.api.http) = {
245
+ get: "/v1/{parent=projects/*/instances/*}/instancePartitions"
246
+ };
247
+ option (google.api.method_signature) = "parent";
248
+ }
249
+
250
+ // Gets information about a particular instance.
251
+ rpc GetInstance(GetInstanceRequest) returns (Instance) {
252
+ option (google.api.http) = {
253
+ get: "/v1/{name=projects/*/instances/*}"
254
+ };
255
+ option (google.api.method_signature) = "name";
256
+ }
257
+
258
+ // Creates an instance and begins preparing it to begin serving. The
259
+ // returned long-running operation
260
+ // can be used to track the progress of preparing the new
261
+ // instance. The instance name is assigned by the caller. If the
262
+ // named instance already exists, `CreateInstance` returns
263
+ // `ALREADY_EXISTS`.
264
+ //
265
+ // Immediately upon completion of this request:
266
+ //
267
+ // * The instance is readable via the API, with all requested attributes
268
+ // but no allocated resources. Its state is `CREATING`.
269
+ //
270
+ // Until completion of the returned operation:
271
+ //
272
+ // * Cancelling the operation renders the instance immediately unreadable
273
+ // via the API.
274
+ // * The instance can be deleted.
275
+ // * All other attempts to modify the instance are rejected.
276
+ //
277
+ // Upon completion of the returned operation:
278
+ //
279
+ // * Billing for all successfully-allocated resources begins (some types
280
+ // may have lower than the requested levels).
281
+ // * Databases can be created in the instance.
282
+ // * The instance's allocated resource levels are readable via the API.
283
+ // * The instance's state becomes `READY`.
284
+ //
285
+ // The returned long-running operation will
286
+ // have a name of the format `<instance_name>/operations/<operation_id>` and
287
+ // can be used to track creation of the instance. The
288
+ // metadata field type is
289
+ // [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata].
290
+ // The response field type is
291
+ // [Instance][google.spanner.admin.instance.v1.Instance], if successful.
292
+ rpc CreateInstance(CreateInstanceRequest)
293
+ returns (google.longrunning.Operation) {
294
+ option (google.api.http) = {
295
+ post: "/v1/{parent=projects/*}/instances"
296
+ body: "*"
297
+ };
298
+ option (google.api.method_signature) = "parent,instance_id,instance";
299
+ option (google.longrunning.operation_info) = {
300
+ response_type: "google.spanner.admin.instance.v1.Instance"
301
+ metadata_type: "google.spanner.admin.instance.v1.CreateInstanceMetadata"
302
+ };
303
+ }
304
+
305
+ // Updates an instance, and begins allocating or releasing resources
306
+ // as requested. The returned long-running operation can be used to track the
307
+ // progress of updating the instance. If the named instance does not
308
+ // exist, returns `NOT_FOUND`.
309
+ //
310
+ // Immediately upon completion of this request:
311
+ //
312
+ // * For resource types for which a decrease in the instance's allocation
313
+ // has been requested, billing is based on the newly-requested level.
314
+ //
315
+ // Until completion of the returned operation:
316
+ //
317
+ // * Cancelling the operation sets its metadata's
318
+ // [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time],
319
+ // and begins restoring resources to their pre-request values. The
320
+ // operation is guaranteed to succeed at undoing all resource changes,
321
+ // after which point it terminates with a `CANCELLED` status.
322
+ // * All other attempts to modify the instance are rejected.
323
+ // * Reading the instance via the API continues to give the pre-request
324
+ // resource levels.
325
+ //
326
+ // Upon completion of the returned operation:
327
+ //
328
+ // * Billing begins for all successfully-allocated resources (some types
329
+ // may have lower than the requested levels).
330
+ // * All newly-reserved resources are available for serving the instance's
331
+ // tables.
332
+ // * The instance's new resource levels are readable via the API.
333
+ //
334
+ // The returned long-running operation will
335
+ // have a name of the format `<instance_name>/operations/<operation_id>` and
336
+ // can be used to track the instance modification. The
337
+ // metadata field type is
338
+ // [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata].
339
+ // The response field type is
340
+ // [Instance][google.spanner.admin.instance.v1.Instance], if successful.
341
+ //
342
+ // Authorization requires `spanner.instances.update` permission on
343
+ // the resource [name][google.spanner.admin.instance.v1.Instance.name].
344
+ rpc UpdateInstance(UpdateInstanceRequest)
345
+ returns (google.longrunning.Operation) {
346
+ option (google.api.http) = {
347
+ patch: "/v1/{instance.name=projects/*/instances/*}"
348
+ body: "*"
349
+ };
350
+ option (google.api.method_signature) = "instance,field_mask";
351
+ option (google.longrunning.operation_info) = {
352
+ response_type: "google.spanner.admin.instance.v1.Instance"
353
+ metadata_type: "google.spanner.admin.instance.v1.UpdateInstanceMetadata"
354
+ };
355
+ }
356
+
357
+ // Deletes an instance.
358
+ //
359
+ // Immediately upon completion of the request:
360
+ //
361
+ // * Billing ceases for all of the instance's reserved resources.
362
+ //
363
+ // Soon afterward:
364
+ //
365
+ // * The instance and *all of its databases* immediately and
366
+ // irrevocably disappear from the API. All data in the databases
367
+ // is permanently deleted.
368
+ rpc DeleteInstance(DeleteInstanceRequest) returns (google.protobuf.Empty) {
369
+ option (google.api.http) = {
370
+ delete: "/v1/{name=projects/*/instances/*}"
371
+ };
372
+ option (google.api.method_signature) = "name";
373
+ }
374
+
375
+ // Sets the access control policy on an instance resource. Replaces any
376
+ // existing policy.
377
+ //
378
+ // Authorization requires `spanner.instances.setIamPolicy` on
379
+ // [resource][google.iam.v1.SetIamPolicyRequest.resource].
380
+ rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
381
+ returns (google.iam.v1.Policy) {
382
+ option (google.api.http) = {
383
+ post: "/v1/{resource=projects/*/instances/*}:setIamPolicy"
384
+ body: "*"
385
+ };
386
+ option (google.api.method_signature) = "resource,policy";
387
+ }
388
+
389
+ // Gets the access control policy for an instance resource. Returns an empty
390
+ // policy if an instance exists but does not have a policy set.
391
+ //
392
+ // Authorization requires `spanner.instances.getIamPolicy` on
393
+ // [resource][google.iam.v1.GetIamPolicyRequest.resource].
394
+ rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
395
+ returns (google.iam.v1.Policy) {
396
+ option (google.api.http) = {
397
+ post: "/v1/{resource=projects/*/instances/*}:getIamPolicy"
398
+ body: "*"
399
+ };
400
+ option (google.api.method_signature) = "resource";
401
+ }
402
+
403
+ // Returns permissions that the caller has on the specified instance resource.
404
+ //
405
+ // Attempting this RPC on a non-existent Cloud Spanner instance resource will
406
+ // result in a NOT_FOUND error if the user has `spanner.instances.list`
407
+ // permission on the containing Google Cloud Project. Otherwise returns an
408
+ // empty set of permissions.
409
+ rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
410
+ returns (google.iam.v1.TestIamPermissionsResponse) {
411
+ option (google.api.http) = {
412
+ post: "/v1/{resource=projects/*/instances/*}:testIamPermissions"
413
+ body: "*"
414
+ };
415
+ option (google.api.method_signature) = "resource,permissions";
416
+ }
417
+
418
+ // Gets information about a particular instance partition.
419
+ rpc GetInstancePartition(GetInstancePartitionRequest)
420
+ returns (InstancePartition) {
421
+ option (google.api.http) = {
422
+ get: "/v1/{name=projects/*/instances/*/instancePartitions/*}"
423
+ };
424
+ option (google.api.method_signature) = "name";
425
+ }
426
+
427
+ // Creates an instance partition and begins preparing it to be used. The
428
+ // returned long-running operation
429
+ // can be used to track the progress of preparing the new instance partition.
430
+ // The instance partition name is assigned by the caller. If the named
431
+ // instance partition already exists, `CreateInstancePartition` returns
432
+ // `ALREADY_EXISTS`.
433
+ //
434
+ // Immediately upon completion of this request:
435
+ //
436
+ // * The instance partition is readable via the API, with all requested
437
+ // attributes but no allocated resources. Its state is `CREATING`.
438
+ //
439
+ // Until completion of the returned operation:
440
+ //
441
+ // * Cancelling the operation renders the instance partition immediately
442
+ // unreadable via the API.
443
+ // * The instance partition can be deleted.
444
+ // * All other attempts to modify the instance partition are rejected.
445
+ //
446
+ // Upon completion of the returned operation:
447
+ //
448
+ // * Billing for all successfully-allocated resources begins (some types
449
+ // may have lower than the requested levels).
450
+ // * Databases can start using this instance partition.
451
+ // * The instance partition's allocated resource levels are readable via the
452
+ // API.
453
+ // * The instance partition's state becomes `READY`.
454
+ //
455
+ // The returned long-running operation will
456
+ // have a name of the format
457
+ // `<instance_partition_name>/operations/<operation_id>` and can be used to
458
+ // track creation of the instance partition. The
459
+ // metadata field type is
460
+ // [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata].
461
+ // The response field type is
462
+ // [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if
463
+ // successful.
464
+ rpc CreateInstancePartition(CreateInstancePartitionRequest)
465
+ returns (google.longrunning.Operation) {
466
+ option (google.api.http) = {
467
+ post: "/v1/{parent=projects/*/instances/*}/instancePartitions"
468
+ body: "*"
469
+ };
470
+ option (google.api.method_signature) =
471
+ "parent,instance_partition,instance_partition_id";
472
+ option (google.longrunning.operation_info) = {
473
+ response_type: "google.spanner.admin.instance.v1.InstancePartition"
474
+ metadata_type: "google.spanner.admin.instance.v1.CreateInstancePartitionMetadata"
475
+ };
476
+ }
477
+
478
+ // Deletes an existing instance partition. Requires that the
479
+ // instance partition is not used by any database or backup and is not the
480
+ // default instance partition of an instance.
481
+ //
482
+ // Authorization requires `spanner.instancePartitions.delete` permission on
483
+ // the resource
484
+ // [name][google.spanner.admin.instance.v1.InstancePartition.name].
485
+ rpc DeleteInstancePartition(DeleteInstancePartitionRequest)
486
+ returns (google.protobuf.Empty) {
487
+ option (google.api.http) = {
488
+ delete: "/v1/{name=projects/*/instances/*/instancePartitions/*}"
489
+ };
490
+ option (google.api.method_signature) = "name";
491
+ }
492
+
493
+ // Updates an instance partition, and begins allocating or releasing resources
494
+ // as requested. The returned long-running operation can be used to track the
495
+ // progress of updating the instance partition. If the named instance
496
+ // partition does not exist, returns `NOT_FOUND`.
497
+ //
498
+ // Immediately upon completion of this request:
499
+ //
500
+ // * For resource types for which a decrease in the instance partition's
501
+ // allocation has been requested, billing is based on the newly-requested
502
+ // level.
503
+ //
504
+ // Until completion of the returned operation:
505
+ //
506
+ // * Cancelling the operation sets its metadata's
507
+ // [cancel_time][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata.cancel_time],
508
+ // and begins restoring resources to their pre-request values. The
509
+ // operation is guaranteed to succeed at undoing all resource changes,
510
+ // after which point it terminates with a `CANCELLED` status.
511
+ // * All other attempts to modify the instance partition are rejected.
512
+ // * Reading the instance partition via the API continues to give the
513
+ // pre-request resource levels.
514
+ //
515
+ // Upon completion of the returned operation:
516
+ //
517
+ // * Billing begins for all successfully-allocated resources (some types
518
+ // may have lower than the requested levels).
519
+ // * All newly-reserved resources are available for serving the instance
520
+ // partition's tables.
521
+ // * The instance partition's new resource levels are readable via the API.
522
+ //
523
+ // The returned long-running operation will
524
+ // have a name of the format
525
+ // `<instance_partition_name>/operations/<operation_id>` and can be used to
526
+ // track the instance partition modification. The
527
+ // metadata field type is
528
+ // [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata].
529
+ // The response field type is
530
+ // [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if
531
+ // successful.
532
+ //
533
+ // Authorization requires `spanner.instancePartitions.update` permission on
534
+ // the resource
535
+ // [name][google.spanner.admin.instance.v1.InstancePartition.name].
536
+ rpc UpdateInstancePartition(UpdateInstancePartitionRequest)
537
+ returns (google.longrunning.Operation) {
538
+ option (google.api.http) = {
539
+ patch: "/v1/{instance_partition.name=projects/*/instances/*/instancePartitions/*}"
540
+ body: "*"
541
+ };
542
+ option (google.api.method_signature) = "instance_partition,field_mask";
543
+ option (google.longrunning.operation_info) = {
544
+ response_type: "google.spanner.admin.instance.v1.InstancePartition"
545
+ metadata_type: "google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata"
546
+ };
547
+ }
548
+
549
+ // Lists instance partition long-running operations in the given instance.
550
+ // An instance partition operation has a name of the form
551
+ // `projects/<project>/instances/<instance>/instancePartitions/<instance_partition>/operations/<operation>`.
552
+ // The long-running operation
553
+ // metadata field type
554
+ // `metadata.type_url` describes the type of the metadata. Operations returned
555
+ // include those that have completed/failed/canceled within the last 7 days,
556
+ // and pending operations. Operations returned are ordered by
557
+ // `operation.metadata.value.start_time` in descending order starting from the
558
+ // most recently started operation.
559
+ //
560
+ // Authorization requires `spanner.instancePartitionOperations.list`
561
+ // permission on the resource
562
+ // [parent][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.parent].
563
+ rpc ListInstancePartitionOperations(ListInstancePartitionOperationsRequest)
564
+ returns (ListInstancePartitionOperationsResponse) {
565
+ option (google.api.http) = {
566
+ get: "/v1/{parent=projects/*/instances/*}/instancePartitionOperations"
567
+ };
568
+ option (google.api.method_signature) = "parent";
569
+ }
570
+
571
+ // Moves an instance to the target instance configuration. You can use the
572
+ // returned long-running operation to track
573
+ // the progress of moving the instance.
574
+ //
575
+ // `MoveInstance` returns `FAILED_PRECONDITION` if the instance meets any of
576
+ // the following criteria:
577
+ //
578
+ // * Is undergoing a move to a different instance configuration
579
+ // * Has backups
580
+ // * Has an ongoing update
581
+ // * Contains any CMEK-enabled databases
582
+ // * Is a free trial instance
583
+ //
584
+ // While the operation is pending:
585
+ //
586
+ // * All other attempts to modify the instance, including changes to its
587
+ // compute capacity, are rejected.
588
+ // * The following database and backup admin operations are rejected:
589
+ //
590
+ // * `DatabaseAdmin.CreateDatabase`
591
+ // * `DatabaseAdmin.UpdateDatabaseDdl` (disabled if default_leader is
592
+ // specified in the request.)
593
+ // * `DatabaseAdmin.RestoreDatabase`
594
+ // * `DatabaseAdmin.CreateBackup`
595
+ // * `DatabaseAdmin.CopyBackup`
596
+ //
597
+ // * Both the source and target instance configurations are subject to
598
+ // hourly compute and storage charges.
599
+ // * The instance might experience higher read-write latencies and a higher
600
+ // transaction abort rate. However, moving an instance doesn't cause any
601
+ // downtime.
602
+ //
603
+ // The returned long-running operation has
604
+ // a name of the format
605
+ // `<instance_name>/operations/<operation_id>` and can be used to track
606
+ // the move instance operation. The
607
+ // metadata field type is
608
+ // [MoveInstanceMetadata][google.spanner.admin.instance.v1.MoveInstanceMetadata].
609
+ // The response field type is
610
+ // [Instance][google.spanner.admin.instance.v1.Instance],
611
+ // if successful.
612
+ // Cancelling the operation sets its metadata's
613
+ // [cancel_time][google.spanner.admin.instance.v1.MoveInstanceMetadata.cancel_time].
614
+ // Cancellation is not immediate because it involves moving any data
615
+ // previously moved to the target instance configuration back to the original
616
+ // instance configuration. You can use this operation to track the progress of
617
+ // the cancellation. Upon successful completion of the cancellation, the
618
+ // operation terminates with `CANCELLED` status.
619
+ //
620
+ // If not cancelled, upon completion of the returned operation:
621
+ //
622
+ // * The instance successfully moves to the target instance
623
+ // configuration.
624
+ // * You are billed for compute and storage in target instance
625
+ // configuration.
626
+ //
627
+ // Authorization requires the `spanner.instances.update` permission on
628
+ // the resource [instance][google.spanner.admin.instance.v1.Instance].
629
+ //
630
+ // For more details, see
631
+ // [Move an instance](https://cloud.google.com/spanner/docs/move-instance).
632
+ rpc MoveInstance(MoveInstanceRequest) returns (google.longrunning.Operation) {
633
+ option (google.api.http) = {
634
+ post: "/v1/{name=projects/*/instances/*}:move"
635
+ body: "*"
636
+ };
637
+ option (google.longrunning.operation_info) = {
638
+ response_type: "google.spanner.admin.instance.v1.MoveInstanceResponse"
639
+ metadata_type: "google.spanner.admin.instance.v1.MoveInstanceMetadata"
640
+ };
641
+ }
642
+ }
643
+
644
+ message ReplicaInfo {
645
+ // Indicates the type of replica. See the [replica types
646
+ // documentation](https://cloud.google.com/spanner/docs/replication#replica_types)
647
+ // for more details.
648
+ enum ReplicaType {
649
+ // Not specified.
650
+ TYPE_UNSPECIFIED = 0;
651
+
652
+ // Read-write replicas support both reads and writes. These replicas:
653
+ //
654
+ // * Maintain a full copy of your data.
655
+ // * Serve reads.
656
+ // * Can vote whether to commit a write.
657
+ // * Participate in leadership election.
658
+ // * Are eligible to become a leader.
659
+ READ_WRITE = 1;
660
+
661
+ // Read-only replicas only support reads (not writes). Read-only replicas:
662
+ //
663
+ // * Maintain a full copy of your data.
664
+ // * Serve reads.
665
+ // * Do not participate in voting to commit writes.
666
+ // * Are not eligible to become a leader.
667
+ READ_ONLY = 2;
668
+
669
+ // Witness replicas don't support reads but do participate in voting to
670
+ // commit writes. Witness replicas:
671
+ //
672
+ // * Do not maintain a full copy of data.
673
+ // * Do not serve reads.
674
+ // * Vote whether to commit writes.
675
+ // * Participate in leader election but are not eligible to become leader.
676
+ WITNESS = 3;
677
+ }
678
+
679
+ // The location of the serving resources, e.g., "us-central1".
680
+ string location = 1;
681
+
682
+ // The type of replica.
683
+ ReplicaType type = 2;
684
+
685
+ // If true, this location is designated as the default leader location where
686
+ // leader replicas are placed. See the [region types
687
+ // documentation](https://cloud.google.com/spanner/docs/instances#region_types)
688
+ // for more details.
689
+ bool default_leader_location = 3;
690
+ }
691
+
692
+ // A possible configuration for a Cloud Spanner instance. Configurations
693
+ // define the geographic placement of nodes and their replication.
694
+ message InstanceConfig {
695
+ option (google.api.resource) = {
696
+ type: "spanner.googleapis.com/InstanceConfig"
697
+ pattern: "projects/{project}/instanceConfigs/{instance_config}"
698
+ plural: "instanceConfigs"
699
+ singular: "instanceConfig"
700
+ };
701
+
702
+ // The type of this configuration.
703
+ enum Type {
704
+ // Unspecified.
705
+ TYPE_UNSPECIFIED = 0;
706
+
707
+ // Google-managed configuration.
708
+ GOOGLE_MANAGED = 1;
709
+
710
+ // User-managed configuration.
711
+ USER_MANAGED = 2;
712
+ }
713
+
714
+ // Indicates the current state of the instance configuration.
715
+ enum State {
716
+ // Not specified.
717
+ STATE_UNSPECIFIED = 0;
718
+
719
+ // The instance configuration is still being created.
720
+ CREATING = 1;
721
+
722
+ // The instance configuration is fully created and ready to be used to
723
+ // create instances.
724
+ READY = 2;
725
+ }
726
+
727
+ // Describes the availability for free instances to be created in an instance
728
+ // configuration.
729
+ enum FreeInstanceAvailability {
730
+ // Not specified.
731
+ FREE_INSTANCE_AVAILABILITY_UNSPECIFIED = 0;
732
+
733
+ // Indicates that free instances are available to be created in this
734
+ // instance configuration.
735
+ AVAILABLE = 1;
736
+
737
+ // Indicates that free instances are not supported in this instance
738
+ // configuration.
739
+ UNSUPPORTED = 2;
740
+
741
+ // Indicates that free instances are currently not available to be created
742
+ // in this instance configuration.
743
+ DISABLED = 3;
744
+
745
+ // Indicates that additional free instances cannot be created in this
746
+ // instance configuration because the project has reached its limit of free
747
+ // instances.
748
+ QUOTA_EXCEEDED = 4;
749
+ }
750
+
751
+ // Indicates the quorum type of this instance configuration.
752
+ enum QuorumType {
753
+ // Quorum type not specified.
754
+ QUORUM_TYPE_UNSPECIFIED = 0;
755
+
756
+ // An instance configuration tagged with `REGION` quorum type forms a write
757
+ // quorum in a single region.
758
+ REGION = 1;
759
+
760
+ // An instance configuration tagged with the `DUAL_REGION` quorum type forms
761
+ // a write quorum with exactly two read-write regions in a multi-region
762
+ // configuration.
763
+ //
764
+ // This instance configuration requires failover in the event of
765
+ // regional failures.
766
+ DUAL_REGION = 2;
767
+
768
+ // An instance configuration tagged with the `MULTI_REGION` quorum type
769
+ // forms a write quorum from replicas that are spread across more than one
770
+ // region in a multi-region configuration.
771
+ MULTI_REGION = 3;
772
+ }
773
+
774
+ // A unique identifier for the instance configuration. Values
775
+ // are of the form
776
+ // `projects/<project>/instanceConfigs/[a-z][-a-z0-9]*`.
777
+ //
778
+ // User instance configuration must start with `custom-`.
779
+ string name = 1;
780
+
781
+ // The name of this instance configuration as it appears in UIs.
782
+ string display_name = 2;
783
+
784
+ // Output only. Whether this instance configuration is a Google-managed or
785
+ // user-managed configuration.
786
+ Type config_type = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
787
+
788
+ // The geographic placement of nodes in this instance configuration and their
789
+ // replication properties.
790
+ //
791
+ // To create user-managed configurations, input
792
+ // `replicas` must include all replicas in `replicas` of the `base_config`
793
+ // and include one or more replicas in the `optional_replicas` of the
794
+ // `base_config`.
795
+ repeated ReplicaInfo replicas = 3;
796
+
797
+ // Output only. The available optional replicas to choose from for
798
+ // user-managed configurations. Populated for Google-managed configurations.
799
+ repeated ReplicaInfo optional_replicas = 6
800
+ [(google.api.field_behavior) = OUTPUT_ONLY];
801
+
802
+ // Base configuration name, e.g. projects/<project_name>/instanceConfigs/nam3,
803
+ // based on which this configuration is created. Only set for user-managed
804
+ // configurations. `base_config` must refer to a configuration of type
805
+ // `GOOGLE_MANAGED` in the same project as this configuration.
806
+ string base_config = 7 [(google.api.resource_reference) = {
807
+ type: "spanner.googleapis.com/InstanceConfig"
808
+ }];
809
+
810
+ // Cloud Labels are a flexible and lightweight mechanism for organizing cloud
811
+ // resources into groups that reflect a customer's organizational needs and
812
+ // deployment strategies. Cloud Labels can be used to filter collections of
813
+ // resources. They can be used to control how resource metrics are aggregated.
814
+ // And they can be used as arguments to policy management rules (e.g. route,
815
+ // firewall, load balancing, etc.).
816
+ //
817
+ // * Label keys must be between 1 and 63 characters long and must conform to
818
+ // the following regular expression: `[a-z][a-z0-9_-]{0,62}`.
819
+ // * Label values must be between 0 and 63 characters long and must conform
820
+ // to the regular expression `[a-z0-9_-]{0,63}`.
821
+ // * No more than 64 labels can be associated with a given resource.
822
+ //
823
+ // See https://goo.gl/xmQnxf for more information on and examples of labels.
824
+ //
825
+ // If you plan to use labels in your own code, please note that additional
826
+ // characters may be allowed in the future. Therefore, you are advised to use
827
+ // an internal label representation, such as JSON, which doesn't rely upon
828
+ // specific characters being disallowed. For example, representing labels
829
+ // as the string: name + "_" + value would prove problematic if we were to
830
+ // allow "_" in a future release.
831
+ map<string, string> labels = 8;
832
+
833
+ // etag is used for optimistic concurrency control as a way
834
+ // to help prevent simultaneous updates of a instance configuration from
835
+ // overwriting each other. It is strongly suggested that systems make use of
836
+ // the etag in the read-modify-write cycle to perform instance configuration
837
+ // updates in order to avoid race conditions: An etag is returned in the
838
+ // response which contains instance configurations, and systems are expected
839
+ // to put that etag in the request to update instance configuration to ensure
840
+ // that their change is applied to the same version of the instance
841
+ // configuration. If no etag is provided in the call to update the instance
842
+ // configuration, then the existing instance configuration is overwritten
843
+ // blindly.
844
+ string etag = 9;
845
+
846
+ // Allowed values of the "default_leader" schema option for databases in
847
+ // instances that use this instance configuration.
848
+ repeated string leader_options = 4;
849
+
850
+ // Output only. If true, the instance configuration is being created or
851
+ // updated. If false, there are no ongoing operations for the instance
852
+ // configuration.
853
+ bool reconciling = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
854
+
855
+ // Output only. The current instance configuration state. Applicable only for
856
+ // `USER_MANAGED` configurations.
857
+ State state = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
858
+
859
+ // Output only. Describes whether free instances are available to be created
860
+ // in this instance configuration.
861
+ FreeInstanceAvailability free_instance_availability = 12
862
+ [(google.api.field_behavior) = OUTPUT_ONLY];
863
+
864
+ // Output only. The `QuorumType` of the instance configuration.
865
+ QuorumType quorum_type = 18 [(google.api.field_behavior) = OUTPUT_ONLY];
866
+
867
+ // Output only. The storage limit in bytes per processing unit.
868
+ int64 storage_limit_per_processing_unit = 19
869
+ [(google.api.field_behavior) = OUTPUT_ONLY];
870
+ }
871
+
872
+ // ReplicaComputeCapacity describes the amount of server resources that are
873
+ // allocated to each replica identified by the replica selection.
874
+ message ReplicaComputeCapacity {
875
+ // Required. Identifies replicas by specified properties.
876
+ // All replicas in the selection have the same amount of compute capacity.
877
+ ReplicaSelection replica_selection = 1
878
+ [(google.api.field_behavior) = REQUIRED];
879
+
880
+ // Compute capacity allocated to each replica identified by the specified
881
+ // selection.
882
+ // The unit is selected based on the unit used to specify the instance size
883
+ // for non-autoscaling instances, or the unit used in autoscaling limit for
884
+ // autoscaling instances.
885
+ oneof compute_capacity {
886
+ // The number of nodes allocated to each replica.
887
+ //
888
+ // This may be zero in API responses for instances that are not yet in
889
+ // state `READY`.
890
+ int32 node_count = 2;
891
+
892
+ // The number of processing units allocated to each replica.
893
+ //
894
+ // This may be zero in API responses for instances that are not yet in
895
+ // state `READY`.
896
+ int32 processing_units = 3;
897
+ }
898
+ }
899
+
900
+ // Autoscaling configuration for an instance.
901
+ message AutoscalingConfig {
902
+ // The autoscaling limits for the instance. Users can define the minimum and
903
+ // maximum compute capacity allocated to the instance, and the autoscaler will
904
+ // only scale within that range. Users can either use nodes or processing
905
+ // units to specify the limits, but should use the same unit to set both the
906
+ // min_limit and max_limit.
907
+ message AutoscalingLimits {
908
+ // The minimum compute capacity for the instance.
909
+ oneof min_limit {
910
+ // Minimum number of nodes allocated to the instance. If set, this number
911
+ // should be greater than or equal to 1.
912
+ int32 min_nodes = 1;
913
+
914
+ // Minimum number of processing units allocated to the instance. If set,
915
+ // this number should be multiples of 1000.
916
+ int32 min_processing_units = 2;
917
+ }
918
+
919
+ // The maximum compute capacity for the instance. The maximum compute
920
+ // capacity should be less than or equal to 10X the minimum compute
921
+ // capacity.
922
+ oneof max_limit {
923
+ // Maximum number of nodes allocated to the instance. If set, this number
924
+ // should be greater than or equal to min_nodes.
925
+ int32 max_nodes = 3;
926
+
927
+ // Maximum number of processing units allocated to the instance. If set,
928
+ // this number should be multiples of 1000 and be greater than or equal to
929
+ // min_processing_units.
930
+ int32 max_processing_units = 4;
931
+ }
932
+ }
933
+
934
+ // The autoscaling targets for an instance.
935
+ message AutoscalingTargets {
936
+ // Required. The target high priority cpu utilization percentage that the
937
+ // autoscaler should be trying to achieve for the instance. This number is
938
+ // on a scale from 0 (no utilization) to 100 (full utilization). The valid
939
+ // range is [10, 90] inclusive.
940
+ int32 high_priority_cpu_utilization_percent = 1
941
+ [(google.api.field_behavior) = REQUIRED];
942
+
943
+ // Required. The target storage utilization percentage that the autoscaler
944
+ // should be trying to achieve for the instance. This number is on a scale
945
+ // from 0 (no utilization) to 100 (full utilization). The valid range is
946
+ // [10, 99] inclusive.
947
+ int32 storage_utilization_percent = 2
948
+ [(google.api.field_behavior) = REQUIRED];
949
+ }
950
+
951
+ // AsymmetricAutoscalingOption specifies the scaling of replicas identified by
952
+ // the given selection.
953
+ message AsymmetricAutoscalingOption {
954
+ // Overrides the top-level autoscaling configuration for the replicas
955
+ // identified by `replica_selection`. All fields in this message are
956
+ // optional. Any unspecified fields will use the corresponding values from
957
+ // the top-level autoscaling configuration.
958
+ message AutoscalingConfigOverrides {
959
+ // Optional. If specified, overrides the min/max limit in the top-level
960
+ // autoscaling configuration for the selected replicas.
961
+ AutoscalingLimits autoscaling_limits = 1
962
+ [(google.api.field_behavior) = OPTIONAL];
963
+
964
+ // Optional. If specified, overrides the autoscaling target
965
+ // high_priority_cpu_utilization_percent in the top-level autoscaling
966
+ // configuration for the selected replicas.
967
+ int32 autoscaling_target_high_priority_cpu_utilization_percent = 2
968
+ [(google.api.field_behavior) = OPTIONAL];
969
+ }
970
+
971
+ // Required. Selects the replicas to which this AsymmetricAutoscalingOption
972
+ // applies. Only read-only replicas are supported.
973
+ ReplicaSelection replica_selection = 1
974
+ [(google.api.field_behavior) = REQUIRED];
975
+
976
+ // Optional. Overrides applied to the top-level autoscaling configuration
977
+ // for the selected replicas.
978
+ AutoscalingConfigOverrides overrides = 2
979
+ [(google.api.field_behavior) = OPTIONAL];
980
+ }
981
+
982
+ // Required. Autoscaling limits for an instance.
983
+ AutoscalingLimits autoscaling_limits = 1
984
+ [(google.api.field_behavior) = REQUIRED];
985
+
986
+ // Required. The autoscaling targets for an instance.
987
+ AutoscalingTargets autoscaling_targets = 2
988
+ [(google.api.field_behavior) = REQUIRED];
989
+
990
+ // Optional. Optional asymmetric autoscaling options.
991
+ // Replicas matching the replica selection criteria will be autoscaled
992
+ // independently from other replicas. The autoscaler will scale the replicas
993
+ // based on the utilization of replicas identified by the replica selection.
994
+ // Replica selections should not overlap with each other.
995
+ //
996
+ // Other replicas (those do not match any replica selection) will be
997
+ // autoscaled together and will have the same compute capacity allocated to
998
+ // them.
999
+ repeated AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3
1000
+ [(google.api.field_behavior) = OPTIONAL];
1001
+ }
1002
+
1003
+ // An isolated set of Cloud Spanner resources on which databases can be hosted.
1004
+ message Instance {
1005
+ option (google.api.resource) = {
1006
+ type: "spanner.googleapis.com/Instance"
1007
+ pattern: "projects/{project}/instances/{instance}"
1008
+ plural: "instances"
1009
+ singular: "instance"
1010
+ };
1011
+
1012
+ // Indicates the current state of the instance.
1013
+ enum State {
1014
+ // Not specified.
1015
+ STATE_UNSPECIFIED = 0;
1016
+
1017
+ // The instance is still being created. Resources may not be
1018
+ // available yet, and operations such as database creation may not
1019
+ // work.
1020
+ CREATING = 1;
1021
+
1022
+ // The instance is fully created and ready to do work such as
1023
+ // creating databases.
1024
+ READY = 2;
1025
+ }
1026
+
1027
+ // The type of this instance. The type can be used to distinguish product
1028
+ // variants, that can affect aspects like: usage restrictions, quotas and
1029
+ // billing. Currently this is used to distinguish FREE_INSTANCE vs PROVISIONED
1030
+ // instances.
1031
+ enum InstanceType {
1032
+ // Not specified.
1033
+ INSTANCE_TYPE_UNSPECIFIED = 0;
1034
+
1035
+ // Provisioned instances have dedicated resources, standard usage limits and
1036
+ // support.
1037
+ PROVISIONED = 1;
1038
+
1039
+ // Free instances provide no guarantee for dedicated resources,
1040
+ // [node_count, processing_units] should be 0. They come
1041
+ // with stricter usage limits and limited support.
1042
+ FREE_INSTANCE = 2;
1043
+ }
1044
+
1045
+ // The edition selected for this instance. Different editions provide
1046
+ // different capabilities at different price points.
1047
+ enum Edition {
1048
+ // Edition not specified.
1049
+ EDITION_UNSPECIFIED = 0;
1050
+
1051
+ // Standard edition.
1052
+ STANDARD = 1;
1053
+
1054
+ // Enterprise edition.
1055
+ ENTERPRISE = 2;
1056
+
1057
+ // Enterprise Plus edition.
1058
+ ENTERPRISE_PLUS = 3;
1059
+ }
1060
+
1061
+ // Indicates the
1062
+ // [default backup
1063
+ // schedule](https://cloud.google.com/spanner/docs/backup#default-backup-schedules)
1064
+ // behavior for new databases within the instance.
1065
+ enum DefaultBackupScheduleType {
1066
+ // Not specified.
1067
+ DEFAULT_BACKUP_SCHEDULE_TYPE_UNSPECIFIED = 0;
1068
+
1069
+ // A default backup schedule isn't created automatically when a new database
1070
+ // is created in the instance.
1071
+ NONE = 1;
1072
+
1073
+ // A default backup schedule is created automatically when a new database
1074
+ // is created in the instance. The default backup schedule creates a full
1075
+ // backup every 24 hours. These full backups are retained for 7 days.
1076
+ // You can edit or delete the default backup schedule once it's created.
1077
+ AUTOMATIC = 2;
1078
+ }
1079
+
1080
+ // Required. A unique identifier for the instance, which cannot be changed
1081
+ // after the instance is created. Values are of the form
1082
+ // `projects/<project>/instances/[a-z][-a-z0-9]*[a-z0-9]`. The final
1083
+ // segment of the name must be between 2 and 64 characters in length.
1084
+ string name = 1 [(google.api.field_behavior) = REQUIRED];
1085
+
1086
+ // Required. The name of the instance's configuration. Values are of the form
1087
+ // `projects/<project>/instanceConfigs/<configuration>`. See
1088
+ // also [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] and
1089
+ // [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
1090
+ string config = 2 [
1091
+ (google.api.field_behavior) = REQUIRED,
1092
+ (google.api.resource_reference) = {
1093
+ type: "spanner.googleapis.com/InstanceConfig"
1094
+ }
1095
+ ];
1096
+
1097
+ // Required. The descriptive name for this instance as it appears in UIs.
1098
+ // Must be unique per project and between 4 and 30 characters in length.
1099
+ string display_name = 3 [(google.api.field_behavior) = REQUIRED];
1100
+
1101
+ // The number of nodes allocated to this instance. At most, one of either
1102
+ // `node_count` or `processing_units` should be present in the message.
1103
+ //
1104
+ // Users can set the `node_count` field to specify the target number of nodes
1105
+ // allocated to the instance.
1106
+ //
1107
+ // If autoscaling is enabled, `node_count` is treated as an `OUTPUT_ONLY`
1108
+ // field and reflects the current number of nodes allocated to the instance.
1109
+ //
1110
+ // This might be zero in API responses for instances that are not yet in the
1111
+ // `READY` state.
1112
+ //
1113
+ //
1114
+ // For more information, see
1115
+ // [Compute capacity, nodes, and processing
1116
+ // units](https://cloud.google.com/spanner/docs/compute-capacity).
1117
+ int32 node_count = 5;
1118
+
1119
+ // The number of processing units allocated to this instance. At most, one of
1120
+ // either `processing_units` or `node_count` should be present in the message.
1121
+ //
1122
+ // Users can set the `processing_units` field to specify the target number of
1123
+ // processing units allocated to the instance.
1124
+ //
1125
+ // If autoscaling is enabled, `processing_units` is treated as an
1126
+ // `OUTPUT_ONLY` field and reflects the current number of processing units
1127
+ // allocated to the instance.
1128
+ //
1129
+ // This might be zero in API responses for instances that are not yet in the
1130
+ // `READY` state.
1131
+ //
1132
+ //
1133
+ // For more information, see
1134
+ // [Compute capacity, nodes and processing
1135
+ // units](https://cloud.google.com/spanner/docs/compute-capacity).
1136
+ int32 processing_units = 9;
1137
+
1138
+ // Output only. Lists the compute capacity per ReplicaSelection. A replica
1139
+ // selection identifies a set of replicas with common properties. Replicas
1140
+ // identified by a ReplicaSelection are scaled with the same compute capacity.
1141
+ repeated ReplicaComputeCapacity replica_compute_capacity = 19
1142
+ [(google.api.field_behavior) = OUTPUT_ONLY];
1143
+
1144
+ // Optional. The autoscaling configuration. Autoscaling is enabled if this
1145
+ // field is set. When autoscaling is enabled, node_count and processing_units
1146
+ // are treated as OUTPUT_ONLY fields and reflect the current compute capacity
1147
+ // allocated to the instance.
1148
+ AutoscalingConfig autoscaling_config = 17
1149
+ [(google.api.field_behavior) = OPTIONAL];
1150
+
1151
+ // Output only. The current instance state. For
1152
+ // [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance],
1153
+ // the state must be either omitted or set to `CREATING`. For
1154
+ // [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance],
1155
+ // the state must be either omitted or set to `READY`.
1156
+ State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
1157
+
1158
+ // Cloud Labels are a flexible and lightweight mechanism for organizing cloud
1159
+ // resources into groups that reflect a customer's organizational needs and
1160
+ // deployment strategies. Cloud Labels can be used to filter collections of
1161
+ // resources. They can be used to control how resource metrics are aggregated.
1162
+ // And they can be used as arguments to policy management rules (e.g. route,
1163
+ // firewall, load balancing, etc.).
1164
+ //
1165
+ // * Label keys must be between 1 and 63 characters long and must conform to
1166
+ // the following regular expression: `[a-z][a-z0-9_-]{0,62}`.
1167
+ // * Label values must be between 0 and 63 characters long and must conform
1168
+ // to the regular expression `[a-z0-9_-]{0,63}`.
1169
+ // * No more than 64 labels can be associated with a given resource.
1170
+ //
1171
+ // See https://goo.gl/xmQnxf for more information on and examples of labels.
1172
+ //
1173
+ // If you plan to use labels in your own code, please note that additional
1174
+ // characters may be allowed in the future. And so you are advised to use an
1175
+ // internal label representation, such as JSON, which doesn't rely upon
1176
+ // specific characters being disallowed. For example, representing labels
1177
+ // as the string: name + "_" + value would prove problematic if we were to
1178
+ // allow "_" in a future release.
1179
+ map<string, string> labels = 7;
1180
+
1181
+ // The `InstanceType` of the current instance.
1182
+ InstanceType instance_type = 10;
1183
+
1184
+ // Deprecated. This field is not populated.
1185
+ repeated string endpoint_uris = 8;
1186
+
1187
+ // Output only. The time at which the instance was created.
1188
+ google.protobuf.Timestamp create_time = 11
1189
+ [(google.api.field_behavior) = OUTPUT_ONLY];
1190
+
1191
+ // Output only. The time at which the instance was most recently updated.
1192
+ google.protobuf.Timestamp update_time = 12
1193
+ [(google.api.field_behavior) = OUTPUT_ONLY];
1194
+
1195
+ // Free instance metadata. Only populated for free instances.
1196
+ FreeInstanceMetadata free_instance_metadata = 13;
1197
+
1198
+ // Optional. The `Edition` of the current instance.
1199
+ Edition edition = 20 [(google.api.field_behavior) = OPTIONAL];
1200
+
1201
+ // Optional. Controls the default backup schedule behavior for new databases
1202
+ // within the instance. By default, a backup schedule is created automatically
1203
+ // when a new database is created in a new instance.
1204
+ //
1205
+ // Note that the `AUTOMATIC` value isn't permitted for free instances,
1206
+ // as backups and backup schedules aren't supported for free instances.
1207
+ //
1208
+ // In the `GetInstance` or `ListInstances` response, if the value of
1209
+ // `default_backup_schedule_type` isn't set, or set to `NONE`, Spanner doesn't
1210
+ // create a default backup schedule for new databases in the instance.
1211
+ DefaultBackupScheduleType default_backup_schedule_type = 23
1212
+ [(google.api.field_behavior) = OPTIONAL];
1213
+ }
1214
+
1215
+ // The request for
1216
+ // [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
1217
+ message ListInstanceConfigsRequest {
1218
+ // Required. The name of the project for which a list of supported instance
1219
+ // configurations is requested. Values are of the form
1220
+ // `projects/<project>`.
1221
+ string parent = 1 [
1222
+ (google.api.field_behavior) = REQUIRED,
1223
+ (google.api.resource_reference) = {
1224
+ type: "cloudresourcemanager.googleapis.com/Project"
1225
+ }
1226
+ ];
1227
+
1228
+ // Number of instance configurations to be returned in the response. If 0 or
1229
+ // less, defaults to the server's maximum allowed page size.
1230
+ int32 page_size = 2;
1231
+
1232
+ // If non-empty, `page_token` should contain a
1233
+ // [next_page_token][google.spanner.admin.instance.v1.ListInstanceConfigsResponse.next_page_token]
1234
+ // from a previous
1235
+ // [ListInstanceConfigsResponse][google.spanner.admin.instance.v1.ListInstanceConfigsResponse].
1236
+ string page_token = 3;
1237
+ }
1238
+
1239
+ // The response for
1240
+ // [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
1241
+ message ListInstanceConfigsResponse {
1242
+ // The list of requested instance configurations.
1243
+ repeated InstanceConfig instance_configs = 1;
1244
+
1245
+ // `next_page_token` can be sent in a subsequent
1246
+ // [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs]
1247
+ // call to fetch more of the matching instance configurations.
1248
+ string next_page_token = 2;
1249
+ }
1250
+
1251
+ // The request for
1252
+ // [GetInstanceConfigRequest][google.spanner.admin.instance.v1.InstanceAdmin.GetInstanceConfig].
1253
+ message GetInstanceConfigRequest {
1254
+ // Required. The name of the requested instance configuration. Values are of
1255
+ // the form `projects/<project>/instanceConfigs/<config>`.
1256
+ string name = 1 [
1257
+ (google.api.field_behavior) = REQUIRED,
1258
+ (google.api.resource_reference) = {
1259
+ type: "spanner.googleapis.com/InstanceConfig"
1260
+ }
1261
+ ];
1262
+ }
1263
+
1264
+ // The request for
1265
+ // [CreateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstanceConfig].
1266
+ message CreateInstanceConfigRequest {
1267
+ // Required. The name of the project in which to create the instance
1268
+ // configuration. Values are of the form `projects/<project>`.
1269
+ string parent = 1 [
1270
+ (google.api.field_behavior) = REQUIRED,
1271
+ (google.api.resource_reference) = {
1272
+ type: "cloudresourcemanager.googleapis.com/Project"
1273
+ }
1274
+ ];
1275
+
1276
+ // Required. The ID of the instance configuration to create. Valid identifiers
1277
+ // are of the form `custom-[-a-z0-9]*[a-z0-9]` and must be between 2 and 64
1278
+ // characters in length. The `custom-` prefix is required to avoid name
1279
+ // conflicts with Google-managed configurations.
1280
+ string instance_config_id = 2 [(google.api.field_behavior) = REQUIRED];
1281
+
1282
+ // Required. The `InstanceConfig` proto of the configuration to create.
1283
+ // `instance_config.name` must be
1284
+ // `<parent>/instanceConfigs/<instance_config_id>`.
1285
+ // `instance_config.base_config` must be a Google-managed configuration name,
1286
+ // e.g. <parent>/instanceConfigs/us-east1, <parent>/instanceConfigs/nam3.
1287
+ InstanceConfig instance_config = 3 [(google.api.field_behavior) = REQUIRED];
1288
+
1289
+ // An option to validate, but not actually execute, a request,
1290
+ // and provide the same response.
1291
+ bool validate_only = 4;
1292
+ }
1293
+
1294
+ // The request for
1295
+ // [UpdateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstanceConfig].
1296
+ message UpdateInstanceConfigRequest {
1297
+ // Required. The user instance configuration to update, which must always
1298
+ // include the instance configuration name. Otherwise, only fields mentioned
1299
+ // in
1300
+ // [update_mask][google.spanner.admin.instance.v1.UpdateInstanceConfigRequest.update_mask]
1301
+ // need be included. To prevent conflicts of concurrent updates,
1302
+ // [etag][google.spanner.admin.instance.v1.InstanceConfig.reconciling] can
1303
+ // be used.
1304
+ InstanceConfig instance_config = 1 [(google.api.field_behavior) = REQUIRED];
1305
+
1306
+ // Required. A mask specifying which fields in
1307
+ // [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] should be
1308
+ // updated. The field mask must always be specified; this prevents any future
1309
+ // fields in [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig]
1310
+ // from being erased accidentally by clients that do not know about them. Only
1311
+ // display_name and labels can be updated.
1312
+ google.protobuf.FieldMask update_mask = 2
1313
+ [(google.api.field_behavior) = REQUIRED];
1314
+
1315
+ // An option to validate, but not actually execute, a request,
1316
+ // and provide the same response.
1317
+ bool validate_only = 3;
1318
+ }
1319
+
1320
+ // The request for
1321
+ // [DeleteInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstanceConfig].
1322
+ message DeleteInstanceConfigRequest {
1323
+ // Required. The name of the instance configuration to be deleted.
1324
+ // Values are of the form
1325
+ // `projects/<project>/instanceConfigs/<instance_config>`
1326
+ string name = 1 [
1327
+ (google.api.field_behavior) = REQUIRED,
1328
+ (google.api.resource_reference) = {
1329
+ type: "spanner.googleapis.com/InstanceConfig"
1330
+ }
1331
+ ];
1332
+
1333
+ // Used for optimistic concurrency control as a way to help prevent
1334
+ // simultaneous deletes of an instance configuration from overwriting each
1335
+ // other. If not empty, the API
1336
+ // only deletes the instance configuration when the etag provided matches the
1337
+ // current status of the requested instance configuration. Otherwise, deletes
1338
+ // the instance configuration without checking the current status of the
1339
+ // requested instance configuration.
1340
+ string etag = 2;
1341
+
1342
+ // An option to validate, but not actually execute, a request,
1343
+ // and provide the same response.
1344
+ bool validate_only = 3;
1345
+ }
1346
+
1347
+ // The request for
1348
+ // [ListInstanceConfigOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigOperations].
1349
+ message ListInstanceConfigOperationsRequest {
1350
+ // Required. The project of the instance configuration operations.
1351
+ // Values are of the form `projects/<project>`.
1352
+ string parent = 1 [
1353
+ (google.api.field_behavior) = REQUIRED,
1354
+ (google.api.resource_reference) = {
1355
+ type: "cloudresourcemanager.googleapis.com/Project"
1356
+ }
1357
+ ];
1358
+
1359
+ // An expression that filters the list of returned operations.
1360
+ //
1361
+ // A filter expression consists of a field name, a
1362
+ // comparison operator, and a value for filtering.
1363
+ // The value must be a string, a number, or a boolean. The comparison operator
1364
+ // must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
1365
+ // Colon `:` is the contains operator. Filter rules are not case sensitive.
1366
+ //
1367
+ // The following fields in the Operation are eligible for filtering:
1368
+ //
1369
+ // * `name` - The name of the long-running operation
1370
+ // * `done` - False if the operation is in progress, else true.
1371
+ // * `metadata.@type` - the type of metadata. For example, the type string
1372
+ // for
1373
+ // [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]
1374
+ // is
1375
+ // `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`.
1376
+ // * `metadata.<field_name>` - any field in metadata.value.
1377
+ // `metadata.@type` must be specified first, if filtering on metadata
1378
+ // fields.
1379
+ // * `error` - Error associated with the long-running operation.
1380
+ // * `response.@type` - the type of response.
1381
+ // * `response.<field_name>` - any field in response.value.
1382
+ //
1383
+ // You can combine multiple expressions by enclosing each expression in
1384
+ // parentheses. By default, expressions are combined with AND logic. However,
1385
+ // you can specify AND, OR, and NOT logic explicitly.
1386
+ //
1387
+ // Here are a few examples:
1388
+ //
1389
+ // * `done:true` - The operation is complete.
1390
+ // * `(metadata.@type=` \
1391
+ // `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata)
1392
+ // AND` \
1393
+ // `(metadata.instance_config.name:custom-config) AND` \
1394
+ // `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \
1395
+ // `(error:*)` - Return operations where:
1396
+ // * The operation's metadata type is
1397
+ // [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata].
1398
+ // * The instance configuration name contains "custom-config".
1399
+ // * The operation started before 2021-03-28T14:50:00Z.
1400
+ // * The operation resulted in an error.
1401
+ string filter = 2;
1402
+
1403
+ // Number of operations to be returned in the response. If 0 or
1404
+ // less, defaults to the server's maximum allowed page size.
1405
+ int32 page_size = 3;
1406
+
1407
+ // If non-empty, `page_token` should contain a
1408
+ // [next_page_token][google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse.next_page_token]
1409
+ // from a previous
1410
+ // [ListInstanceConfigOperationsResponse][google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse]
1411
+ // to the same `parent` and with the same `filter`.
1412
+ string page_token = 4;
1413
+ }
1414
+
1415
+ // The response for
1416
+ // [ListInstanceConfigOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigOperations].
1417
+ message ListInstanceConfigOperationsResponse {
1418
+ // The list of matching instance configuration long-running operations. Each
1419
+ // operation's name will be
1420
+ // prefixed by the name of the instance configuration. The operation's
1421
+ // metadata field type
1422
+ // `metadata.type_url` describes the type of the metadata.
1423
+ repeated google.longrunning.Operation operations = 1;
1424
+
1425
+ // `next_page_token` can be sent in a subsequent
1426
+ // [ListInstanceConfigOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigOperations]
1427
+ // call to fetch more of the matching metadata.
1428
+ string next_page_token = 2;
1429
+ }
1430
+
1431
+ // The request for
1432
+ // [GetInstance][google.spanner.admin.instance.v1.InstanceAdmin.GetInstance].
1433
+ message GetInstanceRequest {
1434
+ // Required. The name of the requested instance. Values are of the form
1435
+ // `projects/<project>/instances/<instance>`.
1436
+ string name = 1 [
1437
+ (google.api.field_behavior) = REQUIRED,
1438
+ (google.api.resource_reference) = {
1439
+ type: "spanner.googleapis.com/Instance"
1440
+ }
1441
+ ];
1442
+
1443
+ // If field_mask is present, specifies the subset of
1444
+ // [Instance][google.spanner.admin.instance.v1.Instance] fields that should be
1445
+ // returned. If absent, all
1446
+ // [Instance][google.spanner.admin.instance.v1.Instance] fields are returned.
1447
+ google.protobuf.FieldMask field_mask = 2;
1448
+ }
1449
+
1450
+ // The request for
1451
+ // [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance].
1452
+ message CreateInstanceRequest {
1453
+ // Required. The name of the project in which to create the instance. Values
1454
+ // are of the form `projects/<project>`.
1455
+ string parent = 1 [
1456
+ (google.api.field_behavior) = REQUIRED,
1457
+ (google.api.resource_reference) = {
1458
+ type: "cloudresourcemanager.googleapis.com/Project"
1459
+ }
1460
+ ];
1461
+
1462
+ // Required. The ID of the instance to create. Valid identifiers are of the
1463
+ // form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64 characters in
1464
+ // length.
1465
+ string instance_id = 2 [(google.api.field_behavior) = REQUIRED];
1466
+
1467
+ // Required. The instance to create. The name may be omitted, but if
1468
+ // specified must be `<parent>/instances/<instance_id>`.
1469
+ Instance instance = 3 [(google.api.field_behavior) = REQUIRED];
1470
+ }
1471
+
1472
+ // The request for
1473
+ // [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances].
1474
+ message ListInstancesRequest {
1475
+ // Required. The name of the project for which a list of instances is
1476
+ // requested. Values are of the form `projects/<project>`.
1477
+ string parent = 1 [
1478
+ (google.api.field_behavior) = REQUIRED,
1479
+ (google.api.resource_reference) = {
1480
+ type: "cloudresourcemanager.googleapis.com/Project"
1481
+ }
1482
+ ];
1483
+
1484
+ // Number of instances to be returned in the response. If 0 or less, defaults
1485
+ // to the server's maximum allowed page size.
1486
+ int32 page_size = 2;
1487
+
1488
+ // If non-empty, `page_token` should contain a
1489
+ // [next_page_token][google.spanner.admin.instance.v1.ListInstancesResponse.next_page_token]
1490
+ // from a previous
1491
+ // [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse].
1492
+ string page_token = 3;
1493
+
1494
+ // An expression for filtering the results of the request. Filter rules are
1495
+ // case insensitive. The fields eligible for filtering are:
1496
+ //
1497
+ // * `name`
1498
+ // * `display_name`
1499
+ // * `labels.key` where key is the name of a label
1500
+ //
1501
+ // Some examples of using filters are:
1502
+ //
1503
+ // * `name:*` --> The instance has a name.
1504
+ // * `name:Howl` --> The instance's name contains the string "howl".
1505
+ // * `name:HOWL` --> Equivalent to above.
1506
+ // * `NAME:howl` --> Equivalent to above.
1507
+ // * `labels.env:*` --> The instance has the label "env".
1508
+ // * `labels.env:dev` --> The instance has the label "env" and the value of
1509
+ // the label contains the string "dev".
1510
+ // * `name:howl labels.env:dev` --> The instance's name contains "howl" and
1511
+ // it has the label "env" with its value
1512
+ // containing "dev".
1513
+ string filter = 4;
1514
+
1515
+ // Deadline used while retrieving metadata for instances.
1516
+ // Instances whose metadata cannot be retrieved within this deadline will be
1517
+ // added to
1518
+ // [unreachable][google.spanner.admin.instance.v1.ListInstancesResponse.unreachable]
1519
+ // in
1520
+ // [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse].
1521
+ google.protobuf.Timestamp instance_deadline = 5;
1522
+ }
1523
+
1524
+ // The response for
1525
+ // [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances].
1526
+ message ListInstancesResponse {
1527
+ // The list of requested instances.
1528
+ repeated Instance instances = 1;
1529
+
1530
+ // `next_page_token` can be sent in a subsequent
1531
+ // [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances]
1532
+ // call to fetch more of the matching instances.
1533
+ string next_page_token = 2;
1534
+
1535
+ // The list of unreachable instances.
1536
+ // It includes the names of instances whose metadata could not be retrieved
1537
+ // within
1538
+ // [instance_deadline][google.spanner.admin.instance.v1.ListInstancesRequest.instance_deadline].
1539
+ repeated string unreachable = 3;
1540
+ }
1541
+
1542
+ // The request for
1543
+ // [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance].
1544
+ message UpdateInstanceRequest {
1545
+ // Required. The instance to update, which must always include the instance
1546
+ // name. Otherwise, only fields mentioned in
1547
+ // [field_mask][google.spanner.admin.instance.v1.UpdateInstanceRequest.field_mask]
1548
+ // need be included.
1549
+ Instance instance = 1 [(google.api.field_behavior) = REQUIRED];
1550
+
1551
+ // Required. A mask specifying which fields in
1552
+ // [Instance][google.spanner.admin.instance.v1.Instance] should be updated.
1553
+ // The field mask must always be specified; this prevents any future fields in
1554
+ // [Instance][google.spanner.admin.instance.v1.Instance] from being erased
1555
+ // accidentally by clients that do not know about them.
1556
+ google.protobuf.FieldMask field_mask = 2
1557
+ [(google.api.field_behavior) = REQUIRED];
1558
+ }
1559
+
1560
+ // The request for
1561
+ // [DeleteInstance][google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstance].
1562
+ message DeleteInstanceRequest {
1563
+ // Required. The name of the instance to be deleted. Values are of the form
1564
+ // `projects/<project>/instances/<instance>`
1565
+ string name = 1 [
1566
+ (google.api.field_behavior) = REQUIRED,
1567
+ (google.api.resource_reference) = {
1568
+ type: "spanner.googleapis.com/Instance"
1569
+ }
1570
+ ];
1571
+ }
1572
+
1573
+ // Metadata type for the operation returned by
1574
+ // [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance].
1575
+ message CreateInstanceMetadata {
1576
+ // The instance being created.
1577
+ Instance instance = 1;
1578
+
1579
+ // The time at which the
1580
+ // [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance]
1581
+ // request was received.
1582
+ google.protobuf.Timestamp start_time = 2;
1583
+
1584
+ // The time at which this operation was cancelled. If set, this operation is
1585
+ // in the process of undoing itself (which is guaranteed to succeed) and
1586
+ // cannot be cancelled again.
1587
+ google.protobuf.Timestamp cancel_time = 3;
1588
+
1589
+ // The time at which this operation failed or was completed successfully.
1590
+ google.protobuf.Timestamp end_time = 4;
1591
+
1592
+ // The expected fulfillment period of this create operation.
1593
+ FulfillmentPeriod expected_fulfillment_period = 5;
1594
+ }
1595
+
1596
+ // Metadata type for the operation returned by
1597
+ // [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance].
1598
+ message UpdateInstanceMetadata {
1599
+ // The desired end state of the update.
1600
+ Instance instance = 1;
1601
+
1602
+ // The time at which
1603
+ // [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance]
1604
+ // request was received.
1605
+ google.protobuf.Timestamp start_time = 2;
1606
+
1607
+ // The time at which this operation was cancelled. If set, this operation is
1608
+ // in the process of undoing itself (which is guaranteed to succeed) and
1609
+ // cannot be cancelled again.
1610
+ google.protobuf.Timestamp cancel_time = 3;
1611
+
1612
+ // The time at which this operation failed or was completed successfully.
1613
+ google.protobuf.Timestamp end_time = 4;
1614
+
1615
+ // The expected fulfillment period of this update operation.
1616
+ FulfillmentPeriod expected_fulfillment_period = 5;
1617
+ }
1618
+
1619
+ // Free instance specific metadata that is kept even after an instance has been
1620
+ // upgraded for tracking purposes.
1621
+ message FreeInstanceMetadata {
1622
+ // Allows users to change behavior when a free instance expires.
1623
+ enum ExpireBehavior {
1624
+ // Not specified.
1625
+ EXPIRE_BEHAVIOR_UNSPECIFIED = 0;
1626
+
1627
+ // When the free instance expires, upgrade the instance to a provisioned
1628
+ // instance.
1629
+ FREE_TO_PROVISIONED = 1;
1630
+
1631
+ // When the free instance expires, disable the instance, and delete it
1632
+ // after the grace period passes if it has not been upgraded.
1633
+ REMOVE_AFTER_GRACE_PERIOD = 2;
1634
+ }
1635
+
1636
+ // Output only. Timestamp after which the instance will either be upgraded or
1637
+ // scheduled for deletion after a grace period. ExpireBehavior is used to
1638
+ // choose between upgrading or scheduling the free instance for deletion. This
1639
+ // timestamp is set during the creation of a free instance.
1640
+ google.protobuf.Timestamp expire_time = 1
1641
+ [(google.api.field_behavior) = OUTPUT_ONLY];
1642
+
1643
+ // Output only. If present, the timestamp at which the free instance was
1644
+ // upgraded to a provisioned instance.
1645
+ google.protobuf.Timestamp upgrade_time = 2
1646
+ [(google.api.field_behavior) = OUTPUT_ONLY];
1647
+
1648
+ // Specifies the expiration behavior of a free instance. The default of
1649
+ // ExpireBehavior is `REMOVE_AFTER_GRACE_PERIOD`. This can be modified during
1650
+ // or after creation, and before expiration.
1651
+ ExpireBehavior expire_behavior = 3;
1652
+ }
1653
+
1654
+ // Metadata type for the operation returned by
1655
+ // [CreateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstanceConfig].
1656
+ message CreateInstanceConfigMetadata {
1657
+ // The target instance configuration end state.
1658
+ InstanceConfig instance_config = 1;
1659
+
1660
+ // The progress of the
1661
+ // [CreateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstanceConfig]
1662
+ // operation.
1663
+ OperationProgress progress = 2;
1664
+
1665
+ // The time at which this operation was cancelled.
1666
+ google.protobuf.Timestamp cancel_time = 3;
1667
+ }
1668
+
1669
+ // Metadata type for the operation returned by
1670
+ // [UpdateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstanceConfig].
1671
+ message UpdateInstanceConfigMetadata {
1672
+ // The desired instance configuration after updating.
1673
+ InstanceConfig instance_config = 1;
1674
+
1675
+ // The progress of the
1676
+ // [UpdateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstanceConfig]
1677
+ // operation.
1678
+ OperationProgress progress = 2;
1679
+
1680
+ // The time at which this operation was cancelled.
1681
+ google.protobuf.Timestamp cancel_time = 3;
1682
+ }
1683
+
1684
+ // An isolated set of Cloud Spanner resources that databases can define
1685
+ // placements on.
1686
+ message InstancePartition {
1687
+ option (google.api.resource) = {
1688
+ type: "spanner.googleapis.com/InstancePartition"
1689
+ pattern: "projects/{project}/instances/{instance}/instancePartitions/{instance_partition}"
1690
+ plural: "instancePartitions"
1691
+ singular: "instancePartition"
1692
+ };
1693
+
1694
+ // Indicates the current state of the instance partition.
1695
+ enum State {
1696
+ // Not specified.
1697
+ STATE_UNSPECIFIED = 0;
1698
+
1699
+ // The instance partition is still being created. Resources may not be
1700
+ // available yet, and operations such as creating placements using this
1701
+ // instance partition may not work.
1702
+ CREATING = 1;
1703
+
1704
+ // The instance partition is fully created and ready to do work such as
1705
+ // creating placements and using in databases.
1706
+ READY = 2;
1707
+ }
1708
+
1709
+ // Required. A unique identifier for the instance partition. Values are of the
1710
+ // form
1711
+ // `projects/<project>/instances/<instance>/instancePartitions/[a-z][-a-z0-9]*[a-z0-9]`.
1712
+ // The final segment of the name must be between 2 and 64 characters in
1713
+ // length. An instance partition's name cannot be changed after the instance
1714
+ // partition is created.
1715
+ string name = 1 [(google.api.field_behavior) = REQUIRED];
1716
+
1717
+ // Required. The name of the instance partition's configuration. Values are of
1718
+ // the form `projects/<project>/instanceConfigs/<configuration>`. See also
1719
+ // [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] and
1720
+ // [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
1721
+ string config = 2 [
1722
+ (google.api.field_behavior) = REQUIRED,
1723
+ (google.api.resource_reference) = {
1724
+ type: "spanner.googleapis.com/InstanceConfig"
1725
+ }
1726
+ ];
1727
+
1728
+ // Required. The descriptive name for this instance partition as it appears in
1729
+ // UIs. Must be unique per project and between 4 and 30 characters in length.
1730
+ string display_name = 3 [(google.api.field_behavior) = REQUIRED];
1731
+
1732
+ // Compute capacity defines amount of server and storage resources that are
1733
+ // available to the databases in an instance partition. At most, one of either
1734
+ // `node_count` or` processing_units` should be present in the message. For
1735
+ // more information, see
1736
+ // [Compute capacity, nodes, and processing
1737
+ // units](https://cloud.google.com/spanner/docs/compute-capacity).
1738
+ oneof compute_capacity {
1739
+ // The number of nodes allocated to this instance partition.
1740
+ //
1741
+ // Users can set the `node_count` field to specify the target number of
1742
+ // nodes allocated to the instance partition.
1743
+ //
1744
+ // This may be zero in API responses for instance partitions that are not
1745
+ // yet in state `READY`.
1746
+ int32 node_count = 5;
1747
+
1748
+ // The number of processing units allocated to this instance partition.
1749
+ //
1750
+ // Users can set the `processing_units` field to specify the target number
1751
+ // of processing units allocated to the instance partition.
1752
+ //
1753
+ // This might be zero in API responses for instance partitions that are not
1754
+ // yet in the `READY` state.
1755
+ int32 processing_units = 6;
1756
+ }
1757
+
1758
+ // Output only. The current instance partition state.
1759
+ State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
1760
+
1761
+ // Output only. The time at which the instance partition was created.
1762
+ google.protobuf.Timestamp create_time = 8
1763
+ [(google.api.field_behavior) = OUTPUT_ONLY];
1764
+
1765
+ // Output only. The time at which the instance partition was most recently
1766
+ // updated.
1767
+ google.protobuf.Timestamp update_time = 9
1768
+ [(google.api.field_behavior) = OUTPUT_ONLY];
1769
+
1770
+ // Output only. The names of the databases that reference this
1771
+ // instance partition. Referencing databases should share the parent instance.
1772
+ // The existence of any referencing database prevents the instance partition
1773
+ // from being deleted.
1774
+ repeated string referencing_databases = 10
1775
+ [(google.api.field_behavior) = OUTPUT_ONLY];
1776
+
1777
+ // Output only. Deprecated: This field is not populated.
1778
+ // Output only. The names of the backups that reference this instance
1779
+ // partition. Referencing backups should share the parent instance. The
1780
+ // existence of any referencing backup prevents the instance partition from
1781
+ // being deleted.
1782
+ repeated string referencing_backups = 11
1783
+ [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY];
1784
+
1785
+ // Used for optimistic concurrency control as a way
1786
+ // to help prevent simultaneous updates of a instance partition from
1787
+ // overwriting each other. It is strongly suggested that systems make use of
1788
+ // the etag in the read-modify-write cycle to perform instance partition
1789
+ // updates in order to avoid race conditions: An etag is returned in the
1790
+ // response which contains instance partitions, and systems are expected to
1791
+ // put that etag in the request to update instance partitions to ensure that
1792
+ // their change will be applied to the same version of the instance partition.
1793
+ // If no etag is provided in the call to update instance partition, then the
1794
+ // existing instance partition is overwritten blindly.
1795
+ string etag = 12;
1796
+ }
1797
+
1798
+ // Metadata type for the operation returned by
1799
+ // [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition].
1800
+ message CreateInstancePartitionMetadata {
1801
+ // The instance partition being created.
1802
+ InstancePartition instance_partition = 1;
1803
+
1804
+ // The time at which the
1805
+ // [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition]
1806
+ // request was received.
1807
+ google.protobuf.Timestamp start_time = 2;
1808
+
1809
+ // The time at which this operation was cancelled. If set, this operation is
1810
+ // in the process of undoing itself (which is guaranteed to succeed) and
1811
+ // cannot be cancelled again.
1812
+ google.protobuf.Timestamp cancel_time = 3;
1813
+
1814
+ // The time at which this operation failed or was completed successfully.
1815
+ google.protobuf.Timestamp end_time = 4;
1816
+ }
1817
+
1818
+ // The request for
1819
+ // [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition].
1820
+ message CreateInstancePartitionRequest {
1821
+ // Required. The name of the instance in which to create the instance
1822
+ // partition. Values are of the form
1823
+ // `projects/<project>/instances/<instance>`.
1824
+ string parent = 1 [
1825
+ (google.api.field_behavior) = REQUIRED,
1826
+ (google.api.resource_reference) = {
1827
+ type: "spanner.googleapis.com/Instance"
1828
+ }
1829
+ ];
1830
+
1831
+ // Required. The ID of the instance partition to create. Valid identifiers are
1832
+ // of the form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64
1833
+ // characters in length.
1834
+ string instance_partition_id = 2 [(google.api.field_behavior) = REQUIRED];
1835
+
1836
+ // Required. The instance partition to create. The instance_partition.name may
1837
+ // be omitted, but if specified must be
1838
+ // `<parent>/instancePartitions/<instance_partition_id>`.
1839
+ InstancePartition instance_partition = 3
1840
+ [(google.api.field_behavior) = REQUIRED];
1841
+ }
1842
+
1843
+ // The request for
1844
+ // [DeleteInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstancePartition].
1845
+ message DeleteInstancePartitionRequest {
1846
+ // Required. The name of the instance partition to be deleted.
1847
+ // Values are of the form
1848
+ // `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`
1849
+ string name = 1 [
1850
+ (google.api.field_behavior) = REQUIRED,
1851
+ (google.api.resource_reference) = {
1852
+ type: "spanner.googleapis.com/InstancePartition"
1853
+ }
1854
+ ];
1855
+
1856
+ // Optional. If not empty, the API only deletes the instance partition when
1857
+ // the etag provided matches the current status of the requested instance
1858
+ // partition. Otherwise, deletes the instance partition without checking the
1859
+ // current status of the requested instance partition.
1860
+ string etag = 2;
1861
+ }
1862
+
1863
+ // The request for
1864
+ // [GetInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.GetInstancePartition].
1865
+ message GetInstancePartitionRequest {
1866
+ // Required. The name of the requested instance partition. Values are of
1867
+ // the form
1868
+ // `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`.
1869
+ string name = 1 [
1870
+ (google.api.field_behavior) = REQUIRED,
1871
+ (google.api.resource_reference) = {
1872
+ type: "spanner.googleapis.com/InstancePartition"
1873
+ }
1874
+ ];
1875
+ }
1876
+
1877
+ // The request for
1878
+ // [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition].
1879
+ message UpdateInstancePartitionRequest {
1880
+ // Required. The instance partition to update, which must always include the
1881
+ // instance partition name. Otherwise, only fields mentioned in
1882
+ // [field_mask][google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.field_mask]
1883
+ // need be included.
1884
+ InstancePartition instance_partition = 1
1885
+ [(google.api.field_behavior) = REQUIRED];
1886
+
1887
+ // Required. A mask specifying which fields in
1888
+ // [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
1889
+ // should be updated. The field mask must always be specified; this prevents
1890
+ // any future fields in
1891
+ // [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
1892
+ // from being erased accidentally by clients that do not know about them.
1893
+ google.protobuf.FieldMask field_mask = 2
1894
+ [(google.api.field_behavior) = REQUIRED];
1895
+ }
1896
+
1897
+ // Metadata type for the operation returned by
1898
+ // [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition].
1899
+ message UpdateInstancePartitionMetadata {
1900
+ // The desired end state of the update.
1901
+ InstancePartition instance_partition = 1;
1902
+
1903
+ // The time at which
1904
+ // [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition]
1905
+ // request was received.
1906
+ google.protobuf.Timestamp start_time = 2;
1907
+
1908
+ // The time at which this operation was cancelled. If set, this operation is
1909
+ // in the process of undoing itself (which is guaranteed to succeed) and
1910
+ // cannot be cancelled again.
1911
+ google.protobuf.Timestamp cancel_time = 3;
1912
+
1913
+ // The time at which this operation failed or was completed successfully.
1914
+ google.protobuf.Timestamp end_time = 4;
1915
+ }
1916
+
1917
+ // The request for
1918
+ // [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions].
1919
+ message ListInstancePartitionsRequest {
1920
+ // Required. The instance whose instance partitions should be listed. Values
1921
+ // are of the form `projects/<project>/instances/<instance>`. Use `{instance}
1922
+ // = '-'` to list instance partitions for all Instances in a project, e.g.,
1923
+ // `projects/myproject/instances/-`.
1924
+ string parent = 1 [
1925
+ (google.api.field_behavior) = REQUIRED,
1926
+ (google.api.resource_reference) = {
1927
+ type: "spanner.googleapis.com/Instance"
1928
+ }
1929
+ ];
1930
+
1931
+ // Number of instance partitions to be returned in the response. If 0 or less,
1932
+ // defaults to the server's maximum allowed page size.
1933
+ int32 page_size = 2;
1934
+
1935
+ // If non-empty, `page_token` should contain a
1936
+ // [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.next_page_token]
1937
+ // from a previous
1938
+ // [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
1939
+ string page_token = 3;
1940
+
1941
+ // Optional. Deadline used while retrieving metadata for instance partitions.
1942
+ // Instance partitions whose metadata cannot be retrieved within this deadline
1943
+ // will be added to
1944
+ // [unreachable][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.unreachable]
1945
+ // in
1946
+ // [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
1947
+ google.protobuf.Timestamp instance_partition_deadline = 4
1948
+ [(google.api.field_behavior) = OPTIONAL];
1949
+ }
1950
+
1951
+ // The response for
1952
+ // [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions].
1953
+ message ListInstancePartitionsResponse {
1954
+ // The list of requested instancePartitions.
1955
+ repeated InstancePartition instance_partitions = 1;
1956
+
1957
+ // `next_page_token` can be sent in a subsequent
1958
+ // [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions]
1959
+ // call to fetch more of the matching instance partitions.
1960
+ string next_page_token = 2;
1961
+
1962
+ // The list of unreachable instances or instance partitions.
1963
+ // It includes the names of instances or instance partitions whose metadata
1964
+ // could not be retrieved within
1965
+ // [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionsRequest.instance_partition_deadline].
1966
+ repeated string unreachable = 3;
1967
+ }
1968
+
1969
+ // The request for
1970
+ // [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations].
1971
+ message ListInstancePartitionOperationsRequest {
1972
+ // Required. The parent instance of the instance partition operations.
1973
+ // Values are of the form `projects/<project>/instances/<instance>`.
1974
+ string parent = 1 [
1975
+ (google.api.field_behavior) = REQUIRED,
1976
+ (google.api.resource_reference) = {
1977
+ type: "spanner.googleapis.com/Instance"
1978
+ }
1979
+ ];
1980
+
1981
+ // Optional. An expression that filters the list of returned operations.
1982
+ //
1983
+ // A filter expression consists of a field name, a
1984
+ // comparison operator, and a value for filtering.
1985
+ // The value must be a string, a number, or a boolean. The comparison operator
1986
+ // must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
1987
+ // Colon `:` is the contains operator. Filter rules are not case sensitive.
1988
+ //
1989
+ // The following fields in the Operation are eligible for filtering:
1990
+ //
1991
+ // * `name` - The name of the long-running operation
1992
+ // * `done` - False if the operation is in progress, else true.
1993
+ // * `metadata.@type` - the type of metadata. For example, the type string
1994
+ // for
1995
+ // [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]
1996
+ // is
1997
+ // `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`.
1998
+ // * `metadata.<field_name>` - any field in metadata.value.
1999
+ // `metadata.@type` must be specified first, if filtering on metadata
2000
+ // fields.
2001
+ // * `error` - Error associated with the long-running operation.
2002
+ // * `response.@type` - the type of response.
2003
+ // * `response.<field_name>` - any field in response.value.
2004
+ //
2005
+ // You can combine multiple expressions by enclosing each expression in
2006
+ // parentheses. By default, expressions are combined with AND logic. However,
2007
+ // you can specify AND, OR, and NOT logic explicitly.
2008
+ //
2009
+ // Here are a few examples:
2010
+ //
2011
+ // * `done:true` - The operation is complete.
2012
+ // * `(metadata.@type=` \
2013
+ // `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata)
2014
+ // AND` \
2015
+ // `(metadata.instance_partition.name:custom-instance-partition) AND` \
2016
+ // `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \
2017
+ // `(error:*)` - Return operations where:
2018
+ // * The operation's metadata type is
2019
+ // [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata].
2020
+ // * The instance partition name contains "custom-instance-partition".
2021
+ // * The operation started before 2021-03-28T14:50:00Z.
2022
+ // * The operation resulted in an error.
2023
+ string filter = 2 [(google.api.field_behavior) = OPTIONAL];
2024
+
2025
+ // Optional. Number of operations to be returned in the response. If 0 or
2026
+ // less, defaults to the server's maximum allowed page size.
2027
+ int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
2028
+
2029
+ // Optional. If non-empty, `page_token` should contain a
2030
+ // [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.next_page_token]
2031
+ // from a previous
2032
+ // [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse]
2033
+ // to the same `parent` and with the same `filter`.
2034
+ string page_token = 4 [(google.api.field_behavior) = OPTIONAL];
2035
+
2036
+ // Optional. Deadline used while retrieving metadata for instance partition
2037
+ // operations. Instance partitions whose operation metadata cannot be
2038
+ // retrieved within this deadline will be added to
2039
+ // [unreachable_instance_partitions][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.unreachable_instance_partitions]
2040
+ // in
2041
+ // [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse].
2042
+ google.protobuf.Timestamp instance_partition_deadline = 5
2043
+ [(google.api.field_behavior) = OPTIONAL];
2044
+ }
2045
+
2046
+ // The response for
2047
+ // [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations].
2048
+ message ListInstancePartitionOperationsResponse {
2049
+ // The list of matching instance partition long-running operations. Each
2050
+ // operation's name will be
2051
+ // prefixed by the instance partition's name. The operation's
2052
+ // metadata field type
2053
+ // `metadata.type_url` describes the type of the metadata.
2054
+ repeated google.longrunning.Operation operations = 1;
2055
+
2056
+ // `next_page_token` can be sent in a subsequent
2057
+ // [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations]
2058
+ // call to fetch more of the matching metadata.
2059
+ string next_page_token = 2;
2060
+
2061
+ // The list of unreachable instance partitions.
2062
+ // It includes the names of instance partitions whose operation metadata could
2063
+ // not be retrieved within
2064
+ // [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.instance_partition_deadline].
2065
+ repeated string unreachable_instance_partitions = 3;
2066
+ }
2067
+
2068
+ // The request for
2069
+ // [MoveInstance][google.spanner.admin.instance.v1.InstanceAdmin.MoveInstance].
2070
+ message MoveInstanceRequest {
2071
+ // Required. The instance to move.
2072
+ // Values are of the form `projects/<project>/instances/<instance>`.
2073
+ string name = 1 [
2074
+ (google.api.field_behavior) = REQUIRED,
2075
+ (google.api.resource_reference) = {
2076
+ type: "spanner.googleapis.com/Instance"
2077
+ }
2078
+ ];
2079
+
2080
+ // Required. The target instance configuration where to move the instance.
2081
+ // Values are of the form `projects/<project>/instanceConfigs/<config>`.
2082
+ string target_config = 2 [
2083
+ (google.api.field_behavior) = REQUIRED,
2084
+ (google.api.resource_reference) = {
2085
+ type: "spanner.googleapis.com/InstanceConfig"
2086
+ }
2087
+ ];
2088
+ }
2089
+
2090
+ // The response for
2091
+ // [MoveInstance][google.spanner.admin.instance.v1.InstanceAdmin.MoveInstance].
2092
+ message MoveInstanceResponse {}
2093
+
2094
+ // Metadata type for the operation returned by
2095
+ // [MoveInstance][google.spanner.admin.instance.v1.InstanceAdmin.MoveInstance].
2096
+ message MoveInstanceMetadata {
2097
+ // The target instance configuration where to move the instance.
2098
+ // Values are of the form `projects/<project>/instanceConfigs/<config>`.
2099
+ string target_config = 1;
2100
+
2101
+ // The progress of the
2102
+ // [MoveInstance][google.spanner.admin.instance.v1.InstanceAdmin.MoveInstance]
2103
+ // operation.
2104
+ // [progress_percent][google.spanner.admin.instance.v1.OperationProgress.progress_percent]
2105
+ // is reset when cancellation is requested.
2106
+ OperationProgress progress = 2;
2107
+
2108
+ // The time at which this operation was cancelled.
2109
+ google.protobuf.Timestamp cancel_time = 3;
2110
+ }