Azure.ResourceManager.Redis (.NET)
Management plane SDK for provisioning and managing Azure Cache for Redis resources via Azure Resource Manager.
⚠️ Management vs Data Plane
- This SDK (Azure.ResourceManager.Redis): Create caches, configure firewall rules, manage access keys, set up geo-replication
- Data Plane SDK (StackExchange.Redis): Get/set keys, pub/sub, streams, Lua scripts
Installation
Current Version: 1.5.1 (Stable)
API Version: 2024-11-01
Target Frameworks: .NET 8.0, .NET Standard 2.0
Environment Variables
Authentication
Resource Hierarchy
Core Workflows
1. Create Redis Cache
2. Get Redis Cache
3. Update Redis Cache
4. Delete Redis Cache
5. Get Access Keys
6. Regenerate Access Keys
7. Manage Firewall Rules
8. Configure Patch Schedule (Premium SKU)
9. Import/Export Data (Premium SKU)
10. Force Reboot
SKU Reference
Capacity Sizes (Family C - Basic/Standard):
- C0: 250 MB
- C1: 1 GB
- C2: 2.5 GB
- C3: 6 GB
- C4: 13 GB
- C5: 26 GB
- C6: 53 GB
Capacity Sizes (Family P - Premium):
- P1: 6 GB per shard
- P2: 13 GB per shard
- P3: 26 GB per shard
- P4: 53 GB per shard
- P5: 120 GB per shard
Key Types Reference
Best Practices
- Use
WaitUntil.Completedfor operations that must finish before proceeding - Use
WaitUntil.Startedwhen you want to poll manually or run operations in parallel - Always use
DefaultAzureCredential— never hardcode keys - Handle
RequestFailedExceptionfor ARM API errors - Use
CreateOrUpdateAsyncfor idempotent operations - Navigate hierarchy via
Get*methods (e.g.,cache.GetRedisFirewallRules()) - Use Premium SKU for production workloads requiring geo-replication, clustering, or persistence
- Enable TLS 1.2 minimum — set
MinimumTlsVersion = RedisTlsVersion.Tls1_2 - Disable non-SSL port — set
EnableNonSslPort = falsefor security - Rotate keys regularly — use
RegenerateKeyAsyncand update connection strings
Error Handling
Common Pitfalls
- SKU downgrades not allowed — You cannot downgrade from Premium to Standard/Basic
- Clustering requires Premium — Shard configuration only available on Premium SKU
- Geo-replication requires Premium — Linked servers only work with Premium caches
- VNet injection requires Premium — Virtual network support is Premium-only
- Patch schedules require Premium — Maintenance windows only configurable on Premium
- Cache name globally unique — Redis cache names must be unique across all Azure subscriptions
- Long provisioning times — Cache creation can take 15-20 minutes; use
WaitUntil.Startedfor async patterns
Connecting with StackExchange.Redis (Data Plane)
After creating the cache with this management SDK, use StackExchange.Redis for data operations:


