| name | azure-resource-manager-cosmosdb-dotnet |
| description | ALWAYS use this when the request matches Azure Resource Manager Cosmosdb Dotnet: Azure Resource Manager SDK for Cosmos DB in .NET. |
Azure.ResourceManager.CosmosDB (.NET)
Selective Reading Rule
Start with:
references/senior-master-standard.md
references/usage-routing.md
references/quality-checklist.md
Then load only the inherited docs, scripts, assets, or examples that match the user's actual task.
Management plane SDK for provisioning and managing Azure Cosmos DB resources via Azure Resource Manager.
⚠️ Management vs Data Plane
- This SDK (Azure.ResourceManager.CosmosDB): Create accounts, databases, containers, configure throughput, manage RBAC
- Data Plane SDK (Microsoft.Azure.Cosmos): CRUD operations on documents, queries, stored procedures execution
Installation
dotnet add package Azure.ResourceManager.CosmosDB
dotnet add package Azure.Identity
Current Versions: Stable v1.4.0, Preview v1.4.0-beta.13
Environment Variables
AZURE_SUBSCRIPTION_ID=<your-subscription-id>
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.CosmosDB;
credential = DefaultAzureCredential();
armClient = ArmClient(credential);
subscriptionId = Environment.GetEnvironmentVariable();
subscription = armClient.GetSubscriptionResource(
ResourceIdentifier());