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

通过 Azure 计费和成本管理来防止意外费用Prevent unexpected charges with Azure billing and cost management

注册 Azure 时,可以采取几种措施来更好地了解自己的支出:When you sign up for Azure, there are several things you can do to get a better idea of your spending:

在添加 Azure 服务之前获取估计成本Get estimated costs before adding Azure services

下面提供了有关使用以下工具估算成本的一些附加信息:Here is some additional information about estimating costs using the following tools:

  • Azure 定价计算器Azure pricing calculator
  • Azure 门户Azure portal
  • 支出限制Spending limit

以下部分中的插图以美元显示示例定价。The images in the following sections show example pricing in US Dollars.

使用定价计算器在线估计成本Estimate cost online using the pricing calculator

查看定价计算器,获取感兴趣的服务的每月估计成本。Check out the pricing calculator to get an estimated monthly cost of the service you're interested in. 可以添加任何第一方 Azure 资源来获取估算成本。You can add any first party Azure resource to get an estimated cost. 在定价计算器中,可以更改货币类型。In the pricing calculator, you can change the currency type.

定价计算器菜单的屏幕截图

例如,在定价计算器中,如果将某个 A1 Windows 虚拟机 (VM) 一直保持运行,则会按计算小时数以特定的每月金额估算其成本:For example, in the pricing calculator, an A1 Windows Virtual Machine (VM) is estimated to cost a certain amount/month in compute hours if you leave it running the whole time:

定价计算器的屏幕截图,其中显示了 A1 Windows VM 的每月预算成本

有关定价的详细信息,请参阅定价常见问题解答For more information about pricing, see the Pricing FAQ. 若要与 Azure 销售人员沟通,请拨打“常见问题解答”页顶部提供的电话号码。If you want to talk to an Azure salesperson, call the phone number shown at the top of the FAQ page.

在 Azure 门户中查看估算成本Review estimated costs in the Azure portal

通常,在 Azure 门户中添加服务时,会有一个视图显示每月的估算成本(采用你的帐单货币)。Typically, when you add a service in the Azure portal, there's a view that shows you an estimated cost per month in your billed currency. 例如,选择 Windows VM 的大小时,可看到计算小时数的每月估计成本:For example, when you choose the size of your Windows VM, you see the estimated monthly cost for the compute hours:

示例:A1 Windows VM 及其每月估算成本

检查支出限制是否为开启状态Check if you have a spending limit on

如果有使用信用额度的订阅,则将默认开启支出限制。If you have a subscription that uses credits, then the spending limit is turned on for you by default. 这样一来,当信用额度花完时,不再对信用卡计费。This way, when you spend all your credits, your credit card doesn't get charged. 请参阅 Azure 产品/服务以及支出限制可用性的完整列表See the full list of Azure offers and the availability of spending limit.

但是,在达到支出限制时,服务将会禁用。However, when you reach your spending limit, your services get disabled. 这意味着 VM 会被解除分配。That means your VMs are deallocated. 若要避免服务中断,必须关闭支出限制。To avoid service downtime, you must turn off the spending limit. 任何超额都将对保存的信用卡收费。Any overage gets charged onto your credit card on file.

若要查看支出限制是否为启用状态,请转到帐户中心的订阅视图To see if you've got a spending limit on, go to the Subscriptions view in the Account Center. 如果支出限制为“打开”,则会显示如下所示的横幅:A banner appears if your spending limit is on, similar to the following:

帐户中心中,显示支出限制为开启状态的警告信息的屏幕截图

单击该横幅,并按提示删除支出限制。Click the banner and follow the prompts to remove the spending limit. 如果注册时未输入信用卡信息,则必须输入信息才能移除支出限制。If you didn't enter credit card information when you signed up, you must enter it to remove the spending limit. 有关详细信息,请参阅 Azure 支出限制 - 其工作原理以及如何将其启用或移除For more information, see Azure spending limit – How it works and how to enable or remove it.

使用预算和成本警报Use budgets and cost alerts

可以创建预算来管理成本,并创建警报以自动通知利益干系人支出异常和超支风险。You can create budgets to manage costs and create alerts that automatically notify stakeholders of spending anomalies and overspending risks. 警报基于与预算和成本阈值相比的支出。Alerts are based on spending compared to budget and cost thresholds.

使用 Azure 服务时监视成本Monitor costs when using Azure services

可以使用以下工具监视成本:You can monitor costs with the following tools:

  • TagsTags
  • 成本细分和消耗率Cost breakdown and burn rate
  • 成本分析Cost analysis

