您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

面向合作伙伴的 Azure 成本管理入门Get started with Azure Cost Management for partners

Azure 成本管理原生可用于已将其客户加入 Microsoft 客户协议并已购买 Azure 计划的直接合作伙伴。Azure Cost Management is natively available for direct partners who have onboarded their customers to a Microsoft Customer Agreement and have purchased an Azure Plan. 本文介绍合作伙伴如何使用 Azure 成本管理功能查看 Azure 计划中的订阅的成本。This article explains how partners use Azure Cost Management features to view costs for subscriptions in the Azure Plan. 此外,还将介绍合作伙伴如何以零售价为其客户启用成本管理访问。It also describes how partners enable Cost Management access at retail rates for their customers.

就直接合作伙伴和间接提供商而言,全局管理员和管理员代理可以访问合作伙伴租户中的成本管理并以已开票的价格管理成本。For direct partners and indirect providers, the global admin and admin agents, can access Cost Management in the partner tenant and manage costs at invoiced prices.

经销商和客户可在客户租户中使用成本管理服务,还可查看订阅的使用成本,其中成本按零售价计算和显示。Resellers and customers can access Cost Management in the customer tenant and view consumption costs for the subscriptions, where costs are computed and shown at retail rates. 但是,他们必须对客户租户中的订阅具有 Azure RBAC 访问权限才能查看成本。However, they must have Azure RBAC access to the subscription in the customer tenant to view costs. 提供商必须为客户租户启用成本可见性策略。The cost visibility policy must be enabled by the provider for the customer tenant.

在 CSP 合作伙伴为其客户启用成本管理功能后,客户即可使用该功能。Customers can use Cost Management features when enabled by their CSP partner.

CSP 合作伙伴可以使用成本管理来实现以下目的:CSP partners use Cost Management to:

  • 了解已开票的成本,并将成本关联到客户、订阅、资源组和服务。Understand invoiced costs and associate the costs to the customer, subscriptions, resource groups, and services.
  • 成本分析中获得 Azure 成本的直观视图,并使用其中的许多功能来按客户、订阅、资源组、资源、计量器、服务及其他许多维度分析成本。Get an intuitive view of Azure costs in cost analysis with capabilities to analyze costs by customer, subscription, resource group, resource, meter, service, and many other dimensions.
  • 在成本分析中查看已应用“合作伙伴赚取的返点”(PEC) 的资源成本。View resource costs that have Partner Earned Credit (PEC) applied in Cost Analysis.
  • 使用编程预算设置通知和自动化,并在成本超出预算时发出警报。Set up notifications and automation using programmatic budgets and alerts when costs exceed budgets.
  • 启用 Azure 资源管理器策略,使客户能够访问成本管理数据。Enable the Azure Resource Manager policy that provides customer access to Cost Management data. 然后,客户可以查看采用即用即付费率的订阅的消耗成本数据。Customers can then view consumption cost data for their subscriptions using pay-as-you-go rates.
  • 将成本和使用情况数据导出到即用即付订阅的存储 Blob。Export their cost and usage data to a storage blob with a pay-as-you-go subscription.

以下示例显示了所有客户的成本。Here's an example showing costs for all customers.

显示所有客户的成本的示例Example showing costs for all customers

以下示例显示了单个客户的成本。Here's an example showing costs for a single customer.

显示单个客户的成本的示例Example showing costs for a single customer

还可以通过 REST API 使用 Azure 成本管理提供的所有功能。All functionality available in Azure Cost Management is also available with REST APIs. 使用 API 可以自动化成本管理任务。Use the APIs to automate cost management tasks.

先决条件Prerequisites

对于合作伙伴而言,Azure 成本管理原生仅适用于 Azure 计划中的订阅。As a partner, Azure Cost Management is natively available only for subscriptions that are on the Azure plan.

若要在 Azure 门户中启用 Azure 成本管理,必须确认客户接受 Microsoft 客户协议(代表客户)并将客户转换到 Azure 计划。To enable Azure Cost Management in the Azure portal, you must have confirmed customer acceptance of the Microsoft Customer Agreement (on behalf of the customer) and transitioned the customer to the Azure Plan. Azure 成本管理中仅提供已转换到 Azure 计划的订阅的成本。Only the costs for subscriptions that are transitioned to the Azure plan are available in Azure Cost Management.

Azure 成本管理要求对计费帐户或订阅拥有读取访问权限。Azure Cost Management requires read access to your billing account or subscription.

有关为计费帐户启用 Azure 成本管理并分配其访问权限的详细信息,请参阅分配用户角色和权限For more information about enabling and assigning access to Azure Cost Management for a billing account, see Assign users roles and permissions. “全局管理员”和“管理员代理”角色可以管理计费帐户的成本。The Global admin and Admin agent roles can manage costs for a billing account.

若要在订阅范围访问 Azure 成本管理,对某个订阅拥有 Azure RBAC 访问权限的任何用户都可查看零售(即用即付)费率的成本。To access Azure Cost Management at the subscription scope, any user with Azure RBAC access to a subscription can view costs at retail (pay-as-you-go) rates. 但是,必须为客户租户启用成本可见性策略However the cost visibility policy for the customer tenant must be enabled. 若要查看受支持帐户类型的完整列表,请参阅了解成本管理数据To view a full list of supported account types, see Understand Cost Management data.

将现有计费协议转移给新的合作伙伴时,成本管理功能仅适用于与该合作伙伴建立的当前计费关系。When transferring existing billing agreements to a new partner, cost management capabilities are only available for the current billing relationship with the partner. 转移给新的合作伙伴之前的历史费用不计入新的计费帐户。Historical costs before the transfer to the new partner don't move to the new billing account. 不过,历史费用记录仍保留在原始的关联计费帐户中。However, the cost history does remain with the original associated billing account.

成本管理如何使用范围How Cost Management uses scopes

