@@ -106,23 +106,28 @@ message DatabaseQuotas {
106106 repeated StorageQuotas storage_quotas = 6 ;
107107}
108108
109- // A policy that is used for resource scale recommendation. If multiple are used,
110- // recommender combines them to recommend the largest scale.
111- message ScaleRecommenderPolicy {
112- // Policy that tracks metric and reactively recommend to adjust resources scale
113- // to keep metric close to the specified target value.
114- message TargetTrackingPolicy {
115- oneof target {
116- // A percentage of compute resources' average CPU utilization.
117- uint32 average_cpu_utilization_percent = 1 ;
109+ message ScaleRecommenderPolicies {
110+ // A policy that is used for resource scale recommendation. If multiple are used,
111+ // recommender combines them to recommend the largest scale.
112+ message ScaleRecommenderPolicy {
113+ // Policy that tracks metric and reactively recommend to adjust resources scale
114+ // to keep metric close to the specified target value.
115+ message TargetTrackingPolicy {
116+ oneof target {
117+ // A percentage of compute resources' average CPU utilization.
118+ uint32 average_cpu_utilization_percent = 1 ;
119+ }
118120 }
119- }
120121
121- oneof policy {
122- TargetTrackingPolicy target_tracking_policy = 1 ;
122+ oneof policy {
123+ TargetTrackingPolicy target_tracking_policy = 1 ;
124+ }
123125 }
126+
127+ repeated ScaleRecommenderPolicy policies = 1 ;
124128}
125129
130+
126131// Request to create a new database. For successfull creation
127132// specified database shouldn't exist. At least one storage
128133// unit should be requested for the database.
@@ -149,7 +154,7 @@ message CreateDatabaseRequest {
149154 // Optional quotas for the database
150155 DatabaseQuotas database_quotas = 10 ;
151156 // Optional scale recommender policies
152- repeated ScaleRecommenderPolicy scale_recommender_policies = 11 ;
157+ ScaleRecommenderPolicies scale_recommender_policies = 11 ;
153158}
154159
155160message CreateDatabaseResponse {
@@ -201,7 +206,7 @@ message GetDatabaseStatusResult {
201206 // Current quotas for the database
202207 DatabaseQuotas database_quotas = 10 ;
203208 // Current scale recommender policies
204- repeated ScaleRecommenderPolicy scale_recommender_policies = 11 ;
209+ ScaleRecommenderPolicies scale_recommender_policies = 11 ;
205210}
206211
207212// Change resources allocated for database.
@@ -230,8 +235,8 @@ message AlterDatabaseRequest {
230235 DatabaseQuotas database_quotas = 11 ;
231236 // Alter attributes. Leave the value blank to drop an attribute.
232237 map <string , string > alter_attributes = 12 ;
233- // Alter scale recommender policies.
234- repeated ScaleRecommenderPolicy scale_recommender_policies = 13 ;
238+ // Change scale recommender policies.
239+ ScaleRecommenderPolicies scale_recommender_policies = 13 ;
235240}
236241
237242message AlterDatabaseResponse {
0 commit comments