azure-mgmt-mongodbatlas-dotnet
它能做什么
这个工具可以让你把 MongoDB Atlas 组织作为 Azure 资源来管理,并将 MongoDB Atlas 的计费与 Azure Marketplace 集成在一起。
适用场景
- ✓为你的 MongoDB Atlas 组织设置 Azure 访问权限时。
- ✓想把 MongoDB Atlas 的计费统一到你的 Azure 订阅中时。
- ✓使用 Azure 工具管理 MongoDB Atlas 组织的生命周期时。
技能链接
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/azure-mgmt-mongodbatlas-dotnet/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“创建一个名为 'my-atlas-org' 的 MongoDB Atlas 组织,区域为 'EastUS2',并填写 Marketplace 和用户信息。”
每周 5 个新技能,1 分钟读完。
工作原理
你使用一套连接 Azure 的专用代码(SDK)。借助这些代码,你可以创建、查看、更新或删除 MongoDB Atlas 组织,就像管理 Azure 资源一样。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Azure.ResourceManager.MongoDBAtlas SDK
Manage MongoDB Atlas Organizations as Azure ARM resources with unified billing through Azure Marketplace.
Package Information
| Property | Value |
|---|---|
| Package | Azure.ResourceManager.MongoDBAtlas |
| Version | 1.0.0 (GA) |
| API Version | 2025-06-01 |
| Resource Type | MongoDB.Atlas/organizations |
| NuGet | Azure.ResourceManager.MongoDBAtlas |
Installation
dotnet add package Azure.ResourceManager.MongoDBAtlas
dotnet add package Azure.Identity
dotnet add package Azure.ResourceManager
Important Scope Limitation
This SDK manages MongoDB Atlas Organizations as Azure ARM resources for marketplace integration. It does NOT directly manage:
- Atlas clusters
- Databases
- Collections
- Users/roles
For cluster management, use the MongoDB Atlas API directly after creating the organization.
Authentication
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.MongoDBAtlas;
using Azure.ResourceManager.MongoDBAtlas.Models;
// Create ARM client with DefaultAzureCredential
var credential = new DefaultAzureCredential();
var armClient = new ArmClient(credential);
Core Types
| Type | Purpose |
|---|---|
MongoDBAtlasOrganizationResource |
ARM resource representing an Atlas organization |
MongoDBAtlasOrganizationCollection |
Collection of organizations in a resource group |
MongoDBAtlasOrganizationData |
Data model for organization resource |
MongoDBAtlasOrganizationProperties |
Organization-specific properties |
MongoDBAtlasMarketplaceDetails |
Azure Marketplace subscription details |
MongoDBAtlasOfferDetails |
Marketplace offer configuration |
MongoDBAtlasUserDetails |
User information for the organization |
MongoDBAtlasPartnerProperties |
MongoDB-specific properties (org name, ID) |
Workflows
Get Organization Collection
// Get resource group
var subscription = await armClient.GetDefaultSubscriptionAsync();
var resourceGroup = await subscription.GetResourceGroupAsync("my-resource-group");
// Get organizations collection
MongoDBAtlasOrganizationCollection organizations =
resourceGroup.Value.GetMongoDBAtlasOrganizations();
Create Organization
var organizationName = "my-atlas-org";
var location = AzureLocation.EastUS2;
// Build organization data
var organizationData = new MongoDBAtlasOrganizationData(location)
{
Properties = new MongoDBAtlasOrganizationProperties(
marketplace: new MongoDBAtlasMarketplaceDetails(
subscriptionId: "your-azure-subscription-id",
offerDetails: new MongoDBAtlasOfferDetails(
publisherId: "mongodb",
offerId: "mongodb_atlas_azure_native_prod",
planId: "private_plan",
planName: "Pay as You Go (Free) (Private)",
termUnit: "P1M",
termId: "gmz7xq9ge3py"
)
),
user: new MongoDBAtlasUserDetails(
emailAddress: "admin@example.com",
upn: "admin@example.com"
)
{
FirstName = "Admin",
LastName = "User"
}
)
{
PartnerProperties = new MongoDBAtlasPartnerProperties
{
OrganizationName = organizationName
}
},
Tags = { ["Environment"] = "Production" }
};
// Create the organization (long-running operation)
var operation = await organizations.CreateOrUpdateAsync(
WaitUntil.Completed,
organizationName,
organizationData
);
MongoDBAtlasOrganizationResource organization = operation.Value;
Console.WriteLine($"Created: {organization.Id}");
Get Existing Organization
// Option 1: From collection
MongoDBAtlasOrganizationResource org =
await organizations.GetAsync("my-atlas-org");
// Option 2: From resource identifier
var resourceId = MongoDBAtlasOrganizationResource.CreateResourceIdentifier(
subscriptionId: "subscription-id",
resourceGroupName: "my-resource-group",
organizationName: "my-atlas-org"
);
MongoDBAtlasOrganizationResource org2 =
armClient.GetMongoDBAtlasOrganizationResource(resourceId);
await org2.GetAsync(); // Fetch data
List Organizations
// List in resource group
await foreach (var org in organizations.GetAllAsync())
{
Console.WriteLine($"Org: {org.Data.Name}");
…
常见问题
什么是“MongoDB Atlas 组织”?
它是 MongoDB Atlas 中容纳项目和数据库的容器,让你可以在更高层级管理访问权限和设置。
什么是“Azure ARM 资源”?
它们是你在微软 Azure 中管理的资源,例如虚拟机、数据库,在这里也包括 MongoDB Atlas 组织。
我可以用这个工具管理数据库和集群吗?
不可以。这个工具只负责管理 MongoDB Atlas 组织本身。如需管理集群和数据库,你需要直接使用 MongoDB Atlas 界面。
详情
作者的原始描述
Manage MongoDB Atlas Organizations as Azure ARM resources with unified billing through Azure Marketplace.
热度
- GitHub 星标
- 48k
- 排名
- #3959
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …
同一仓库的更多技能
00-andruia-consultant
48k帮你的智能体启动或改进 AI 项目。它可以分析代码、推荐工具,并用西班牙语制定行动计划。
007
48k让你的智能体执行安全审计和威胁建模。它有助于保护项目免受攻击和漏洞的威胁。
10-andruia-skill-smith
48k帮你的智能体创建或改进 AI 工具。它可以定义工具的工作方式、编写文档,并验证其结构。
20-andruia-niche-intelligence
48k让你的智能体创建某个特定行业的摘要。它有助于借助可靠的信息来源,了解项目的背景、规则、使用模式和风险。