你将在特定的范围内管理计费数据、获取特定于付款的角色、查看发票,以及执行常规的帐户管理。Scopes are where you manage billing data, have roles specific to payments, view invoices, and conduct general account management. 对计费和帐户角色的管理独立于用于资源管理的范围(使用 Azure RBAC)的管理。Billing and account roles are managed separately from scopes used for resource management, which use Azure RBAC. 为了明确区分不同范围的意图(包括访问控制的差异),我们分别将其称作计费范围和 Azure RBAC 范围。To clearly distinguish the intent of the separate scopes, including the access control differences, they are referred to as billing scopes and Azure RBAC scopes, respectively.

若要了解计费范围和 RBAC 范围,并了解成本管理如何使用范围,请参阅了解和使用范围To understand billing scopes and Azure RBAC scopes and how cost management works with scopes, see Understand and work with scopes.

使用合作伙伴租户计费范围管理成本Manage costs with partner tenant billing scopes

将客户加入 Microsoft 客户协议后,可在租户中使用以下计费范围。After you've onboarded your customers to a Microsoft Customer Agreement, the following billing scopes are available in your tenant. 在成本管理中使用范围来管理成本。Use the scopes to manage costs in Cost Management.

计费帐户范围Billing account scope

使用计费帐户范围可以查看所有客户和计费配置文件中的税前成本。Use the billing account scope to view pre-tax costs across all your customers and billing profiles. 仅显示 Microsoft 客户协议中客户的基于消耗量的产品的发票成本。Invoice costs are only shown for customer's consumption-based products on the Microsoft Customer Agreement. 但是,会显示 Microsoft 客户协议和 CSP 套餐中客户的基于购买项的产品的发票成本。However, invoice costs are shown for purchased-based products for customers on both the Microsoft Customer Agreement and the CSP offer. 目前,在范围中查看成本的默认货币为美元。Currently, the default currency to view costs in the scope is US dollars. 为范围设置的预算也以美元为货币。Budgets set for the scope are also in USD.

无论使用何种不同的计费货币,合作伙伴都可以使用计费帐户范围以美元为货币来为其各个客户、订阅、资源和资源组设置预算和管理成本。Regardless of different billed currencies, partners use Billing account scope to set budgets and manage costs in USD across their customers, subscriptions, resources, and resource groups.

合作伙伴还可以在成本分析视图中,筛选各个客户的采用特定计费货币的成本。Partners also filter costs in a specific billing currency across customers in the cost analysis view. 选择“实际成本”列表可以查看采用受支持计费货币的成本。Select the Actual cost list to view costs in supported billing currencies.

显示货币的“实际成本”选项的示例

在计费范围中使用摊销成本视图可以查看整个预留期限内的预留实例摊销成本。Use the amortized cost view in billing scopes to view reserved instance amortized costs across a reservation term.

计费配置文件范围Billing profile scope

使用计费配置文件范围可以查看所有客户的、包含在发票中的所有产品和订阅的采用计费货币的税前成本。Use the billing profile scope to view pre-tax costs in the billing currency across all your customers for all products and subscriptions included in an invoice. 可以使用 InvoiceID 筛选器筛选特定发票的计费配置文件中的成本。You can filter costs in a billing profile for a specific invoice using the InvoiceID filter. 该筛选器显示特定发票的消耗和产品购买成本。The filter shows the consumption and product purchase costs for a specific invoice. 还可以筛选发票中特定客户的成本,以查看税前成本。You can also filter the costs for a specific customer on the invoice to see pre-tax costs.

将客户加入 Microsoft 客户协议后,你将收到一份发票,其中包含 Microsoft 客户协议中这些客户的所有产品(消耗、购买和权利)的所有费用。After you onboard customers to a Microsoft Customer Agreement, you receive an invoice that includes all charges for all products (consumption, purchases, and entitlements) for these customers on the Microsoft Customer Agreement. 以相同的货币计费时,这些发票还包含仍在经典 CSP 套餐(而不是在 Azure 计划)中的客户的权利和购买产品(例如 SaaS、Azure 市场和预留项)的费用。When billed in the same currency, these invoices also include the charges for entitlement and purchased products such as SaaS, Azure Marketplace, and reservations for customers who are still in the classic CSP offer no on the Azure plan.

为了帮助根据客户发票核对费用,可以使用计费配置文件范围来查看客户发票的所有累积成本。To help reconcile charges against the customer invoice, the billing profile scope enables you to see all costs that accrue for an invoice for your customers. 与发票一样,该范围将显示新 Microsoft 客户协议中每个客户的成本。Like the invoice, the scope shows costs for every customer in the new Microsoft Customer Agreement. 该范围还显示了仍在当前 CSP 套餐中的客户权利产品的每笔费用。The scope also shows every charge for customer entitlement products still in the current CSP offer.

只有计费配置文件和计费帐户范围才是适合显示权利和基于购买的产品(例如 Azure 市场和预留项购买)费用的范围。The billing profile and billing account scopes are the only applicable scopes that show charges for entitlement and purchase-based products like Azure Marketplace and reservation purchases.

计费配置文件定义发票中包含的订阅。Billing profiles define the subscriptions that are included in an invoice. 计费配置文件在功能上等同于企业协议注册。Billing profiles are the functional equivalent of an enterprise agreement enrollment. 计费配置文件是生成发票的范围。A billing profile is the scope where invoices are generated.

目前,在查看计费配置文件范围中的成本时,计费货币是默认货币。Currently, the billing currency is the default currency when viewing costs in the billing profile scope. 在计费配置文件范围设置的预算采用计费货币。Budgets set at the billing profile scope are in the billing currency.

合作伙伴可以使用范围来核对发票。Partners can use the scope to reconcile to invoices. 此外,他们可以使用范围以计费货币为以下各项设置预算:And, they use the scope to set budgets in the billing currency for the following items:

  • 筛选出的特定发票Specific filtered invoice
  • 客户Customer
  • 订阅Subscription
  • 资源组Resource group
  • 资源Resource
  • Azure 服务Azure service
  • 计量Meter
  • ResellerMPNIDResellerMPNID

客户范围Customer scope

