# Class ScalingMode (1.25.0)

1.25.0 (latest) 1.24.0 1.23.0 1.22.0 1.21.0 1.20.0 1.19.0 1.18.0 1.17.2 1.16.0 1.15.0 1.14.1 1.13.5 1.12.0 1.11.3 1.10.0 1.9.1 1.8.0 1.7.3 1.6.3 1.5.0 1.4.1 1.3.1 1.2.2 1.1.0 1.0.1 0.4.2 0.3.0 0.2.0 0.1.0

    ScalingMode(value)

The scaling mode for the reservation. This enum determines
how the reservation scales up and down.

        Please note, in this mode, the ignore_idle_slots field must
        be set to true. Otherwise the request will be rejected with
        error code `google.rpc.Code.INVALID_ARGUMENT`.
    IDLE_SLOTS_ONLY (2):
        The reservation will scale up using only idle slots
        contributed by other reservations or from unassigned
        commitments. If no idle slots are available it will not
        scale up further. If the idle slots which it is using are
        reclaimed by the contributing reservation(s) it may be
        forced to scale down. The max idle slots the reservation can
        be max_slots - baseline capacity. For example, if max_slots
        is 1000, baseline is 200 and customer sets ScalingMode to
        IDLE_SLOTS_ONLY,

        1. if there are 1000 idle slots available in other
           reservations, the reservation will scale up to 1000 slots
           with 200 baseline and 800 idle slots.
        2. if there are 500 idle slots available in other
           reservations, the reservation will scale up to 700 slots
           with 200 baseline and 500 idle slots. Please note, in
           this mode, the reservation might not be able to scale up
           to max_slots.

        Please note, in this mode, the ignore_idle_slots field must
        be set to false. Otherwise the request will be rejected with
        error code `google.rpc.Code.INVALID_ARGUMENT`.
    ALL_SLOTS (3):
        The reservation will scale up using all slots available to
        it. It will use idle slots contributed by other reservations
        or from unassigned commitments first. If no idle slots are
        available it will scale up using autoscaling. For example,
        if max_slots is 1000, baseline is 200 and customer sets
        ScalingMode to ALL_SLOTS,

        1. if there are 800 idle slots available in other
           reservations, the reservation will scale up to 1000 slots
           with 200 baseline and 800 idle slots.
        2. if there are 500 idle slots available in other
           reservations, the reservation will scale up to 1000 slots
           with 200 baseline, 500 idle slots and 300 autoscaling
           slots.
        3. if there are no idle slots available in other
           reservations, it will scale up to 1000 slots with 200
           baseline and 800 autoscaling slots.

        Please note, in this mode, the ignore_idle_slots field must
        be set to false. Otherwise the request will be rejected with
        error code `google.rpc.Code.INVALID_ARGUMENT`.

| ## Enums ||
|---|---|
| **Name** | **Description** |
| `SCALING_MODE_UNSPECIFIED` | Default value of ScalingMode. |
| `AUTOSCALE_ONLY` | The reservation will scale up only using slots from autoscaling. It will not use any idle slots even if there may be some available. The upper limit that autoscaling can scale up to will be max_slots - baseline. For example, if max_slots is 1000, baseline is 200 and customer sets ScalingMode to AUTOSCALE_ONLY, then autoscalerg will scale up to 800 slots and no idle slots will be used. |