az redis

Access to a secure, dedicated Redis cache for your Azure applications.

Commands

az redis create Create new Redis Cache instance.
az redis delete Deletes a Redis cache.
az redis export Export data stored in a Redis cache.
az redis force-reboot Reboot specified Redis node(s).
az redis import-method Import data into a Redis cache.
az redis list Lists all Redis caches in a resource group.
az redis list-all Gets all Redis caches in the specified subscription.
az redis list-keys Retrieve a Redis cache's access keys.
az redis patch-schedule Manage Redis patch schedules.
az redis patch-schedule delete Deletes the patching schedule of a redis cache (requires Premium SKU).
az redis patch-schedule set Create or replace the patching schedule for Redis cache (requires Premium SKU).
az redis patch-schedule show Gets the patching schedule of a redis cache (requires Premium SKU).
az redis regenerate-keys Regenerate Redis cache's access keys.
az redis show Gets a Redis cache (resource description).
az redis update Scale or update settings of a Redis cache.
az redis update-settings (DEPRECATED) Update the settings of a Redis cache.

az redis create

Create new Redis Cache instance.

az redis create --location
--name
--resource-group
--sku {Basic, Premium, Standard}
--vm-size
[--enable-non-ssl-port]
[--redis-configuration]
[--shard-count]
[--static-ip]
[--subnet-id]
[--tags]
[--tenant-settings]

Required Parameters

--location -l

Location. You can configure the default location using az configure --defaults location=<location>.

--name -n

The primary resource name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--sku

What type of redis cache to deploy. Valid values: (Basic, Standard, Premium).

accepted values: Basic, Premium, Standard
--vm-size

Size of redis cache to deploy. Example : values for C family (C0, C1, C2, C3, C4, C5, C6). For P family (P1, P2, P3, P4).

Optional Parameters

--enable-non-ssl-port

If the value is true, then the non-ssl redis server port (6379) will be enabled.

--redis-configuration

All Redis Settings. Few possible keys rdb-backup-enabled, rdb-storage-connection-string, rdb-backup-frequency, maxmemory-delta, maxmemory-policy, notify-keyspace-events, maxmemory-samples, slowlog-log-slower-than, slowlog-max-len, list-max-ziplist-entries, list-max-ziplist-value, hash-max-ziplist-entries, hash-max-ziplist-value, set-max-intset-entries, zset-max-ziplist-entries, zset-max-ziplist-value etc.

--shard-count

The number of shards to be created on a Premium Cluster Cache.

--static-ip

Required when deploying a redis cache inside an existing Azure Virtual Network.

--subnet-id

The full resource ID of a subnet in a virtual network to deploy the redis cache in. Example format /subscriptions/{subid}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1.

--tags
--tenant-settings

Json dictionary with tenant settings.

az redis delete

Deletes a Redis cache.

az redis delete --name
--resource-group

Required Parameters

--name -n

Name of the redis cache.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az redis export

Export data stored in a Redis cache.

az redis export --container
--name
--prefix
--resource-group
[--file-format]

Required Parameters

--container
--name -n

Name of the redis cache.

--prefix
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--file-format

az redis force-reboot

Reboot specified Redis node(s).

This operation requires write permission to the cache resource. There can be potential data loss.

az redis force-reboot --name
--reboot-type {AllNodes, PrimaryNode, SecondaryNode}
--resource-group
[--shard-id]

Required Parameters

--name -n

Name of the redis cache.

--reboot-type

Which Redis node(s) to reboot. Depending on this value data loss is possible.

accepted values: AllNodes, PrimaryNode, SecondaryNode
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--shard-id

If clustering is enabled, the ID of the shard to be rebooted.

az redis import-method

Import data into a Redis cache.

az redis import-method --file-format
--files
--name
--resource-group

Required Parameters

--file-format
--files
--name -n

Name of the redis cache.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az redis list

Lists all Redis caches in a resource group.

az redis list --resource-group

Required Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az redis list-all

Gets all Redis caches in the specified subscription.

az redis list-all

az redis list-keys

Retrieve a Redis cache's access keys.

This operation requires write permission to the cache resource.

az redis list-keys --name
--resource-group

Required Parameters

--name -n

Name of the redis cache.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az redis regenerate-keys

Regenerate Redis cache's access keys.

This operation requires write permission to the cache resource.

az redis regenerate-keys --key-type {Primary, Secondary}
--name
--resource-group

Required Parameters

--key-type

The Redis access key to regenerate.

accepted values: Primary, Secondary
--name -n

Name of the redis cache.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az redis show

Gets a Redis cache (resource description).

az redis show --name
--resource-group

Required Parameters

--name -n

Name of the redis cache.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az redis update

Scale or update settings of a Redis cache.

az redis update --name
--resource-group
[--add]
[--remove]
[--set]
[--sku {Basic, Premium, Standard}]
[--vm-size]

Required Parameters

--name -n

Name of the redis cache.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.

--sku
accepted values: Basic, Premium, Standard
--vm-size

Size of redis cache to deploy. Example : values for C family (C0, C1, C2, C3, C4, C5, C6). For P family (P1, P2, P3, P4).

az redis update-settings

(DEPRECATED) Update the settings of a Redis cache.

WARNING: This command is deprecated. Instead, use the update command.

az redis update-settings --name
--redis-configuration
--resource-group

Required Parameters

--name -n

Name of the redis cache.

--redis-configuration
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.