@@ -156,3 +156,100 @@ properties:
156156 replicated to the secondary.
157157 output : true
158158 output : true
159+ - name : ' scalingMode'
160+ type : Enum
161+ min_version : beta
162+ description : |
163+ The scaling mode for the reservation. If the field is present but maxSlots is not present,
164+ requests will be rejected with error code google.rpc.Code.INVALID_ARGUMENT.
165+
166+ Enum values:
167+
168+ `SCALING_MODE_UNSPECIFIED`: Default value of ScalingMode.
169+
170+ `AUTOSCALE_ONLY`: The reservation will scale up only using slots from autoscaling. It will
171+ not use any idle slots even if there may be some available. The upper limit that autoscaling
172+ can scale up to will be maxSlots - baseline. For example, if maxSlots is 1000, baseline is 200
173+ and customer sets ScalingMode to AUTOSCALE_ONLY, then autoscalerg will scale up to 800 slots
174+ and no idle slots will be used. Please note, in this mode, the ignoreIdleSlots field must be
175+ set to true. Otherwise the request will be rejected with error code
176+ google.rpc.Code.INVALID_ARGUMENT.
177+
178+ `IDLE_SLOTS_ONLY`: The reservation will scale up using only idle slots contributed by other
179+ reservations or from unassigned commitments. If no idle slots are available it will not scale
180+ up further. If the idle slots which it is using are reclaimed by the contributing reservation(s)
181+ it may be forced to scale down. The max idle slots the reservation can be maxSlots - baseline
182+ capacity. For example, if maxSlots is 1000, baseline is 200 and customer sets ScalingMode to
183+ IDLE_SLOTS_ONLY, 1. if there are 1000 idle slots available in other reservations, the
184+ reservation will scale up to 1000 slots with 200 baseline and 800 idle slots. 2. if there are
185+ 500 idle slots available in other reservations, the reservation will scale up to 700 slots with
186+ 200 baseline and 300 idle slots. Please note, in this mode, the reservation might not be able to
187+ scale up to maxSlots. Please note, in this mode, the ignoreIdleSlots field must be set to false.
188+ Otherwise the request will be rejected with error code google.rpc.Code.INVALID_ARGUMENT
189+
190+ `ALL_SLOTS`: The reservation will scale up using all slots available to it. It will use idle slots
191+ contributed by other reservations or from unassigned commitments first. If no idle slots are
192+ available it will scale up using autoscaling. For example, if maxSlots is 1000, baseline is 200
193+ and customer sets ScalingMode to ALL_SLOTS, 1. if there are 800 idle slots available in other
194+ reservations, the reservation will scale up to 1000 slots with 200 baseline and 800 idle slots. 2.
195+ if there are 500 idle slots available in other reservations, the reservation will scale up to 1000
196+ slots with 200 baseline, 500 idle slots and 300 autoscaling slots. 3. if there are no idle slots
197+ available in other reservations, it will scale up to 1000 slots with 200 baseline and 800
198+ autoscaling slots. Please note, in this mode, the ignoreIdleSlots field must be set to false.
199+ Otherwise the request will be rejected with error code google.rpc.Code.INVALID_ARGUMENT.
200+ enum_values :
201+ - ' SCALING_MODE_UNSPECIFIED'
202+ - ' AUTOSCALE_ONLY'
203+ - ' IDLE_SLOTS_ONLY'
204+ - ' ALL_SLOTS'
205+ required_with :
206+ - ' maxSlots'
207+ conflicts :
208+ - ' autoscale'
209+ - name : ' maxSlots'
210+ type : Integer
211+ min_version : beta
212+ description : |
213+ The overall max slots for the reservation, covering slotCapacity (baseline), idle slots
214+ (if ignoreIdleSlots is false) and scaled slots. If present, the reservation won't use
215+ more than the specified number of slots, even if there is demand and supply (from idle
216+ slots). NOTE: capping a reservation's idle slot usage is best effort and its usage may
217+ exceed the maxSlots value. However, in terms of autoscale.current_slots (which accounts
218+ for the additional added slots), it will never exceed the maxSlots - baseline.
219+
220+ This field must be set together with the scalingMode enum value, otherwise the request
221+ will be rejected with error code google.rpc.Code.INVALID_ARGUMENT.
222+
223+ If the maxSlots and scalingMode are set, the autoscale or autoscale.max_slots field
224+ must be unset. Otherwise the request will be rejected with error code
225+ google.rpc.Code.INVALID_ARGUMENT. However, the autoscale field may still be in the
226+ output. The autopscale.max_slots will always show as 0 and the autoscaler.current_slots
227+ will represent the current slots from autoscaler excluding idle slots. For example,
228+ if the maxSlots is 1000 and scalingMode is AUTOSCALE_ONLY, then in the output, the
229+ autoscaler.max_slots will be 0 and the autoscaler.current_slots may be any value
230+ between 0 and 1000.
231+
232+ If the maxSlots is 1000, scalingMode is ALL_SLOTS, the baseline is 100 and idle slots
233+ usage is 200, then in the output, the autoscaler.max_slots will be 0 and the
234+ autoscaler.current_slots will not be higher than 700.
235+
236+ If the maxSlots is 1000, scalingMode is IDLE_SLOTS_ONLY, then in the output, the
237+ autoscaler field will be null.
238+
239+ If the maxSlots and scalingMode are set, then the ignoreIdleSlots field must be
240+ aligned with the scalingMode enum value.(See details in ScalingMode comments).
241+ Otherwise the request will be rejected with error code google.rpc.Code.INVALID_ARGUMENT.
242+
243+ Please note, the maxSlots is for user to manage the part of slots greater than the
244+ baseline. Therefore, we don't allow users to set maxSlots smaller or equal to the
245+ baseline as it will not be meaningful. If the field is present and
246+ slotCapacity>=maxSlots, requests will be rejected with error code
247+ google.rpc.Code.INVALID_ARGUMENT.
248+
249+ Please note that if maxSlots is set to 0, we will treat it as unset. Customers can set
250+ maxSlots to 0 and set scalingMode to SCALING_MODE_UNSPECIFIED to disable the maxSlots
251+ feature.
252+ required_with :
253+ - ' scalingMode'
254+ conflicts :
255+ - ' autoscale'
0 commit comments