合作伙伴可以使用范围来管理与已加入 Microsoft 客户协议的客户关联的成本。Partners use the scope to manage costs associated to customers that are onboarded to the Microsoft Customer Agreement. 合作伙伴可以使用范围来查看特定客户的采用计费货币的税前成本。The scope allows partners to view pre-tax costs for a specific customer in a billing currency. 还可以筛选特定订阅、资源组或资源的税前成本。You can also filter the pre-tax costs for a specific subscription, resource group, or resource.

客户范围不包括当前 CSP 套餐中的客户。The customer scope doesn't include customers who are on the current CSP offer. 该范围仅包括已签署 Microsoft 客户协议的客户。The scope only includes customers who have a Microsoft Customer Agreement. 应用客户筛选器时,将在计费帐户和计费配置文件范围提供当前 CSP 套餐客户的权利成本,而不提供 Azure 用量。Entitlement costs, not Azure usage, for current CSP offer customers are available at the billing account and billing profile scopes when you apply the customer filter. 在此范围设置的预算采用计费货币。The budgets set at this scope are in the billing currency.

合作伙伴在成本管理中访问计费范围Partner access to billing scopes in Cost Management

只有具有“全局管理员”和“管理员代理”角色的用户才能直接在合作伙伴的 Azure 租户中管理和查看计费帐户、计费配置文件与客户的成本。Only the users with Global admin and Admin agent roles can manage and view costs for billing accounts, billing profiles, and customers directly in the partner's Azure tenant. 有关合作伙伴中心角色的详细信息,请参阅分配用户角色和权限For more information about partner center roles, see Assign users roles and permissions.

为客户租户订阅启用成本管理Enable cost management for customer tenant subscriptions

将客户加入 Microsoft 客户协议后,合作伙伴可以启用对成本管理的访问。Partners may enable access to Cost Management after customers are onboarded to a Microsoft Customer Agreement. 然后,合作伙伴可以启用某个策略,使客户能够查看其按即用即付零售价计算的 Azure 所消耗服务的成本。Then partners can then enable a policy allowing customers to view their costs for Azure consumed services computed at pay-as-you-go retail rates. 将在 Azure RBAC 订阅和资源组范围,以客户的计费货币根据其消耗用量显示成本。Costs are shown in the customer's billing currency for their consumed usage at Azure RBAC subscription and resource groups scopes.

合作伙伴启用成本可见性策略后,可通过 Azure 资源管理器访问订阅的任何用户都可以管理和分析按即用即付费率计算的成本。When the policy for cost visibility is enabled by the partner, any user with Azure Resource Manager access to the subscription can manage and analyze costs at pay-as-you-go rates. 对 Azure 订阅拥有相应 Azure RBAC 访问权限的经销商和客户实际上可以查看成本。Effectively, resellers and customers that have the appropriate Azure RBAC access to the Azure subscriptions can view cost.

无论采用哪种策略,只要提供商的全局管理员和管理员代理具有对订阅和资源组的访问权限,他们就可以查看订阅成本。Regardless of the policy, global admins and admin agents of the provider can view subscription costs if they have access to the subscription and resource group.

启用查看 Azure 使用费的策略Enable the policy to view Azure usage charges

你需要是“管理员代理”组的成员才能查看和更新策略。You need to be a member of the admin agent group to view and update the policy. 使用以下信息来启用允许客户查看 Azure 使用费的策略。Use the following information to enable the policy allowing customers to view Azure usage charges.

在 Azure 门户中登录到合作伙伴租户,然后选择“成本管理 + 计费”。In the Azure portal, sign in to the partner tenant and select Cost Management + Billing. 在计费范围区域中选择相关计费范围,然后选择“客户”。Select the relevant billing scope in the Billing Scope area, and then select Customers. 客户列表与计费帐户相关联。The list of customers is associated with the billing account. 如果错误地登录到客户租户,则不会看到客户列表。If you mistakenly sign in to the customer tenant, you won't see the Customers list.

在客户列表中,选择要允许其查看成本的客户。In the list of customers, select the customer that you want to allow to view costs.

在成本管理中选择客户Select customers in Cost Management

在“设置”下,选择“策略”。Under Settings, select Policies.

将显示与所选客户的订阅相关联的“Azure 用量”费用的当前成本可见性策略。The current cost visibility policy is shown for Azure Usage charges associated to the subscriptions for the selected customer. 允许客户查看即用即付费用的策略Policy to allow customers to view pay-as-you-go charges

将策略设置为“否”时,与该客户关联的订阅用户无法使用 Azure 成本管理。When the policy is set to No, Azure Cost Management isn't available for subscription users associated to the customer. 除非已由合作伙伴启用,否则默认会对所有订阅用户禁用成本可见性策略。Unless enabled by a partner, the cost visibility policy is disabled by default for all subscription users.

将成本策略设置为“是”时,与客户租户关联的订阅用户可以查看按即用即付费率计算的使用费。When the cost policy is set to Yes, subscription users associated to the customer tenant can see usage charges at pay-as-you go rates.

启用成本可见性策略后,具有订阅用量的所有服务都会显示按即用即付费率计算的成本。When the cost visibility policy is enabled, all services that have subscription usage show costs at pay-as-you-go rates. 对于实际和摊销成本,预留用量会显示零费用。Reservation usage appears with zero charges for actual and amortized costs. 购买项和权利不与特定的订阅相关联。Purchases and entitlements are not associated to a specific subscription. 因此,不会在订阅范围显示购买项。So, purchases aren't displayed at the subscription scope. 直接合作伙伴或间接提供商的全局管理员/管理员代理还可以使用更新客户 API,以大规模设置每个客户的成本可见性策略。The global admin/admin agent of a direct partner or an indirect provider can also use the Update Customer API to set each customer's cost visibility policy at scale.

查看客户租户中的订阅成本View subscription costs in the customer tenant

若要查看订阅成本,请在客户的 Azure 租户中打开“成本管理 + 计费”。To view costs for a subscription, open Cost Management + Billing in the customer's Azure tenant. 选择“成本分析”所需订阅,开始查看成本。Select Cost analysis the required subscription to start reviewing costs. 可在客户租户中单独查看每个订阅的消耗成本。You can view consumption costs for each subscription individually in the customer tenant.

