az-redis
Manage Azure Cache for Redis instances
TLDR
Create a new Redis cache instance
Update a Redis cache
Export data stored in a Redis cache
Delete a Redis cache
SYNOPSIS
az redis <SUBCOMMAND> [<OPTIONS>]
PARAMETERS
create
Creates a new Azure Cache for Redis instance.
Common options include: --name (name of the cache), --resource-group (resource group name), --location (Azure region), --sku (e.g., Basic, Standard, Premium), and --vm-size (e.g., C0, C1, P1).
show
Displays detailed information about an existing Azure Cache for Redis instance.
Common options include: --name and --resource-group.
list
Lists all Azure Cache for Redis instances within a subscription or a specified resource group.
Common option: --resource-group (optional, to filter by resource group).
update
Modifies properties of an existing Azure Cache for Redis instance, such as scaling the SKU, updating firewall rules, or enabling persistence.
Common options include: --name, --resource-group, --sku, and --set (for generic property updates).
delete
Removes an Azure Cache for Redis instance.
Common options include: --name and --resource-group.
regenerate-keys
Regenerates the primary or secondary access keys for a Redis cache instance.
Common options include: --name, --resource-group, and --key-type {Primary,Secondary}.
force-reboot
Initiates a force reboot of the Redis cache nodes, useful for maintenance or troubleshooting.
Common options include: --name, --resource-group, --shard-id (for Premium tier), and --reboot-type {PrimaryNode,SecondaryNode,AllNodes}.
DESCRIPTION
The az redis command group, part of the Azure CLI, facilitates comprehensive management of Azure Cache for Redis instances directly from the command line. It allows users to create, configure, scale, monitor, and delete Redis caches deployed within Azure. This powerful tool is crucial for automating deployment pipelines, scripting operational tasks, and managing cloud-based Redis services without relying solely on the Azure portal. It provides a programmatic interface for interacting with the Azure Redis API, making it an essential utility for developers and administrators looking to streamline their cloud resource management workflows for high-performance data caching solutions.
CAVEATS
The 'az-redis' command is not a standalone Linux command. It is a command group within the Azure CLI, a cross-platform command-line tool developed by Microsoft for managing Azure resources. Therefore, to use it, you must have the Azure CLI installed on your system and be authenticated to an active Azure subscription (e.g., via az login). Operations performed with this command, particularly creating or scaling Redis caches, will incur costs on your Azure account.
INSTALLATION
The Azure CLI, which includes the az redis command group, can be installed on Linux, macOS, and Windows. On Linux, it's typically installed via native package managers (e.g., apt for Debian/Ubuntu, yum for RHEL/CentOS) or a universal install script provided by Microsoft.
AUTHENTICATION
Before using any az command, including az redis, you must authenticate to your Azure account. This is most commonly done using the command az login, which will open a browser window for interactive login. For automated scripts, service principals or managed identities can be used for non-interactive authentication.
HISTORY
The Azure CLI was developed to provide a unified and consistent command-line experience for managing Azure services across various operating systems. The az redis command group was introduced as part of the Azure CLI's expanding capabilities, allowing users to automate and script the management of Azure Cache for Redis instances. Its development reflects the growing trend towards Infrastructure-as-Code and the need for robust command-line interfaces for cloud resource orchestration, complementing the Azure portal and PowerShell options.