gcloud beta compute instance-groups managed update-autoscaling

NAME
gcloud beta compute instance-groups managed update-autoscaling - update autoscaling parameters of a managed instance group
SYNOPSIS
gcloud beta compute instance-groups managed update-autoscaling NAME [--max-num-replicas=MAX_NUM_REPLICAS] [--min-num-replicas=MIN_NUM_REPLICAS] [--mode=MODE] [--clear-scale-in-control     | --scale-in-control=[max-scaled-in-replicas=MAX-SCALED-IN-REPLICAS],[max-scaled-in-replicas-percent=MAX-SCALED-IN-REPLICAS-PERCENT],[time-window=TIME-WINDOW]] [--disable-schedule=DISABLE_SCHEDULE     | --enable-schedule=ENABLE_SCHEDULE     | --remove-schedule=REMOVE_SCHEDULE     | --set-schedule=SET_SCHEDULE     | --update-schedule=UPDATE_SCHEDULE] [--region=REGION     | --zone=ZONE] [--schedule-cron=SCHEDULE_CRON --schedule-description=SCHEDULE_DESCRIPTION --schedule-duration-sec=SCHEDULE_DURATION_SEC --schedule-min-required-replicas=SCHEDULE_MIN_REQUIRED_REPLICAS --schedule-time-zone=SCHEDULE_TIME_ZONE] [GCLOUD_WIDE_FLAG]
DESCRIPTION
(BETA) gcloud beta compute instance-groups managed update-autoscaling updates autoscaling parameters of specified managed instance group.

Autoscalers can use one or more policies listed below. Information on using multiple policies can be found here: https://cloud.google.com/compute/docs/autoscaler/multiple-policies

In contrast to gcloud beta compute instance-groups managed set-autoscaling, this command only updates specified fields. For instance:

gcloud beta compute instance-groups managed update-autoscaling  --mode only-scale-out

would change the mode field of the autoscaler policy, but leave the rest of the settings intact.

POSITIONAL ARGUMENTS
NAME
Name of the managed instance group to operate on.
FLAGS
--max-num-replicas=MAX_NUM_REPLICAS
Maximum number of replicas Autoscaler can set.
--min-num-replicas=MIN_NUM_REPLICAS
Minimum number of replicas Autoscaler can set.
--mode=MODE
Set the mode of an autoscaler for a managed instance group.

You can turn off or restrict MIG autoscaler activities without affecting your autoscaler configuration. The autoscaler configuration persists while the activities are turned off or restricted, and the activities resume when the autoscaler is turned on again or when the restrictions are lifted.

MODE must be one of:

off
Turns off autoscaling, while keeping the new configuration.
on
Permits autoscaling to scale out and in (default for new autoscalers).
only-scale-out
Permits autoscaling to scale only out and not in.
only-up
(DEPRECATED) Permits autoscaling to scale only out and not in.
Value `only-up` is deprecated. Use `--mode only-scale-out`
instead.
At most one of these may be specified:
--clear-scale-in-control
If specified, the scale-in-control field will be cleared. Using this flag will remove any configuration set by --scale-in-control flag.
--scale-in-control=[max-scaled-in-replicas=MAX-SCALED-IN-REPLICAS],[max-scaled-in-replicas-percent=MAX-SCALED-IN-REPLICAS-PERCENT],[time-window=TIME-WINDOW]
Configuration that allows slower scale in so that even if Autoscaler recommends an abrupt scale in of a managed instance group, it will be throttled as specified by the parameters.
max-scaled-in-replicas
Maximum allowed number of VMs that can be deducted from the peak recommendation during the window. Possibly all these VMs can be deleted at once so the application needs to be prepared to lose that many VMs in one step. Mutually exclusive with 'max-scaled-in-replicas-percent'.
max-scaled-in-replicas-percent
Maximum allowed percent of VMs that can be deducted from the peak recommendation during the window. Possibly all these VMs can be deleted at once so the application needs to be prepared to lose that many VMs in one step. Mutually exclusive with 'max-scaled-in-replicas'.
time-window
How long back autoscaling should look when computing recommendations. The autoscaler will not resize below the maximum allowed deduction subtracted from the peak size observed in this period. Measured in seconds.
At most one of these may be specified:
--disable-schedule=DISABLE_SCHEDULE
Name of the scaling schedule to be disabled.