以客户身份查看成本分析View cost analysis as a customer

将以基于即用即付费率的成本,提供订阅和资源组 Azure RBAC 范围的成本分析、预算和警报。Cost analysis, budgets, and alerts are available for the subscription and resource group Azure RBAC scopes at pay-as-you-go rate-based costs.

Azure RBAC 范围内的预留实例的摊销视图和实际成本将显示零费用。Amortized views and actual costs for reserved instances in the Azure RBAC scopes show zero charges. 权利的购买成本(如预留实例和市场费用)仅显示在进行购买的合作伙伴租户的计费范围内。Purchase costs for entitlements such as Reserved instances and Marketplace fees are only shown in billing scopes in the partner's tenant where the purchases were made.

用于计算视图中显示的成本的零售价与适用于所有客户的 Azure 定价计算器中显示的价格相同。The retail rates used to compute costs shown in the view are the same prices shown in the Azure Pricing Calculator for all customers. 显示的成本不包括合作伙伴可能具有的任何折扣或额度,例如“合作伙伴赚取的额度”、“分级折扣”和“全局服务折扣”。Costs shown don't include any discounts or credits that the partner may have like Partner Earned Credits, Tier Discounts, and Global Service discounts.

在成本分析中分析成本Analyze costs in cost analysis

有权访问合作伙伴租户中的计费范围的合作伙伴可以在不同客户的成本分析中,浏览和分析特定客户或发票的开票成本。Partners with access to billing scopes in the partner tenant can explore and analyze invoiced costs in cost analysis across customers for a specific customer or for an invoice. 成本分析视图中,还可以保存视图,以及将数据导出到 CSV 和 PNG 文件In the cost analysis view, you can also save views and export data to CSV and PNG files.

有权访问客户租户中的订阅的 Azure RBAC 用户还可分析该客户租户中的订阅的零售成本、保存视图,并可将数据导出到 CSV 和 PNG 文件。Azure RBAC users with access to the subscription in the customer tenant can also analyze retail costs for subscriptions in the customer tenant, save views, and export data to CSV and PNG files.

可以使用成本分析中的筛选和分组依据功能来按多个字段分析成本。You can use filter and group by features in cost analysis to analyze costs by multiple fields. 下一部分将介绍特定于合作伙伴的字段。Partner-specific fields are shown in the next section.

数据字段Data fields

在使用情况详细信息文件和成本管理 API 中可以找到以下数据字段。The following data fields are found in usage detail files and Cost Management APIs. 在适用的情况下,会显示合作伙伴中心内的同等信息。Where available, Partner Center equivalent information is shown. 对于下面以粗体显示的字段,合作伙伴可以使用成本分析中的筛选和分组依据功能来按多个字段分析成本。For the following bold fields, partners can use filter and group by features in cost analysis to analyze costs by multiple fields. 以粗体显示的字段仅适用于合作伙伴支持的 Microsoft 客户协议。Bold fields apply only to Microsoft Customer Agreements supported by partners.

