使用 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 spend. 定價計算機可以在您建立 Azure 資源之前提供成本估計值。The pricing calculator can provide an estimate of costs before you create an Azure resource. Azure 入口網站可為您提供目前的成本明細和您訂用帳戶的預測。The Azure portal provides you with the current cost breakdown and forecast for your subscription. 如果您需要將不同專案或小組的成本分組並加以了解,請查看資源標記If you want to group and understand costs for different projects or teams, look at resource tagging. 如果您的組織有您偏好使用的報告系統,請查看計費 APIIf your organization has a reporting system that you prefer to use, check out the billing APIs.

在新增 Azure 服務之前取得估計的成本Get estimated costs before adding Azure services

使用價格計算機在線上評估成本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 estimate cost.

定價計算機功能表的螢幕擷取畫面

例如,如果您讓 A1 Windows 虛擬機器 (VM) 持續運作,則運算時間的預估成本為每月 $66.96 美元:For example, an A1 Windows Virtual Machine (VM) is estimated to cost $66.96 USD/month in compute hours if you leave it running the whole time:

價格計算機的螢幕擷取畫面,顯示 A1 Windows 虛擬機器的每月預估成本為 $66.96 美元

如需價格的詳細資訊,請參閱此常見問題集For more information on pricing, see this FAQ. 或者,如果您需要洽詢 Azure 銷售人員,請連絡 1-800-867-1389。Or if you want to talk to an Azure salesperson, contact 1-800-867-1389.

在 Azure 入口網站中檢閱預估成本Review the estimated cost in the Azure portal

一般而言,當您在 Azure 入口網站中新增服務時,會有一個檢視向您顯示類似的每月預估成本。Typically when you add a service in the Azure portal, there's a view that shows you a similar estimated cost per month. 例如,當您選擇 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 預估每月成本為 $66.96 美元

檢查您是否開啟消費限制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, if you hit 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 spending limit on, go to the Subscriptions view in the Account Center. 如果您的消費限制是開啟的,則會出現橫幅︰A banner appears if your spending limit is on:

顯示帳戶中心已開啟消費限制的警告的螢幕擷取畫面

按一下橫幅並遵循提示,即可移除消費限制。Click the banner and follow 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.

您可以使用 Cloudyn 服務建立警示,就能在出現異常消費和超支風險時自動通知利害關係人。You can use the Cloudyn service to create alerts that automatically notify stakeholders of spending anomalies and overspending risks. 您可以使用支援根據預算和成本閾值發出警示的報告來建立警示。You can create alerts using reports that support alerts based on budget and cost thresholds. 如需使用 Cloudyn 的詳細資訊,請參閱教學課程:檢閱使用量和成本For more information on using Cloudyn, see Tutorial: Review usage and costs.

此範例使用 [隨時間變化的實際成本] 報告,在您的 Azure VM 消費接近總預算時通知您。This example uses the Actual Cost Over Time report to send a notification when your spending on an Azure VM nears your total budget. 在此案例中,您的總預算為 20,000 美元,而您想要在成本接近預算的一半 (9000 美元) 時收到通知,並且在成本達到 10,000 美元時收到額外的警示。In this scenario, you have a total budget of $20,000 and you want to receive a notification when costs are approaching half of your budget, $9,000, and an additional alert when costs reach $10,000.

  1. 在 Cloudyn 入口網站頂端的功能表中,選取 [成本] > [成本分析] > [隨時間變化的實際成本]。From the menu at the top of the Cloudyn portal, select Costs > Cost Analysis > Actual Cost Over Time.
  2. 將 [群組] 設定為 [服務],並將 [Filter on the service] (服務上的篩選) 設定為 [Azure/VM]。Set Groups to Service and set Filter on the service to Azure/VM.
  3. 在報告的右上方選取 [動作],然後選取 [排程報告]。In the top right of the report, select Actions and then select Schedule report.
  4. 若要依排定的間隔傳送報告電子郵件給自己,請在 [儲存或排程此報告] 方塊中選取 [排程] 索引標籤。To send yourself an email of the report at scheduled interval, select the Scheduling tab in the Save or Schedule this report dialog. 務必要選取 [透過電子郵件傳送]。Be sure to select Send via email. 您所使用的任何標記、群組和篩選都會包含在以電子郵件傳送的報告中。Any tags, grouping, and filtering you use are included in the emailed report.
  5. 選取 [閾值] 索引標籤,然後選取 [實際成本與閾值]。Select the Threshold tab and then select Actual Cost vs. Threshold.
    1. 在 [紅色警示] 閾值方塊中輸入 10000。In the Red alert threshold box enter 10000.
    2. 在 [黃色警示] 閾值方塊中輸入 9000。In the Yellow alert threshold box enter 9000.
    3. 在 [連續警示數目] 方塊中,輸入要接收的連續警示數目。In the Number of consecutive alerts box, enter the number of consecutive alerts to receive. 當您收到所指定的警示總數時,不會再傳送其他警示。When you receive the total number of alerts that you specified, no additional alerts are sent.
  6. 選取 [ 儲存]。Select Save.

    根據費用閾值顯示紅色警示和黃色警示的範例

