azure-mgmt-apicenter-py 是什么?
该 Skill 教你用 azure-mgmt-apicenter 管理订阅中的 API Center 服务与内部目录项,包括注册 API、版本、定义、环境、部署和 metadata schema。管理面写操作和真正部署 API 是两件事。
中文说明由本站依据来源整理;英文原文保留在页面下方。
怎么接入你的 Agent?
- 定位完整 Skill 目录
打开本项目来源,核对
SKILL.md及其引用的脚本和资料。 - 交给你正在用的 Agent
在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。
- 确认识别,再做具体任务
让 Agent 回报安装目录和识别到的名称
azure-mgmt-apicenter-py,然后按本页使用示例提供材料。
展开并复制给 Codex 的安装指令
安装并检查 azure-mgmt-apicenter-py
请在 Codex 的当前工作环境中安装并检查 azure-mgmt-apicenter-py 这个 Skill。
项目身份:microsoft/skills / azure-mgmt-apicenter-py
来源:https://github.com/microsoft/skills/blob/f03ec5392f7a0f3aca12af47477e92f1edf7b44c/.github/plugins/azure-sdk-python/skills/azure-mgmt-apicenter-py/SKILL.md
已定位的源文件:.github/plugins/azure-sdk-python/skills/azure-mgmt-apicenter-py/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 Claude Code 的安装指令
安装并检查 azure-mgmt-apicenter-py
请在 Claude Code 的当前工作环境中安装并检查 azure-mgmt-apicenter-py 这个 Skill。
项目身份:microsoft/skills / azure-mgmt-apicenter-py
来源:https://github.com/microsoft/skills/blob/f03ec5392f7a0f3aca12af47477e92f1edf7b44c/.github/plugins/azure-sdk-python/skills/azure-mgmt-apicenter-py/SKILL.md
已定位的源文件:.github/plugins/azure-sdk-python/skills/azure-mgmt-apicenter-py/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 Cursor 的安装指令
安装并检查 azure-mgmt-apicenter-py
请在 Cursor Agent 的当前工作环境中安装并检查 azure-mgmt-apicenter-py 这个 Skill。
项目身份:microsoft/skills / azure-mgmt-apicenter-py
来源:https://github.com/microsoft/skills/blob/f03ec5392f7a0f3aca12af47477e92f1edf7b44c/.github/plugins/azure-sdk-python/skills/azure-mgmt-apicenter-py/SKILL.md
已定位的源文件:.github/plugins/azure-sdk-python/skills/azure-mgmt-apicenter-py/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 当前 Agent 的安装指令
安装并检查 azure-mgmt-apicenter-py
请在 当前 Agent 的当前工作环境中安装并检查 azure-mgmt-apicenter-py 这个 Skill。
项目身份:microsoft/skills / azure-mgmt-apicenter-py
来源:https://github.com/microsoft/skills/blob/f03ec5392f7a0f3aca12af47477e92f1edf7b44c/.github/plugins/azure-sdk-python/skills/azure-mgmt-apicenter-py/SKILL.md
已定位的源文件:.github/plugins/azure-sdk-python/skills/azure-mgmt-apicenter-py/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。装好以后,具体怎么用?
准备哪些材料
- 安装 azure-mgmt-apicenter 与 azure-identity,设置 subscription id 和 ARM 管理权限。
- 确认 resource group、service 和 workspace 的现有状态;新建服务/目录项前核对区域和命名。
- 准备真实 API 规范及联系人、terms、环境和 runtime URI;源文中的 schema/地址是演示内容。
实际使用顺序
- 优先使用 services.list_by_subscription、apis.list 和其他 list 操作盘点现状。
- 在目标 service/workspace 下按 API、version、definition 层级注册资源,再导入规范内容。
- 环境描述部署目标;Deployment 的 environment_id、definition_id 必须指向正确现有资源。
- 为 API 补充 owner/contact、生命周期、元数据 schema,使目录能辅助治理和发现。
从一个具体任务开始
本站根据源文件编写的使用示例,未在本站实际运行。示例中的文件由你提供。
复制一个具体任务
请基于 azure-mgmt-apicenter-py 帮我制定只读资源盘点脚本:列出订阅中的 API Center 名称/区域,以及指定 workspace 中 API 名称/种类。不得创建资源。输出只读枚举草案;未调用 ARM 或注册 API。
使用条件与边界
- CreateOrUpdate 和 begin_import_specification 会改变服务端目录或API规范。
- API的production lifecycle字段只是目录标签,不会自动证明 API 可用或安全。
- API Center 不等于 API Management;本 Skill 重点在 inventory/governance。
常见问题
登记API后客户端能调用了吗?
不一定。此服务记录 API 资产和部署信息,不负责把服务发布到 gateway;实际调用地址和网关策略需另行配置。
为什么deployment关联失败?
检查 environment_id 和 definition_id 是否为相同 subscription/service/workspace 下正确的完整资源 ID,并确认目标 API version 已存在。
来源原文与资料状态
- 源文件
- 已保存 SKILL.md,抓取于 2026-11-16T12:36:35.145Z
- 中文使用说明
- 已针对下方源文件版本整理用途、用法和常见问题
- 安装与任务测试
- 本站未执行安装或任务测试
- 来源复核
- 本页中文用法已对照保存版本的完整 SKILL.md 阅读整理
展开 SKILL.md 原文、章节与历史收录资料
.github/plugins/azure-sdk-python/skills/azure-mgmt-apicenter-py/SKILL.md · 抓取时间 2026-11-16T12:36:35.145Z
以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。
抓取成功不代表已完成安装或任务测试。
Azure API Center Management SDK for Python. Use for managing API inventory, metadata, and governance across your organization. Triggers: "azure-mgmt-apicenter", "ApiCenterMgmtClient", "API Center", "API inventory", "API governance".
查看源文件章节 / Source sections
- 原文:Azure API Center Management SDK for Python
- 安装 / Installation
- 原文:Environment Variables
- 原文:Authentication & Lifecycle
- 原文:Create API Center
- 原文:List API Centers
- 原文:Register an API
- 原文:Create API Version
- 原文:Add API Definition
- 原文:Import API Specification
- 原文:List APIs
- 原文:Create Environment
- 原文:Create Deployment
- 原文:Define Custom Metadata
- 原文:Client Types
- 原文:Operations
- 原文:Best Practices
- 原文:Reference Files
原文:Azure API Center Management SDK for Python
Manage API inventory, metadata, and governance in Azure API Center.
安装 / Installation
```bash pip install azure-mgmt-apicenter pip install azure-identity ```
原文:Environment Variables
```bash AZURE_SUBSCRIPTION_ID=your-subscription-id # Required for all auth methods AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production ```
原文:Authentication & Lifecycle
> **🔑 Two rules apply to every code sample below:** > > 1. **Prefer `DefaultAzureCredential`.** It works locally (Azure CLI / VS Code / Developer CLI) and in Azure (managed identity, workload identity) with no code change. Avoid connection strings, account/API keys — they bypass Entra audit and rotation. > - Local dev: `DefaultAzureCredential` works as-is. > - Production: set `AZURE_TOKEN_CREDENTIALS=prod` (or `AZURE_TOKEN_CREDENTIALS=<specific_credential>`) to constrain the credential chain to production-safe credentials. > 2. **Wrap every client in a context manager** so HTTP transports, sockets, and token caches are released deterministically: > - Sync: `with <Client>(...) as client:` > - Async: `async with <Client>(...) as client:` **and** `async with DefaultAzureCredential() as credential:` (from `azure.identity.aio`) > > Snippets may abbreviate this setup, but production code should always follow both rules. ```python from azure.identity import DefaultAzureCredential, ManagedIdentityCredential from azure.mgmt.apicenter import ApiCenterMgmtClient import os # Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=<specific_credential> credential = DefaultAzureCredential(require_envvar=True) # Or use a specific credential directly in production: # See https://learn.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#credential-classes # credential = ManagedIdentityCredential() with ApiCenterMgmtClient( credential=credential, subscription_id=os.environ["AZURE_SUBSCRIPTION_ID"] ) as client: # Use `client` for all subsequent operations (see examples below) ... ```
原文:Create API Center
```python from azure.mgmt.apicenter.models import Service api_center = client.services.create_or_update( resource_group_name="my-resource-group", service_name="my-api-center", resource=Service( location="eastus", tags={"environment": "production"} ) ) print(f"Created API Center: {api_center.name}") ```
原文:List API Centers
```python api_centers = client.services.list_by_subscription() for api_center in api_centers: print(f"{api_center.name} - {api_center.location}") ```
文件 SHA256:1f6aa252243b60aad3dd879b24e9fcba51b6833861baa5ee97b74ff2f0b3a726
仓库许可证记录:MIT;skill-declaration-captured-not-interpreted,查看来源。
Azure API Center Management SDK for Python. Use for managing API inventory, metadata, and governance across your organization. Triggers: "azure-mgmt-apicenter", "ApiCenterMgmtClient", "API Center", "API inventory", "API governance".
历史收录数据
| 来源仓库 | microsoft/skills |
|---|---|
| Skill源路径 | .github/plugins/azure-sdk-python/skills/azure-mgmt-apicenter-py/SKILL.md |
安装前请让使用的Agent先读取这个SKILL.md及其所在目录,确认依赖和所需权限。此页不生成未经来源验证的安装命令。