将标记添加到资源以将计费数据分组Add tags to resources to group billing data

可以使用标记来对受支持服务的计费数据进行分组。You can use tags to group billing data for supported services. 例如,如果为不同的团队运行多个 VM,可以使用标记按成本中心(例如人力资源、营销、财务等)或环境(例如生产、预生产、测试)将成本分类。For example, if you run several VMs for different teams, then you can use tags to categorize costs by cost center (for example: HR, marketing, finance, etc.) or environment (for example: production, pre-production, test).

显示在门户中设置标记的屏幕截图

各标记显示了完全不同的成本报告视图。The tags show up throughout different cost reporting views. 例如,成本分析视图中会立即显示这些标记,而在详细使用情况 CSV 文件中,则需要在第一个计费期之后才会显示。For example, they're visible in your cost analysis view right away and in the detailed usage CSV file after your first billing period.

有关详细信息,请参阅使用标记来组织 Azure 资源For more information, see Using tags to organize your Azure resources.

监视成本细分和消耗率Monitor cost breakdown and burn rate

运行 Azure 服务后,请定期检查费用。After you have your Azure services running, regularly check charges. 可在 Azure 门户中查看当前支出和消耗率。You can see the current spending and burn rate in the Azure portal.

  1. 访问 Azure 门户中的“订阅”并选择一个订阅。Visit the Subscriptions in the Azure portal and select a subscription.

  2. 如果你的订阅支持该功能,则你可以查看成本细分和消耗率。If it's supported for your subscription, you see the cost breakdown and burn rate.

    Azure 门户中消耗率和明细的屏幕截图

  3. 在左侧列表中单击“成本分析”,以按资源查看成本细分。Click Cost analysis in the list one the left to see the cost breakdown by resource. 添加服务后,请等待 24 小时以显示数据。After you add a service, wait 24 hours for the data to display.

    Azure 门户中成本分析视图的屏幕截图

  4. 可按标记、资源类型、资源组和时间跨度等不同的属性进行筛选。You can filter by different properties like tags, resource type, resource group, and timespan. 单击“应用”确认筛选条件;若要将视图导出为逗号分隔值 (.csv) 文件,请单击“下载”。 Click Apply to confirm the filters and Download if you want to export the view to a comma-separated values (.csv) file.

  5. 此外,还可以单击资源,查看每日费用历史记录以及每天的资源成本。Additionally, you can click a resource to see your daily spend history and how much the resource costs each day.

    Azure 门户中费用历史记录视图的屏幕截图

将看到的成本与选择服务时看到的估算值进行比较。Compare the costs that you see with the estimates that you saw when you selected the services. 如果看到的成本与估算值相差很大,请检查之前为资源选择的定价计划。If the costs are significantly different from the estimates, check the pricing plan that you've selected for your resources.

优化和降低成本Optimize and reduce costs

如果你不熟悉成本管理的原理,请阅读如何使用 Azure 成本管理优化云投资If you're unfamiliar with the principles of cost management, read How to optimize your cloud investment with Azure Cost Management.

在 Azure 门户中,还可以使用 VM 自动关闭和顾问建议来优化及降低 Azure 成本。In the Azure portal, you can also optimize and reduce Azure costs with auto shutdown for VMs and Advisor recommendations.

考虑使用 VM 自动关闭等成本削减功能Consider cost-cutting features like auto shutdown for VMs

可在 Azure 门户中为 VM 配置自动关闭,具体视方案而定。Depending on your scenario, you can configure auto shutdown for your VMs in the Azure portal. 有关详细信息,请参阅使用 Azure 资源管理器为 VM 设置自动关闭功能For more information, see Auto shutdown for VMs using Azure Resource Manager.

门户中的自动关闭选项的屏幕截图

自动关闭与在 VM 中使用电源选项进行关闭不同。Auto shutdown isn't the same as when you shut down within the VM with power options. 自动关闭会停止并解除分配 VM,以便停止额外的使用费。Auto shutdown stops and deallocates your VMs to stop additional usage charges. 有关详细信息,请参阅 Linux VMWindows VM 有关 VM 状态的定价常见问题解答。For more information, see pricing FAQ for Linux VMs and Windows VMs about VM states.

有关开发和测试环境的更多降低成本功能,请参阅 Azure 开发测试实验室For more cost-cutting features for your development and test environments, check out Azure DevTest Labs.

