Share via


az redis

Manage dedicated Redis caches for your Azure applications.

Commands

Name Description Type Status
az redis access-policy

Manage Access Policies for Redis Cache.

Core GA
az redis access-policy-assignment

Manage Access Policy Assignments (Redis Users) for Redis Cache.

Core GA
az redis access-policy-assignment create

Add an Access Policy Assignment (Redis User) to the Redis Cache.

Core GA
az redis access-policy-assignment delete

Delete the Access Policy Assignment (Redis User).

Core GA
az redis access-policy-assignment list

Get the list of Access Policy Assignments (Redis Users) associated with the Redis Cache.

Core GA
az redis access-policy-assignment show

Get the detailed information about an Access Policy Assignment (Redis User) of the Redis Cache.

Core GA
az redis access-policy-assignment update

Update an Access Policy Assignment (Redis User) of the Redis Cache.

Core GA
az redis access-policy create

Add an Access Policy to the Redis Cache.

Core GA
az redis access-policy delete

Delete the Access Policy.

Core GA
az redis access-policy list

Get the list of Access Policies associated with the Redis Cache.

Core GA
az redis access-policy show

Get the detailed information about an Access Policy of the Redis Cache.

Core GA
az redis access-policy update

Update an Access Policy of the Redis Cache.

Core GA
az redis create

Create new Redis Cache instance.

Core GA
az redis delete

Deletes a Redis cache.

Core GA
az redis export

Export data stored in a Redis cache.

Core GA
az redis firewall-rules

Manage Redis firewall rules.

Core GA
az redis firewall-rules create

Create a redis cache firewall rule.

Core GA
az redis firewall-rules delete

Deletes a single firewall rule in a specified redis cache.

Core GA
az redis firewall-rules list

Gets all firewall rules in the specified redis cache.

Core GA
az redis firewall-rules show

Gets a single firewall rule in a specified redis cache.

Core GA
az redis firewall-rules update

Update a redis cache firewall rule.

Core GA
az redis flush

Delete all of the keys in a cache.

Core GA
az redis force-reboot

Reboot specified Redis node(s).

Core GA
az redis identity

Manage identity assigned to Azure cache for Redis.

Core GA
az redis identity assign

Assign identity for Azure cache for Redis.

Core GA
az redis identity remove

Remove the identity already assigned for Azure cache for Redis.

Core GA
az redis identity show

Show the identity assigned for Azure cache for Redis.

Core GA
az redis import

Import data into a Redis cache.

Core GA
az redis import-method

Import data into Redis cache.

Core Deprecated
az redis list

List Redis Caches.

Core GA
az redis list-keys

Retrieve a Redis cache's access keys.

Core GA
az redis patch-schedule

Manage Redis patch schedules.

Core GA
az redis patch-schedule create

Create patching schedule for Redis cache.

Core GA
az redis patch-schedule delete

Deletes the patching schedule of a redis cache.

Core GA
az redis patch-schedule show

Gets the patching schedule of a redis cache.

Core GA
az redis patch-schedule update

Update the patching schedule for Redis cache.

Core GA
az redis regenerate-keys

Regenerate Redis cache's access keys.

Core GA
az redis server-link

Manage Redis server links.

Core GA
az redis server-link create

Adds a server link to the Redis cache (requires Premium SKU).

Core GA
az redis server-link delete

Deletes the linked server from a redis cache (requires Premium SKU).

Core GA
az redis server-link list

Gets the list of linked servers associated with this redis cache (requires Premium SKU).

Core GA
az redis server-link show

Gets the detailed information about a linked server of a redis cache (requires Premium SKU).

Core GA
az redis show

Gets a Redis cache (resource description).

Core GA
az redis update

Update a Redis cache.

Core GA

az redis create

Create new Redis Cache instance.

