@@ -25,6 +25,7 @@ import "google/iam/v1/policy.proto";
2525import "google/longrunning/operations.proto" ;
2626import "google/protobuf/empty.proto" ;
2727import "google/protobuf/field_mask.proto" ;
28+ import "google/protobuf/struct.proto" ;
2829import "google/protobuf/timestamp.proto" ;
2930import "google/spanner/admin/database/v1/backup.proto" ;
3031import "google/spanner/admin/database/v1/backup_schedule.proto" ;
@@ -41,6 +42,10 @@ option (google.api.resource_definition) = {
4142 type : "spanner.googleapis.com/Instance"
4243 pattern : "projects/{project}/instances/{instance}"
4344};
45+ option (google.api.resource_definition ) = {
46+ type : "spanner.googleapis.com/InstancePartition"
47+ pattern : "projects/{project}/instances/{instance}/instancePartitions/{instance_partition}"
48+ };
4449
4550// Cloud Spanner Database Admin API
4651//
@@ -425,6 +430,15 @@ service DatabaseAdmin {
425430 option (google.api.method_signature ) = "parent" ;
426431 }
427432
433+ // Adds split points to specified tables, indexes of a database.
434+ rpc AddSplitPoints (AddSplitPointsRequest ) returns (AddSplitPointsResponse ) {
435+ option (google.api.http ) = {
436+ post : "/v1/{database=projects/*/instances/*/databases/*}:addSplitPoints"
437+ body : "*"
438+ };
439+ option (google.api.method_signature ) = "database,split_points" ;
440+ }
441+
428442 // Creates a new backup schedule.
429443 rpc CreateBackupSchedule (CreateBackupScheduleRequest )
430444 returns (BackupSchedule ) {
@@ -1207,3 +1221,59 @@ message ListDatabaseRolesResponse {
12071221 // call to fetch more of the matching roles.
12081222 string next_page_token = 2 ;
12091223}
1224+
1225+ // The request for
1226+ // [AddSplitPoints][google.spanner.admin.database.v1.DatabaseAdmin.AddSplitPoints].
1227+ message AddSplitPointsRequest {
1228+ // Required. The database on whose tables/indexes split points are to be
1229+ // added. Values are of the form
1230+ // `projects/<project>/instances/<instance>/databases/<database>`.
1231+ string database = 1 [
1232+ (google.api.field_behavior ) = REQUIRED ,
1233+ (google.api.resource_reference ) = {
1234+ type : "spanner.googleapis.com/Database"
1235+ }
1236+ ];
1237+
1238+ // Required. The split points to add.
1239+ repeated SplitPoints split_points = 2
1240+ [(google.api.field_behavior ) = REQUIRED ];
1241+
1242+ // Optional. A user-supplied tag associated with the split points.
1243+ // For example, "intital_data_load", "special_event_1".
1244+ // Defaults to "CloudAddSplitPointsAPI" if not specified.
1245+ // The length of the tag must not exceed 50 characters,else will be trimmed.
1246+ // Only valid UTF8 characters are allowed.
1247+ string initiator = 3 [(google.api.field_behavior ) = OPTIONAL ];
1248+ }
1249+
1250+ // The response for
1251+ // [AddSplitPoints][google.spanner.admin.database.v1.DatabaseAdmin.AddSplitPoints].
1252+ message AddSplitPointsResponse {}
1253+
1254+ // The split points of a table/index.
1255+ message SplitPoints {
1256+ // A split key.
1257+ message Key {
1258+ // Required. The column values making up the split key.
1259+ google.protobuf.ListValue key_parts = 1
1260+ [(google.api.field_behavior ) = REQUIRED ];
1261+ }
1262+
1263+ // The table to split.
1264+ string table = 1 ;
1265+
1266+ // The index to split.
1267+ // If specified, the `table` field must refer to the index's base table.
1268+ string index = 2 ;
1269+
1270+ // Required. The list of split keys, i.e., the split boundaries.
1271+ repeated Key keys = 3 [(google.api.field_behavior ) = REQUIRED ];
1272+
1273+ // Optional. The expiration timestamp of the split points.
1274+ // A timestamp in the past means immediate expiration.
1275+ // The maximum value can be 30 days in the future.
1276+ // Defaults to 10 days in the future if not specified.
1277+ google.protobuf.Timestamp expire_time = 5
1278+ [(google.api.field_behavior ) = OPTIONAL ];
1279+ }
0 commit comments