gcloud alpha redis instances update

NAME
gcloud alpha redis instances update - update Memorystore Redis instances
SYNOPSIS
gcloud alpha redis instances update(INSTANCE :--region=REGION)[--async][--display-name=DISPLAY_NAME][--enable-auth][--maintenance-version=MAINTENANCE_VERSION][--persistence-mode=PERSISTENCE_MODE][--rdb-snapshot-period=RDB_SNAPSHOT_PERIOD][--rdb-snapshot-start-time=RDB_SNAPSHOT_START_TIME][--read-replicas-mode=READ_REPLICAS_MODE][--remove-redis-config=[KEY,…]][--replica-count=REPLICA_COUNT][--secondary-ip-range=SECONDARY_IP_RANGE][--size=SIZE][--update-labels=[KEY=VALUE,…]][--update-redis-config=KEY=VALUE][--clear-labels    |--remove-labels=[KEY,…]][--maintenance-window-any    |--maintenance-window-day=MAINTENANCE_WINDOW_DAY--maintenance-window-hour=MAINTENANCE_WINDOW_HOUR][GCLOUD_WIDE_FLAG]
DESCRIPTION
(ALPHA) Update the metadata and/or configuration parameters of aRedis instance.

This command can fail for the following reasons:

  • The instance specified does not exist.
  • The active account does not have permission to update the given instance.
EXAMPLES
To update a Redis instance with the namemy-redis-instance to havethe display name "Cache for Foo Service", and add the two labels,env andservice, run:
gcloudalpharedisinstancesupdatemy-redis-instance--display-name="Cache for Foo Service"--update-labels=env=test,service=foo
POSITIONAL ARGUMENTS
Instance resource - Arguments and flags that specify the Memorystore Redisinstance you want to update. The arguments in this group can be used to specifythe attributes of this resource. (NOTE) Some attributes are not given argumentsin this group but can be set in other ways.

To set theproject attribute:

  • provide the argumentinstance on the command line with a fullyspecified name;
  • provide the argument--project on the command line;
  • set the propertycore/project.

This must be specified.

INSTANCE
ID of the instance or fully qualified identifier for the instance.

To set theinstance attribute:

  • provide the argumentinstance on the command line.

This positional argument must be specified if any of the other arguments in thisgroup are specified.

--region=REGION
The name of the Redis region of the instance. Overrides the default redis/regionproperty value for this command invocation.To set theregion attribute:
  • provide the argumentinstance on the command line with a fullyspecified name;
  • provide the argument--region on the command line;
  • set the propertyredis/region.
FLAGS
--async
Return immediately, without waiting for the operation in progress to complete.
--display-name=DISPLAY_NAME
A human-readable name for the instance.
--enable-auth
Enables Redis AUTH for the instance.
--maintenance-version=MAINTENANCE_VERSION
Specifies which maintenance version to apply to your instance duringself-service maintenance. To view the available maintenance versions for yourinstance, rungcloud redis instances describe [INSTANCE_ID].Acceptable values for this flag are eithercurrent_default or oneof the specific versions listed by the describe command. If you pass the valuecurrent_default, the Memorystore updates to the most recentavailable maintenance version during self service maintenance.
--persistence-mode=PERSISTENCE_MODE
Operation mode for automated persistence.PERSISTENCE_MODE must be one of:
disabled
RDB mode is disabled
rdb
Automatic RDB persistence
--rdb-snapshot-period=RDB_SNAPSHOT_PERIOD
The attempted period between RDB snapshots.RDB_SNAPSHOT_PERIOD must be one of:
12h
12 hours
1h
1 hour
24h
24 hours
6h
6 hours
--rdb-snapshot-start-time=RDB_SNAPSHOT_START_TIME
Date and time of the first snapshot in the ISO 1801 format, and alignment timefor future snapshots. For example, 2022-11-02T03:00:00Z.
--read-replicas-mode=READ_REPLICAS_MODE
Read replicas mode used by the instance. Only works against standard tierinstances with 5GB and above provisioned capacity and Redis version 5.0 andabove. This is an irreversible update i.e. Read replicas can not be disabled forthe instance once it is enabled. Also this update is exclusive and cannot beclubbed with other update operations.READ_REPLICAS_MODEmust be one of:
read-replicas-disabled
If read replica is not enabled on the instance, no changes are done. If readreplica is enabled for the instance, update operation fails
read-replicas-enabled
Read replica is enabled for the instance if not already enabled. Read endpointwill be provided and the instance can scale up and down the number of replicas.
--remove-redis-config=[KEY,…]
A list of Redis config parameters to remove. Removing a non-existent configparameter is silently ignored.
--replica-count=REPLICA_COUNT
The replica count of the instance. Valid from 0 to 5.
--secondary-ip-range=SECONDARY_IP_RANGE
Required only when read-replicas-mode is enabled on the instance. The CIDR rangeof internal addresses that are reserved for this instance. For example,10.0.0.0/28 or 192.168.0.0/28. Range must be unique and non-overlapping withexisting ranges in the network. If value 'auto' passed, the service willautomatically pick an available range.
--size=SIZE
The memory size of the instance in GiB.
--update-labels=[KEY=VALUE,…]
List of label KEY=VALUE pairs to update. If a label exists, its value ismodified. Otherwise, a new label is created.

