mcpField
A
azure-cost-management

azure-cost-management

github.com/microsoftdocs云与 DevOps796216 次安装3 天前更新
代码仓库

关于 azure-cost-management

azure-cost-management 是面向 Azure 成本管理使用者的 Agent 技能,提供计费、成本优化、账户配置与自动化指导,并结合本地速查内容和远程文档获取。

主要功能

  1. 01账单与订阅问题排查
  2. 02成本分析和优化建议
  3. 03预留与节省计划指导
  4. 04权限、预算和导出配置
  5. 05API 与脚本自动化模式

适用场景

  1. 01排查账单或订阅访问问题
  2. 02规划预留和节省计划
  3. 03设置预算与成本数据导出
  4. 04自动化成本分析和账单数据检索

MCP 相关

技能可通过 mcp_microsoftdocs 的 microsoft_docs_fetch 获取远程文档;也可使用 fetch_webpage 作为备用方式。

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/microsoftdocs/agent-skills --skill azure-cost-management

安装后在 Claude Code 中输入/azure-cost-management确认已加载。

详细介绍

成本管理技能

此技能提供成本管理方面的专家指导,涵盖故障排除、最佳做法、决策、限制和配额、安全、配置、集成和编码模式,以及部署。它结合了本地快速参考内容与远程文档获取功能。

如何使用此技能

IMPORTANT for Agent:使用下面的类别索引定位相关部分。对于带有行范围的类别(例如 L35-L120),使用 read_file 并指定相应行。对于带有文件链接的类别(例如 [security.md](security.md)),使用 read_file 读取链接的参考文件

IMPORTANT for Agent:如果 metadata.generated_at 的时间早于 3 个月以上,请建议用户从存储库拉取最新版本。如果 mcp_microsoftdocs 工具不可用,请建议用户安装:安装指南

此技能需要网络访问才能获取文档内容:

  • 首选:使用 mcp_microsoftdocs:microsoft_docs_fetch,并将查询字符串设为 from=learn-agent-skill。返回 Markdown。
  • 备用:使用 fetch_webpage,并将查询字符串设为 from=learn-agent-skill&accept=text/markdown。返回 Markdown。

类别索引