启用和查看 Azure 顾问建议Turn on and review Azure Advisor recommendations

Azure 顾问可帮助你识别很少使用的资源,以此降低成本。Azure Advisor helps you reduce costs by identifying resources with low usage. 在 Azure 门户访问顾问:Visit Advisor in the Azure portal:

Azure 门户中的 Azure 顾问按钮的屏幕截图

可在顾问仪表板的“成本”选项卡中获得可行的建议: You can get actionable recommendations in the Cost tab in the Advisor dashboard:

顾问成本建议示例的屏幕截图

有关成本节省顾问建议的指导教程,请查看根据建议优化成本Review the Optimize costs from recommendations tutorial for a guided tutorial about cost-saving Advisor recommendations.

根据最新的发票检查成本Review costs against your latest invoice

计费周期结束时,会提供最新的发票。At the end of the billing cycle, your latest invoice is available. 也可以下载发票和详细使用情况文件,以确保收费无误。You can also download invoices and detailed usage files to make sure you were charged correctly. 有关比较每日使用情况和发票的详细信息,请参阅了解 Microsoft Azure 帐单For more information about comparing your daily usage with your invoice, see Understand your bill for Microsoft Azure.

计费 APIBilling API

使用 Azure 计费 API 以编程方式获取使用情况数据。Use the Azure billing API to programmatically get usage data. 同时使用 RateCard API 和使用情况 API 获取计费使用情况。Use the RateCard API and the Usage API together to get your billed usage. 有关详细信息,请参阅深入了解 Microsoft Azure 资源消耗For more information, see Gain insights into your Microsoft Azure resource consumption.

其他资源和特殊情况Additional resources and special cases

EA、CSP 和赞助客户EA, CSP, and Sponsorship customers

请咨询帐户管理员或 Azure 合作伙伴以开始使用。Talk to your account manager or Azure partner to get started.

产品/服务Offer 资源Resources
企业协议 (EA)Enterprise Agreement (EA) EA 门户帮助文档 Power BI 报表EA portal, help docs, and Power BI report
云解决方案提供商 (CSP)Cloud Solution Provider (CSP) 咨询提供商Talk to your provider
Azure 赞助Azure Sponsorship 赞助门户Sponsorship portal

如果管理大型组织的 IT,建议阅读 Azure 企业基架企业 IT 白皮书(.pdf 下载,仅英文版)。If you're managing IT for a large organization, we recommend reading Azure enterprise scaffold and the enterprise IT white paper (.pdf download, English only).

Azure 门户中的企业协议成本视图Enterprise Agreement cost views in the Azure portal

企业成本视图目前为公共预览版。Enterprise cost views are currently in Public Preview. 注意事项:Items to note:

  • 订阅费用基于使用情况,并且不包括预付金额、超额用量、已包含数量、调整和税。Subscription costs are based on usage and don't include prepaid amounts, overages, included quantities, adjustments, and taxes. 实际费用按注册级计算。Actual charges are computed at the Enrollment level.
  • Azure 门户中显示的金额可能不同于企业门户中显示的金额。Amounts shown in the Azure portal might be different than what's in the Enterprise portal. 企业门户中的更新可能要花费几分钟时间来完成,之后,更改才会显示在 Azure 门户中。Updates in the Enterprise portal may take a few minutes before the changes are shown in the Azure portal.
  • 如果未看到成本,可能是以下几种原因之一所致:If you aren't seeing costs, it might be for one of the following reasons:
    • 你在订阅级别没有权限。You don't have permissions at the subscription level. 若要查看企业成本视图,必须在订阅级别是账单读者、读者、参与者或所有者。To see enterprise cost views, you must be a Billing Reader, Reader, Contributor, or Owner at the subscription level.
    • 你是帐户所有者且你的注册管理员已禁用“AO 查看费用”设置。You're an Account Owner and your Enrollment Administrator has disabled the "AO view charges" setting. 请联系你的注册管理员以获取费用访问权限。Contact your Enrollment Administrator to get access to costs.
    • 你是部门管理员且你的注册管理员已禁用“DA 查看费用”设置。 You're a Department Administrator and your Enrollment Administrator has disabled the DA view charges setting. 联系你的注册管理员以获取访问权限。Contact your Enrollment Administrator to get access.
    • 你是从某个渠道合作伙伴购买的 Azure,而该合作伙伴未发布定价信息。You bought Azure through a channel partner, and the partner didn't release pricing information.
  • 如果你在企业门户中更新与成本访问相关的设置,则更改过几分钟后才会显示在 Azure 门户中。If you update settings related to cost access in the Enterprise portal, there's a delay of a few minutes before the changes are shown in the Azure portal.
  • 支出限制和发票指南不适用于 EA 订阅。Spending limit, and invoice guidance don't apply to EA Subscriptions.

