@@ -506,6 +506,42 @@ class Reservation
506506 # @return [Hash<String,String>]
507507 attr_accessor :labels
508508
509+ # Optional. The overall max slots for the reservation, covering slot_capacity (
510+ # baseline), idle slots (if ignore_idle_slots is false) and scaled slots. If
511+ # present, the reservation won't use more than the specified number of slots,
512+ # even if there is demand and supply (from idle slots). NOTE: capping a
513+ # reservation's idle slot usage is best effort and its usage may exceed the
514+ # max_slots value. However, in terms of autoscale.current_slots (which accounts
515+ # for the additional added slots), it will never exceed the max_slots - baseline.
516+ # This field must be set together with the scaling_mode enum value, otherwise
517+ # the request will be rejected with error code `google.rpc.Code.INVALID_ARGUMENT`
518+ # . If the max_slots and scaling_mode are set, the autoscale or autoscale.
519+ # max_slots field must be unset. Otherwise the request will be rejected with
520+ # error code `google.rpc.Code.INVALID_ARGUMENT`. However, the autoscale field
521+ # may still be in the output. The autopscale.max_slots will always show as 0 and
522+ # the autoscaler.current_slots will represent the current slots from autoscaler
523+ # excluding idle slots. For example, if the max_slots is 1000 and scaling_mode
524+ # is AUTOSCALE_ONLY, then in the output, the autoscaler.max_slots will be 0 and
525+ # the autoscaler.current_slots may be any value between 0 and 1000. If the
526+ # max_slots is 1000, scaling_mode is ALL_SLOTS, the baseline is 100 and idle
527+ # slots usage is 200, then in the output, the autoscaler.max_slots will be 0 and
528+ # the autoscaler.current_slots will not be higher than 700. If the max_slots is
529+ # 1000, scaling_mode is IDLE_SLOTS_ONLY, then in the output, the autoscaler
530+ # field will be null. If the max_slots and scaling_mode are set, then the
531+ # ignore_idle_slots field must be aligned with the scaling_mode enum value.(See
532+ # details in ScalingMode comments). Otherwise the request will be rejected with
533+ # error code `google.rpc.Code.INVALID_ARGUMENT`. Please note, the max_slots is
534+ # for user to manage the part of slots greater than the baseline. Therefore, we
535+ # don't allow users to set max_slots smaller or equal to the baseline as it will
536+ # not be meaningful. If the field is present and slot_capacity>=max_slots,
537+ # requests will be rejected with error code `google.rpc.Code.INVALID_ARGUMENT`.
538+ # Please note that if max_slots is set to 0, we will treat it as unset.
539+ # Customers can set max_slots to 0 and set scaling_mode to
540+ # SCALING_MODE_UNSPECIFIED to disable the max_slots feature.
541+ # Corresponds to the JSON property `maxSlots`
542+ # @return [Fixnum]
543+ attr_accessor :max_slots
544+
509545 # Applicable only for reservations located within one of the BigQuery multi-
510546 # regions (US or EU). If set to true, this reservation is placed in the
511547 # organization's secondary region which is designated for disaster recovery
@@ -543,6 +579,13 @@ class Reservation
543579 # @return [Google::Apis::BigqueryreservationV1::ReplicationStatus]
544580 attr_accessor :replication_status
545581
582+ # The scaling mode for the reservation. If the field is present but max_slots is
583+ # not present, requests will be rejected with error code `google.rpc.Code.
584+ # INVALID_ARGUMENT`.
585+ # Corresponds to the JSON property `scalingMode`
586+ # @return [String]
587+ attr_accessor :scaling_mode
588+
546589 # Optional. The current location of the reservation's secondary replica. This
547590 # field is only set for reservations using the managed disaster recovery feature.
548591 # Users can set this in create reservation calls to create a failover
@@ -584,11 +627,13 @@ def update!(**args)
584627 @edition = args [ :edition ] if args . key? ( :edition )
585628 @ignore_idle_slots = args [ :ignore_idle_slots ] if args . key? ( :ignore_idle_slots )
586629 @labels = args [ :labels ] if args . key? ( :labels )
630+ @max_slots = args [ :max_slots ] if args . key? ( :max_slots )
587631 @multi_region_auxiliary = args [ :multi_region_auxiliary ] if args . key? ( :multi_region_auxiliary )
588632 @name = args [ :name ] if args . key? ( :name )
589633 @original_primary_location = args [ :original_primary_location ] if args . key? ( :original_primary_location )
590634 @primary_location = args [ :primary_location ] if args . key? ( :primary_location )
591635 @replication_status = args [ :replication_status ] if args . key? ( :replication_status )
636+ @scaling_mode = args [ :scaling_mode ] if args . key? ( :scaling_mode )
592637 @secondary_location = args [ :secondary_location ] if args . key? ( :secondary_location )
593638 @slot_capacity = args [ :slot_capacity ] if args . key? ( :slot_capacity )
594639 @update_time = args [ :update_time ] if args . key? ( :update_time )
0 commit comments