字段名称Field name 说明Description 合作伙伴中心内的同等信息Partner Center equivalent
invoiceIdinvoiceId 特定交易的发票上显示的发票 ID。Invoice ID shown on the invoice for the specific transaction. 显示交易的发票编号。Invoice number where the transaction is shown.
previousInvoiceIDpreviousInvoiceID 有退款(负成本)时对原始发票的引用。Reference to an original invoice there is a refund (negative cost). 仅当有退款时才填充。Populated only when there is a refund. 空值N/A
billingAccountNamebillingAccountName 表示合作伙伴的计费帐户的名称。Name of the billing account representing the partner. 其中累积了已加入 Microsoft 客户协议的客户,以及已购买 SaaS、Azure 市场和预留项等权利的 CSP 客户的成本。It accrues all costs across the customers who have onboarded to a Microsoft customer agreement and the CSP customers that have made entitlement purchases like SaaS, Azure Marketplace, and reservations. 空值N/A
billingAccountIDbillingAccountID 表示合作伙伴的计费帐户的标识符。Identifier for the billing account representing the partner. MCAPI 合作伙伴商业根 ID。MCAPI Partner Commerce Root ID. 在请求中使用,但不包含在响应中。Used in a request, but not included in a response.
billingProfileIDbillingProfileID 以一种计费货币将已加入 Microsoft 客户协议的客户,以及已购买 SaaS、Azure 市场和预留项等权利的 CSP 客户的成本分组到不同发票的计费配置文件的标识符。Identifier for the billing profile that groups costs across invoices in a single billing currency across the customers who have onboarded to a Microsoft customer agreement and the CSP customers that have made entitlement purchases like SaaS, Azure Marketplace, and reservations. MCAPI 合作伙伴计费组 ID。MCAPI Partner Billing Group ID. 在请求中使用,但不包含在响应中。Used in a request, but not included in a response.
billingProfileNamebillingProfileName 以一种计费货币将已加入 Microsoft 客户协议的客户,以及已购买 SaaS、Azure 市场和预留项等权利的 CSP 客户的成本分组到不同发票的计费配置文件的名称。Name of the billing profile that groups costs across invoices in a single billing currency across the customers who have onboarded to a Microsoft customer agreement and the CSP customers that have made entitlement purchases like SaaS, Azure Marketplace, and reservations. 空值N/A
invoiceSectionNameinvoiceSectionName 在发票中计费的项目的名称。Name of the project that is being charged in the invoice. 不适用于合作伙伴加入的 Microsoft 客户协议。Not applicable for Microsoft Customer Agreements onboarded by partners. 空值N/A
invoiceSectionIDinvoiceSectionID 在发票中计费的项目的标识符。Identifier of the project that is being charged in the invoice. 不适用于合作伙伴加入的 Microsoft 客户协议。Not applicable for Microsoft Customer Agreements onboarded by partners. 空值N/A
CustomerTenantIDCustomerTenantID 客户订阅的 Azure Active Directory 租户的标识符。Identifier of the Azure Active Directory tenant of the customer's subscription. 客户的组织 ID - 客户的 Azure Active Directory TenantID。Customer's organizational ID - the customer's Azure Active Directory TenantID.
CustomerNameCustomerName 客户订阅的 Azure Active Directory 租户的名称。Name of the Azure Active Directory tenant for the customer's subscription. 合作伙伴中心内显示的客户组织名称。Customer's organization name, as shown in the Partner Center. 根据系统信息核对发票时,此字段非常重要。Important for reconciling the invoice with your system information.
CustomerTenantDomainNameCustomerTenantDomainName 客户订阅的 Azure Active Directory 租户的域名。Domain name for the Azure Active Directory tenant of the customer's subscription. 客户的 Azure Active Directory 租户域。Customer Azure Active Directory tenant domain.
PartnerTenantIDPartnerTenantID 合作伙伴的 Azure Active Directory 租户的标识符。Identifier for the partner's Azure Active Directory tenant. 合作伙伴的 Azure Active Directory 租户 ID,称作“合作伙伴 ID”,采用 GUID 格式。Partner Azure Active Directory Tenant ID called as Partner ID, in GUID format.
PartnerNamePartnerName 合作伙伴 Azure Active Directory 租户的名称。Name of the partner Azure Active Directory tenant. 合作伙伴名称。Partner name.
ResellerMPNIDResellerMPNID 与订阅关联的经销商的 MPNID。MPNID for the reseller associated with the subscription. 订阅记录中的经销商的 MPN ID。MPN ID of the reseller on record for the subscription. 不适用于当前活动。Not available for current activity.
costCentercostCenter 与订阅关联的成本中心。Cost center associated to the subscription. 空值N/A
billingPeriodStartDatebillingPeriodStartDate 发票中显示的计费周期开始日期。Billing period start date, as shown on the invoice. 空值N/A
billingPeriodEndDatebillingPeriodEndDate 发票中显示的计费周期结束日期。Billing period end date, as shown on the invoice. 空值N/A
servicePeriodStartDateservicePeriodStartDate 为服务用量分级费用时分级时段的开始日期。Start date for the rating period when the service usage was rated for charges. 将根据分级时段确定 Azure 服务的价格。The prices for Azure services are determined for the rating period. 合作伙伴中心内的 ChargeStartDate。ChargeStartDate in Partner Center.  计费周期的开始日期,不包括上一个计费周期内的之前未付款的潜在使用数据的显示日期。Billing cycle start date, except when presenting dates of previously uncharged latent usage data from a previous billing cycle. 该时间始终为一天的起点时间,即 0:00。The time is always the beginning of the day, 0:00.
servicePeriodEndDateservicePeriodEndDate 为服务用量分级费用时的时段结束日期。End date for the period when the service usage was rated for charges. 将根据分级时段确定 Azure 服务的价格。The prices for Azure services are determined based on the rating period. 空值N/A
datedate 对于 Azure 消耗数据,会显示分级用量的日期。For Azure consumption data, it shows date of usage as rated. 对于预留实例,会显示购买日期。For reserved instance, it shows the purchased date. 对于重复性费用和一次性费用(例如市场和支持服务),会显示购买日期。For recurring charges and one-time charges such as Marketplace and support, it shows the purchase date. 空值N/A
productIDproductID 已按消耗或购买量累积了费用的产品的标识符。Identifier for the product that has accrued charges by consumption or purchase. 它是合作伙伴中心内显示的 productID 和 SKuID 的串联键。It is the concatenated key of productID and SKuID, as shown in the Partner Center. 产品的 ID。The ID of the product.
productproduct 在发票中显示的已按消耗或购买量累积了费用的产品的名称。Name of the product that has accrued charges by consumption or purchase, as shown on the invoice. 目录中的产品名称。The product name in the catalog.
serviceFamilyserviceFamily 显示购买或收费的产品的服务系列。Shows the service family for the product purchased or charged. 例如“存储”或“计算”。For example, Storage or Compute. 空值N/A
productOrderIDproductOrderID 订阅所属的资产或 Azure 计划名称的标识符。The identifier of the asset or Azure plan name that the subscription belongs to. 例如“Azure 计划”。For example, Azure Plan. CommerceSubscriptionIDCommerceSubscriptionID
productOrderNameproductOrderName 订阅所属的 Azure 计划的名称。The name of the Azure plan that the subscription belongs to. 例如“Azure 计划”。For example, Azure Plan. 空值N/A
consumedServiceconsumedService 旧版 EA 使用情况详细信息中使用的消耗服务(旧式分类)。Consumed service (legacy taxonomy) as used in legacy EA usage details. 合作伙伴中心内显示的服务。Service shown in the Partner Center. 例如 Microsoft.Storage、Microsoft.Compute 和 microsoft.operationalinsights。For example, Microsoft.Storage, Microsoft.Compute, and microsoft.operationalinsights.
meterIDmeterID 度量的消耗项的计量标识符。Metered identifier for measured consumption. 所用计量器的 ID。The ID of the used meter.
meterNamemeterName 标识度量消耗项的计量器名称。Identifies the name of the meter for measured consumption. 所用计量器的名称。The name of the consumed meter.
meterCategorymeterCategory 标识用量对应的顶级服务。Identifies the top-level service for usage. 用量对应的顶级服务。The top-level service for the usage.
meterSubCategorymeterSubCategory 定义可能影响费率的 Azure 服务的类型或子类别。Defines the type or subcategory of Azure service that can affect the rate. 可能影响费率的 Azure 服务的类型。The type of Azure service that can affect the rate.
meterRegionmeterRegion 指明某些服务的数据中心的位置,这些服务根据数据中心位置进行定价。Identifies the location of the datacenter for certain services that are priced based on datacenter location. 服务数据中心的区域位置(如果适用且已填充)。The regional location of a data center for services, where applicable and populated.
订阅 IDsubscription ID Microsoft 为 Azure 订阅生成的唯一标识符。Unique Microsoft generated identifier for the Azure subscription. EntitlementIDEntitlementID
subscriptionNamesubscriptionName Azure 订阅的名称。Name of the Azure subscription. 空值N/A
术语Term 显示套餐的有效期限。Displays the term for the validity of the offer. 例如,预留实例显示 12 个月表示一年的期限。For example, reserved instances show 12 months of a yearly term of the reserved instance. 对于 SaaS、Azure 市场和支持服务的一次性购买或重复性购买,期限会显示一个月。For one-time purchases or recurring purchases, the term displays one month for SaaS, Azure Marketplace, and support. 不适用于 Azure 消耗计划。Not applicable for Azure consumption. 空值N/A
publisherType(firstParty、thirdPartyReseller、thirdPartyAgency)publisherType (firstParty, thirdPartyReseller, thirdPartyAgency) 发布者的类型,将发布者标识为第一方、第三方经销商或第三方代理商。Type of publisher that identifies the publisher as first party, third-party reseller, or third-party agency. 空值N/A
partNumberpartNumber 未使用的预留实例和 Azure 市场服务的部件号。Part number for the unused reserved instance and Azure Marketplace services. 空值N/A
publisherNamepublisherName 服务发布者(包括 Microsoft 或第三方发布者)的名称。Name of the publisher of the service including Microsoft or third-party publishers. 产品发布者的名称。The name of the product's publisher.
reservationIdreservationId 预留实例购买项的标识符。Identifier for the reserved instance purchase. 空值N/A
reservationNamereservationName 预留实例的名称。Name of the reserved instance. 空值N/A
reservationOrderIdreservationOrderId 预留实例的 OrderID。OrderID for the reserved instance. 空值N/A
频率frequency 预留实例的付款频率。Payment frequency for a reserved instance. 空值N/A
resourceGroupresourceGroup 用于生命周期资源管理的 Azure 资源组的名称。Name of the Azure resource group used for lifecycle resource management. 资源组的名称。Name of the resource group.
instanceID 或 ResourceIDinstanceID (or) ResourceID 资源实例的标识符。Identifier of the resource instance. 显示为包含完整资源属性的 ResourceURI。Shown as a ResourceURI that includes complete resource properties.
resourceLocationresourceLocation 资源位置的名称。Name of the resource location. 资源的位置。The location of the resource.
位置Location 资源的规范化位置。Normalized location of the resource. 空值N/A
effectivePriceeffectivePrice 服务的有效单价,采用定价货币。The effective unit price of the service, in pricing currency. 每个产品、服务系列、计量器和套餐采用唯一的单价。Unique for a product, service family, meter, and offer. 与计费帐户的价目表中的定价配合使用。Used with pricing in the price sheet for the billing account. 如果存在分层定价或包含的数量,则会显示混合使用价格。When there is tiered pricing or an included quantity, it shows the blended price for consumption. 调整后的单价。The unit price after adjustments are made.
数量Quantity 购买或消耗的度量数量。Measured quantity purchased or consumed. 计费周期内使用的计量器数量。The amount of the meter used during the billing period. 单位数量。Number of units. 请确保它与对帐期间计费系统中的信息相匹配。Ensure it matches the information in your billing system during reconciliation.
unitOfMeasureunitOfMeasure 指明服务的计价单位。Identifies the unit that the service is charged in. 例如,GB 和小时。For example, GB and hours. 指明服务的计价单位。Identifies the unit that the service is charged in. 例如,GB、小时和 10,000 秒。For example, GB, hours, and 10,000 s.
pricingCurrencypricingCurrency 定义单价的货币。The currency defining the unit price. 价目表中的货币。The currency in the price list.
billingCurrencybillingCurrency 定义计费成本的货币。The currency defining the billed cost. 定义为发票上的计费货币的货币。The currency defined as the billed currency on the invoice.
chargeTypechargeType 定义成本在 Azure 成本管理中所代表的费用类型,例如购买和退款。Defines the type of charge that the cost represents in Azure Cost Management like purchase and refund. 费用或调整的类型。The type of charge or adjustment. 不适用于当前活动。Not available for current activity.
costinBillingCurrencycostinBillingCurrency 采用计费货币的 ExtendedCost 或混合税前成本。ExtendedCost or blended cost before tax in the billed currency. 空值N/A
costinPricingCurrencycostinPricingCurrency 与价格关联的采用定价货币的 ExtendedCost 或混合税前成本。ExtendedCost or blended cost before tax in pricing currency to correlate with prices. 空值N/A
costinUSDcostinUSD 以美元为货币的估算 ExtendedCost 或混合税前成本。Estimated ExtendedCost or blended cost before tax in USD. 空值N/A
paygCostInBillingCurrencypaygCostInBillingCurrency 定价为零售价时显示成本。Shows costs if pricing is in retail prices. 以计费货币显示即用即付价格。Shows pay-as-you-go prices in the billing currency. 仅在 Azure RBAC 范围适用。Available only at Azure RBAC scopes. 空值N/A
paygCostInUSDpaygCostInUSD 定价为零售价时显示成本。Shows costs if pricing is in retail prices. 以美元为货币显示即用即付价格。Shows pay-as-you-go prices in USD. 仅在 Azure RBAC 范围适用。Available only at Azure RBAC scopes. 空值N/A
exchangeRateexchangeRate 从定价货币转换为计费货币时使用的汇率。Exchange rate used to convert from the pricing currency to the billing currency. 在合作伙伴中心内称为 PCToBCExchangeRate。Referred to as PCToBCExchangeRate in the Partner Center. 定价货币兑换为计费货币的汇率。The pricing currency to billing currency exchange rate.
exchangeRateDateexchangeRateDate 从定价货币转换为计费货币时使用的汇率的日期。The date for the exchange rate that's used to convert from the pricing currency to the billing currency. 在合作伙伴中心内称为 PCToBCExchangeRateDat。Referred to as PCToBCExchangeRateDat in the Partner Center. 定价货币兑换为计费货币的汇率日期。The pricing currency to billing currency exchange rate date.
isAzureCreditEligibleisAzureCreditEligible 指示该成本是否适合以 Azure 额度付款。Indicates whether the cost is eligible for payment by Azure credits. 空值N/A
serviceInfo1serviceInfo1 旧字段,用于捕获可选的服务特定元数据。Legacy field that captures optional service-specific metadata. 内部 Azure 服务元数据。Internal Azure service metadata.
serviceInfo2serviceInfo2 旧字段,用于捕获可选的服务特定元数据。Legacy field that captures optional service-specific metadata. 服务信息。Service information. 例如,虚拟机的映像类型和 ExpressRoute 的 ISP 名称。For example, an image type for a virtual machine and ISP name for ExpressRoute.
additionalInfoadditionalInfo 服务特定的元数据。Service-specific metadata. 例如,虚拟机的映像类型。For example, an image type for a virtual machine. 其他列中未包括的任何其他信息。Any additional information not covered in other columns. 特定于服务的元数据。The service-specific metadata. 例如,虚拟机的映像类型。For example, an image type for a virtual machine.
标记tags 分配给计量器的标记。Tag that you assign to the meter. 使用标记对计费记录进行分组。Use tags to group billing records. 例如,可以使用标记按使用测定仪的部门分配费用。For example, you can use tags to distribute costs by the department that uses the meter. 客户添加的标记。Tags added by the customer.
partnerEarnedCreditRatepartnerEarnedCreditRate 存在基于合作伙伴管理员链接访问的合作伙伴赚取的返点 (PEC) 时应用的折扣率。Rate of discount applied if there is a partner earned credit (PEC) based on partner admin link access. 合作伙伴赚取的返点 (PEC) 率。The rate of partner earned credit (PEC). 例如 0% 或 15%。For example, 0% or 15%.
partnerEarnedCreditAppliedpartnerEarnedCreditApplied 指示是否已应用合作伙伴赚取的返点。Indicates whether the partner earned credit has been applied. 空值N/A