查看订阅和访问权限Check your subscription and access

若要查看成本,必须具有对计费信息的订阅级访问权限To view costs, you must have subscriptions-level access to billing information. 只有帐户管理员可以访问帐户中心、更改计费信息以及管理订阅。Only the Account Admin can access the Account Center, change billing information, and manage subscriptions. 帐户管理员是完成注册过程的人员。The Account Admin is the person who went through the sign-up process. 有关详细信息,请参阅添加或更改管理订阅或服务的 Azure 管理员角色For more information, see Add or change Azure administrator roles that manage the subscription or services.

若要查看你是否为帐户管理员,请转到 Azure 门户中的“订阅”To see if you're the Account admin, go to Subscriptions in the Azure portal. 查看订阅列表并找到“我的角色”。 View the list of subscriptions and find My role. 如果角色是“帐户管理员”,则表示你拥有完全特权。 If Account admin is the role, then you have full privileges. 如果显示“所有者”等其他角色,则表示你不拥有完全特权。 If it says something else, like Owner, you don't have full privileges.

Azure 门户中订阅视图中的角色的屏幕截图

若要管理订阅以及更改计费信息,请查找帐户管理员。请求帐户管理员来完成任务,或者将订阅转移给你To manage subscriptions and change billing info, find the Account Admin. Ask the Account Admin to complete the tasks or transfer the subscription to you.

当帐户管理员不再属于组织,并且需要管理帐单时,请联系我们If your Account admin is no longer with your organization and you need to manage billing, contact us.

请求服务事件的服务级别协议额度Request a Service Level Agreement credit for a service incident

服务级别协议 (SLA) 描述 Microsoft 关于运行时间和连接性方面的承诺。The Service Level Agreement (SLA) describes Microsoft’s commitments for uptime and connectivity. 当 Azure 服务遇到影响运行时间或连接的问题(通常称为“服务中断”)时,会报告一个服务事件。 A service incident is reported when Azure services experience an issue that impacts uptime or connectivity, often referred to as an outage. 如果我们未根据 SLA 中所述达到并保持每个服务的服务级别,则你有权请求一定的额度并扣除每月服务费的一部分。If we do not achieve and maintain the Service Levels for each service as described in the SLA, then you might be eligible for a credit towards a portion of your monthly service fees.

若要请求额度:To request a credit:

  1. 登录到 Azure 门户Sign-in to the Azure portal. 如果你有多个帐户,请确保使用受 Azure 停机影响的帐户。If you have multiple accounts, make sure that you use the one that was affected by Azure downtime.
  2. 创建新的支持请求。Create a new support request.
  3. 在“问题类型”下,选择“计费”。 Under Issue type, select Billing.
  4. 在“请求类型”下,选择“退款请求”。 Under Problem type, select Refund Request.
  5. 添加详细信息,指出你要请求 SLA 额度,并指定日期/时间/时区以及受影响的服务(VM、网站等)Add details to specify that you’re asking for an SLA credit, mention the date/time/time-zone as well as the impacted services (VMs, Web Sites, etc.)
  6. 确认你的联系详细信息,然后选择“创建”以提交请求。 Verify your contact details and select Create to submit your request.

SLA 阈值因服务而异。SLA thresholds vary by service. 例如,SQL Web 层的 SLA 为 99.9%,VM 的 SLA 为 99.95%,SQL 标准层的 SLA 为 99.99%。For example, the SQL Web Tier has an SLA of 99.9%, VMs have an SLA of 99.95%, and SQL Standard Tier has an SLA of 99.99%.

对于某些服务,必须满足先决条件才能应用 SLA。For some services, there are prerequisites for the SLA to apply. 例如,对于虚拟机,必须在同一个可用性集中部署两个或更多个实例。For example, virtual machines must have two or more instances deployed in the same Availability Set.

有关详细信息,请参阅服务级别协议Azure 服务的 SLA 摘要文档。For more information, see Service Level Agreements and the SLA summary for Azure services documentation.

需要帮助?Need help? 请联系我们。Contact us.

如有任何疑问或需要帮助,请创建支持请求If you have questions or need help, create a support request.

后续步骤Next steps