When a scaling schedule is disabled its configuration persists but the scaling schedule itself never becomes active. If you disable a scaling schedule that is currently active the disabled scaling schedule stops being effective immediately after it moves into DISABLED state. If there is no need to maintain capacity, the autoscaler starts removing instances after a 10-minute stabilization period and (if configured) following scale-in controls. This ensures you don't accidentally lose capacity immediately after the scaling schedule ends.

--enable-schedule=ENABLE_SCHEDULE
Name of the scaling schedule to be enabled.
--remove-schedule=REMOVE_SCHEDULE
Name of the scaling schedule to be removed.

Be careful with this action as scaling schedule deletion cannot be undone.

You can delete any schedule regardless of its status. If you delete a scaling schedule that is currently active, the deleted scaling schedule stops being effective immediately after it is deleted. If there is no need to maintain capacity, the autoscaler starts removing instances after a 10-minute stabilization period and (if configured) following scale-in controls. This ensures you don't accidentally lose capacity immediately after the scaling schedule ends.

--set-schedule=SET_SCHEDULE
A unique name for the scaling schedule to be configured.
--update-schedule=UPDATE_SCHEDULE
Name of the scaling schedule to be updated.
At most one of these may be specified:
--region=REGION
Region of the managed instance group to operate on. If not specified, you may be prompted to select a region (interactive mode only).

A list of regions can be fetched by running:

gcloud compute regions list

Overrides the default compute/region property value for this command invocation.

--zone=ZONE
Zone of the managed instance group to operate on. If not specified, you may be prompted to select a zone (interactive mode only).

A list of zones can be fetched by running:

gcloud compute zones list

Overrides the default compute/zone property value for this command invocation.

--schedule-cron=SCHEDULE_CRON
Start time of the scaling schedule in cron format.

This is when the autoscaler starts creating new VMs, if the MIG's current size is less than the minimum required instances. Set the start time to allow enough time for new VMs to boot and initialize. For example if your workload takes 10 minutes from VM creation to start serving then set start time 10 minutes earlier than the time you need VMs to be ready.

--schedule-description=SCHEDULE_DESCRIPTION
A verbose description of the scaling schedule.
--schedule-duration-sec=SCHEDULE_DURATION_SEC
How long should the scaling schedule be active, measured in seconds.

Minimum duration is 5 minutes. A scaling schedule is active from its start time and for its configured duration. During this time, the autoscaler scales the MIG to have at least as many VMs as defined by the minimum required instances. After the configured duration, if there is no need to maintain capacity, the autoscaler starts removing instances after a 10-minute stabilization period and (if configured) following scale-in controls.

--schedule-min-required-replicas=SCHEDULE_MIN_REQUIRED_REPLICAS
How many VMs the autoscaler should provision for the duration of this scaling schedule.

Autoscaler provides at least this number of instances when the scaling schedule is active. A MIG can have more VMs if there are other scaling schedules active with more required instances or if another autoscaling policy (for example, scaling based on CPU) requires more instances to meet its target.

This configuration does not change autoscaling minimum and maximum instance limits which are always in effect. Autoscaler does not create more than the maximum number of instances configured for MIG.
--schedule-time-zone=SCHEDULE_TIME_ZONE
Name of the timezone scaling schedule's start time is in.

It should be provided as a name from the IANA tz database (for example Europe/Paris or UTC). It automatically adjusts for daylight savings time (DST). If no time zone is provided, UTC is used as a default.

See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones for the list of valid timezones.

GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --billing-project, --configuration, --flags-file, --flatten, --format, --help, --impersonate-service-account, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity.

Run $ gcloud help for details.

EXAMPLES
To update an existing instance group:
gcloud beta compute instance-groups managed update-autoscaling  --mode=only-scale-out
NOTES
This command is currently in BETA and may change without notice. These variants are also available:
gcloud compute instance-groups managed update-autoscaling
gcloud alpha compute instance-groups managed update-autoscaling