跳到正文
Skillpedia
智能体48k · #3959

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/azure-mgmt-mongodbatlas-dotnet/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#3959
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能