@@ -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" ;
@@ -425,6 +426,15 @@ service DatabaseAdmin {
425426 option (google.api.method_signature ) = "parent" ;
426427 }
427428
429+ // Adds split points to specified tables, indexes of a database.
430+ rpc AddSplitPoints (AddSplitPointsRequest ) returns (AddSplitPointsResponse ) {
431+ option (google.api.http ) = {
432+ post : "/v1/{database=projects/*/instances/*/databases/*}:addSplitPoints"
433+ body : "*"
434+ };
435+ option (google.api.method_signature ) = "database,split_points" ;
436+ }
437+
428438 // Creates a new backup schedule.
429439 rpc CreateBackupSchedule (CreateBackupScheduleRequest )
430440 returns (BackupSchedule ) {
@@ -1207,3 +1217,59 @@ message ListDatabaseRolesResponse {
12071217 // call to fetch more of the matching roles.
12081218 string next_page_token = 2 ;
12091219}
1220+
1221+ // The request for
1222+ // [AddSplitPoints][google.spanner.admin.database.v1.DatabaseAdmin.AddSplitPoints].
1223+ message AddSplitPointsRequest {
1224+ // Required. The database on whose tables/indexes split points are to be
1225+ // added. Values are of the form
1226+ // `projects/<project>/instances/<instance>/databases/<database>`.
1227+ string database = 1 [
1228+ (google.api.field_behavior ) = REQUIRED ,
1229+ (google.api.resource_reference ) = {
1230+ type : "spanner.googleapis.com/Database"
1231+ }
1232+ ];
1233+
1234+ // Required. The split points to add.
1235+ repeated SplitPoints split_points = 2
1236+ [(google.api.field_behavior ) = REQUIRED ];
1237+
1238+ // Optional. A user-supplied tag associated with the split points.
1239+ // For example, "intital_data_load", "special_event_1".
1240+ // Defaults to "CloudAddSplitPointsAPI" if not specified.
1241+ // The length of the tag must not exceed 50 characters,else will be trimmed.
1242+ // Only valid UTF8 characters are allowed.
1243+ string initiator = 3 [(google.api.field_behavior ) = OPTIONAL ];
1244+ }
1245+
1246+ // The response for
1247+ // [AddSplitPoints][google.spanner.admin.database.v1.DatabaseAdmin.AddSplitPoints].
1248+ message AddSplitPointsResponse {}
1249+
1250+ // The split points of a table/index.
1251+ message SplitPoints {
1252+ // A split key.
1253+ message Key {
1254+ // Required. The column values making up the split key.
1255+ google.protobuf.ListValue key_parts = 1
1256+ [(google.api.field_behavior ) = REQUIRED ];
1257+ }
1258+
1259+ // The table to split.
1260+ string table = 1 ;
1261+
1262+ // The index to split.
1263+ // If specified, the `table` field must refer to the index's base table.
1264+ string index = 2 ;
1265+
1266+ // Required. The list of split keys, i.e., the split boundaries.
1267+ repeated Key keys = 3 [(google.api.field_behavior ) = REQUIRED ];
1268+
1269+ // Optional. The expiration timestamp of the split points.
1270+ // A timestamp in the past means immediate expiration.
1271+ // The maximum value can be 30 days in the future.
1272+ // Defaults to 10 days in the future if not specified.
1273+ google.protobuf.Timestamp expire_time = 5
1274+ [(google.api.field_behavior ) = OPTIONAL ];
1275+ }
0 commit comments