类别行说明
故障排除L36-L65诊断并解决 Azure 账单、订阅和预留实例问题(注册、访问、付款、发票、使用率和错误代码),包括 EA、MCA、CSP 和学生帐户。
最佳做法L66-L78分析和优化 Azure 成本、使用 Advisor、管理订阅和协议、利用节省计划和 SQL 许可,以及建立成本治理流程的最佳做法。
决策L79-L116指导如何选择和配置 Azure 账单、成本分配、预留实例、节省计划、EA/MCA/CSP 转换,以及订阅/帐户转移,以优化和管理云支出。
限制和配额L117-L129成本管理数据的限制、配额和时间安排;免费帐户和额度限制;订阅支出限制;节省计划的排除项/使用率;多订阅限制;非活动计费帐户。
安全L130-L152管理 Azure 账单、订阅、EA/MCA 帐户、预留实例、节省计划和税务文件的安全访问、角色和权限,并通过门户/API 检查额度余额。
配置L153-L175配置成本管理:标记、视图、筛选器、导出、预算、警报、预留实例/节省计划、SQL 许可,以及订阅/账单所有权和策略。
集成和编码模式L176-L193用于自动执行成本分析、检索账单数据,以及以编程方式创建/迁移 Azure 订阅和预留实例的 API、脚本和 PowerShell 模式。
部署L194-L197配置 Azure 成本和使用情况数据到存储(如 Azure Storage)的自动化大规模导出,包括持续成本分析所需的设置、计划和管理。
故障排除
主题URL
排查常见的 Azure 成本管理错误代码https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/cost-management-error-codes
排查并重新激活已禁用的 Azure for Studentshttps://learn.microsoft.com/en-us/azure/cost-management-billing/manage/azurestudents-subscription-disabled
诊断并重新激活已禁用的 Azure 订阅https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/subscription-disabled
排查 MCA 注册后无法访问订阅的问题https://learn.microsoft.com/en-us/azure/cost-management-billing/microsoft-customer-agreement/troubleshoot-subscription-access
使用 Monitor 日志查找 Azure 预留购买者https://learn.microsoft.com/en-us/azure/cost-management-billing/reservations/find-reservation-purchaser-from-logs
修复无法下载 Azure 预留使用情况的问题https://learn.microsoft.com/en-us/azure/cost-management-billing/reservations/troubleshoot-download-usage
解决购买预留时出现的“没有符合条件的订阅”错误https://learn.microsoft.com/en-us/azure/cost-management-billing/reservations/troubleshoot-no-eligible-subscriptions
排查无法使用的 Azure 预留类型https://learn.microsoft.com/en-us/azure/cost-management-billing/reservations/troubleshoot-product-not-available
排查 Azure 预留建议差异https://learn.microsoft.com/en-us/azure/cost-management-billing/reservations/troubleshoot-reservation-recommendation
在 Entra 租户之间转移 Azure 预留订单https://learn.microsoft.com/en-us/azure/cost-management-billing/reservations/troubleshoot-reservation-transfers-between-tenants
诊断并修复 Azure 预留利用率问题https://learn.microsoft.com/en-us/azure/cost-management-billing/reservations/troubleshoot-reservation-utilization
排查 Azure 节省计划利用率异常https://learn.microsoft.com/en-us/azure/cost-management-billing/savings-plan/troubleshoot-savings-plan-utilization
排查 Azure 账单付款更新错误https://learn.microsoft.com/en-us/azure/cost-management-billing/troubleshoot-billing/billing-troubleshoot-azure-payment-issues
修复 Azure EA 用户创建 VM 时出现的错误https://learn.microsoft.com/en-us/azure/cost-management-billing/troubleshoot-billing/cannot-create-vm
解决 Azure 门户中缺少计费账户的问题https://learn.microsoft.com/en-us/azure/cost-management-billing/troubleshoot-billing/troubleshoot-account-not-found
修复在门户中查看 Azure 发票时遇到的问题https://learn.microsoft.com/en-us/azure/cost-management-billing/troubleshoot-billing/troubleshoot-cant-find-invoice
使用对账使用情况文件排查 CSP 计费问题https://learn.microsoft.com/en-us/azure/cost-management-billing/troubleshoot-billing/troubleshoot-csp-billing-issues-usage-file-pivot-tables
使用 Azure 使用情况数据透视表排查 MCA 计费问题https://learn.microsoft.com/en-us/azure/cost-management-billing/troubleshoot-billing/troubleshoot-customer-agreement-billing-issues-usage-file-pivot-tables
解决 Azure 账单中信用卡被拒的问题https://learn.microsoft.com/en-us/azure/cost-management-billing/troubleshoot-billing/troubleshoot-declined-card
使用使用情况数据透视表排查 Azure EA 计费问题https://learn.microsoft.com/en-us/azure/cost-management-billing/troubleshoot-billing/troubleshoot-ea-billing-issues-usage-file-pivot-tables
诊断并修复 Azure 阈值计费问题https://learn.microsoft.com/en-us/azure/cost-management-billing/troubleshoot-billing/troubleshoot-threshold-billing
解决 Azure 订阅注册时出现的目录错误https://learn.microsoft.com/en-us/azure/cost-management-billing/troubleshoot-subscription/cannot-sign-up-subscription
解决 Azure 门户中的“未找到订阅”错误https://learn.microsoft.com/en-us/azure/cost-management-billing/troubleshoot-subscription/no-subscriptions-found
排查新建 Azure 账户时的注册问题https://learn.microsoft.com/en-us/azure/cost-management-billing/troubleshoot-subscription/troubleshoot-azure-sign-up
修复预留项的“因冲突而不可用”问题https://learn.microsoft.com/en-us/azure/cost-management-billing/troubleshoot-subscription/troubleshoot-not-available-conflict
排查 Azure 门户订阅登录问题https://learn.microsoft.com/en-us/azure/cost-management-billing/troubleshoot-subscription/troubleshoot-sign-in-issue
最佳实践
主题URL
使用成本分析解答常见的 Azure 成本问题https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/cost-analysis-common-uses
应用 Azure 成本管理优化最佳实践https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/cost-mgt-best-practices
使用 Advisor 建议降低 Azure 成本https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/tutorial-acm-opt-recommendations
安全取消和删除 Azure 订阅https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/cancel-azure-subscription
遵循 Microsoft 客户协议入门最佳实践https://learn.microsoft.com/en-us/azure/cost-management-billing/microsoft-customer-agreement/onboard-microsoft-customer-agreement
手动计算 EA 节省计划的成本节省https://learn.microsoft.com/en-us/azure/cost-management-billing/savings-plan/calculate-ea-savings-plan-savings
将集中管理的 SQL 许可证应用于 Azure 用量https://learn.microsoft.com/en-us/azure/cost-management-billing/scope-level/manage-licenses-centrally
结合 SQL HADR 和集中管理的混合权益https://learn.microsoft.com/en-us/azure/cost-management-billing/scope-level/sql-server-hadr-licenses
规划并实施 Azure 成本管理实践https://learn.microsoft.com/en-us/azure/cost-management-billing/understand/plan-manage-costs
决策
主题URL
决定并配置 Azure 成本分配规则https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/allocate-costs
规划并实施 Azure 成本分配策略https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/cost-allocation-introduction
选择和使用内置的成本分析视图https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/cost-analysis-built-in-views
规划从 EA 迁移到 MCA 成本管理 APIhttps://learn.microsoft.com/en-us/azure/cost-management-billing/costs/migrate-cost-management-api
决定并管理 Azure 企业协议计费https://learn.microsoft.com/en-us/azure/cost-management-billing/enterprise-agreement-faq
了解 Azure 数据传输费用和场景https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/data-transfer-fees
决定是否采用 Azure EA VM 预留实例节省方案https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/ea-portal-vm-reservations
评估 Azure EA 定价和使用量计算https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/ea-pricing-overview
将 MCA-Online Azure 订阅转移到企业协议https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/mca-online-ea-transfer
将 Azure 计费所有权转移到 MCAhttps://learn.microsoft.com/en-us/azure/cost-management-billing/manage/mca-request-billing-ownership
将企业协议计费转换为 Microsoft 客户协议https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/mca-setup-account
决定并规划 Azure 订阅和产品转移https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/subscription-transfer
决定并执行 Azure 订阅套餐变更https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/switch-azure-offer
选择并升级 Azure 免费版或学生账户https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/upgrade-azure-subscription
为迁移到 Microsoft 客户协议计费准备订阅https://learn.microsoft.com/en-us/azure/cost-management-billing/microsoft-customer-agreement/checklist-microsoft-customer-agreement-billing-migration
作为 CSP 合作伙伴管理 Azure 计费https://learn.microsoft.com/en-us/azure/cost-management-billing/partner-faq
选择并使用 Microsoft Agent 预购计划https://learn.microsoft.com/en-us/azure/cost-management-billing/reservations/agent-pre-purchase
确定要购买的 Azure 预留https://learn.microsoft.com/en-us/azure/cost-management-billing/reservations/determine-reservation-purchase
管理 Azure 预留的兑换和退款https://learn.microsoft.com/en-us/azure/cost-management-billing/reservations/exchange-and-refund-azure-reservations
规划并购买 Microsoft Fabric 容量预留https://learn.microsoft.com/en-us/azure/cost-management-billing/reservations/fabric-capacity
规划从已停用的 Azure 预留 VM 实例进行转换https://learn.microsoft.com/en-us/azure/cost-management-billing/reservations/manage-legacy-vm-reservations-after-july-1-2026
了解 Azure 预留兑换政策变更https://learn.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-exchange-policy-changes
使用摊销后的节省计划成本进行费用分摊https://learn.microsoft.com/en-us/azure/cost-management-billing/savings-plan/charge-back-costs
选择最佳 Azure 节省计划承诺金额https://learn.microsoft.com/en-us/azure/cost-management-billing/savings-plan/choose-commitment-amount
决定选择 Azure 节省计划还是预留https://learn.microsoft.com/en-us/azure/cost-management-billing/savings-plan/decide-between-savings-plan-reservation
了解 Azure 节省计划折扣的应用方式https://learn.microsoft.com/en-us/azure/cost-management-billing/savings-plan/discount-application
解读并使用 Azure 节省计划建议https://learn.microsoft.com/en-us/azure/cost-management-billing/savings-plan/purchase-recommendations
选择并了解 Azure 节省计划范围https://learn.microsoft.com/en-us/azure/cost-management-billing/savings-plan/scope-savings-plan
决定并管理 Azure 混合权益的范围https://learn.microsoft.com/en-us/azure/cost-management-billing/scope-level/faq-azure-hybrid-benefit-scope
规划转换到集中管理的 Azure 混合权益https://learn.microsoft.com/en-us/azure/cost-management-billing/scope-level/transition-existing
评估 Azure 计费计量器 ID 更新的影响https://learn.microsoft.com/en-us/azure/cost-management-billing/understand/billing-meter-id-updates
了解 Azure 共享计费计量器区域https://learn.microsoft.com/en-us/azure/cost-management-billing/understand/billing-meter-location
了解 Azure 外部服务费用的计费方式https://learn.microsoft.com/en-us/azure/cost-management-billing/understand/understand-azure-marketplace-charges
规划从 Azure SAP HANA 大型实例迁移https://learn.microsoft.com/en-us/azure/sap/large-instances/decommission-sap-hana
限制与配额
主题URL
Azure Cost Management and Billing 使用限制https://learn.microsoft.com/en-us/azure/cost-management-billing/cost-management-billing-faq
了解 Azure Cost Management 数据的时间安排和粒度https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/understand-cost-mgt-data
遵守 Azure 免费帐户限制以避免产生费用https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/avoid-charges-free-account
了解 Azure 免费帐户额度和期限限制https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/create-free-services
了解和管理 Azure 订阅支出限制https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/spending-limit
确认 Azure savings plan 软件成本不包含在内https://learn.microsoft.com/en-us/azure/cost-management-billing/savings-plan/software-costs-not-included
检查 Azure savings plan 利用率和数据延迟https://learn.microsoft.com/en-us/azure/cost-management-billing/savings-plan/view-utilization
了解创建多个 Azure 订阅时的限制https://learn.microsoft.com/en-us/azure/cost-management-billing/troubleshoot-subscription/create-subscriptions-deploy-resources
了解并避免 Azure 休眠计费帐户https://learn.microsoft.com/en-us/azure/cost-management-billing/understand/keep-billing-accounts-active
安全性
主题URL
使用门户和 API 检查 Azure 额度余额https://learn.microsoft.com/en-us/azure/cost-management-billing/benefits/credits/mca-check-azure-credits-balance
为 Azure 成本管理数据分配 RBAC 访问权限https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/assign-access-acm-data
使用 RBAC 分配和更改 Azure 订阅管理员角色https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/add-change-subscription-administrator
从 Azure 经典管理员迁移到 RBAC 角色https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/classic-administrator-retire
在门户中管理 Azure EA 账单https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/direct-ea-administration
将全局管理员访问权限提升至账单帐户https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/elevate-access-global-admin
授予用于创建 Azure EA 订阅的 RBAC 权限https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/grant-access-to-create-subscription
配置目录之间的 Azure 订阅转移策略https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/manage-azure-subscription-policy
分配 Azure 账单角色以访问帐户https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/manage-billing-access
了解 Azure 购买的 PSD2 SCA 要求https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/open-banking-strong-customer-authentication
管理 Azure 企业协议账单管理员角色https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/understand-ea-roles
管理 Microsoft 客户协议的账单角色https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/understand-mca-roles
在 MCA 下管理租户并保护账单访问权限https://learn.microsoft.com/en-us/azure/cost-management-billing/microsoft-customer-agreement/manage-tenants
设置 CSP 角色以查看 Azure 预留实例https://learn.microsoft.com/en-us/azure/cost-management-billing/reservations/how-to-view-csp-reservations
使用 PowerShell 授予 Azure 预留实例 RBAC 访问权限https://learn.microsoft.com/en-us/azure/cost-management-billing/reservations/manage-reservations-rbac-powershell
配置 Azure 预留实例的权限和角色https://learn.microsoft.com/en-us/azure/cost-management-billing/reservations/view-reservations
确定购买 Azure 节省计划的资格和权限https://learn.microsoft.com/en-us/azure/cost-management-billing/savings-plan/permission-buy-savings-plan
配置查看和管理节省计划的权限https://learn.microsoft.com/en-us/azure/cost-management-billing/savings-plan/permission-view-manage
安全地访问和下载 Azure 税务文件https://learn.microsoft.com/en-us/azure/cost-management-billing/understand/mca-download-tax-document
配置
主题URL
在成本管理中配置和应用计费标记https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/billing-tags
配置和使用 Azure 成本管理警报https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/cost-mgt-alerts-monitor-usage-spending
配置和自定义 Azure 成本分析视图https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/customize-cost-analysis-views
为 Azure 成本分配配置标记继承https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/enable-tag-inheritance
使用 SAS 密钥配置成本管理导出https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/export-cost-data-storage-account-sas-key
在成本分析和预算中配置分组和筛选https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/group-filter
使用 Bicep 定义成本管理预算https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/quick-create-budget-bicep
使用 ARM 模板创建成本管理预算https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/quick-create-budget-template
设置 Azure 预留实例利用率警报https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/reservation-utilization-alerts
创建和管理 Azure 成本管理预算https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/tutorial-acm-create-budgets
转移 MOSP Azure 订阅的计费所有权https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/billing-subscription-transfer
配置 Azure Marketplace 和专用优惠购买策略https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/enable-marketplace-purchases
使用 Azure 凭据为 Power Platform 配置 Partner Admin Linkhttps://learn.microsoft.com/en-us/azure/cost-management-billing/manage/link-partner-id-power-apps-accounts
在 Azure 21Vianet 成本管理中配置加价规则https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/markup-china
将 MOSP 或 MCA Azure 订阅转移到 Enterprise Agreementhttps://learn.microsoft.com/en-us/azure/cost-management-billing/manage/mosp-ea-transfer
配置 Azure 预留实例的自动续订设置https://learn.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-renew
配置 Azure 节省计划的自动续订https://learn.microsoft.com/en-us/azure/cost-management-billing/savings-plan/renew-savings-plan
在 Azure 中创建和限定 SQL 许可证分配的范围https://learn.microsoft.com/en-us/azure/cost-management-billing/scope-level/create-sql-license-assignments
为成本管理员配置 SQL IaaS 扩展注册https://learn.microsoft.com/en-us/azure/cost-management-billing/scope-level/sql-iaas-extension-registration
集成与编码模式
主题URL
使用 Cost Management Power BI 应用分析 Azure 成本https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/analyze-cost-data-azure-cost-management-power-bi-template-app
使用 API 和脚本自动执行 Azure 成本管理https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/manage-automation
将 Azure 计费场景映射到 Cost Management APIhttps://learn.microsoft.com/en-us/azure/cost-management-billing/manage/cost-management-automation-scenarios
使用 PowerShell 自动执行跨租户的 MCA 计费角色迁移https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/mca-role-migration
在关联的计费租户中创建 MCA 订阅https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/programmatically-create-customer-agreement-associated-billing-tenants
通过 REST API 以编程方式创建 Azure 订阅https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/programmatically-create-subscription
使用最新的 Azure API 创建 EA 订阅https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/programmatically-create-subscription-enterprise-agreement
使用最新 API 以编程方式创建 MCA 订阅https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/programmatically-create-subscription-microsoft-customer-agreement
以编程方式创建跨 Entra 租户的 MCA 订阅https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/programmatically-create-subscription-microsoft-customer-agreement-across-tenants
以编程方式创建 Partner Agreement Azure 订阅https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/programmatically-create-subscription-microsoft-partner-agreement
使用旧版 API 以编程方式创建 Azure 订阅https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/programmatically-create-subscription-preview
使用 Cost Details API 分析 EA 计费情况https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/review-enterprise-billing
通过 Cost Details API 检索订阅计费数据https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/review-subscription-billing
使用 Azure 预留 API 实现自动化https://learn.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-apis
部署
主题URL
设置定期大规模导出成本数据https://learn.microsoft.com/en-us/azure/cost-management-billing/costs/ingest-azure-usage-at-scale

评论

支持 Markdown