@@ -803,6 +803,34 @@ message InstanceConfig {
803803 State state = 11 [(google.api.field_behavior ) = OUTPUT_ONLY ];
804804}
805805
806+ // ReplicaComputeCapacity describes the amount of server resources that are
807+ // allocated to each replica identified by the replica selection.
808+ message ReplicaComputeCapacity {
809+ // Required. Identifies replicas by specified properties.
810+ // All replicas in the selection have the same amount of compute capacity.
811+ ReplicaSelection replica_selection = 1
812+ [(google.api.field_behavior ) = REQUIRED ];
813+
814+ // Compute capacity allocated to each replica identified by the specified
815+ // selection.
816+ // The unit is selected based on the unit used to specify the instance size
817+ // for non-autoscaling instances, or the unit used in autoscaling limit for
818+ // autoscaling instances.
819+ oneof compute_capacity {
820+ // The number of nodes allocated to each replica.
821+ //
822+ // This may be zero in API responses for instances that are not yet in
823+ // state `READY`.
824+ int32 node_count = 2 ;
825+
826+ // The number of processing units allocated to each replica.
827+ //
828+ // This may be zero in API responses for instances that are not yet in
829+ // state `READY`.
830+ int32 processing_units = 3 ;
831+ }
832+ }
833+
806834// Autoscaling configuration for an instance.
807835message AutoscalingConfig {
808836 // The autoscaling limits for the instance. Users can define the minimum and
@@ -854,13 +882,56 @@ message AutoscalingConfig {
854882 [(google.api.field_behavior ) = REQUIRED ];
855883 }
856884
885+ // AsymmetricAutoscalingOption specifies the scaling of replicas identified by
886+ // the given selection.
887+ message AsymmetricAutoscalingOption {
888+ // Overrides the top-level autoscaling configuration for the replicas
889+ // identified by `replica_selection`. All fields in this message are
890+ // optional. Any unspecified fields will use the corresponding values from
891+ // the top-level autoscaling configuration.
892+ message AutoscalingConfigOverrides {
893+ // Optional. If specified, overrides the min/max limit in the top-level
894+ // autoscaling configuration for the selected replicas.
895+ AutoscalingLimits autoscaling_limits = 1
896+ [(google.api.field_behavior ) = OPTIONAL ];
897+
898+ // Optional. If specified, overrides the autoscaling target
899+ // high_priority_cpu_utilization_percent in the top-level autoscaling
900+ // configuration for the selected replicas.
901+ int32 autoscaling_target_high_priority_cpu_utilization_percent = 2
902+ [(google.api.field_behavior ) = OPTIONAL ];
903+ }
904+
905+ // Required. Selects the replicas to which this AsymmetricAutoscalingOption
906+ // applies. Only read-only replicas are supported.
907+ ReplicaSelection replica_selection = 1
908+ [(google.api.field_behavior ) = REQUIRED ];
909+
910+ // Optional. Overrides applied to the top-level autoscaling configuration
911+ // for the selected replicas.
912+ AutoscalingConfigOverrides overrides = 2
913+ [(google.api.field_behavior ) = OPTIONAL ];
914+ }
915+
857916 // Required. Autoscaling limits for an instance.
858917 AutoscalingLimits autoscaling_limits = 1
859918 [(google.api.field_behavior ) = REQUIRED ];
860919
861920 // Required. The autoscaling targets for an instance.
862921 AutoscalingTargets autoscaling_targets = 2
863922 [(google.api.field_behavior ) = REQUIRED ];
923+
924+ // Optional. Optional asymmetric autoscaling options.
925+ // Replicas matching the replica selection criteria will be autoscaled
926+ // independently from other replicas. The autoscaler will scale the replicas
927+ // based on the utilization of replicas identified by the replica selection.
928+ // Replica selections should not overlap with each other.
929+ //
930+ // Other replicas (those do not match any replica selection) will be
931+ // autoscaled together and will have the same compute capacity allocated to
932+ // them.
933+ repeated AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3
934+ [(google.api.field_behavior ) = OPTIONAL ];
864935}
865936
866937// An isolated set of Cloud Spanner resources on which databases can be hosted.
@@ -901,6 +972,24 @@ message Instance {
901972 ENTERPRISE_PLUS = 3 ;
902973 }
903974
975+ // Indicates the default backup behavior for new databases within the
976+ // instance.
977+ enum DefaultBackupScheduleType {
978+ // Not specified.
979+ DEFAULT_BACKUP_SCHEDULE_TYPE_UNSPECIFIED = 0 ;
980+
981+ // No default backup schedule will be created automatically on creation of a
982+ // database within the instance.
983+ NONE = 1 ;
984+
985+ // A default backup schedule will be created automatically on creation of a
986+ // database within the instance. The default backup schedule creates a full
987+ // backup every 24 hours and retains the backup for a period of 7 days. Once
988+ // created, the default backup schedule can be edited/deleted similar to any
989+ // other backup schedule.
990+ AUTOMATIC = 2 ;
991+ }
992+
904993 // Required. A unique identifier for the instance, which cannot be changed
905994 // after the instance is created. Values are of the form
906995 // `projects/<project>/instances/[a-z][-a-z0-9]*[a-z0-9]`. The final
@@ -922,34 +1011,56 @@ message Instance {
9221011 // Must be unique per project and between 4 and 30 characters in length.
9231012 string display_name = 3 [(google.api.field_behavior ) = REQUIRED ];
9241013
925- // The number of nodes allocated to this instance. At most one of either
926- // node_count or processing_units should be present in the message.
1014+ // The number of nodes allocated to this instance. At most, one of either
1015+ // ` node_count` or ` processing_units` should be present in the message.
9271016 //
928- // Users can set the node_count field to specify the target number of nodes
1017+ // Users can set the ` node_count` field to specify the target number of nodes
9291018 // allocated to the instance.
9301019 //
931- // This may be zero in API responses for instances that are not yet in state
932- // `READY` .
1020+ // If autoscaling is enabled, `node_count` is treated as an `OUTPUT_ONLY`
1021+ // field and reflects the current number of nodes allocated to the instance .
9331022 //
934- // See [the
935- // documentation](https://cloud.google.com/spanner/docs/compute-capacity)
936- // for more information about nodes and processing units.
1023+ // This might be zero in API responses for instances that are not yet in the
1024+ // `READY` state.
1025+ //
1026+ // If the instance has varying node count across replicas (achieved by
1027+ // setting asymmetric_autoscaling_options in autoscaling config), the
1028+ // node_count here is the maximum node count across all replicas.
1029+ //
1030+ // For more information, see
1031+ // [Compute capacity, nodes, and processing
1032+ // units](https://cloud.google.com/spanner/docs/compute-capacity).
9371033 int32 node_count = 5 ;
9381034
939- // The number of processing units allocated to this instance. At most one of
940- // processing_units or node_count should be present in the message.
1035+ // The number of processing units allocated to this instance. At most, one of
1036+ // either ` processing_units` or ` node_count` should be present in the message.
9411037 //
942- // Users can set the processing_units field to specify the target number of
1038+ // Users can set the ` processing_units` field to specify the target number of
9431039 // processing units allocated to the instance.
9441040 //
945- // This may be zero in API responses for instances that are not yet in state
946- // `READY`.
1041+ // If autoscaling is enabled, `processing_units` is treated as an
1042+ // `OUTPUT_ONLY` field and reflects the current number of processing units
1043+ // allocated to the instance.
9471044 //
948- // See [the
949- // documentation](https://cloud.google.com/spanner/docs/compute-capacity)
950- // for more information about nodes and processing units.
1045+ // This might be zero in API responses for instances that are not yet in the
1046+ // `READY` state.
1047+ //
1048+ // If the instance has varying processing units per replica
1049+ // (achieved by setting asymmetric_autoscaling_options in autoscaling config),
1050+ // the processing_units here is the maximum processing units across all
1051+ // replicas.
1052+ //
1053+ // For more information, see
1054+ // [Compute capacity, nodes and processing
1055+ // units](https://cloud.google.com/spanner/docs/compute-capacity).
9511056 int32 processing_units = 9 ;
9521057
1058+ // Output only. Lists the compute capacity per ReplicaSelection. A replica
1059+ // selection identifies a set of replicas with common properties. Replicas
1060+ // identified by a ReplicaSelection are scaled with the same compute capacity.
1061+ repeated ReplicaComputeCapacity replica_compute_capacity = 19
1062+ [(google.api.field_behavior ) = OUTPUT_ONLY ];
1063+
9531064 // Optional. The autoscaling configuration. Autoscaling is enabled if this
9541065 // field is set. When autoscaling is enabled, node_count and processing_units
9551066 // are treated as OUTPUT_ONLY fields and reflect the current compute capacity
@@ -1000,6 +1111,18 @@ message Instance {
10001111
10011112 // Optional. The `Edition` of the current instance.
10021113 Edition edition = 20 [(google.api.field_behavior ) = OPTIONAL ];
1114+
1115+ // Optional. Controls the default backup behavior for new databases within the
1116+ // instance.
1117+ //
1118+ // Note that `AUTOMATIC` is not permitted for free instances, as backups and
1119+ // backup schedules are not allowed for free instances.
1120+ //
1121+ // In the `GetInstance` or `ListInstances` response, if the value of
1122+ // default_backup_schedule_type is unset or NONE, no default backup
1123+ // schedule will be created for new databases within the instance.
1124+ DefaultBackupScheduleType default_backup_schedule_type = 23
1125+ [(google.api.field_behavior ) = OPTIONAL ];
10031126}
10041127
10051128// The request for
0 commit comments