az redis create --location
                --name
                --resource-group
                --sku {Basic, Premium, Standard}
                --vm-size {c0, c1, c2, c3, c4, c5, c6, p1, p2, p3, p4, p5}
                [--enable-non-ssl-port]
                [--mi-system-assigned]
                [--mi-user-assigned]
                [--minimum-tls-version {1.0, 1.1, 1.2}]
                [--redis-configuration]
                [--redis-version]
                [--replicas-per-master]
                [--shard-count]
                [--static-ip]
                [--subnet-id]
                [--tags]
                [--tenant-settings]
                [--update-channel {Preview, Stable}]
                [--zones]

Examples

Create new Redis Cache instance. (autogenerated)

az redis create --location westus2 --name MyRedisCache --resource-group MyResourceGroup --sku Basic --vm-size c0

Configure the multiple zones for new Premium Azure Cache for Redis

az redis create --location westus2 --name MyRedisCache --resource-group MyResourceGroup --sku Premium --vm-size p1 --zones 1 2

Configure the memory policies for the cache.

az redis create --resource-group resourceGroupName --name cacheName --location westus2 --sku Standard --vm-size c0 --redis-configuration @"config_max-memory.json"

Configure and enable the RDB back up data persistence for new Premium Azure Cache for Redis.

az redis create --location westus2 --name MyRedisCache --resource-group MyResourceGroup --sku Premium --vm-size p1 --redis-configuration @"config_rdb.json"

Configure and enable the AOF back up data persistence for new Premium Azure Cache for Redis

az redis create --location westus2 --name MyRedisCache --resource-group MyResourceGroup --sku Premium --vm-size p1 --redis-configuration @"config_aof.json"

Create a Premium Azure Cache for Redis with clustering enabled

az redis create --location westus2 --name MyRedisCache --resource-group MyResourceGroup --sku Premium --vm-size p1 --shard-count 2

Deploying a Premium Azure Cache for Redis inside an existing Azure Virtual Network

az redis create --location westus2 --name MyRedisCache --resource-group MyResourceGroup --sku Premium --vm-size p1 --subnet-id "/subscriptions/{subid}/resourceGroups/{resourceGroupName}/providers/Microsoft.{Network|ClassicNetwork}/virtualNetworks/vnet1/subnets/subnet1"

Deploying a Premium Azure Cache for Redis with Microsoft Entra Authentication configured

az redis create --location westus2 --name MyRedisCache --resource-group MyResourceGroup --sku Premium --vm-size p1 --redis-configuration @"config_enable-aad.json"

Required Parameters

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--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>.

--sku

Type of Redis cache.

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

Size of Redis cache to deploy. Basic and Standard Cache sizes start with C. Premium Cache sizes start with P.

Accepted values: c0, c1, c2, c3, c4, c5, c6, p1, p2, p3, p4, p5

Optional Parameters

--enable-non-ssl-port

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

--mi-system-assigned

Flag to specify system assigned identity.

--mi-user-assigned

One or more space separated resource IDs of user assigned identities.

--minimum-tls-version

Specifies the TLS version required by clients to connect to cache.

Accepted values: 1.0, 1.1, 1.2
--redis-configuration

A json file used to set redis-configuration settings. You may encounter parse errors if the json file is invalid.

Usage: --redis-configuration @"{config_file.json}"

An example json file for configuring max-memory policies [ { "maxmemory-policy": "allkeys-lru" } ]

An example json file for enabling the RDB back up data persistence is [ { "rdb-storage-connection-string": "DefaultEndpointsProtocol=https;AccountName=mystorageaccount;AccountKey=myAccountKey;EndpointSuffix=core.windows.net", "rdb-backup-enabled": "true", "rdb-backup-frequency": "15", "rdb-backup-max-snapshot-count": "1" } ]

An example json file for enabling the AOF back up data persistence is [ { "aof-backup-enabled": "true", "aof-storage-connection-string-0": "DefaultEndpointsProtocol=https;AccountName=mystorageaccount;AccountKey=myAccountKey;EndpointSuffix=core.windows.net", "aof-storage-connection-string-1": "DefaultEndpointsProtocol=https;AccountName=mystorageaccount;AccountKey=myAccountKey;EndpointSuffix=core.windows.net" } ]

The content for a json file for configuring Microsoft Entra Authentication is { "aad-enabled": "true", }.