查看合作伙伴赚取的返点 (PEC) 资源成本View Partner Earned Credit (PEC) resource costs

在 Azure 成本管理中,合作伙伴可以使用成本分析来查看收到了 PEC 权益的成本。In Azure Cost Management, partners can use cost analysis to view costs that received the PEC benefits.

在 Azure 门户中登录到合作伙伴租户,并选择“成本管理 + 计费”。In the Azure portal, sign in to the partner tenant and select Cost Management + Billing. 在“成本管理”下,选择“成本分析”。Under Cost Management, select Cost analysis.

成本分析视图将显示合作伙伴计费帐户的成本。The Cost analysis view shows costs of the billing account for the partner. 根据需要选择合作伙伴、特定客户或计费配置文件的“范围”来核对发票。Select the Scope as needed for the partner, a specific customer, or a billing profile to reconcile invoices.

在圆环图中选择下拉列表,然后选择“PartnerEarnedCreditApplied”钻取到 PEC 成本。In a donut chart, select the drop-down list and select PartnerEarnedCreditApplied to drill into PEC costs.

演示如何查看合作伙伴赚取的返点的示例

如果 PartnerEarnedCreditApplied 属性为 True,则关联的成本将提供合作伙伴赚取的权益的管理访问权限。When the PartnerEarnedCreditApplied property is True, the associated cost has the benefit of the partner earned admin access.

