Azure Cosmos DB ARM for .NET
Provision and manage Azure Cosmos DB resources from .NET through ARM.
The skill clearly separates management-plane from data-plane use and recommends DefaultAzureCredential without hardcoded keys, providing some scope control. However, examples print primary keys and connection strings, use environment variables for client secrets, and include deletion, failover, and public-network configurations without confirmation, least-privilege guidance, secret-handling controls, rollback, or impact disclosure, so points are deducted.
Installation, authentication, resource hierarchy, core CRUD, throughput, and some error-handling paths are documented and mostly consistent. However, there are no skill-specific executable tests or compatibility checks, and input validation, idempotency conflicts, version verification, and comprehensive recovery/failure feedback are thin; the static cap requires a conservative deduction.
The name, description, trigger phrases, and management-plane boundary are clear, covering accounts, databases, containers, throughput, and related RBAC scenarios. Still, input/output contracts, permission prerequisites, regional/API variation, cost risks, and Chinese-language or mainland-China environment support are not defined, limiting trigger precision and environment-fit confidence.
Front matter supplies name, description, MIT license, author, version, and package metadata; the document is layered into installation, authentication, workflows, references, and related SDKs. It lacks a changelog, explicit maintenance owner/update path, pinned compatibility guidance, FAQ, known limitations, and versioned reference provenance, so points are deducted.
The material directly addresses common Cosmos DB ARM provisioning and management tasks, and the management/data-plane distinction has practical value. Static evidence does not demonstrate compilation or execution, several examples depend on SDK/API version details, and production-grade RBAC, networking, rollback, and validation workflows are incomplete; the static effectiveness ceiling therefore limits the score.
The skill provides many concrete types, methods, package versions, and error examples, while the repository includes CI and harness materials. The supplied evidence does not show skill-specific tests, real execution results, or independent corroboration; the workflows mainly validate the generic harness, not this skill's key paths, so verifiability remains limited.
- Do not print PrimaryMasterKey, SecondaryMasterKey, or connection strings to logs, terminals, or agent context; use secure storage and least-privilege identities.
- Account deletion, failover, public-network enablement, and throughput changes have external or cost impacts; require confirmation and prepare backup, rollback, or recovery procedures.
- Compatibility between the stated package versions and the shown APIs is not established by the supplied material; verify the actual Azure.ResourceManager.CosmosDB and Azure.Identity versions before compiling.
- No skill-specific tests or execution results are supplied; treat the snippets as references requiring validation.
What it does & when to use it
This skill targets Azure Cosmos DB management-plane work with the Azure.ResourceManager.CosmosDB .NET SDK. It covers account, database, container, throughput, RBAC, authentication, resource navigation, keys, connection strings, and ARM error handling. It explicitly excludes data-plane document CRUD, queries, and stored procedure execution, which belong to Microsoft.Azure.Cosmos. It is a good fit for .NET developers automating Azure resource provisioning and configuration.
It shows how to install Azure.ResourceManager.CosmosDB and Azure.Identity, configure subscription and credential environment variables, and create an ArmClient that navigates subscriptions, resource groups, accounts, databases, and containers. The examples create or update Cosmos DB accounts, SQL databases, and SQL containers with consistency, failover, partition-key, indexing, and TTL settings. It also demonstrates manual and autoscale throughput, retrieving account keys and connection strings, and handling RequestFailedException responses from ARM.
- A .NET infrastructure developer needs to provision a Cosmos DB account, SQL database, and container from C#.
- A platform engineer needs repeatable, idempotent Cosmos DB deployments with manual or autoscale throughput.
- A security-conscious Azure team needs DefaultAzureCredential, managed identity, or service-principal authentication instead of hardcoded keys.
- An application team needs to retrieve Cosmos DB keys or connection strings and manage related ARM resources or RBAC.
Pros & cons
- Clearly separates management-plane and data-plane responsibilities.
- Provides an end-to-end resource hierarchy from ArmClient through subscriptions, resource groups, accounts, databases, and containers.
- Includes authentication, idempotent CreateOrUpdateAsync operations, long-running operations, throughput, key retrieval, and ARM error handling.
- States stable and preview package versions and points to focused reference files.
- It is limited to .NET management-plane guidance and does not replace Microsoft.Azure.Cosmos for document operations or queries.
- The source does not provide independent test results for this individual skill or the contents of its referenced files.
- Using the examples requires an Azure subscription, suitable permissions, network access, and local credential configuration.
How to install
Run the documented collection installer in a compatible agent environment:
npx skills add microsoft/skills
Choose azure-resource-manager-cosmosdb-dotnet in the installation wizard. The skill is located at .github/plugins/azure-sdk-dotnet/skills/azure-resource-manager-cosmosdb-dotnet/.
How to use
Use a management-plane prompt such as: "Create a Cosmos DB account named my-cosmos-account in Azure using Azure.ResourceManager.CosmosDB and configure a SQL database and container." Provide AZURE_SUBSCRIPTION_ID; when using DefaultAzureCredential in production, also set AZURE_TOKEN_CREDENTIALS=prod. Do not use this skill for document CRUD, queries, or stored procedure execution; use Microsoft.Azure.Cosmos for those data-plane tasks.
Compared to similar skills
Microsoft.Azure.Cosmos is the named alternative for data-plane work: document CRUD, queries, and stored procedure execution. This skill uses Azure.ResourceManager.CosmosDB for management-plane operations such as provisioning accounts, databases, containers, throughput, and RBAC.