您也可以選擇 [成本百分比與預算] 閾值計量來建立警示。You can also choose the Cost Percentage vs. Budget threshold metric to create alerts. 這可讓您將閾值指定為預算的百分比,而不是貨幣值。This allows you to specify the thresholds as percentages of your budget instead of currency values.

使用 Azure 服務時監視成本的方式Ways to monitor your costs when using Azure services

將標記新增至您的資源以便將計費資料分組Add tags to your resources to group your billing data

針對支援的服務,您可以使用標記來將您的計費資料分組。You can use tags to group billing data for supported services. 例如,如果您有不同小組執行數個 VM,您可以使用標記,依照成本中心 (HR、行銷、財務) 或環境 (生產環境、預先生產環境、測試) 來將成本分類。For example, if you run several VMs for different teams, then you can use tags to categorize costs by cost center (HR, marketing, finance) or environment (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 detail usage .csv after your first billing period.

如需詳細資訊,請參閱 使用標記組織您的 Azure 資源For more information, see Using tags to organize your Azure resources.

定期查看入口網站以了解成本細分和完工速率Regularly check the portal for cost breakdown and burn rate

在您的服務開始執行之後,請定期檢查它們花了您多少錢。After you get your services running, regularly check how much they're costing you. 您可以在 Azure 入口網站中看到目前的花費和完工速率。You can see the current spend and burn rate in 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 to the left to see the cost breakdown by resource. 新增服務之後,請等候 24 小時以便資料填入。Wait 24 hours after you add a service for the data to populate.

    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 入口網站中消費歷程記錄檢視的螢幕擷取畫面

我們建議您將您看到的成本與您在選取服務時看到的預估進行核對。We recommend you check the costs you see with the estimates you saw when you selected the services. 如果成本和預估的相差很多,請再次檢查您為資源選取的定價方案。If the costs are wildly different from the estimates, double check the pricing plan that you've selected for your resources.

請考慮啟用成本削減功能,例如 VM 自動關機Consider enabling 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 Resource Manager 的 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 VM 的定價常見問題,以及 Windows VM有關 VM 的狀態。For more information, see pricing FAQ for Linux VMs and Windows VMs about VM states.

如需更多針對開發和測試環境的成本削減功能,請參閱 Azure DevTest LabsFor more cost-cutting features for your development and test environments, check out Azure DevTest Labs.

開啟並查看 Azure 建議程式的建議Turn on and check out Azure Advisor recommendations

Azure 建議程式是一項功能,可協助您藉由找出低使用率的資源來降低成本。Azure Advisor is a feature that helps you reduce costs by identifying resources with low usage. 在 Azure 入口網站中造訪 Adviso:Visit Advisor in the Azure portal:

Azure 入口網站中 Azure 建議程式按鈕的螢幕擷取畫面

然後,您可以從 [建議程式] 儀表板中的 [成本] 索引標籤取得可操作的建議:Then, you can get actionable recommendations in the Cost tab in the Advisor dashboard:

建議程式的成本建議範例的螢幕擷取畫面

如需詳細資訊,請參閱建議程式成本建議For more information, see Advisor Cost recommendations.

在計費週期結束時檢閱成本Reviewing costs at the end of your billing cycle

計費週期結束後,您將可以取用您的發票。After the end of your billing cycle, your invoice will become available. 您也可以下載過去的發票和詳細使用量檔案,確定已向您正確收費。You can also download past invoices and detail 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

使用我們的計費 API 可以用程式設計方式取得使用量資料。Use our 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
Enterprise 合約 (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 企業 Scaffold企業 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 合約成本檢視Preview Enterprise Agreement cost views within 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. 看看您有存取權的訂用帳戶清單。Look at the list of subscriptions you have access to. 查看 [我的角色] 底下。Look under My role. 如果它顯示帳戶管理員,那麼您就是帳戶管理員。If it says Account admin, then you're ok. 如果它顯示諸如擁有者之類的其他角色,則表示您沒有完整權限。If it says something else like Owner, then you don't have full privileges.

Azure 入口網站的訂用帳戶檢視中您的角色的螢幕擷取畫面

如果您不是帳戶管理員,則表示有人可能藉由使用 Azure Active Directory 角色型存取控制 (RBAC) 授與您部分存取權。If you're not the Account admin, then somebody probably gave you partial access by using Azure Active Directory Role-based Access Control (RBAC). 若要管理訂用帳戶及變更帳單資訊,請尋找帳戶管理員。要求帳戶管理員執行該工作,或將訂用帳戶移轉給您To manage subscriptions and change billing info, find the Account Admin. Ask the Account Admin to do 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.

需要協助嗎?Need help? 與我們連絡。Contact us.

如果您有問題或需要協助,請建立支援要求If you have questions or need help, create a support request.