Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

Commit e67adc2

Browse files
feat(spanner): add leader_options to InstanceConfig and default_leader to Database (#1414)
* feat(spanner): add leader_options to InstanceConfig and default_leader to Database PiperOrigin-RevId: 382409094 Source-Link: googleapis/googleapis@2c6e4dd Source-Link: googleapis/googleapis-gen@ba248c5 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 3bf8872 commit e67adc2

5 files changed

Lines changed: 98 additions & 1 deletion

File tree

protos/google/spanner/admin/database/v1/spanner_database_admin.proto

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,14 @@ message Database {
399399
// sure to account for the time from the moment when the value is queried to
400400
// the moment when you initiate the recovery.
401401
google.protobuf.Timestamp earliest_version_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
402+
403+
// Output only. The read-write region which contains the database's leader
404+
// replicas.
405+
//
406+
// This is the same as the value of default_leader
407+
// database option set using DatabaseAdmin.CreateDatabase or
408+
// DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty.
409+
string default_leader = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
402410
}
403411

404412
// The request for [ListDatabases][google.spanner.admin.database.v1.DatabaseAdmin.ListDatabases].

protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,10 @@ message InstanceConfig {
318318
// The geographic placement of nodes in this instance configuration and their
319319
// replication properties.
320320
repeated ReplicaInfo replicas = 3;
321+
322+
// Allowed values of the “default_leader” schema option for databases in
323+
// instances that use this instance configuration.
324+
repeated string leader_options = 4;
321325
}
322326

323327
// An isolated set of Cloud Spanner resources on which databases can be hosted.

protos/protos.d.ts

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protos/protos.js

Lines changed: 62 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protos/protos.json

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)