@google-cloud/spanner-api 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +111 -0
  2. package/build/protos/google/spanner/admin/database/v1/backup.proto +773 -0
  3. package/build/protos/google/spanner/admin/database/v1/backup_schedule.proto +230 -0
  4. package/build/protos/google/spanner/admin/database/v1/common.proto +132 -0
  5. package/build/protos/google/spanner/admin/database/v1/spanner_database_admin.proto +1314 -0
  6. package/build/protos/google/spanner/admin/instance/v1/common.proto +64 -0
  7. package/build/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto +2184 -0
  8. package/build/protos/google/spanner/executor/v1/cloud_executor.proto +1610 -0
  9. package/build/protos/google/spanner/v1/change_stream.proto +451 -0
  10. package/build/protos/google/spanner/v1/commit_response.proto +80 -0
  11. package/build/protos/google/spanner/v1/keys.proto +163 -0
  12. package/build/protos/google/spanner/v1/location.proto +388 -0
  13. package/build/protos/google/spanner/v1/mutation.proto +156 -0
  14. package/build/protos/google/spanner/v1/query_plan.proto +156 -0
  15. package/build/protos/google/spanner/v1/result_set.proto +260 -0
  16. package/build/protos/google/spanner/v1/spanner.proto +1472 -0
  17. package/build/protos/google/spanner/v1/transaction.proto +329 -0
  18. package/build/protos/google/spanner/v1/type.proto +214 -0
  19. package/build/protos/protos.d.ts +42547 -0
  20. package/build/protos/protos.js +1 -0
  21. package/build/protos/protos.json +1 -0
  22. package/build/src/index.d.ts +20 -0
  23. package/build/src/index.js +34 -0
  24. package/build/src/index.js.map +1 -0
  25. package/build/src/v1/database_admin_client.d.ts +2433 -0
  26. package/build/src/v1/database_admin_client.js +2938 -0
  27. package/build/src/v1/database_admin_client.js.map +1 -0
  28. package/build/src/v1/database_admin_client_config.json +169 -0
  29. package/build/src/v1/database_admin_proto_list.json +6 -0
  30. package/build/src/v1/gapic_metadata.json +253 -0
  31. package/build/src/v1/index.d.ts +4 -0
  32. package/build/src/v1/index.js +29 -0
  33. package/build/src/v1/index.js.map +1 -0
  34. package/build/src/v1/instance_admin_client.d.ts +2162 -0
  35. package/build/src/v1/instance_admin_client.js +2411 -0
  36. package/build/src/v1/instance_admin_client.js.map +1 -0
  37. package/build/src/v1/instance_admin_client_config.json +129 -0
  38. package/build/src/v1/instance_admin_proto_list.json +4 -0
  39. package/build/src/v1/spanner_client.d.ts +1353 -0
  40. package/build/src/v1/spanner_client.js +1456 -0
  41. package/build/src/v1/spanner_client.js.map +1 -0
  42. package/build/src/v1/spanner_client_config.json +123 -0
  43. package/build/src/v1/spanner_executor_proxy_client.d.ts +419 -0
  44. package/build/src/v1/spanner_executor_proxy_client.js +730 -0
  45. package/build/src/v1/spanner_executor_proxy_client.js.map +1 -0
  46. package/build/src/v1/spanner_executor_proxy_client_config.json +30 -0
  47. package/build/src/v1/spanner_executor_proxy_proto_list.json +15 -0
  48. package/build/src/v1/spanner_proto_list.json +12 -0
  49. package/package.json +65 -0
