Azure Stack 中的使用情况和计费Usage and billing in Azure Stack

本文介绍了如何根据资源使用情况对 Azure Stack 用户进行计费,以及如何访问计费信息以进行分析和退款。This article describes how Azure Stack users are billed for resource usage, and how the billing information is accessed for analytics and charge back.

Azure Stack 收集已使用资源的使用情况数据并对其进行分组。Azure Stack collects and groups usage data for resources that are used. 然后 Azure Stack 将此数据转发到 Azure Commerce。Then Azure Stack forwards this data to Azure Commerce. Azure Commerce 计收 Azure Stack 使用费的方式与计收 Azure 使用费相同。Azure Commerce bills you for Azure Stack usage in the same way it bills you for Azure usage.

也可以使用计费适配器来获取使用情况数据并将其导出到自己的计费或退款系统,或者导出到商业智能工具(例如 Power BI)。You can also get usage data and export it to your own billing or charge back system by using a billing adapter, or export it to a business intelligence tool such as Power BI.

使用情况管道Usage pipeline

Azure Stack 中的每个资源提供程序会根据资源使用情况发布使用情况数据。Each resource provider in Azure Stack posts usage data per resource usage. 使用情况服务定期(每小时或每天)聚合使用情况数据并将其存储在使用情况数据库中。The usage service periodically (hourly and daily) aggregates usage data and stores it in the usage database. Azure Stack 操作员和用户可以通过 Azure Stack 资源使用情况 API 来访问存储的使用情况数据。Azure Stack operators and users can access the stored usage data through the Azure Stack resource usage APIs.

如果已将 Azure Stack 实例注册到 Azure,则 Azure Stack 会配置为将使用情况数据发送到 Azure Commerce。If you have Registered your Azure Stack instance with Azure, Azure Stack is configured to send the usage data to Azure Commerce. 将数据上传到 Azure 后,可以通过计费门户或使用 Azure 资源使用情况 API 访问该数据。After the data is uploaded to Azure, you can access it through the billing portal or by using Azure resource usage APIs. 若要详细了解哪些使用情况数据会报告到 Azure,请参阅使用情况数据报告For more information about what usage data is reported to Azure, see Usage data reporting.

下图显示了使用情况管道中的关键组件:The following image shows the key components in the usage pipeline:


可以找到哪些使用情况信息,如何查找?What usage information can I find, and how?

Azure Stack 资源提供程序(例如计算、存储和网络)每隔一小时为每个订阅生成使用情况数据。Azure Stack resource providers (such as Compute, Storage, and Network) generate usage data at hourly intervals for each subscription. 使用情况数据包含有关所用资源的信息,例如资源名称、所用订阅和所用数量。The usage data contains information about the resource used, such as resource name, subscription used, and quantity used. 若要了解计量的 ID 资源,请参阅使用情况 API 常见问题解答To learn about the meters' ID resources, see the Usage API FAQ.

在收集使用情况数据后,它将报告给 Azure来生成帐单,可以通过 Azure 计费门户查看账单。After the usage data has been collected, it is reported to Azure to generate a bill, which can be viewed through the Azure billing portal.


对于 Azure Stack 开发工具包 (ASDK) 和在容量模型下许可的 Azure Stack 集成系统用户,不需要进行使用情况数据报告。Usage data reporting is not required for the Azure Stack Development Kit (ASDK) and for Azure Stack integrated system users who license under the capacity model.

Azure 计费门户显示应计费资源的使用情况数据。The Azure billing portal shows usage data for the chargeable resources. 除了应计费资源之外,Azure Stack 还会捕获更广范围内资源的使用情况数据,可以通过 REST API 或 PowerShell cmdlet 在 Azure Stack 环境中访问这些数据。In addition to the chargeable resources, Azure Stack captures usage data for a broader set of resources, which you can access in your Azure Stack environment through REST APIs or PowerShell cmdlets. Azure Stack 操作员可以获取所有用户订阅的使用情况数据。Azure Stack operators can get the usage data for all user subscriptions. 单个用户只能获取自己的详细使用情况。Individual users can only get their own usage details.

多租户云服务提供商的使用情况报告Usage reporting for multitenant Cloud Service Providers

有许多 Azure Stack 客户的多租户云服务提供商 (CSP) 可以单独报告每个客户的使用情况,以便向不同的 Azure 订阅收取使用费。A multi-tenant Cloud Service Provider (CSP) who has many customers using Azure Stack may want to report each customer usage separately, so that the provider can charge usage to different Azure subscriptions.

每个客户将会获得一个按不同 Azure Active Directory (Azure AD) 租户表示的标识。Each customer has their identity represented by a different Azure Active Directory (Azure AD) tenant. Azure Stack 支持向每个 Azure AD 租户分配一个 CSP 订阅。Azure Stack supports assigning one CSP subscription to each Azure AD tenant. 可将租户及其订阅添加到基本 Azure Stack 注册。You can add tenants and their subscriptions to the base Azure Stack registration. 将会针对所有 Azure Stack 实例执行基本注册。The base registration is done for all Azure Stack instances. 如果没有为租户注册订阅,用户仍可使用 Azure Stack,其使用情况数据将发送到用于基本注册的订阅。If a subscription is not registered for a tenant, the user can still use Azure Stack, and their usage will be sent to the subscription used for the base registration.

后续步骤Next steps