Keys must start with a lowercase character and contain only hyphens(-), underscores (_), lowercase characters, andnumbers. Values must contain only hyphens (-), underscores(_), lowercase characters, and numbers.

--update-redis-config=KEY=VALUE
A list of Redis config KEY=VALUE pairs to update according tohttp://cloud.google.com/memorystore/docs/reference/redis-configs.If a config parameter is already set, its value is modified; otherwise a newRedis config parameter is added. Currently, the only supported parameters are:

Redis version 3.2 and newer: maxmemory-policy, notify-keyspace-events, timeout.

Redis version 4.0 and newer: activedefrag, lfu-decay-time, lfu-log-factor,maxmemory-gb.

Redis version 5.0 and newer: stream-node-max-bytes, stream-node-max-entries.

Redis version 7.0 and newer: maxmemory-clients, lazyfree-lazy-eviction,lazyfree-lazy-expire, lazyfree-lazy-user-del, lazyfree-lazy-user-flush.

At most one of these can be specified:
--clear-labels
Remove all labels. If--update-labels is also specified then--clear-labels is applied first.

For example, to remove all labels:

gcloudalpharedisinstancesupdate--clear-labels

To remove all existing labels and create two new labels,foo andbaz:

gcloudalpharedisinstancesupdate--clear-labels--update-labelsfoo=bar,baz=qux
--remove-labels=[KEY,…]
List of label keys to remove. If a label does not exist it is silently ignored.If--update-labels is also specified then--update-labels is applied first.
At most one of these can be specified:
--maintenance-window-any
Removes the user-specified maintenance window.
Or at least one of these can be specified:
--maintenance-window-day=MAINTENANCE_WINDOW_DAY
Day of week for maintenance window, in UTC time zone. MAINTENANCE_WINDOW_DAYmust be one of: SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY.MAINTENANCE_WINDOW_DAY must be one of:day-of-week-unspecified,friday,monday,saturday,sunday,thursday,tuesday,wednesday.
--maintenance-window-hour=MAINTENANCE_WINDOW_HOUR
Hour of day (0 to 23) for maintenance window, in UTC time zone.
GCLOUD WIDE FLAGS
These flags are available to all commands:--access-token-file,--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.

API REFERENCE
This command uses theredis/v1alpha1 API. The full documentationfor this API can be found at:https://cloud.google.com/memorystore/docs/redis/
NOTES
This command is currently in alpha and might change without notice. If thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist. These variants are also available:
gcloudredisinstancesupdate
gcloudbetaredisinstancesupdate

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-01-21 UTC.