@google-cloud/spanner 7.5.0 → 7.7.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.
- package/CHANGELOG.md +23 -0
- package/README.md +2 -0
- package/build/protos/google/spanner/admin/instance/v1/common.proto +15 -1
- package/build/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto +563 -1
- package/build/protos/google/spanner/executor/v1/cloud_executor.proto +1507 -0
- package/build/protos/protos.d.ts +14427 -3610
- package/build/protos/protos.js +38682 -10182
- package/build/protos/protos.json +3967 -1231
- package/build/src/codec.d.ts +11 -0
- package/build/src/codec.js +25 -1
- package/build/src/database.d.ts +7 -1
- package/build/src/database.js +14 -2
- package/build/src/index.d.ts +15 -2
- package/build/src/index.js +18 -1
- package/build/src/v1/database_admin_client.js +10 -7
- package/build/src/v1/gapic_metadata.json +8 -156
- package/build/src/v1/index.d.ts +1 -0
- package/build/src/v1/index.js +3 -1
- package/build/src/v1/instance_admin_client.d.ts +644 -0
- package/build/src/v1/instance_admin_client.js +522 -7
- package/build/src/v1/instance_admin_client_config.json +24 -0
- package/build/src/v1/spanner_client.js +10 -7
- package/build/src/v1/spanner_executor_proxy_client.d.ts +376 -0
- package/build/src/v1/spanner_executor_proxy_client.js +649 -0
- package/build/src/v1/spanner_executor_proxy_client_config.json +30 -0
- package/build/src/v1/spanner_executor_proxy_proto_list.json +13 -0
- package/package.json +3 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2024 Google LLC
|
|
2
2
|
//
|
|
3
3
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
// you may not use this file except in compliance with the License.
|
|
@@ -235,6 +235,15 @@ service InstanceAdmin {
|
|
|
235
235
|
option (google.api.method_signature) = "parent";
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
+
// Lists all instance partitions for the given instance.
|
|
239
|
+
rpc ListInstancePartitions(ListInstancePartitionsRequest)
|
|
240
|
+
returns (ListInstancePartitionsResponse) {
|
|
241
|
+
option (google.api.http) = {
|
|
242
|
+
get: "/v1/{parent=projects/*/instances/*}/instancePartitions"
|
|
243
|
+
};
|
|
244
|
+
option (google.api.method_signature) = "parent";
|
|
245
|
+
}
|
|
246
|
+
|
|
238
247
|
// Gets information about a particular instance.
|
|
239
248
|
rpc GetInstance(GetInstanceRequest) returns (Instance) {
|
|
240
249
|
option (google.api.http) = {
|
|
@@ -403,6 +412,161 @@ service InstanceAdmin {
|
|
|
403
412
|
};
|
|
404
413
|
option (google.api.method_signature) = "resource,permissions";
|
|
405
414
|
}
|
|
415
|
+
|
|
416
|
+
// Gets information about a particular instance partition.
|
|
417
|
+
rpc GetInstancePartition(GetInstancePartitionRequest)
|
|
418
|
+
returns (InstancePartition) {
|
|
419
|
+
option (google.api.http) = {
|
|
420
|
+
get: "/v1/{name=projects/*/instances/*/instancePartitions/*}"
|
|
421
|
+
};
|
|
422
|
+
option (google.api.method_signature) = "name";
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
// Creates an instance partition and begins preparing it to be used. The
|
|
426
|
+
// returned [long-running operation][google.longrunning.Operation]
|
|
427
|
+
// can be used to track the progress of preparing the new instance partition.
|
|
428
|
+
// The instance partition name is assigned by the caller. If the named
|
|
429
|
+
// instance partition already exists, `CreateInstancePartition` returns
|
|
430
|
+
// `ALREADY_EXISTS`.
|
|
431
|
+
//
|
|
432
|
+
// Immediately upon completion of this request:
|
|
433
|
+
//
|
|
434
|
+
// * The instance partition is readable via the API, with all requested
|
|
435
|
+
// attributes but no allocated resources. Its state is `CREATING`.
|
|
436
|
+
//
|
|
437
|
+
// Until completion of the returned operation:
|
|
438
|
+
//
|
|
439
|
+
// * Cancelling the operation renders the instance partition immediately
|
|
440
|
+
// unreadable via the API.
|
|
441
|
+
// * The instance partition can be deleted.
|
|
442
|
+
// * All other attempts to modify the instance partition are rejected.
|
|
443
|
+
//
|
|
444
|
+
// Upon completion of the returned operation:
|
|
445
|
+
//
|
|
446
|
+
// * Billing for all successfully-allocated resources begins (some types
|
|
447
|
+
// may have lower than the requested levels).
|
|
448
|
+
// * Databases can start using this instance partition.
|
|
449
|
+
// * The instance partition's allocated resource levels are readable via the
|
|
450
|
+
// API.
|
|
451
|
+
// * The instance partition's state becomes `READY`.
|
|
452
|
+
//
|
|
453
|
+
// The returned [long-running operation][google.longrunning.Operation] will
|
|
454
|
+
// have a name of the format
|
|
455
|
+
// `<instance_partition_name>/operations/<operation_id>` and can be used to
|
|
456
|
+
// track creation of the instance partition. The
|
|
457
|
+
// [metadata][google.longrunning.Operation.metadata] field type is
|
|
458
|
+
// [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata].
|
|
459
|
+
// The [response][google.longrunning.Operation.response] field type is
|
|
460
|
+
// [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if
|
|
461
|
+
// successful.
|
|
462
|
+
rpc CreateInstancePartition(CreateInstancePartitionRequest)
|
|
463
|
+
returns (google.longrunning.Operation) {
|
|
464
|
+
option (google.api.http) = {
|
|
465
|
+
post: "/v1/{parent=projects/*/instances/*}/instancePartitions"
|
|
466
|
+
body: "*"
|
|
467
|
+
};
|
|
468
|
+
option (google.api.method_signature) =
|
|
469
|
+
"parent,instance_partition,instance_partition_id";
|
|
470
|
+
option (google.longrunning.operation_info) = {
|
|
471
|
+
response_type: "google.spanner.admin.instance.v1.InstancePartition"
|
|
472
|
+
metadata_type: "google.spanner.admin.instance.v1.CreateInstancePartitionMetadata"
|
|
473
|
+
};
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
// Deletes an existing instance partition. Requires that the
|
|
477
|
+
// instance partition is not used by any database or backup and is not the
|
|
478
|
+
// default instance partition of an instance.
|
|
479
|
+
//
|
|
480
|
+
// Authorization requires `spanner.instancePartitions.delete` permission on
|
|
481
|
+
// the resource
|
|
482
|
+
// [name][google.spanner.admin.instance.v1.InstancePartition.name].
|
|
483
|
+
rpc DeleteInstancePartition(DeleteInstancePartitionRequest)
|
|
484
|
+
returns (google.protobuf.Empty) {
|
|
485
|
+
option (google.api.http) = {
|
|
486
|
+
delete: "/v1/{name=projects/*/instances/*/instancePartitions/*}"
|
|
487
|
+
};
|
|
488
|
+
option (google.api.method_signature) = "name";
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
// Updates an instance partition, and begins allocating or releasing resources
|
|
492
|
+
// as requested. The returned [long-running
|
|
493
|
+
// operation][google.longrunning.Operation] can be used to track the
|
|
494
|
+
// progress of updating the instance partition. If the named instance
|
|
495
|
+
// partition does not exist, returns `NOT_FOUND`.
|
|
496
|
+
//
|
|
497
|
+
// Immediately upon completion of this request:
|
|
498
|
+
//
|
|
499
|
+
// * For resource types for which a decrease in the instance partition's
|
|
500
|
+
// allocation has been requested, billing is based on the newly-requested
|
|
501
|
+
// level.
|
|
502
|
+
//
|
|
503
|
+
// Until completion of the returned operation:
|
|
504
|
+
//
|
|
505
|
+
// * Cancelling the operation sets its metadata's
|
|
506
|
+
// [cancel_time][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata.cancel_time],
|
|
507
|
+
// and begins restoring resources to their pre-request values. The
|
|
508
|
+
// operation is guaranteed to succeed at undoing all resource changes,
|
|
509
|
+
// after which point it terminates with a `CANCELLED` status.
|
|
510
|
+
// * All other attempts to modify the instance partition are rejected.
|
|
511
|
+
// * Reading the instance partition via the API continues to give the
|
|
512
|
+
// pre-request resource levels.
|
|
513
|
+
//
|
|
514
|
+
// Upon completion of the returned operation:
|
|
515
|
+
//
|
|
516
|
+
// * Billing begins for all successfully-allocated resources (some types
|
|
517
|
+
// may have lower than the requested levels).
|
|
518
|
+
// * All newly-reserved resources are available for serving the instance
|
|
519
|
+
// partition's tables.
|
|
520
|
+
// * The instance partition's new resource levels are readable via the API.
|
|
521
|
+
//
|
|
522
|
+
// The returned [long-running operation][google.longrunning.Operation] will
|
|
523
|
+
// have a name of the format
|
|
524
|
+
// `<instance_partition_name>/operations/<operation_id>` and can be used to
|
|
525
|
+
// track the instance partition modification. The
|
|
526
|
+
// [metadata][google.longrunning.Operation.metadata] field type is
|
|
527
|
+
// [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata].
|
|
528
|
+
// The [response][google.longrunning.Operation.response] field type is
|
|
529
|
+
// [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if
|
|
530
|
+
// successful.
|
|
531
|
+
//
|
|
532
|
+
// Authorization requires `spanner.instancePartitions.update` permission on
|
|
533
|
+
// the resource
|
|
534
|
+
// [name][google.spanner.admin.instance.v1.InstancePartition.name].
|
|
535
|
+
rpc UpdateInstancePartition(UpdateInstancePartitionRequest)
|
|
536
|
+
returns (google.longrunning.Operation) {
|
|
537
|
+
option (google.api.http) = {
|
|
538
|
+
patch: "/v1/{instance_partition.name=projects/*/instances/*/instancePartitions/*}"
|
|
539
|
+
body: "*"
|
|
540
|
+
};
|
|
541
|
+
option (google.api.method_signature) = "instance_partition,field_mask";
|
|
542
|
+
option (google.longrunning.operation_info) = {
|
|
543
|
+
response_type: "google.spanner.admin.instance.v1.InstancePartition"
|
|
544
|
+
metadata_type: "google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata"
|
|
545
|
+
};
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
// Lists instance partition [long-running
|
|
549
|
+
// operations][google.longrunning.Operation] 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][google.longrunning.Operation.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
|
+
}
|
|
406
570
|
}
|
|
407
571
|
|
|
408
572
|
message ReplicaInfo {
|
|
@@ -1041,6 +1205,14 @@ message ListInstancesRequest {
|
|
|
1041
1205
|
// it has the label "env" with its value
|
|
1042
1206
|
// containing "dev".
|
|
1043
1207
|
string filter = 4;
|
|
1208
|
+
|
|
1209
|
+
// Deadline used while retrieving metadata for instances.
|
|
1210
|
+
// Instances whose metadata cannot be retrieved within this deadline will be
|
|
1211
|
+
// added to
|
|
1212
|
+
// [unreachable][google.spanner.admin.instance.v1.ListInstancesResponse.unreachable]
|
|
1213
|
+
// in
|
|
1214
|
+
// [ListInstancesResponse][google.spanner.admin.instance.v1.ListInstancesResponse].
|
|
1215
|
+
google.protobuf.Timestamp instance_deadline = 5;
|
|
1044
1216
|
}
|
|
1045
1217
|
|
|
1046
1218
|
// The response for
|
|
@@ -1053,6 +1225,12 @@ message ListInstancesResponse {
|
|
|
1053
1225
|
// [ListInstances][google.spanner.admin.instance.v1.InstanceAdmin.ListInstances]
|
|
1054
1226
|
// call to fetch more of the matching instances.
|
|
1055
1227
|
string next_page_token = 2;
|
|
1228
|
+
|
|
1229
|
+
// The list of unreachable instances.
|
|
1230
|
+
// It includes the names of instances whose metadata could not be retrieved
|
|
1231
|
+
// within
|
|
1232
|
+
// [instance_deadline][google.spanner.admin.instance.v1.ListInstancesRequest.instance_deadline].
|
|
1233
|
+
repeated string unreachable = 3;
|
|
1056
1234
|
}
|
|
1057
1235
|
|
|
1058
1236
|
// The request for
|
|
@@ -1104,6 +1282,9 @@ message CreateInstanceMetadata {
|
|
|
1104
1282
|
|
|
1105
1283
|
// The time at which this operation failed or was completed successfully.
|
|
1106
1284
|
google.protobuf.Timestamp end_time = 4;
|
|
1285
|
+
|
|
1286
|
+
// The expected fulfillment period of this create operation.
|
|
1287
|
+
FulfillmentPeriod expected_fulfillment_period = 5;
|
|
1107
1288
|
}
|
|
1108
1289
|
|
|
1109
1290
|
// Metadata type for the operation returned by
|
|
@@ -1124,6 +1305,9 @@ message UpdateInstanceMetadata {
|
|
|
1124
1305
|
|
|
1125
1306
|
// The time at which this operation failed or was completed successfully.
|
|
1126
1307
|
google.protobuf.Timestamp end_time = 4;
|
|
1308
|
+
|
|
1309
|
+
// The expected fulfillment period of this update operation.
|
|
1310
|
+
FulfillmentPeriod expected_fulfillment_period = 5;
|
|
1127
1311
|
}
|
|
1128
1312
|
|
|
1129
1313
|
// Metadata type for the operation returned by
|
|
@@ -1155,3 +1339,381 @@ message UpdateInstanceConfigMetadata {
|
|
|
1155
1339
|
// The time at which this operation was cancelled.
|
|
1156
1340
|
google.protobuf.Timestamp cancel_time = 3;
|
|
1157
1341
|
}
|
|
1342
|
+
|
|
1343
|
+
// An isolated set of Cloud Spanner resources that databases can define
|
|
1344
|
+
// placements on.
|
|
1345
|
+
message InstancePartition {
|
|
1346
|
+
option (google.api.resource) = {
|
|
1347
|
+
type: "spanner.googleapis.com/InstancePartition"
|
|
1348
|
+
pattern: "projects/{project}/instances/{instance}/instancePartitions/{instance_partition}"
|
|
1349
|
+
};
|
|
1350
|
+
|
|
1351
|
+
// Indicates the current state of the instance partition.
|
|
1352
|
+
enum State {
|
|
1353
|
+
// Not specified.
|
|
1354
|
+
STATE_UNSPECIFIED = 0;
|
|
1355
|
+
|
|
1356
|
+
// The instance partition is still being created. Resources may not be
|
|
1357
|
+
// available yet, and operations such as creating placements using this
|
|
1358
|
+
// instance partition may not work.
|
|
1359
|
+
CREATING = 1;
|
|
1360
|
+
|
|
1361
|
+
// The instance partition is fully created and ready to do work such as
|
|
1362
|
+
// creating placements and using in databases.
|
|
1363
|
+
READY = 2;
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
// Required. A unique identifier for the instance partition. Values are of the
|
|
1367
|
+
// form
|
|
1368
|
+
// `projects/<project>/instances/<instance>/instancePartitions/[a-z][-a-z0-9]*[a-z0-9]`.
|
|
1369
|
+
// The final segment of the name must be between 2 and 64 characters in
|
|
1370
|
+
// length. An instance partition's name cannot be changed after the instance
|
|
1371
|
+
// partition is created.
|
|
1372
|
+
string name = 1 [(google.api.field_behavior) = REQUIRED];
|
|
1373
|
+
|
|
1374
|
+
// Required. The name of the instance partition's configuration. Values are of
|
|
1375
|
+
// the form `projects/<project>/instanceConfigs/<configuration>`. See also
|
|
1376
|
+
// [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig] and
|
|
1377
|
+
// [ListInstanceConfigs][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs].
|
|
1378
|
+
string config = 2 [
|
|
1379
|
+
(google.api.field_behavior) = REQUIRED,
|
|
1380
|
+
(google.api.resource_reference) = {
|
|
1381
|
+
type: "spanner.googleapis.com/InstanceConfig"
|
|
1382
|
+
}
|
|
1383
|
+
];
|
|
1384
|
+
|
|
1385
|
+
// Required. The descriptive name for this instance partition as it appears in
|
|
1386
|
+
// UIs. Must be unique per project and between 4 and 30 characters in length.
|
|
1387
|
+
string display_name = 3 [(google.api.field_behavior) = REQUIRED];
|
|
1388
|
+
|
|
1389
|
+
// Compute capacity defines amount of server and storage resources that are
|
|
1390
|
+
// available to the databases in an instance partition. At most one of either
|
|
1391
|
+
// node_count or processing_units should be present in the message. See [the
|
|
1392
|
+
// documentation](https://cloud.google.com/spanner/docs/compute-capacity)
|
|
1393
|
+
// for more information about nodes and processing units.
|
|
1394
|
+
oneof compute_capacity {
|
|
1395
|
+
// The number of nodes allocated to this instance partition.
|
|
1396
|
+
//
|
|
1397
|
+
// Users can set the node_count field to specify the target number of nodes
|
|
1398
|
+
// allocated to the instance partition.
|
|
1399
|
+
//
|
|
1400
|
+
// This may be zero in API responses for instance partitions that are not
|
|
1401
|
+
// yet in state `READY`.
|
|
1402
|
+
int32 node_count = 5;
|
|
1403
|
+
|
|
1404
|
+
// The number of processing units allocated to this instance partition.
|
|
1405
|
+
//
|
|
1406
|
+
// Users can set the processing_units field to specify the target number of
|
|
1407
|
+
// processing units allocated to the instance partition.
|
|
1408
|
+
//
|
|
1409
|
+
// This may be zero in API responses for instance partitions that are not
|
|
1410
|
+
// yet in state `READY`.
|
|
1411
|
+
int32 processing_units = 6;
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
// Output only. The current instance partition state.
|
|
1415
|
+
State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
1416
|
+
|
|
1417
|
+
// Output only. The time at which the instance partition was created.
|
|
1418
|
+
google.protobuf.Timestamp create_time = 8
|
|
1419
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
1420
|
+
|
|
1421
|
+
// Output only. The time at which the instance partition was most recently
|
|
1422
|
+
// updated.
|
|
1423
|
+
google.protobuf.Timestamp update_time = 9
|
|
1424
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
1425
|
+
|
|
1426
|
+
// Output only. The names of the databases that reference this
|
|
1427
|
+
// instance partition. Referencing databases should share the parent instance.
|
|
1428
|
+
// The existence of any referencing database prevents the instance partition
|
|
1429
|
+
// from being deleted.
|
|
1430
|
+
repeated string referencing_databases = 10
|
|
1431
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
1432
|
+
|
|
1433
|
+
// Output only. The names of the backups that reference this instance
|
|
1434
|
+
// partition. Referencing backups should share the parent instance. The
|
|
1435
|
+
// existence of any referencing backup prevents the instance partition from
|
|
1436
|
+
// being deleted.
|
|
1437
|
+
repeated string referencing_backups = 11
|
|
1438
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
1439
|
+
|
|
1440
|
+
// Used for optimistic concurrency control as a way
|
|
1441
|
+
// to help prevent simultaneous updates of a instance partition from
|
|
1442
|
+
// overwriting each other. It is strongly suggested that systems make use of
|
|
1443
|
+
// the etag in the read-modify-write cycle to perform instance partition
|
|
1444
|
+
// updates in order to avoid race conditions: An etag is returned in the
|
|
1445
|
+
// response which contains instance partitions, and systems are expected to
|
|
1446
|
+
// put that etag in the request to update instance partitions to ensure that
|
|
1447
|
+
// their change will be applied to the same version of the instance partition.
|
|
1448
|
+
// If no etag is provided in the call to update instance partition, then the
|
|
1449
|
+
// existing instance partition is overwritten blindly.
|
|
1450
|
+
string etag = 12;
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
// Metadata type for the operation returned by
|
|
1454
|
+
// [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition].
|
|
1455
|
+
message CreateInstancePartitionMetadata {
|
|
1456
|
+
// The instance partition being created.
|
|
1457
|
+
InstancePartition instance_partition = 1;
|
|
1458
|
+
|
|
1459
|
+
// The time at which the
|
|
1460
|
+
// [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition]
|
|
1461
|
+
// request was received.
|
|
1462
|
+
google.protobuf.Timestamp start_time = 2;
|
|
1463
|
+
|
|
1464
|
+
// The time at which this operation was cancelled. If set, this operation is
|
|
1465
|
+
// in the process of undoing itself (which is guaranteed to succeed) and
|
|
1466
|
+
// cannot be cancelled again.
|
|
1467
|
+
google.protobuf.Timestamp cancel_time = 3;
|
|
1468
|
+
|
|
1469
|
+
// The time at which this operation failed or was completed successfully.
|
|
1470
|
+
google.protobuf.Timestamp end_time = 4;
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
// The request for
|
|
1474
|
+
// [CreateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstancePartition].
|
|
1475
|
+
message CreateInstancePartitionRequest {
|
|
1476
|
+
// Required. The name of the instance in which to create the instance
|
|
1477
|
+
// partition. Values are of the form
|
|
1478
|
+
// `projects/<project>/instances/<instance>`.
|
|
1479
|
+
string parent = 1 [
|
|
1480
|
+
(google.api.field_behavior) = REQUIRED,
|
|
1481
|
+
(google.api.resource_reference) = {
|
|
1482
|
+
type: "spanner.googleapis.com/Instance"
|
|
1483
|
+
}
|
|
1484
|
+
];
|
|
1485
|
+
|
|
1486
|
+
// Required. The ID of the instance partition to create. Valid identifiers are
|
|
1487
|
+
// of the form `[a-z][-a-z0-9]*[a-z0-9]` and must be between 2 and 64
|
|
1488
|
+
// characters in length.
|
|
1489
|
+
string instance_partition_id = 2 [(google.api.field_behavior) = REQUIRED];
|
|
1490
|
+
|
|
1491
|
+
// Required. The instance partition to create. The instance_partition.name may
|
|
1492
|
+
// be omitted, but if specified must be
|
|
1493
|
+
// `<parent>/instancePartitions/<instance_partition_id>`.
|
|
1494
|
+
InstancePartition instance_partition = 3
|
|
1495
|
+
[(google.api.field_behavior) = REQUIRED];
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
// The request for
|
|
1499
|
+
// [DeleteInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstancePartition].
|
|
1500
|
+
message DeleteInstancePartitionRequest {
|
|
1501
|
+
// Required. The name of the instance partition to be deleted.
|
|
1502
|
+
// Values are of the form
|
|
1503
|
+
// `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`
|
|
1504
|
+
string name = 1 [
|
|
1505
|
+
(google.api.field_behavior) = REQUIRED,
|
|
1506
|
+
(google.api.resource_reference) = {
|
|
1507
|
+
type: "spanner.googleapis.com/InstancePartition"
|
|
1508
|
+
}
|
|
1509
|
+
];
|
|
1510
|
+
|
|
1511
|
+
// Optional. If not empty, the API only deletes the instance partition when
|
|
1512
|
+
// the etag provided matches the current status of the requested instance
|
|
1513
|
+
// partition. Otherwise, deletes the instance partition without checking the
|
|
1514
|
+
// current status of the requested instance partition.
|
|
1515
|
+
string etag = 2;
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
// The request for
|
|
1519
|
+
// [GetInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.GetInstancePartition].
|
|
1520
|
+
message GetInstancePartitionRequest {
|
|
1521
|
+
// Required. The name of the requested instance partition. Values are of
|
|
1522
|
+
// the form
|
|
1523
|
+
// `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`.
|
|
1524
|
+
string name = 1 [
|
|
1525
|
+
(google.api.field_behavior) = REQUIRED,
|
|
1526
|
+
(google.api.resource_reference) = {
|
|
1527
|
+
type: "spanner.googleapis.com/InstancePartition"
|
|
1528
|
+
}
|
|
1529
|
+
];
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
// The request for
|
|
1533
|
+
// [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition].
|
|
1534
|
+
message UpdateInstancePartitionRequest {
|
|
1535
|
+
// Required. The instance partition to update, which must always include the
|
|
1536
|
+
// instance partition name. Otherwise, only fields mentioned in
|
|
1537
|
+
// [field_mask][google.spanner.admin.instance.v1.UpdateInstancePartitionRequest.field_mask]
|
|
1538
|
+
// need be included.
|
|
1539
|
+
InstancePartition instance_partition = 1
|
|
1540
|
+
[(google.api.field_behavior) = REQUIRED];
|
|
1541
|
+
|
|
1542
|
+
// Required. A mask specifying which fields in
|
|
1543
|
+
// [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
|
|
1544
|
+
// should be updated. The field mask must always be specified; this prevents
|
|
1545
|
+
// any future fields in
|
|
1546
|
+
// [InstancePartition][google.spanner.admin.instance.v1.InstancePartition]
|
|
1547
|
+
// from being erased accidentally by clients that do not know about them.
|
|
1548
|
+
google.protobuf.FieldMask field_mask = 2
|
|
1549
|
+
[(google.api.field_behavior) = REQUIRED];
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1552
|
+
// Metadata type for the operation returned by
|
|
1553
|
+
// [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition].
|
|
1554
|
+
message UpdateInstancePartitionMetadata {
|
|
1555
|
+
// The desired end state of the update.
|
|
1556
|
+
InstancePartition instance_partition = 1;
|
|
1557
|
+
|
|
1558
|
+
// The time at which
|
|
1559
|
+
// [UpdateInstancePartition][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstancePartition]
|
|
1560
|
+
// request was received.
|
|
1561
|
+
google.protobuf.Timestamp start_time = 2;
|
|
1562
|
+
|
|
1563
|
+
// The time at which this operation was cancelled. If set, this operation is
|
|
1564
|
+
// in the process of undoing itself (which is guaranteed to succeed) and
|
|
1565
|
+
// cannot be cancelled again.
|
|
1566
|
+
google.protobuf.Timestamp cancel_time = 3;
|
|
1567
|
+
|
|
1568
|
+
// The time at which this operation failed or was completed successfully.
|
|
1569
|
+
google.protobuf.Timestamp end_time = 4;
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
// The request for
|
|
1573
|
+
// [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions].
|
|
1574
|
+
message ListInstancePartitionsRequest {
|
|
1575
|
+
// Required. The instance whose instance partitions should be listed. Values
|
|
1576
|
+
// are of the form `projects/<project>/instances/<instance>`.
|
|
1577
|
+
string parent = 1 [
|
|
1578
|
+
(google.api.field_behavior) = REQUIRED,
|
|
1579
|
+
(google.api.resource_reference) = {
|
|
1580
|
+
type: "spanner.googleapis.com/Instance"
|
|
1581
|
+
}
|
|
1582
|
+
];
|
|
1583
|
+
|
|
1584
|
+
// Number of instance partitions to be returned in the response. If 0 or less,
|
|
1585
|
+
// defaults to the server's maximum allowed page size.
|
|
1586
|
+
int32 page_size = 2;
|
|
1587
|
+
|
|
1588
|
+
// If non-empty, `page_token` should contain a
|
|
1589
|
+
// [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.next_page_token]
|
|
1590
|
+
// from a previous
|
|
1591
|
+
// [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
|
|
1592
|
+
string page_token = 3;
|
|
1593
|
+
|
|
1594
|
+
// Optional. Deadline used while retrieving metadata for instance partitions.
|
|
1595
|
+
// Instance partitions whose metadata cannot be retrieved within this deadline
|
|
1596
|
+
// will be added to
|
|
1597
|
+
// [unreachable][google.spanner.admin.instance.v1.ListInstancePartitionsResponse.unreachable]
|
|
1598
|
+
// in
|
|
1599
|
+
// [ListInstancePartitionsResponse][google.spanner.admin.instance.v1.ListInstancePartitionsResponse].
|
|
1600
|
+
google.protobuf.Timestamp instance_partition_deadline = 4
|
|
1601
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
// The response for
|
|
1605
|
+
// [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions].
|
|
1606
|
+
message ListInstancePartitionsResponse {
|
|
1607
|
+
// The list of requested instancePartitions.
|
|
1608
|
+
repeated InstancePartition instance_partitions = 1;
|
|
1609
|
+
|
|
1610
|
+
// `next_page_token` can be sent in a subsequent
|
|
1611
|
+
// [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions]
|
|
1612
|
+
// call to fetch more of the matching instance partitions.
|
|
1613
|
+
string next_page_token = 2;
|
|
1614
|
+
|
|
1615
|
+
// The list of unreachable instance partitions.
|
|
1616
|
+
// It includes the names of instance partitions whose metadata could
|
|
1617
|
+
// not be retrieved within
|
|
1618
|
+
// [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionsRequest.instance_partition_deadline].
|
|
1619
|
+
repeated string unreachable = 3;
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
// The request for
|
|
1623
|
+
// [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations].
|
|
1624
|
+
message ListInstancePartitionOperationsRequest {
|
|
1625
|
+
// Required. The parent instance of the instance partition operations.
|
|
1626
|
+
// Values are of the form `projects/<project>/instances/<instance>`.
|
|
1627
|
+
string parent = 1 [
|
|
1628
|
+
(google.api.field_behavior) = REQUIRED,
|
|
1629
|
+
(google.api.resource_reference) = {
|
|
1630
|
+
type: "spanner.googleapis.com/Instance"
|
|
1631
|
+
}
|
|
1632
|
+
];
|
|
1633
|
+
|
|
1634
|
+
// Optional. An expression that filters the list of returned operations.
|
|
1635
|
+
//
|
|
1636
|
+
// A filter expression consists of a field name, a
|
|
1637
|
+
// comparison operator, and a value for filtering.
|
|
1638
|
+
// The value must be a string, a number, or a boolean. The comparison operator
|
|
1639
|
+
// must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`.
|
|
1640
|
+
// Colon `:` is the contains operator. Filter rules are not case sensitive.
|
|
1641
|
+
//
|
|
1642
|
+
// The following fields in the [Operation][google.longrunning.Operation]
|
|
1643
|
+
// are eligible for filtering:
|
|
1644
|
+
//
|
|
1645
|
+
// * `name` - The name of the long-running operation
|
|
1646
|
+
// * `done` - False if the operation is in progress, else true.
|
|
1647
|
+
// * `metadata.@type` - the type of metadata. For example, the type string
|
|
1648
|
+
// for
|
|
1649
|
+
// [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]
|
|
1650
|
+
// is
|
|
1651
|
+
// `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`.
|
|
1652
|
+
// * `metadata.<field_name>` - any field in metadata.value.
|
|
1653
|
+
// `metadata.@type` must be specified first, if filtering on metadata
|
|
1654
|
+
// fields.
|
|
1655
|
+
// * `error` - Error associated with the long-running operation.
|
|
1656
|
+
// * `response.@type` - the type of response.
|
|
1657
|
+
// * `response.<field_name>` - any field in response.value.
|
|
1658
|
+
//
|
|
1659
|
+
// You can combine multiple expressions by enclosing each expression in
|
|
1660
|
+
// parentheses. By default, expressions are combined with AND logic. However,
|
|
1661
|
+
// you can specify AND, OR, and NOT logic explicitly.
|
|
1662
|
+
//
|
|
1663
|
+
// Here are a few examples:
|
|
1664
|
+
//
|
|
1665
|
+
// * `done:true` - The operation is complete.
|
|
1666
|
+
// * `(metadata.@type=` \
|
|
1667
|
+
// `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata)
|
|
1668
|
+
// AND` \
|
|
1669
|
+
// `(metadata.instance_partition.name:custom-instance-partition) AND` \
|
|
1670
|
+
// `(metadata.start_time < \"2021-03-28T14:50:00Z\") AND` \
|
|
1671
|
+
// `(error:*)` - Return operations where:
|
|
1672
|
+
// * The operation's metadata type is
|
|
1673
|
+
// [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata].
|
|
1674
|
+
// * The instance partition name contains "custom-instance-partition".
|
|
1675
|
+
// * The operation started before 2021-03-28T14:50:00Z.
|
|
1676
|
+
// * The operation resulted in an error.
|
|
1677
|
+
string filter = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
1678
|
+
|
|
1679
|
+
// Optional. Number of operations to be returned in the response. If 0 or
|
|
1680
|
+
// less, defaults to the server's maximum allowed page size.
|
|
1681
|
+
int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
1682
|
+
|
|
1683
|
+
// Optional. If non-empty, `page_token` should contain a
|
|
1684
|
+
// [next_page_token][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.next_page_token]
|
|
1685
|
+
// from a previous
|
|
1686
|
+
// [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse]
|
|
1687
|
+
// to the same `parent` and with the same `filter`.
|
|
1688
|
+
string page_token = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
1689
|
+
|
|
1690
|
+
// Optional. Deadline used while retrieving metadata for instance partition
|
|
1691
|
+
// operations. Instance partitions whose operation metadata cannot be
|
|
1692
|
+
// retrieved within this deadline will be added to
|
|
1693
|
+
// [unreachable][ListInstancePartitionOperationsResponse.unreachable] in
|
|
1694
|
+
// [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse].
|
|
1695
|
+
google.protobuf.Timestamp instance_partition_deadline = 5
|
|
1696
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
// The response for
|
|
1700
|
+
// [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations].
|
|
1701
|
+
message ListInstancePartitionOperationsResponse {
|
|
1702
|
+
// The list of matching instance partition [long-running
|
|
1703
|
+
// operations][google.longrunning.Operation]. Each operation's name will be
|
|
1704
|
+
// prefixed by the instance partition's name. The operation's
|
|
1705
|
+
// [metadata][google.longrunning.Operation.metadata] field type
|
|
1706
|
+
// `metadata.type_url` describes the type of the metadata.
|
|
1707
|
+
repeated google.longrunning.Operation operations = 1;
|
|
1708
|
+
|
|
1709
|
+
// `next_page_token` can be sent in a subsequent
|
|
1710
|
+
// [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations]
|
|
1711
|
+
// call to fetch more of the matching metadata.
|
|
1712
|
+
string next_page_token = 2;
|
|
1713
|
+
|
|
1714
|
+
// The list of unreachable instance partitions.
|
|
1715
|
+
// It includes the names of instance partitions whose operation metadata could
|
|
1716
|
+
// not be retrieved within
|
|
1717
|
+
// [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.instance_partition_deadline].
|
|
1718
|
+
repeated string unreachable_instance_partitions = 3;
|
|
1719
|
+
}
|