如果 PartnerEarnedCreditApplied 属性为 False,则关联的成本不符合所需的返点条件。When the PartnerEarnedCreditApplied property is False, the associated cost hasn't met the required eligibility for the credit. 或者,购买的服务不符合合作伙伴赚取的返点的条件。Or, the service purchased isn't eligible for partner earned credit.

服务使用情况数据通常需要在 8-24 小时后才显示在成本管理中。Service usage data normally takes 8-24 hours to appear in Cost Management. 有关详细信息,请参阅成本和使用情况数据的更新和保留For more information, see Cost and usage data updates and retention. 从访问时间开始算起的 48 小时内,PEC 返点将显示在 Azure 成本管理中。PEC credits appear within 48 hours from time of access in Azure Cost Management.

还可以使用“分组依据”选项,按 PartnerEarnedCreditApplied 属性进行分组和筛选。You can also group and filter by the PartnerEarnedCreditApplied property using the Group by options. 使用这些选项可以检查包含和不包含 PEC 的成本。Use the options to examine costs that do and don't have PEC.

按合作伙伴赚取的返点进行分组或筛选

将成本数据导出到 Azure 存储Export cost data to Azure Storage

有权访问合作伙伴租户中的计费范围的合作伙伴可将其成本和使用情况数据导出到 Azure 存储 Blob。Partners with access to billing scopes in a partner tenant can export their cost and usage data to an Azure Storage blob. 该 Blob 必须位于合作伙伴租户的某个订阅中,且该订阅不是共享的服务订阅或客户的订阅。The blob must be on a subscription in the partner tenant that's not a shared service subscription or a customer’s subscription. 若要启用成本数据导出,我们建议在合作伙伴租户中设置一个独立的即用即付订阅来托管导出的成本数据。To enable cost data export, we recommended that you set up an independent pay-as-you-go subscription in the partner tenant to host the exported cost data. 导出存储帐户将在即用即付订阅中托管的 Azure 存储 Blob 上创建。The export storage account is created on the Azure Storage blob hosted in the pay-as-you-go subscription. 根据伙伴创建导出时所在的范围,会定期自动将关联的数据导出到存储帐户。Based on the scope where the partner creates the export, the associated data is exported to the storage account automatically on a recurring basis.

对订阅拥有 Azure RBAC 访问权限的用户还可将成本数据导出到客户租户的任何订阅中托管的 Azure 存储 Blob。Users with Azure RBAC access to the subscription can also export the cost data to an Azure storage blob hosted in any subscription in the customer tenant.

在合作伙伴租户或客户租户中创建导出Create an export in a partner tenant or customer tenant

在 Azure 门户中登录到合作伙伴租户或客户租户,并选择“成本管理 + 计费”。In the Azure portal, sign in to the partner tenant or customer tenant and select Cost Management + Billing. 选择适当的范围(例如 Microsoft 合作伙伴协议计费帐户),然后选择“成本分析”。Select an appropriate scope, for example a Microsoft Partner Agreement billing account, and then select Cost Analysis. 加载页面后,选择“导出”。When the page loads, select Export. 选择“计划导出”下的“查看所有导出”。Select View all exports under Schedule Export.

