azure-resource-manager-redis-dotnet
यह क्या करती है
यह कोड .NET का उपयोग करके Azure Cache for Redis resources को manage करने देता है। आप caches बना, update और delete कर सकते हैं, firewall rules सेट कर सकते हैं और access keys manage कर सकते हैं।
कब इस्तेमाल करें
- ✓आपकी application के लिए नया Redis cache बनाना।
- ✓मौजूदा Redis cache की settings बदलना।
- ✓Firewall rules के जरिए तय करना कि Redis cache तक कौन पहुँच सकता है।
Skill का लिंक
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/azure-resource-manager-redis-dotnet/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“'EastUS' region में 'my-cache' नाम का Redis cache default settings के साथ बनाओ।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह .NET के लिए Azure SDK का उपयोग करके Azure Resource Manager से बात करता है। आप code में cache की details लिखते हैं, और SDK उसे बनाने और manage करने का काम संभाल लेता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
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
dotnet add package Azure.ResourceManager.Redis
dotnet add package Azure.Identity
Current Version: 1.5.1 (Stable)
API Version: 2024-11-01
Target Frameworks: .NET 8.0, .NET Standard 2.0
Environment Variables
AZURE_SUBSCRIPTION_ID=<your-subscription-id>
# For service principal auth (optional)
AZURE_TENANT_ID=<tenant-id>
AZURE_CLIENT_ID=<client-id>
AZURE_CLIENT_SECRET=<client-secret>
Authentication
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Redis;
// Always use DefaultAzureCredential
var credential = new DefaultAzureCredential();
var armClient = new ArmClient(credential);
// Get subscription
var subscriptionId = Environment.GetEnvironmentVariable("AZURE_SUBSCRIPTION_ID");
var subscription = armClient.GetSubscriptionResource(
new ResourceIdentifier($"/subscriptions/{subscriptionId}"));
Resource Hierarchy
ArmClient
└── SubscriptionResource
└── ResourceGroupResource
└── RedisResource
├── RedisFirewallRuleResource
├── RedisPatchScheduleResource
├── RedisLinkedServerWithPropertyResource
├── RedisPrivateEndpointConnectionResource
└── RedisCacheAccessPolicyResource
Core Workflows
1. Create Redis Cache
using Azure.ResourceManager.Redis;
using Azure.ResourceManager.Redis.Models;
// Get resource group
var resourceGroup = await subscription
.GetResourceGroupAsync("my-resource-group");
// Define cache configuration
var cacheData = new RedisCreateOrUpdateContent(
location: AzureLocation.EastUS,
sku: new RedisSku(RedisSkuName.Standard, RedisSkuFamily.BasicOrStandard, 1))
{
EnableNonSslPort = false,
MinimumTlsVersion = RedisTlsVersion.Tls1_2,
RedisConfiguration = new RedisCommonConfiguration
{
MaxMemoryPolicy = "volatile-lru"
},
Tags =
{
["environment"] = "production"
}
};
// Create cache (long-running operation)
var cacheCollection = resourceGroup.Value.GetAllRedis();
var operation = await cacheCollection.CreateOrUpdateAsync(
WaitUntil.Completed,
"my-redis-cache",
cacheData);
RedisResource cache = operation.Value;
Console.WriteLine($"Cache created: {cache.Data.HostName}");
2. Get Redis Cache
// Get existing cache
var cache = await resourceGroup.Value
.GetRedisAsync("my-redis-cache");
Console.WriteLine($"Host: {cache.Value.Data.HostName}");
Console.WriteLine($"Port: {cache.Value.Data.Port}");
Console.WriteLine($"SSL Port: {cache.Value.Data.SslPort}");
Console.WriteLine($"Provisioning State: {cache.Value.Data.ProvisioningState}");
3. Update Redis Cache
var patchData = new RedisPatch
{
Sku = new RedisSku(RedisSkuName.Standard, RedisSkuFamily.BasicOrStandard, 2),
RedisConfiguration = new RedisCommonConfiguration
{
MaxMemoryPolicy = "allkeys-lru"
}
};
var updateOperation = await cache.Value.UpdateAsync(
WaitUntil.Completed,
patchData);
4. Delete Redis Cache
await cache.Value.DeleteAsync(WaitUntil.Completed);
5. Get Access Keys
var keys = await cache.Value.GetKeysAsync();
Console.WriteLine($"Primary Key: {keys.Value.PrimaryKey}");
Console.WriteLine($"Secondary Key: {keys.Value.SecondaryKey}");
6. Regenerate Access Keys
var regenerateContent = new RedisRegenerateKeyContent(RedisRegenerateKeyType.Primary);
var newKeys = await cache.Value.RegenerateKeyAsync(regenerateContent);
Console.WriteLine($"New Primary Key: {newKeys.Value.PrimaryKey}");
7. Manage Firewall Rules
// Create firewall rule
var firewallData = new RedisFirewallRuleData(
startIP: System.Net.IPAddress.Parse("10.0.0.1"),
endIP: System.Net.IPAddress.Parse("10.0.0.255"));
var firewallCollection = cache.Value.GetRedisFirewallRules();
var firewallOperation = await firewallCollection.CreateOrUpdateAsync(
WaitUntil.Completed,
"allow-internal-network",
firewallData);
// List all firewall rules
…
अक्सर पूछे जाने वाले सवाल
इस code और StackExchange.Redis में क्या फर्क है?
यह code *cache खुद* को manage करता है (बनाना, कॉन्फ़िगर करना), जबकि StackExchange.Redis cache *के अंदर के डेटा* के साथ काम करता है (values सेव और पढ़ना)।
क्या इसे इस्तेमाल करने के लिए कोई खास setup चाहिए?
हाँ, आपके पास .NET के लिए Azure SDK इंस्टॉल होना चाहिए और आपकी Azure authentication credentials, जैसे subscription ID, सेट होनी चाहिए।
क्या इस code से Redis cache की हर चीज़ manage हो सकती है?
आप creation, configuration, firewall rules, access keys और patch scheduling (Premium SKU के लिए) manage कर सकते हैं। Data operations (सेव और पढ़ना) के लिए आपको दूसरा SDK इस्तेमाल करना होगा।
जानकारी
लोकप्रियता
- GitHub स्टार
- 48k
- रैंकिंग में स्थान
- #3978
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
00-andruia-consultant
48kआपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।
007
48kआपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।
10-andruia-skill-smith
48kआपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।
20-andruia-niche-intelligence
48kआपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।
मिलती-जुलती skills
discrawl
394kयह आपके एजेंट को Discord संदेशों के सेव किए गए स्थानीय आर्काइव में खोजने, उसका सारांश बनाने और उसकी ताज़गी जांचने में मदद करती है।
clickhouse-io
280kआपके एजेंट को ClickHouse databases में queries और schemas optimize करने में मदद करता है। high-performance analytical workloads के लिए best practices लागू करता है। जब analytical queries बहुत धीमी हों, तब इसका उपयोग करें।
scientific-db-pubmed-database
280kआपके एजेंट को बायोमेडिकल क्षेत्र के वैज्ञानिक लेख खोजने में मदद करता है। जिस रिसर्च में खास मेडिकल जानकारी चाहिए, उसके लिए यह काम का है।