--redis-version

Redis version. This should be in the form 'major[.minor]' (only 'major' is required) or the value 'latest' which refers to the latest stable Redis version that is available. Supported versions: 4.0, 6.0 (latest). Default value is 'latest'.

--replicas-per-master

The number of replicas to be created per master.

--shard-count

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

--static-ip

Specify a static ip if required for the VNET. If you do not specify a static IP then an IP address is chosen automatically.

--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}/providers/Microsoft.{Network|ClassicNetwork}/virtualNetworks/vnet1/subnets/subnet1.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--tenant-settings

Space-separated tenant settings in key[=value] format.

--update-channel

Specifies the update channel for the monthly Redis updates your Redis Cache will receive. Caches using "Preview" update channel get latest Redis updates at least 4 weeks ahead of "Stable" channel caches. Default value is "Stable".

Accepted values: Preview, Stable
--zones -z

Space-separated list of availability zones into which to provision the resource.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az redis delete

Deletes a Redis cache.

az redis delete [--ids]
                [--name]
                [--resource-group]
                [--subscription]
                [--yes]

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--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>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az redis export

Export data stored in a Redis cache.

az redis export --container
                --prefix
                [--auth-method {ManagedIdentity, SAS}]
                [--file-format]
                [--ids]
                [--name]
                [--resource-group]
                [--storage-sub-id]
                [--subscription]

Examples

Use managed identity to export cache data

az redis export -n testCacheName -g testResourceGroup --prefix examplePrefix --container containerUrl  --preferred-data-archive-auth-method ManagedIdentity --storage-subscription-id 1a6574ss-ddad-1111-a111-8d756312d1dd

Required Parameters

--container

SAS url for container where data needs to be exported to.

--prefix

Prefix to use for exported files.

Optional Parameters

--auth-method --preferred-data-archive-auth-method

Preferred auth method to communicate to storage account used for data archive, default value is SAS.

Accepted values: ManagedIdentity, SAS
--file-format

Format of the blob (Currently rdb is the only supported format, with other formats expected in the future).

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--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>.

--storage-sub-id --storage-subscription-id

SubscriptionId of the storage account.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az redis flush

Delete all of the keys in a cache.

az redis flush [--ids]
               [--name]
               [--resource-group]
               [--subscription]
               [--yes]

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--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>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az redis force-reboot

Reboot specified Redis node(s).

Usage example - az redis force-reboot --name testCacheName --resource-group testResourceGroup --reboot-type {AllNodes, PrimaryNode, SecondaryNode} [--shard-id].

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

Required Parameters

--reboot-type

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

Accepted values: AllNodes, PrimaryNode, SecondaryNode

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--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>.

--shard-id

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

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az redis import

Import data into a Redis cache.

az redis import --files
                [--auth-method {ManagedIdentity, SAS}]
                [--file-format]
                [--ids]
                [--name]
                [--resource-group]
                [--storage-sub-id]
                [--subscription]

Examples

Use managed identity to import cache data

az redis import -n testCacheName -g testResourceGroup --files blobUrl --preferred-data-archive-auth-method ManagedIdentity --storage-subscription-id 1a6574ss-ddad-1111-a111-8d756312d1dd

Required Parameters

--files

SAS url for blobs that needs to be imported.

Optional Parameters

--auth-method --preferred-data-archive-auth-method

Preferred auth method to communicate to storage account used for data archive, default value is SAS.

Accepted values: ManagedIdentity, SAS
--file-format

Format of the blob (Currently rdb is the only supported format, with other formats expected in the future).

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--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>.

--storage-sub-id --storage-subscription-id

SubscriptionId of the storage account.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az redis import-method

Deprecated

This command has been deprecated and will be removed in a future release. Use 'redis import' instead.

Import data into Redis cache.

Usage example - az redis import-method --name testCacheName --resource-group testResourceGroup --files [--file-format].

az redis import-method --files
                       [--auth-method {ManagedIdentity, SAS}]
                       [--file-format]
                       [--ids]
                       [--name]
                       [--resource-group]
                       [--storage-sub-id]
                       [--subscription]

Required Parameters

--files

SAS url for blobs that needs to be imported.

Optional Parameters

--auth-method --preferred-data-archive-auth-method

Preferred auth method to communicate to storage account used for data archive, default value is SAS.

Accepted values: ManagedIdentity, SAS
--file-format

Format of the blob (Currently rdb is the only supported format, with other formats expected in the future).

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--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>.

--storage-sub-id --storage-subscription-id

SubscriptionId of the storage account.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az redis list

List Redis Caches.

Lists details about all caches within current Subscription or provided Resource Group.

az redis list [--resource-group]

Optional Parameters

--resource-group -g

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az redis list-keys

Retrieve a Redis cache's access keys.

This operation requires write permission to the cache resource.

az redis list-keys [--ids]
                   [--name]
                   [--resource-group]
                   [--subscription]

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--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>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az redis regenerate-keys

Regenerate Redis cache's access keys.

Usage example - az redis regenerate-keys --name testCacheName --resource-group testResourceGroup --key-type {Primary, Secondary}.

az redis regenerate-keys --key-type {Primary, Secondary}
                         [--ids]
                         [--name]
                         [--resource-group]
                         [--subscription]

Required Parameters

--key-type

The Redis access key to regenerate.

Accepted values: Primary, Secondary

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--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>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az redis show

Gets a Redis cache (resource description).

az redis show [--ids]
              [--name]
              [--resource-group]
              [--subscription]

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--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>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az redis update

Update a Redis cache.

Scale or update settings of a Redis cache.

az redis update [--add]
                [--force-string]
                [--ids]
                [--name]
                [--remove]
                [--resource-group]
                [--set]
                [--sku {Basic, Premium, Standard}]
                [--subscription]
                [--vm-size {c0, c1, c2, c3, c4, c5, c6, p1, p2, p3, p4, p5}]

Examples

Update the maxmemory-policy for your Azure Cache for Redis named MyRedisCache

az redis update --name MyRedisCache --resource-group MyResourceGroup --set "redisConfiguration.maxmemory-policy"="allkeys-lru"

Disable the RDB back up data persistence for Premium Azure Cache for Redis

az redis update --name MyRedisCache --resource-group MyResourceGroup --set "redisConfiguration.rdb-backup-enabled"="false"

Configure the RDB back up enabled data persistence for already created Premium Azure Cache for Redis

az redis update --name MyRedisCache --resource-group MyResourceGroup --set "redisConfiguration.rdb-storage-connection-string"="BlobEndpoint=https//..." "redisConfiguration.rdb-backup-enabled"="true" "redisConfiguration.rdb-backup-frequency"="15" "redisConfiguration.rdb-backup-max-snapshot-count"="1"

Scale an Azure Cache for Redis Instance - Update to different size (An example to scale from c0 to c1).

az redis update --name MyRedisCache --resource-group MyResourceGroup --set "sku.capacity"="2"

Scale an Azure Cache for Redis Instance - Update to different tier (From Basic to Standard or Standard to Premium).

az redis update --name MyRedisCache --resource-group MyResourceGroup --set "sku.name"="Premium" "sku.capacity"="1" "sku.family"="P"

Scale an Azure Cache for Redis Instance - Enable Clustering.

az redis update --name MyRedisCache --resource-group MyResourceGroup --set shardCount=1

Scale an Azure Cache for Redis Instance in/out using Redis Cluster.

az redis update --name MyRedisCache --resource-group MyResourceGroup --set shardCount=2

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>.

Default value: []
--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Default value: False
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Name of the Redis cache.

--remove

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

Default value: []
--resource-group -g

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

--set

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

Default value: []
--sku

Type of Redis cache.

Accepted values: Basic, Premium, Standard
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--vm-size

Size of Redis cache to deploy. Basic and Standard Cache sizes start with C. Premium Cache sizes start with P.

Accepted values: c0, c1, c2, c3, c4, c5, c6, p1, p2, p3, p4, p5
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.