Azure Redis Enterprise Management Client Library for Python

3.1.0 · active · verified Sun Apr 12

This is the Microsoft Azure Redis Enterprise Management Client Library for Python, providing tools to manage Azure Redis Enterprise resources. It currently supports Python 3.9+ and is part of the Azure SDK for Python, which follows a regular release cadence. The latest stable version, 3.1.0, was released in October 2025, following the General Availability of Azure Managed Redis in May 2025.

Warnings

Install

Imports

Quickstart

Initializes the RedisEnterpriseManagementClient using DefaultAzureCredential for authentication and lists all Redis Enterprise clusters accessible within the configured Azure subscription. Ensure AZURE_SUBSCRIPTION_ID, AZURE_CLIENT_ID, AZURE_TENANT_ID, and AZURE_CLIENT_SECRET environment variables are set for authentication.

import os
from azure.identity import DefaultAzureCredential
from azure.mgmt.redisenterprise import RedisEnterpriseManagementClient

# Set environment variables for authentication and subscription:
# AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET
# AZURE_SUBSCRIPTION_ID
# Learn more: https://learn.microsoft.com/en-us/azure/developer/python/sdk/authentication-overview

# Get subscription ID from environment variable
subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "")
if not subscription_id:
    raise ValueError("AZURE_SUBSCRIPTION_ID environment variable not set.")

# Authenticate with Azure
credential = DefaultAzureCredential()

# Create a Redis Enterprise Management client
client = RedisEnterpriseManagementClient(credential=credential, subscription_id=subscription_id)

# List all Redis Enterprise clusters in the subscription
print("Listing Redis Enterprise Clusters:")
for cluster in client.redis_enterprise.list():
    print(f"- Name: {cluster.name}, Location: {cluster.location}, SKU: {cluster.sku.name}")

view raw JSON →