选择“导出”和“查看所有导出”

接下来,选择“添加”并键入名称,然后选择导出类型。Next, select Add and type the name and select an export type. 选择“存储”选项卡并输入所需的信息。Select the Storage tab and enter required information.

添加新导出并选择“存储”选项卡

在合作伙伴租户中创建导出时,请选择合作伙伴租户中的即用即付订阅。When you create an export in the partner tenant, select the pay-as-you-go subscription in the partner tenant. 使用该订阅创建 Azure 存储帐户。Create an Azure Storage account using that subscription.

对于客户租户中的 Azure RBAC 用户,请选择客户租户中的订阅。For Azure RBAC users in the customer tenant, select a subscription in the customer tenant. 使用该订阅创建 Azure 存储帐户。Create an Azure Storage account using the subscription.

查看内容,然后选择“创建”以计划导出。Review the content and then select Create to schedule an export.

若要验证导出列表中的数据,请选择存储帐户名称。To verify data in the export list, select the storage account name. 在存储帐户页上选择“容器”,然后选择容器。On the storage account page, select Containers and then select the container. 导航到相应的文件夹,并选择 CSV 文件。Navigate to the corresponding folder and select the CSV file. 选择“下载”以获取 CSV 文件并将其打开。Select Download to get the CSV file and open it. 导出的数据类似于 Azure 门户中的成本数据和使用情况详细信息。The exported data exported resembles cost data similar to usage details from the Azure portal.

导出数据的示例

成本管理 REST APICost Management REST APIs

合作伙伴和客户可以使用以下部分中所述的成本管理 API 来完成常见任务。Partners and customers can use Cost Management APIs described in the following sections for common tasks.

Azure 成本管理 API - 直接和间接提供程序Azure Cost Management APIs - Direct and indirect providers

有权访问合作伙伴租户中的计费范围的合作伙伴可以使用以下 API 来查看开票成本。Partners with access to billing scopes in a partner tenant can use the following APIs to view invoiced costs.

如果合作伙伴有权访问订阅,则无论成本策略是什么,他们都可以调用订阅范围的 API。APIs at the subscription scope can be called by a partner regardless of the cost policy if they have access to the subscription. 有权访问订阅的其他用户(例如客户或经销商)只有在合作伙伴为客户租户启用了成本策略之后,才能调用 API。Other users with access to the subscription, like the customer or reseller, can call the APIs only after the partner enables the cost policy for the customer tenant.

获取计费帐户的列表To get a list of billing accounts

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts?api-version=2019-10-01-preview

获取客户的列表To get a list of customers

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers?api-version=2019-10-01-preview

获取订阅的列表To get a list of subscriptions

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingSubscriptions?api-version=2019-10-01-preview

获取一段时间的发票列表To get a list of invoices for a period of time

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices?api-version=2019-10-01-preview&periodStartDate={periodStartDate}&periodEndDate={periodEndDate}

API 调用将返回发票数组,其中包含类似于以下 JSON 代码的元素。The API call returns an array of invoices that has elements similar to the following JSON code.

    {
      "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountID}/billingProfiles/{BillingProfileID}/invoices/{InvoiceID}",
      "name": "{InvoiceID}",
      "properties": {
        "amountDue": {
          "currency": "USD",
          "value": x.xx
        },
        ...
    }

使用前面返回的 ID 字段值,并在以下示例中将它替换为范围,以查询使用情况详细信息。Use the preceding returned ID field value and replace it in the following example as the scope to query for usage details.

GET https://management.azure.com/{id}/providers/Microsoft.Consumption/UsageDetails?api-version=2019-10-01

该示例返回与特定发票关联的使用情况记录。The example returns the usage records associated with the specific invoice.

获取客户的策略以查看成本To get the policy for customers to view costs

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerID}/policies/default?api-version=2019-10-01-preview

设置客户的策略以查看成本To set the policy for customers to view costs

PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerID}/policies/default?api-version=2019-10-01-preview

获取计费帐户的 Azure 服务使用情况To get Azure service usage for a billing account

GET https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/providers/Microsoft.Consumption/usageDetails?api-version=2019-10-01

下载客户的 Azure 服务使用情况To download a customer's Azure service usage

以下 get 调用是一个异步操作。The following get call is an asynchronous operation.

GET https://management.azure.com/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerID}/providers/Microsoft.Consumption/usageDetails/download?api-version=2019-10-01 -verbose

调用响应中返回的 Location URI 来检查操作状态。Call the Location URI returned in the response to check the operation status. 当状态为 Completed 时,downloadUrl 属性将包含可用于下载生成的报表的链接。When the status is Completed, the downloadUrl property contains a link that you can use to download the generated report.

获取或下载所用 Azure 服务的价目表To get or download the price sheet for consumed Azure services

首先使用以下 post 调用。First, use the following post.

POST https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/billingProfiles/{billingProfileID}/pricesheet/default/download?api-version=2019-10-01-preview&format=csv" -verbose

然后调用异步操作属性值。Then, call the asynchronous operation property value. 例如:For example:

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileID}/pricesheetDownloadOperations/{operation}?sessiontoken=0:11186&api-version=2019-10-01-preview

以上 get 调用返回包含价目表的下载链接。The preceding get call returns the download link containing the price sheet.

获取聚合成本To get aggregated costs

POST https://management.azure.com/providers/microsoft.billing/billingAccounts/{billingAccountName}/providers/microsoft.costmanagement/query?api-version=2019-10-01

为合作伙伴创建预算Create a budget for a partner

PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/providers/Microsoft.CostManagement/budgets/partnerworkshopbudget?api-version=2019-10-01

为客户创建预算Create a budget for a customer

PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/customers/{customerID}/providers/Microsoft.Consumption/budgets/{budgetName}?api-version=2019-10-01

删除预算Delete a budget

DELETE
https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/budgets/{budgetName}?api-version=2019-10-01

后续步骤Next steps