@@ -0,0 +1,2184 @@
1
+ // Copyright 2025 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
+ // Optional. 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. If not specified or set to 0, the autoscaler
940
+ // skips scaling based on high priority CPU utilization.
941
+ int32 high_priority_cpu_utilization_percent = 1
942
+ [(google.api.field_behavior) = OPTIONAL];
943
+
944
+ // Optional. The target total CPU utilization percentage that the autoscaler
945
+ // should be trying to achieve for the instance. This number is on a scale
946
+ // from 0 (no utilization) to 100 (full utilization). The valid range is
947
+ // [10, 90] inclusive. If not specified or set to 0, the autoscaler skips
948
+ // scaling based on total CPU utilization. If both
949
+ // `high_priority_cpu_utilization_percent` and
950
+ // `total_cpu_utilization_percent` are specified, the autoscaler provisions
951
+ // the larger of the two required compute capacities to satisfy both
952
+ // targets.
953
+ int32 total_cpu_utilization_percent = 4
954
+ [(google.api.field_behavior) = OPTIONAL];
955
+
956
+ // Required. The target storage utilization percentage that the autoscaler
957
+ // should be trying to achieve for the instance. This number is on a scale
958
+ // from 0 (no utilization) to 100 (full utilization). The valid range is
959
+ // [10, 99] inclusive.
960
+ int32 storage_utilization_percent = 2
961
+ [(google.api.field_behavior) = REQUIRED];
962
+ }
963
+
964
+ // AsymmetricAutoscalingOption specifies the scaling of replicas identified by
965
+ // the given selection.
966
+ message AsymmetricAutoscalingOption {
967
+ // Overrides the top-level autoscaling configuration for the replicas
968
+ // identified by `replica_selection`. All fields in this message are
969
+ // optional. Any unspecified fields will use the corresponding values from
970
+ // the top-level autoscaling configuration.
971
+ message AutoscalingConfigOverrides {
972
+ // Optional. If specified, overrides the min/max limit in the top-level
973
+ // autoscaling configuration for the selected replicas.
974
+ AutoscalingLimits autoscaling_limits = 1
975
+ [(google.api.field_behavior) = OPTIONAL];
976
+
977
+ // Optional. If specified, overrides the autoscaling target
978
+ // high_priority_cpu_utilization_percent in the top-level autoscaling
979
+ // configuration for the selected replicas.
980
+ int32 autoscaling_target_high_priority_cpu_utilization_percent = 2
981
+ [(google.api.field_behavior) = OPTIONAL];
982
+
983
+ // Optional. If specified, overrides the
984
+ // autoscaling target `total_cpu_utilization_percent`
985
+ // in the top-level autoscaling configuration for the selected replicas.
986
+ int32 autoscaling_target_total_cpu_utilization_percent = 4
987
+ [(google.api.field_behavior) = OPTIONAL];
988
+
989
+ // Optional. If true, disables high priority CPU autoscaling for the
990
+ // selected replicas and ignores
991
+ // [high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.high_priority_cpu_utilization_percent]
992
+ // in the top-level autoscaling configuration.
993
+ //
994
+ // When setting this field to true, setting
995
+ // [autoscaling_target_high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_high_priority_cpu_utilization_percent]
996
+ // field to a non-zero value for the same replica is not supported.
997
+ //
998
+ // If false, the
999
+ // [autoscaling_target_high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_high_priority_cpu_utilization_percent]
1000
+ // field in the replica will be used if set to a non-zero value.
1001
+ // Otherwise, the
1002
+ // [high_priority_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.high_priority_cpu_utilization_percent]
1003
+ // field in the top-level autoscaling configuration will be used.
1004
+ //
1005
+ // Setting both
1006
+ // [disable_high_priority_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_high_priority_cpu_autoscaling]
1007
+ // and
1008
+ // [disable_total_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_total_cpu_autoscaling]
1009
+ // to true for the same replica is not supported.
1010
+ bool disable_high_priority_cpu_autoscaling = 5
1011
+ [(google.api.field_behavior) = OPTIONAL];
1012
+
1013
+ // Optional. If true, disables total CPU autoscaling for the selected
1014
+ // replicas and ignores
1015
+ // [total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.total_cpu_utilization_percent]
1016
+ // in the top-level autoscaling configuration.
1017
+ //
1018
+ // When setting this field to true, setting
1019
+ // [autoscaling_target_total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_total_cpu_utilization_percent]
1020
+ // field to a non-zero value for the same replica is not supported.
1021
+ //
1022
+ // If false, the
1023
+ // [autoscaling_target_total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscaling_target_total_cpu_utilization_percent]
1024
+ // field in the replica will be used if set to a non-zero value.
1025
+ // Otherwise, the
1026
+ // [total_cpu_utilization_percent][google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.total_cpu_utilization_percent]
1027
+ // field in the top-level autoscaling configuration will be used.
1028
+ //
1029
+ // Setting both
1030
+ // [disable_high_priority_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_high_priority_cpu_autoscaling]
1031
+ // and
1032
+ // [disable_total_cpu_autoscaling][google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.disable_total_cpu_autoscaling]
1033
+ // to true for the same replica is not supported.
1034
+ bool disable_total_cpu_autoscaling = 6
1035
+ [(google.api.field_behavior) = OPTIONAL];
1036
+ }
1037
+
1038
+ // Required. Selects the replicas to which this AsymmetricAutoscalingOption
1039
+ // applies. Only read-only replicas are supported.
1040
+ ReplicaSelection replica_selection = 1
1041
+ [(google.api.field_behavior) = REQUIRED];
1042
+
1043
+ // Optional. Overrides applied to the top-level autoscaling configuration
1044
+ // for the selected replicas.
1045
+ AutoscalingConfigOverrides overrides = 2
1046
+ [(google.api.field_behavior) = OPTIONAL];
1047
+ }
1048
+
1049
+ // Required. Autoscaling limits for an instance.
1050
+ AutoscalingLimits autoscaling_limits = 1
1051
+ [(google.api.field_behavior) = REQUIRED];
1052
+
1053
+ // Required. The autoscaling targets for an instance.
1054
+ AutoscalingTargets autoscaling_targets = 2
1055
+ [(google.api.field_behavior) = REQUIRED];
1056
+
1057
+ // Optional. Optional asymmetric autoscaling options.
1058
+ // Replicas matching the replica selection criteria will be autoscaled
1059
+ // independently from other replicas. The autoscaler will scale the replicas
1060
+ // based on the utilization of replicas identified by the replica selection.
1061
+ // Replica selections should not overlap with each other.
1062
+ //
1063
+ // Other replicas (those do not match any replica selection) will be
1064
+ // autoscaled together and will have the same compute capacity allocated to
1065
+ // them.
1066
+ repeated AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3
1067
+ [(google.api.field_behavior) = OPTIONAL];
1068
+ }
1069
+
1070
+ // An isolated set of Cloud Spanner resources on which databases can be hosted.
1071
+ message Instance {
1072
+ option (google.api.resource) = {
1073
+ type: "spanner.googleapis.com/Instance"
1074
+ pattern: "projects/{project}/instances/{instance}"
1075
+ plural: "instances"
1076
+ singular: "instance"
1077
+ };
1078
+
1079
+ // Indicates the current state of the instance.
1080
+ enum State {
1081
+ // Not specified.
1082
+ STATE_UNSPECIFIED = 0;
1083
+
1084
+ // The instance is still being created. Resources may not be
1085
+ // available yet, and operations such as database creation may not
1086
+ // work.
1087
+ CREATING = 1;
1088
+
1089
+ // The instance is fully created and ready to do work such as
1090
+ // creating databases.
1091
+ READY = 2;
1092
+ }
1093
+
1094
+ // The type of this instance. The type can be used to distinguish product
1095
+ // variants, that can affect aspects like: usage restrictions, quotas and
1096
+ // billing. Currently this is used to distinguish FREE_INSTANCE vs PROVISIONED
1097
+ // instances.
1098
+ enum InstanceType {
1099
+ // Not specified.
1100
+ INSTANCE_TYPE_UNSPECIFIED = 0;
1101
+
1102
+ // Provisioned instances have dedicated resources, standard usage limits and
1103
+ // support.
1104
+ PROVISIONED = 1;
1105
+
1106
+ // Free instances provide no guarantee for dedicated resources,
1107
+ // [node_count, processing_units] should be 0. They come
1108
+ // with stricter usage limits and limited support.
1109
+ FREE_INSTANCE = 2;
1110
+ }
1111
+
1112
+ // The edition selected for this instance. Different editions provide
1113
+ // different capabilities at different price points.
1114
+ enum Edition {
1115
+ // Edition not specified.
1116
+ EDITION_UNSPECIFIED = 0;
1117
+
1118
+ // Standard edition.
1119
+ STANDARD = 1;
1120
+
1121
+ // Enterprise edition.
1122
+ ENTERPRISE = 2;
1123
+
1124
+ // Enterprise Plus edition.
1125
+ ENTERPRISE_PLUS = 3;
1126
+ }
1127
+
1128
+ // Indicates the
1129
+ // [default backup
1130
+ // schedule](https://cloud.google.com/spanner/docs/backup#default-backup-schedules)
1131
+ // behavior for new databases within the instance.
1132
+ enum DefaultBackupScheduleType {
1133
+ // Not specified.
1134
+ DEFAULT_BACKUP_SCHEDULE_TYPE_UNSPECIFIED = 0;
1135
+
1136
+ // A default backup schedule isn't created automatically when a new database
1137
+ // is created in the instance.
1138
+ NONE = 1;
1139
+
1140
+ // A default backup schedule is created automatically when a new database
1141
+ // is created in the instance. The default backup schedule creates a full
1142
+ // backup every 24 hours. These full backups are retained for 7 days.
1143
+ // You can edit or delete the default backup schedule once it's created.
1144
+ AUTOMATIC = 2;
1145
+ }
1146
+
1147
+ // Required. A unique identifier for the instance, which cannot be changed
1148
+ // after the instance is created. Values are of the form
1149
+ // `projects/<project>/instances/[a-z][-a-z0-9]*[a-z0-9]`. The final
1150
+ // segment of the name must be between 2 and 64 characters in length.
1151
+ string name = 1 [(google.api.field_behavior) = REQUIRED];
1152
+
1153
+ // Required. The name of the instance's configuration. Values are of the form
1154
+ // `projects/<project>/instanceConfigs/<configuration>`. See
1155
+ // also [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] and
1156
+ // [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
1157
+ string config = 2 [
1158
+ (google.api.field_behavior) = REQUIRED,
1159
+ (google.api.resource_reference) = {
1160
+ type: "spanner.googleapis.com/InstanceConfig"
1161
+ }
1162
+ ];
1163
+
1164
+ // Required. The descriptive name for this instance as it appears in UIs.
1165
+ // Must be unique per project and between 4 and 30 characters in length.
1166
+ string display_name = 3 [(google.api.field_behavior) = REQUIRED];
1167
+
1168
+ // The number of nodes allocated to this instance. At most, one of either
1169
+ // `node_count` or `processing_units` should be present in the message.
1170
+ //
1171
+ // Users can set the `node_count` field to specify the target number of nodes
1172
+ // allocated to the instance.
1173
+ //
1174
+ // If autoscaling is enabled, `node_count` is treated as an `OUTPUT_ONLY`
1175
+ // field and reflects the current number of nodes allocated to the instance.
1176
+ //
1177
+ // This might be zero in API responses for instances that are not yet in the
1178
+ // `READY` state.
1179
+ //
1180
+ //
1181
+ // For more information, see
1182
+ // [Compute capacity, nodes, and processing
1183
+ // units](https://cloud.google.com/spanner/docs/compute-capacity).
1184
+ int32 node_count = 5;
1185
+
1186
+ // The number of processing units allocated to this instance. At most, one of
1187
+ // either `processing_units` or `node_count` should be present in the message.
1188
+ //
1189
+ // Users can set the `processing_units` field to specify the target number of
1190
+ // processing units allocated to the instance.
1191
+ //
1192
+ // If autoscaling is enabled, `processing_units` is treated as an
1193
+ // `OUTPUT_ONLY` field and reflects the current number of processing units
1194
+ // allocated to the instance.
1195
+ //
1196
+ // This might be zero in API responses for instances that are not yet in the
1197
+ // `READY` state.
1198
+ //
1199
+ //
1200
+ // For more information, see
1201
+ // [Compute capacity, nodes and processing
1202
+ // units](https://cloud.google.com/spanner/docs/compute-capacity).
1203
+ int32 processing_units = 9;
1204
+
1205
+ // Output only. Lists the compute capacity per ReplicaSelection. A replica
1206
+ // selection identifies a set of replicas with common properties. Replicas
1207
+ // identified by a ReplicaSelection are scaled with the same compute capacity.
1208
+ repeated ReplicaComputeCapacity replica_compute_capacity = 19
1209
+ [(google.api.field_behavior) = OUTPUT_ONLY];
1210
+
1211
+ // Optional. The autoscaling configuration. Autoscaling is enabled if this
1212
+ // field is set. When autoscaling is enabled, node_count and processing_units
1213
+ // are treated as OUTPUT_ONLY fields and reflect the current compute capacity
1214
+ // allocated to the instance.
1215
+ AutoscalingConfig autoscaling_config = 17
1216
+ [(google.api.field_behavior) = OPTIONAL];
1217
+
1218
+ // Output only. The current instance state. For
1219
+ // [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance],
1220
+ // the state must be either omitted or set to `CREATING`. For
1221
+ // [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance],
1222
+ // the state must be either omitted or set to `READY`.
1223
+ State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
1224
+
1225
+ // Cloud Labels are a flexible and lightweight mechanism for organizing cloud
1226
+ // resources into groups that reflect a customer's organizational needs and
1227
+ // deployment strategies. Cloud Labels can be used to filter collections of
1228
+ // resources. They can be used to control how resource metrics are aggregated.
1229
+ // And they can be used as arguments to policy management rules (e.g. route,
1230
+ // firewall, load balancing, etc.).
1231
+ //
1232
+ // * Label keys must be between 1 and 63 characters long and must conform to
1233
+ // the following regular expression: `[a-z][a-z0-9_-]{0,62}`.
1234
+ // * Label values must be between 0 and 63 characters long and must conform
1235
+ // to the regular expression `[a-z0-9_-]{0,63}`.
1236
+ // * No more than 64 labels can be associated with a given resource.
1237
+ //
1238
+ // See https://goo.gl/xmQnxf for more information on and examples of labels.
1239
+ //
1240
+ // If you plan to use labels in your own code, please note that additional
1241
+ // characters may be allowed in the future. And so you are advised to use an
1242
+ // internal label representation, such as JSON, which doesn't rely upon
1243
+ // specific characters being disallowed. For example, representing labels
1244
+ // as the string: name + "_" + value would prove problematic if we were to
1245
+ // allow "_" in a future release.
1246
+ map<string, string> labels = 7;
1247
+
1248
+ // The `InstanceType` of the current instance.
1249
+ InstanceType instance_type = 10;
1250
+
1251
+ // Deprecated. This field is not populated.
1252
+ repeated string endpoint_uris = 8;
1253
+
1254
+ // Output only. The time at which the instance was created.
1255
+ google.protobuf.Timestamp create_time = 11
1256
+ [(google.api.field_behavior) = OUTPUT_ONLY];
1257
+
1258
+ // Output only. The time at which the instance was most recently updated.
1259
+ google.protobuf.Timestamp update_time = 12
1260
+ [(google.api.field_behavior) = OUTPUT_ONLY];
1261
+
1262
+ // Free instance metadata. Only populated for free instances.
1263
+ FreeInstanceMetadata free_instance_metadata = 13;
1264
+
1265
+ // Optional. The `Edition` of the current instance.
1266
+ Edition edition = 20 [(google.api.field_behavior) = OPTIONAL];
1267
+
1268
+ // Optional. Controls the default backup schedule behavior for new databases
1269
+ // within the instance. By default, a backup schedule is created automatically
1270
+ // when a new database is created in a new instance.
1271
+ //
1272
+ // Note that the `AUTOMATIC` value isn't permitted for free instances,
1273
+ // as backups and backup schedules aren't supported for free instances.
1274
+ //
1275
+ // In the `GetInstance` or `ListInstances` response, if the value of
1276
+ // `default_backup_schedule_type` isn't set, or set to `NONE`, Spanner doesn't
1277
+ // create a default backup schedule for new databases in the instance.
1278
+ DefaultBackupScheduleType default_backup_schedule_type = 23
1279
+ [(google.api.field_behavior) = OPTIONAL];
1280
+ }
1281
+
1282
+ // The request for
1283
+ // [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
1284
+ message ListInstanceConfigsRequest {
1285
+ // Required. The name of the project for which a list of supported instance
1286
+ // configurations is requested. Values are of the form
1287
+ // `projects/<project>`.
1288
+ string parent = 1 [
1289
+ (google.api.field_behavior) = REQUIRED,
1290
+ (google.api.resource_reference) = {
1291
+ type: "cloudresourcemanager.googleapis.com/Project"
1292
+ }
1293
+ ];
1294
+
1295
+ // Number of instance configurations to be returned in the response. If 0 or
1296
+ // less, defaults to the server's maximum allowed page size.
1297
+ int32 page_size = 2;
1298
+
1299
+ // If non-empty, `page_token` should contain a
1300
+ // [next_page_token][google.spanner.admin.instance.v1.ListInstanceConfigsResponse.next_page_token]
1301
+ // from a previous
1302
+ // [ListInstanceConfigsResponse][google.spanner.admin.instance.v1.ListInstanceConfigsResponse].
1303
+ string page_token = 3;
1304
+ }
1305
+
1306
+ // The response for
1307
+ // [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
1308
+ message ListInstanceConfigsResponse {
1309
+ // The list of requested instance configurations.
1310
+ repeated InstanceConfig instance_configs = 1;
1311
+
1312
+ // `next_page_token` can be sent in a subsequent
1313
+ // [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs]
1314
+ // call to fetch more of the matching instance configurations.
1315
+ string next_page_token = 2;
1316
+ }
1317
+
1318
+ // The request for
1319
+ // [GetInstanceConfigRequest][google.spanner.admin.instance.v1.InstanceAdmin.GetInstanceConfig].
1320
+ message GetInstanceConfigRequest {
1321
+ // Required. The name of the requested instance configuration. Values are of
1322
+ // the form `projects/<project>/instanceConfigs/<config>`.
1323
+ string name = 1 [
1324
+ (google.api.field_behavior) = REQUIRED,
1325
+ (google.api.resource_reference) = {
1326
+ type: "spanner.googleapis.com/InstanceConfig"
1327
+ }
1328
+ ];
1329
+ }
1330
+
1331
+ // The request for
1332
+ // [CreateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstanceConfig].
1333
+ message CreateInstanceConfigRequest {
1334
+ // Required. The name of the project in which to create the instance
1335
+ // configuration. Values are of the form `projects/<project>`.
1336
+ string parent = 1 [
1337
+ (google.api.field_behavior) = REQUIRED,
1338
+ (google.api.resource_reference) = {
1339
+ type: "cloudresourcemanager.googleapis.com/Project"
1340
+ }
1341
+ ];
1342
+
1343
+ // Required. The ID of the instance configuration to create. Valid identifiers
1344
+ // are of the form `custom-[-a-z0-9]*[a-z0-9]` and must be between 2 and 64
1345
+ // characters in length. The `custom-` prefix is required to avoid name
1346
+ // conflicts with Google-managed configurations.
1347
+ string instance_config_id = 2 [(google.api.field_behavior) = REQUIRED];
1348
+
1349
+ // Required. The `InstanceConfig` proto of the configuration to create.
1350
+ // `instance_config.name` must be
1351
+ // `<parent>/instanceConfigs/<instance_config_id>`.
1352
+ // `instance_config.base_config` must be a Google-managed configuration name,
1353
+ // e.g. <parent>/instanceConfigs/us-east1, <parent>/instanceConfigs/nam3.
1354
+ InstanceConfig instance_config = 3 [(google.api.field_behavior) = REQUIRED];
1355
+
1356
+ // An option to validate, but not actually execute, a request,
1357
+ // and provide the same response.
1358
+ bool validate_only = 4;
1359
+ }
1360
+
1361
+ // The request for
1362
+ // [UpdateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstanceConfig].
1363
+ message UpdateInstanceConfigRequest {
1364
+ // Required. The user instance configuration to update, which must always
1365
+ // include the instance configuration name. Otherwise, only fields mentioned
1366
+ // in
1367
+ // [update_mask][google.spanner.admin.instance.v1.UpdateInstanceConfigRequest.update_mask]
1368
+ // need be included. To prevent conflicts of concurrent updates,
1369
+ // [etag][google.spanner.admin.instance.v1.InstanceConfig.reconciling] can
1370
+ // be used.
1371
+ InstanceConfig instance_config = 1 [(google.api.field_behavior) = REQUIRED];
1372
+
1373
+ // Required. A mask specifying which fields in
1374
+ // [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] should be
1375
+ // updated. The field mask must always be specified; this prevents any future
1376
+ // fields in [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig]
1377
+ // from being erased accidentally by clients that do not know about them. Only
1378
+ // display_name and labels can be updated.
1379
+ google.protobuf.FieldMask update_mask = 2
1380
+ [(google.api.field_behavior) = REQUIRED];
1381
+
1382
+ // An option to validate, but not actually execute, a request,
1383
+ // and provide the same response.
1384
+ bool validate_only = 3;
1385
+ }
1386
+
1387
+ // The request for
1388
+ // [DeleteInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstanceConfig].
1389
+ message DeleteInstanceConfigRequest {
1390
+ // Required. The name of the instance configuration to be deleted.
1391
+ // Values are of the form
1392
+ // `projects/<project>/instanceConfigs/<instance_config>`
1393
+ string name = 1 [
1394
+ (google.api.field_behavior) = REQUIRED,
1395
+ (google.api.resource_reference) = {
1396
+ type: "spanner.googleapis.com/InstanceConfig"
1397
+ }
1398
+ ];
1399
+
1400
+ // Used for optimistic concurrency control as a way to help prevent
1401
+ // simultaneous deletes of an instance configuration from overwriting each
1402
+ // other. If not empty, the API
1403
+ // only deletes the instance configuration when the etag provided matches the
1404
+ // current status of the requested instance configuration. Otherwise, deletes
1405
+ // the instance configuration without checking the current status of the
1406
+ // requested instance configuration.
1407
+ string etag = 2;
1408
+
1409
+ // An option to validate, but not actually execute, a request,
1410
+ // and provide the same response.
1411
+ bool validate_only = 3;
1412
+ }
1413
+
1414
+ // The request for
1415
+ // [ListInstanceConfigOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigOperations].
1416
+ message ListInstanceConfigOperationsRequest {
1417
+ // Required. The project of the instance configuration operations.
1418
+ // Values are of the form `projects/<project>`.
1419
+ string parent = 1 [
1420
+ (google.api.field_behavior) = REQUIRED,
1421
+ (google.api.resource_reference) = {
1422
+ type: "cloudresourcemanager.googleapis.com/Project"
1423
+ }
1424
+ ];
1425
+
1426
+ // An expression that filters the list of returned operations.
1427
+ //
1428
+ // A filter expression consists of a field name, a
1429
+ // comparison operator, and a value for filtering.
1430
+ // The value must be a string, a number, or a boolean. The comparison operator
1431
+ // must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
1432
+ // Colon `:` is the contains operator. Filter rules are not case sensitive.
1433
+ //
1434
+ // The following fields in the Operation are eligible for filtering:
1435
+ //
1436
+ // * `name` - The name of the long-running operation
1437
+ // * `done` - False if the operation is in progress, else true.
1438
+ // * `metadata.@type` - the type of metadata. For example, the type string
1439
+ // for
1440
+ // [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]
1441
+ // is
1442
+ // `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`.
1443
+ // * `metadata.<field_name>` - any field in metadata.value.
1444
+ // `metadata.@type` must be specified first, if filtering on metadata
1445
+ // fields.
1446
+ // * `error` - Error associated with the long-running operation.
1447
+ // * `response.@type` - the type of response.
1448
+ // * `response.<field_name>` - any field in response.value.
1449
+ //
1450
+ // You can combine multiple expressions by enclosing each expression in
1451
+ // parentheses. By default, expressions are combined with AND logic. However,
1452
+ // you can specify AND, OR, and NOT logic explicitly.
1453
+ //
1454
+ // Here are a few examples:
1455
+ //
1456
+ // * `done:true` - The operation is complete.
1457
+ // * `(metadata.@type=` \
1458
+ // `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata)
1459
+ // AND` \
1460
+ // `(metadata.instance_config.name:custom-config) AND` \
1461
+ // `(metadata.progress.start_time < \"2021-03-28T14:50:00Z\") AND` \
1462
+ // `(error:*)` - Return operations where:
1463
+ // * The operation's metadata type is
1464
+ // [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata].
1465
+ // * The instance configuration name contains "custom-config".
1466
+ // * The operation started before 2021-03-28T14:50:00Z.
1467
+ // * The operation resulted in an error.
1468
+ string filter = 2;
1469
+
1470
+ // Number of operations to be returned in the response. If 0 or
1471
+ // less, defaults to the server's maximum allowed page size.
1472
+ int32 page_size = 3;
1473
+
1474
+ // If non-empty, `page_token` should contain a
1475
+ // [next_page_token][google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse.next_page_token]
1476
+ // from a previous
1477
+ // [ListInstanceConfigOperationsResponse][google.spanner.admin.instance.v1.ListInstanceConfigOperationsResponse]
1478
+ // to the same `parent` and with the same `filter`.
1479
+ string page_token = 4;
1480
+ }
1481
+
1482
+ // The response for
1483
+ // [ListInstanceConfigOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigOperations].
1484
+ message ListInstanceConfigOperationsResponse {
1485
+ // The list of matching instance configuration long-running operations. Each
1486
+ // operation's name will be
1487
+ // prefixed by the name of the instance configuration. The operation's
1488
+ // metadata field type
1489
+ // `metadata.type_url` describes the type of the metadata.
1490
+ repeated google.longrunning.Operation operations = 1;
1491
+
1492
+ // `next_page_token` can be sent in a subsequent
1493
+ // [ListInstanceConfigOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigOperations]
1494
+ // call to fetch more of the matching metadata.
1495
+ string next_page_token = 2;
1496
+ }
1497
+
1498
+ // The request for
1499
+ // [GetInstance][google.spanner.admin.instance.v1.InstanceAdmin.GetInstance].
1500
+ message GetInstanceRequest {
1501
+ // Required. The name of the requested instance. Values are of the form
1502
+ // `projects/<project>/instances/<instance>`.
1503
+ string name = 1 [
1504
+ (google.api.field_behavior) = REQUIRED,
1505
+ (google.api.resource_reference) = {
1506
+ type: "spanner.googleapis.com/Instance"
1507
+ }
1508
+ ];
1509
+
1510
+ // If field_mask is present, specifies the subset of
1511
+ // [Instance][google.spanner.admin.instance.v1.Instance] fields that should be
1512
+ // returned. If absent, all
1513
+ // [Instance][google.spanner.admin.instance.v1.Instance] fields are returned.
1514
+ google.protobuf.FieldMask field_mask = 2;
1515
+ }
1516
+
1517
+ // The request for
1518
+ // [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance].
1519
+ message CreateInstanceRequest {
1520
+ // Required. The name of the project in which to create the instance. Values
1521
+ // are of the form `projects/<project>`.
1522
+ string parent = 1 [
1523
+ (google.api.field_behavior) = REQUIRED,
1524
+ (google.api.resource_reference) = {
1525
+ type: "cloudresourcemanager.googleapis.com/Project"
1526
+ }
1527
+ ];
1528
+
1529
+ // Required. The ID of the instance to create. Valid identifiers are of the
1530
+ // form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64 characters in
1531
+ // length.
1532
+ string instance_id = 2 [(google.api.field_behavior) = REQUIRED];
1533
+
1534
+ // Required. The instance to create. The name may be omitted, but if
1535
+ // specified must be `<parent>/instances/<instance_id>`.
1536
+ Instance instance = 3 [(google.api.field_behavior) = REQUIRED];
1537
+ }
1538
+
1539
+ // The request for
1540
+ // [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances].
1541
+ message ListInstancesRequest {
1542
+ // Required. The name of the project for which a list of instances is
1543
+ // requested. Values are of the form `projects/<project>`.
1544
+ string parent = 1 [
1545
+ (google.api.field_behavior) = REQUIRED,
1546
+ (google.api.resource_reference) = {
1547
+ type: "cloudresourcemanager.googleapis.com/Project"
1548
+ }
1549
+ ];
1550
+
1551
+ // Number of instances to be returned in the response. If 0 or less, defaults
1552
+ // to the server's maximum allowed page size.
1553
+ int32 page_size = 2;
1554
+
1555
+ // If non-empty, `page_token` should contain a
1556
+ // [next_page_token][google.spanner.admin.instance.v1.ListInstancesResponse.next_page_token]
1557
+ // from a previous
1558
+ // [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse].
1559
+ string page_token = 3;
1560
+
1561
+ // An expression for filtering the results of the request. Filter rules are
1562
+ // case insensitive. The fields eligible for filtering are:
1563
+ //
1564
+ // * `name`
1565
+ // * `display_name`
1566
+ // * `labels.key` where key is the name of a label
1567
+ //
1568
+ // Some examples of using filters are:
1569
+ //
1570
+ // * `name:*` --> The instance has a name.
1571
+ // * `name:Howl` --> The instance's name contains the string "howl".
1572
+ // * `name:HOWL` --> Equivalent to above.
1573
+ // * `NAME:howl` --> Equivalent to above.
1574
+ // * `labels.env:*` --> The instance has the label "env".
1575
+ // * `labels.env:dev` --> The instance has the label "env" and the value of
1576
+ // the label contains the string "dev".
1577
+ // * `name:howl labels.env:dev` --> The instance's name contains "howl" and
1578
+ // it has the label "env" with its value
1579
+ // containing "dev".
1580
+ string filter = 4;
1581
+
1582
+ // Deadline used while retrieving metadata for instances.
1583
+ // Instances whose metadata cannot be retrieved within this deadline will be
1584
+ // added to
1585
+ // [unreachable][google.spanner.admin.instance.v1.ListInstancesResponse.unreachable]
1586
+ // in
1587
+ // [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse].
1588
+ google.protobuf.Timestamp instance_deadline = 5;
1589
+ }
1590
+
1591
+ // The response for
1592
+ // [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances].
1593
+ message ListInstancesResponse {
1594
+ // The list of requested instances.
1595
+ repeated Instance instances = 1;
1596
+
1597
+ // `next_page_token` can be sent in a subsequent
1598
+ // [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances]
1599
+ // call to fetch more of the matching instances.
1600
+ string next_page_token = 2;
1601
+
1602
+ // The list of unreachable instances.
1603
+ // It includes the names of instances whose metadata could not be retrieved
1604
+ // within
1605
+ // [instance_deadline][google.spanner.admin.instance.v1.ListInstancesRequest.instance_deadline].
1606
+ repeated string unreachable = 3;
1607
+ }
1608
+
1609
+ // The request for
1610
+ // [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance].
1611
+ message UpdateInstanceRequest {
1612
+ // Required. The instance to update, which must always include the instance
1613
+ // name. Otherwise, only fields mentioned in
1614
+ // [field_mask][google.spanner.admin.instance.v1.UpdateInstanceRequest.field_mask]
1615
+ // need be included.
1616
+ Instance instance = 1 [(google.api.field_behavior) = REQUIRED];
1617
+
1618
+ // Required. A mask specifying which fields in
1619
+ // [Instance][google.spanner.admin.instance.v1.Instance] should be updated.
1620
+ // The field mask must always be specified; this prevents any future fields in
1621
+ // [Instance][google.spanner.admin.instance.v1.Instance] from being erased
1622
+ // accidentally by clients that do not know about them.
1623
+ google.protobuf.FieldMask field_mask = 2
1624
+ [(google.api.field_behavior) = REQUIRED];
1625
+ }
1626
+
1627
+ // The request for
1628
+ // [DeleteInstance][google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstance].
1629
+ message DeleteInstanceRequest {
1630
+ // Required. The name of the instance to be deleted. Values are of the form
1631
+ // `projects/<project>/instances/<instance>`
1632
+ string name = 1 [
1633
+ (google.api.field_behavior) = REQUIRED,
1634
+ (google.api.resource_reference) = {
1635
+ type: "spanner.googleapis.com/Instance"
1636
+ }
1637
+ ];
1638
+ }
1639
+
1640
+ // Metadata type for the operation returned by
1641
+ // [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance].
1642
+ message CreateInstanceMetadata {
1643
+ // The instance being created.
1644
+ Instance instance = 1;
1645
+
1646
+ // The time at which the
1647
+ // [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance]
1648
+ // request was received.
1649
+ google.protobuf.Timestamp start_time = 2;
1650
+
1651
+ // The time at which this operation was cancelled. If set, this operation is
1652
+ // in the process of undoing itself (which is guaranteed to succeed) and
1653
+ // cannot be cancelled again.
1654
+ google.protobuf.Timestamp cancel_time = 3;
1655
+
1656
+ // The time at which this operation failed or was completed successfully.
1657
+ google.protobuf.Timestamp end_time = 4;
1658
+
1659
+ // The expected fulfillment period of this create operation.
1660
+ FulfillmentPeriod expected_fulfillment_period = 5;
1661
+ }
1662
+
1663
+ // Metadata type for the operation returned by
1664
+ // [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance].
1665
+ message UpdateInstanceMetadata {
1666
+ // The desired end state of the update.
1667
+ Instance instance = 1;
1668
+
1669
+ // The time at which
1670
+ // [UpdateInstance][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance]
1671
+ // request was received.
1672
+ google.protobuf.Timestamp start_time = 2;
1673
+
1674
+ // The time at which this operation was cancelled. If set, this operation is
1675
+ // in the process of undoing itself (which is guaranteed to succeed) and
1676
+ // cannot be cancelled again.
1677
+ google.protobuf.Timestamp cancel_time = 3;
1678
+
1679
+ // The time at which this operation failed or was completed successfully.
1680
+ google.protobuf.Timestamp end_time = 4;
1681
+
1682
+ // The expected fulfillment period of this update operation.
1683
+ FulfillmentPeriod expected_fulfillment_period = 5;
1684
+ }
1685
+
1686
+ // Free instance specific metadata that is kept even after an instance has been
1687
+ // upgraded for tracking purposes.
1688
+ message FreeInstanceMetadata {
1689
+ // Allows users to change behavior when a free instance expires.
1690
+ enum ExpireBehavior {
1691
+ // Not specified.
1692
+ EXPIRE_BEHAVIOR_UNSPECIFIED = 0;
1693
+
1694
+ // When the free instance expires, upgrade the instance to a provisioned
1695
+ // instance.
1696
+ FREE_TO_PROVISIONED = 1;
1697
+
1698
+ // When the free instance expires, disable the instance, and delete it
1699
+ // after the grace period passes if it has not been upgraded.
1700
+ REMOVE_AFTER_GRACE_PERIOD = 2;
1701
+ }
1702
+
1703
+ // Output only. Timestamp after which the instance will either be upgraded or
1704
+ // scheduled for deletion after a grace period. ExpireBehavior is used to
1705
+ // choose between upgrading or scheduling the free instance for deletion. This
1706
+ // timestamp is set during the creation of a free instance.
1707
+ google.protobuf.Timestamp expire_time = 1
1708
+ [(google.api.field_behavior) = OUTPUT_ONLY];
1709
+
1710
+ // Output only. If present, the timestamp at which the free instance was
1711
+ // upgraded to a provisioned instance.
1712
+ google.protobuf.Timestamp upgrade_time = 2
1713
+ [(google.api.field_behavior) = OUTPUT_ONLY];
1714
+
1715
+ // Specifies the expiration behavior of a free instance. The default of
1716
+ // ExpireBehavior is `REMOVE_AFTER_GRACE_PERIOD`. This can be modified during
1717
+ // or after creation, and before expiration.
1718
+ ExpireBehavior expire_behavior = 3;
1719
+ }
1720
+
1721
+ // Metadata type for the operation returned by
1722
+ // [CreateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstanceConfig].
1723
+ message CreateInstanceConfigMetadata {
1724
+ // The target instance configuration end state.
1725
+ InstanceConfig instance_config = 1;
1726
+
1727
+ // The progress of the
1728
+ // [CreateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstanceConfig]
1729
+ // operation.
1730
+ OperationProgress progress = 2;
1731
+
1732
+ // The time at which this operation was cancelled.
1733
+ google.protobuf.Timestamp cancel_time = 3;
1734
+ }
1735
+
1736
+ // Metadata type for the operation returned by
1737
+ // [UpdateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstanceConfig].
1738
+ message UpdateInstanceConfigMetadata {
1739
+ // The desired instance configuration after updating.
1740
+ InstanceConfig instance_config = 1;
1741
+
1742
+ // The progress of the
1743
+ // [UpdateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstanceConfig]
1744
+ // operation.
1745
+ OperationProgress progress = 2;
1746
+
1747
+ // The time at which this operation was cancelled.
1748
+ google.protobuf.Timestamp cancel_time = 3;
1749
+ }
1750
+
1751
+ // An isolated set of Cloud Spanner resources that databases can define
1752
+ // placements on.
1753
+ message InstancePartition {
1754
+ option (google.api.resource) = {
1755
+ type: "spanner.googleapis.com/InstancePartition"
1756
+ pattern: "projects/{project}/instances/{instance}/instancePartitions/{instance_partition}"
1757
+ plural: "instancePartitions"
1758
+ singular: "instancePartition"
1759
+ };
1760
+
1761
+ // Indicates the current state of the instance partition.
1762
+ enum State {
1763
+ // Not specified.
1764
+ STATE_UNSPECIFIED = 0;
1765
+
1766
+ // The instance partition is still being created. Resources may not be
1767
+ // available yet, and operations such as creating placements using this
1768
+ // instance partition may not work.
1769
+ CREATING = 1;
1770
+
1771
+ // The instance partition is fully created and ready to do work such as
1772
+ // creating placements and using in databases.
1773
+ READY = 2;
1774
+ }
1775
+
1776
+ // Required. A unique identifier for the instance partition. Values are of the
1777
+ // form
1778
+ // `projects/<project>/instances/<instance>/instancePartitions/[a-z][-a-z0-9]*[a-z0-9]`.
1779
+ // The final segment of the name must be between 2 and 64 characters in
1780
+ // length. An instance partition's name cannot be changed after the instance
1781
+ // partition is created.
1782
+ string name = 1 [(google.api.field_behavior) = REQUIRED];
1783
+
1784
+ // Required. The name of the instance partition's configuration. Values are of
1785
+ // the form `projects/<project>/instanceConfigs/<configuration>`. See also
1786
+ // [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] and
1787
+ // [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
1788
+ string config = 2 [
1789
+ (google.api.field_behavior) = REQUIRED,
1790
+ (google.api.resource_reference) = {
1791
+ type: "spanner.googleapis.com/InstanceConfig"
1792
+ }
1793
+ ];
1794
+
1795
+ // Required. The descriptive name for this instance partition as it appears in
1796
+ // UIs. Must be unique per project and between 4 and 30 characters in length.
1797
+ string display_name = 3 [(google.api.field_behavior) = REQUIRED];
1798
+
1799
+ // Compute capacity defines amount of server and storage resources that are
1800
+ // available to the databases in an instance partition. At most, one of either
1801
+ // `node_count` or` processing_units` should be present in the message. For
1802
+ // more information, see
1803
+ // [Compute capacity, nodes, and processing
1804
+ // units](https://cloud.google.com/spanner/docs/compute-capacity).
1805
+ oneof compute_capacity {
1806
+ // The number of nodes allocated to this instance partition.
1807
+ //
1808
+ // Users can set the `node_count` field to specify the target number of
1809
+ // nodes allocated to the instance partition.
1810
+ //
1811
+ // This may be zero in API responses for instance partitions that are not
1812
+ // yet in state `READY`.
1813
+ int32 node_count = 5;
1814
+
1815
+ // The number of processing units allocated to this instance partition.
1816
+ //
1817
+ // Users can set the `processing_units` field to specify the target number
1818
+ // of processing units allocated to the instance partition.
1819
+ //
1820
+ // This might be zero in API responses for instance partitions that are not
1821
+ // yet in the `READY` state.
1822
+ int32 processing_units = 6;
1823
+ }
1824
+
1825
+ // Optional. The autoscaling configuration. Autoscaling is enabled if this
1826
+ // field is set. When autoscaling is enabled, fields in compute_capacity are
1827
+ // treated as OUTPUT_ONLY fields and reflect the current compute capacity
1828
+ // allocated to the instance partition.
1829
+ AutoscalingConfig autoscaling_config = 13
1830
+ [(google.api.field_behavior) = OPTIONAL];
1831
+
1832
+ // Output only. The current instance partition state.
1833
+ State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
1834
+
1835
+ // Output only. The time at which the instance partition was created.
1836
+ google.protobuf.Timestamp create_time = 8
1837
+ [(google.api.field_behavior) = OUTPUT_ONLY];
1838
+
1839
+ // Output only. The time at which the instance partition was most recently
1840
+ // updated.
1841
+ google.protobuf.Timestamp update_time = 9
1842
+ [(google.api.field_behavior) = OUTPUT_ONLY];
1843
+
1844
+ // Output only. The names of the databases that reference this
1845
+ // instance partition. Referencing databases should share the parent instance.
1846
+ // The existence of any referencing database prevents the instance partition
1847
+ // from being deleted.
1848
+ repeated string referencing_databases = 10
1849
+ [(google.api.field_behavior) = OUTPUT_ONLY];
1850
+
1851
+ // Output only. Deprecated: This field is not populated.
1852
+ // Output only. The names of the backups that reference this instance
1853
+ // partition. Referencing backups should share the parent instance. The
1854
+ // existence of any referencing backup prevents the instance partition from
1855
+ // being deleted.
1856
+ repeated string referencing_backups = 11
1857
+ [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY];
1858
+
1859
+ // Used for optimistic concurrency control as a way
1860
+ // to help prevent simultaneous updates of a instance partition from
1861
+ // overwriting each other. It is strongly suggested that systems make use of
1862
+ // the etag in the read-modify-write cycle to perform instance partition
1863
+ // updates in order to avoid race conditions: An etag is returned in the
1864
+ // response which contains instance partitions, and systems are expected to
1865
+ // put that etag in the request to update instance partitions to ensure that
1866
+ // their change will be applied to the same version of the instance partition.
1867
+ // If no etag is provided in the call to update instance partition, then the
1868
+ // existing instance partition is overwritten blindly.
1869
+ string etag = 12;
1870
+ }
1871
+
1872
+ // Metadata type for the operation returned by
1873
+ // [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition].
1874
+ message CreateInstancePartitionMetadata {
1875
+ // The instance partition being created.
1876
+ InstancePartition instance_partition = 1;
1877
+
1878
+ // The time at which the
1879
+ // [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition]
1880
+ // request was received.
1881
+ google.protobuf.Timestamp start_time = 2;
1882
+
1883
+ // The time at which this operation was cancelled. If set, this operation is
1884
+ // in the process of undoing itself (which is guaranteed to succeed) and
1885
+ // cannot be cancelled again.
1886
+ google.protobuf.Timestamp cancel_time = 3;
1887
+
1888
+ // The time at which this operation failed or was completed successfully.
1889
+ google.protobuf.Timestamp end_time = 4;
1890
+ }
1891
+
1892
+ // The request for
1893
+ // [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition].
1894
+ message CreateInstancePartitionRequest {
1895
+ // Required. The name of the instance in which to create the instance
1896
+ // partition. Values are of the form
1897
+ // `projects/<project>/instances/<instance>`.
1898
+ string parent = 1 [
1899
+ (google.api.field_behavior) = REQUIRED,
1900
+ (google.api.resource_reference) = {
1901
+ type: "spanner.googleapis.com/Instance"
1902
+ }
1903
+ ];
1904
+
1905
+ // Required. The ID of the instance partition to create. Valid identifiers are
1906
+ // of the form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64
1907
+ // characters in length.
1908
+ string instance_partition_id = 2 [(google.api.field_behavior) = REQUIRED];
1909
+
1910
+ // Required. The instance partition to create. The instance_partition.name may
1911
+ // be omitted, but if specified must be
1912
+ // `<parent>/instancePartitions/<instance_partition_id>`.
1913
+ InstancePartition instance_partition = 3
1914
+ [(google.api.field_behavior) = REQUIRED];
1915
+ }
1916
+
1917
+ // The request for
1918
+ // [DeleteInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstancePartition].
1919
+ message DeleteInstancePartitionRequest {
1920
+ // Required. The name of the instance partition to be deleted.
1921
+ // Values are of the form
1922
+ // `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`
1923
+ string name = 1 [
1924
+ (google.api.field_behavior) = REQUIRED,
1925
+ (google.api.resource_reference) = {
1926
+ type: "spanner.googleapis.com/InstancePartition"
1927
+ }
1928
+ ];
1929
+
1930
+ // Optional. If not empty, the API only deletes the instance partition when
1931
+ // the etag provided matches the current status of the requested instance
1932
+ // partition. Otherwise, deletes the instance partition without checking the
1933
+ // current status of the requested instance partition.
1934
+ string etag = 2;
1935
+ }
1936
+
1937
+ // The request for
1938
+ // [GetInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.GetInstancePartition].
1939
+ message GetInstancePartitionRequest {
1940
+ // Required. The name of the requested instance partition. Values are of
1941
+ // the form
1942
+ // `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`.
1943
+ string name = 1 [
1944
+ (google.api.field_behavior) = REQUIRED,
1945
+ (google.api.resource_reference) = {
1946
+ type: "spanner.googleapis.com/InstancePartition"
1947
+ }
1948
+ ];
1949
+ }
1950
+
1951
+ // The request for
1952
+ // [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition].
1953
+ message UpdateInstancePartitionRequest {
1954
+ // Required. The instance partition to update, which must always include the
1955
+ // instance partition name. Otherwise, only fields mentioned in
1956
+ // [field_mask][google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.field_mask]
1957
+ // need be included.
1958
+ InstancePartition instance_partition = 1
1959
+ [(google.api.field_behavior) = REQUIRED];
1960
+
1961
+ // Required. A mask specifying which fields in
1962
+ // [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
1963
+ // should be updated. The field mask must always be specified; this prevents
1964
+ // any future fields in
1965
+ // [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
1966
+ // from being erased accidentally by clients that do not know about them.
1967
+ google.protobuf.FieldMask field_mask = 2
1968
+ [(google.api.field_behavior) = REQUIRED];
1969
+ }
1970
+
1971
+ // Metadata type for the operation returned by
1972
+ // [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition].
1973
+ message UpdateInstancePartitionMetadata {
1974
+ // The desired end state of the update.
1975
+ InstancePartition instance_partition = 1;
1976
+
1977
+ // The time at which
1978
+ // [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition]
1979
+ // request was received.
1980
+ google.protobuf.Timestamp start_time = 2;
1981
+
1982
+ // The time at which this operation was cancelled. If set, this operation is
1983
+ // in the process of undoing itself (which is guaranteed to succeed) and
1984
+ // cannot be cancelled again.
1985
+ google.protobuf.Timestamp cancel_time = 3;
1986
+
1987
+ // The time at which this operation failed or was completed successfully.
1988
+ google.protobuf.Timestamp end_time = 4;
1989
+ }
1990
+
1991
+ // The request for
1992
+ // [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions].
1993
+ message ListInstancePartitionsRequest {
1994
+ // Required. The instance whose instance partitions should be listed. Values
1995
+ // are of the form `projects/<project>/instances/<instance>`. Use `{instance}
1996
+ // = '-'` to list instance partitions for all Instances in a project, e.g.,
1997
+ // `projects/myproject/instances/-`.
1998
+ string parent = 1 [
1999
+ (google.api.field_behavior) = REQUIRED,
2000
+ (google.api.resource_reference) = {
2001
+ type: "spanner.googleapis.com/Instance"
2002
+ }
2003
+ ];
2004
+
2005
+ // Number of instance partitions to be returned in the response. If 0 or less,
2006
+ // defaults to the server's maximum allowed page size.
2007
+ int32 page_size = 2;
2008
+
2009
+ // If non-empty, `page_token` should contain a
2010
+ // [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.next_page_token]
2011
+ // from a previous
2012
+ // [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
2013
+ string page_token = 3;
2014
+
2015
+ // Optional. Deadline used while retrieving metadata for instance partitions.
2016
+ // Instance partitions whose metadata cannot be retrieved within this deadline
2017
+ // will be added to
2018
+ // [unreachable][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.unreachable]
2019
+ // in
2020
+ // [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
2021
+ google.protobuf.Timestamp instance_partition_deadline = 4
2022
+ [(google.api.field_behavior) = OPTIONAL];
2023
+ }
2024
+
2025
+ // The response for
2026
+ // [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions].
2027
+ message ListInstancePartitionsResponse {
2028
+ // The list of requested instancePartitions.
2029
+ repeated InstancePartition instance_partitions = 1;
2030
+
2031
+ // `next_page_token` can be sent in a subsequent
2032
+ // [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions]
2033
+ // call to fetch more of the matching instance partitions.
2034
+ string next_page_token = 2;
2035
+
2036
+ // The list of unreachable instances or instance partitions.
2037
+ // It includes the names of instances or instance partitions whose metadata
2038
+ // could not be retrieved within
2039
+ // [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionsRequest.instance_partition_deadline].
2040
+ repeated string unreachable = 3;
2041
+ }
2042
+
2043
+ // The request for
2044
+ // [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations].
2045
+ message ListInstancePartitionOperationsRequest {
2046
+ // Required. The parent instance of the instance partition operations.
2047
+ // Values are of the form `projects/<project>/instances/<instance>`.
2048
+ string parent = 1 [
2049
+ (google.api.field_behavior) = REQUIRED,
2050
+ (google.api.resource_reference) = {
2051
+ type: "spanner.googleapis.com/Instance"
2052
+ }
2053
+ ];
2054
+
2055
+ // Optional. An expression that filters the list of returned operations.
2056
+ //
2057
+ // A filter expression consists of a field name, a
2058
+ // comparison operator, and a value for filtering.
2059
+ // The value must be a string, a number, or a boolean. The comparison operator
2060
+ // must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
2061
+ // Colon `:` is the contains operator. Filter rules are not case sensitive.
2062
+ //
2063
+ // The following fields in the Operation are eligible for filtering:
2064
+ //
2065
+ // * `name` - The name of the long-running operation
2066
+ // * `done` - False if the operation is in progress, else true.
2067
+ // * `metadata.@type` - the type of metadata. For example, the type string
2068
+ // for
2069
+ // [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]
2070
+ // is
2071
+ // `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`.
2072
+ // * `metadata.<field_name>` - any field in metadata.value.
2073
+ // `metadata.@type` must be specified first, if filtering on metadata
2074
+ // fields.
2075
+ // * `error` - Error associated with the long-running operation.
2076
+ // * `response.@type` - the type of response.
2077
+ // * `response.<field_name>` - any field in response.value.
2078
+ //
2079
+ // You can combine multiple expressions by enclosing each expression in
2080
+ // parentheses. By default, expressions are combined with AND logic. However,
2081
+ // you can specify AND, OR, and NOT logic explicitly.
2082
+ //
2083
+ // Here are a few examples:
2084
+ //
2085
+ // * `done:true` - The operation is complete.
2086
+ // * `(metadata.@type=` \
2087
+ // `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata)
2088
+ // AND` \
2089
+ // `(metadata.instance_partition.name:custom-instance-partition) AND` \
2090
+ // `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \
2091
+ // `(error:*)` - Return operations where:
2092
+ // * The operation's metadata type is
2093
+ // [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata].
2094
+ // * The instance partition name contains "custom-instance-partition".
2095
+ // * The operation started before 2021-03-28T14:50:00Z.
2096
+ // * The operation resulted in an error.
2097
+ string filter = 2 [(google.api.field_behavior) = OPTIONAL];
2098
+
2099
+ // Optional. Number of operations to be returned in the response. If 0 or
2100
+ // less, defaults to the server's maximum allowed page size.
2101
+ int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
2102
+
2103
+ // Optional. If non-empty, `page_token` should contain a
2104
+ // [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.next_page_token]
2105
+ // from a previous
2106
+ // [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse]
2107
+ // to the same `parent` and with the same `filter`.
2108
+ string page_token = 4 [(google.api.field_behavior) = OPTIONAL];
2109
+
2110
+ // Optional. Deadline used while retrieving metadata for instance partition
2111
+ // operations. Instance partitions whose operation metadata cannot be
2112
+ // retrieved within this deadline will be added to
2113
+ // [unreachable_instance_partitions][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.unreachable_instance_partitions]
2114
+ // in
2115
+ // [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse].
2116
+ google.protobuf.Timestamp instance_partition_deadline = 5
2117
+ [(google.api.field_behavior) = OPTIONAL];
2118
+ }
2119
+
2120
+ // The response for
2121
+ // [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations].
2122
+ message ListInstancePartitionOperationsResponse {
2123
+ // The list of matching instance partition long-running operations. Each
2124
+ // operation's name will be
2125
+ // prefixed by the instance partition's name. The operation's
2126
+ // metadata field type
2127
+ // `metadata.type_url` describes the type of the metadata.
2128
+ repeated google.longrunning.Operation operations = 1;
2129
+
2130
+ // `next_page_token` can be sent in a subsequent
2131
+ // [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations]
2132
+ // call to fetch more of the matching metadata.
2133
+ string next_page_token = 2;
2134
+
2135
+ // The list of unreachable instance partitions.
2136
+ // It includes the names of instance partitions whose operation metadata could
2137
+ // not be retrieved within
2138
+ // [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.instance_partition_deadline].
2139
+ repeated string unreachable_instance_partitions = 3;
2140
+ }
2141
+
2142
+ // The request for
2143
+ // [MoveInstance][google.spanner.admin.instance.v1.InstanceAdmin.MoveInstance].
2144
+ message MoveInstanceRequest {
2145
+ // Required. The instance to move.
2146
+ // Values are of the form `projects/<project>/instances/<instance>`.
2147
+ string name = 1 [
2148
+ (google.api.field_behavior) = REQUIRED,
2149
+ (google.api.resource_reference) = {
2150
+ type: "spanner.googleapis.com/Instance"
2151
+ }
2152
+ ];
2153
+
2154
+ // Required. The target instance configuration where to move the instance.
2155
+ // Values are of the form `projects/<project>/instanceConfigs/<config>`.
2156
+ string target_config = 2 [
2157
+ (google.api.field_behavior) = REQUIRED,
2158
+ (google.api.resource_reference) = {
2159
+ type: "spanner.googleapis.com/InstanceConfig"
2160
+ }
2161
+ ];
2162
+ }
2163
+
2164
+ // The response for
2165
+ // [MoveInstance][google.spanner.admin.instance.v1.InstanceAdmin.MoveInstance].
2166
+ message MoveInstanceResponse {}
2167
+
2168
+ // Metadata type for the operation returned by
2169
+ // [MoveInstance][google.spanner.admin.instance.v1.InstanceAdmin.MoveInstance].
2170
+ message MoveInstanceMetadata {
2171
+ // The target instance configuration where to move the instance.
2172
+ // Values are of the form `projects/<project>/instanceConfigs/<config>`.
2173
+ string target_config = 1;
2174
+
2175
+ // The progress of the
2176
+ // [MoveInstance][google.spanner.admin.instance.v1.InstanceAdmin.MoveInstance]
2177
+ // operation.
2178
+ // [progress_percent][google.spanner.admin.instance.v1.OperationProgress.progress_percent]
2179
+ // is reset when cancellation is requested.
2180
+ OperationProgress progress = 2;
2181
+
2182
+ // The time at which this operation was cancelled.
2183
+ google.protobuf.Timestamp cancel_time = 3;
2184
+ }