Skip to content

Commit b99191d

Browse files
Merge pull request #302402 from maddieminn/july-fresh-update
Freshness Update - Automation Docs & CMB Landing Pages
2 parents f24a68e + f070171 commit b99191d

File tree

7 files changed

+161
-80
lines changed

7 files changed

+161
-80
lines changed

articles/cost-management-billing/cost-management-billing-faq.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ sections:
162162
If you’re an EA or MCA customer, `PayGPrice` is populated only for first-party Azure usage charges where `PricingModel` is `OnDemand`, `Spot`, or `SavingsPlan`. `PayGprice` isn't populated when `PricingModel` is `Reservations` or `Marketplace`.
163163
- question: Does Cost and usage details data have Reservation charges?
164164
answer: |
165-
Yes it does. You can see those charges when the actual charges occurred in the Actual Cost dataset or you can see the charges spread across the resources that consumed the Reservation or Savings Plan in the Amortized Cost dataset. For more information, see [Get amortized costs](costs/manage-automation.md#get-amortized-cost-details).
165+
Yes it does. You can see those charges when the actual charges occurred in the Actual Cost dataset or you can see the charges spread across the resources that consumed the Reservation or Savings Plan in the Amortized Cost dataset.
166166
- question: Am I charged for using Cost Details API or Exports?
167167
answer: |
168168
The Cost Details API is free. However, make sure to abide by the rate-limiting policies. For more information, see [Data latency and rate limits](costs/manage-automation.md#data-latency-and-rate-limits). The Exports feature is free to use, but you pay for the storage account that you use to store the exported data.

articles/cost-management-billing/costs/cost-mgt-best-practices.md

Lines changed: 53 additions & 21 deletions
Large diffs are not rendered by default.

articles/cost-management-billing/costs/index.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ metadata:
88
ms.service: cost-management-billing
99
ms.subservice: cost-management
1010
ms.topic: landing-page
11-
author: KennyDay
12-
ms.author: kenday
13-
ms.date: 01/07/2025
11+
author: maddieminn
12+
ms.author: maminn
13+
ms.date: 7/08/2025
1414

1515
# linkListType: architecture | concept | deploy | download | get-started | how-to-guide | learn | overview | quickstart | reference | tutorial | whats-new
1616

articles/cost-management-billing/costs/manage-automation.md

Lines changed: 58 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
title: Manage Azure costs with automation
33
description: This article explains how you can manage Azure costs with automation.
4-
author: jojohpm
5-
ms.author: jojoh
6-
ms.date: 06/26/2025
4+
author: maddieminn
5+
ms.author: maminn
6+
ms.date: 07/03/2025
77
ms.topic: conceptual
88
ms.service: cost-management-billing
99
ms.subservice: cost-management
10-
ms.reviewer: jojoh
10+
ms.reviewer: maminn
1111
---
1212

1313
# Manage costs with automation
@@ -20,84 +20,101 @@ You might need to download your Azure cost data to merge it with other datasets.
2020

2121
## Suggestions for handling large datasets
2222

23-
If your organization has a large Azure presence across many resources or subscriptions, you'll have a large amount of usage details data results. Excel often can't load such large files. In this situation, we recommend the following options:
23+
If your organization has a large Azure presence across many resources or subscriptions, you'll have a large number of usage details data results. Excel often can't load such large files. In this situation, we recommend the following options:
2424

2525
**Power BI**
2626

2727
Power BI is used to ingest and handle large amounts of data. If you're an Enterprise Agreement customer, you can use the Power BI template app to analyze costs for your billing account. The report contains key views used by customers. For more information, see [Analyze Azure costs with the Power BI template app](./analyze-cost-data-azure-cost-management-power-bi-template-app.md).
2828

2929
**Power BI data connector**
3030

31-
If you want to analyze your data daily, we recommend using the [Power BI data connector](/power-bi/connect-data/desktop-connect-azure-cost-management) to get data for detailed analysis. Any reports that you create are kept up to date by the connector as more costs accrue.
31+
If you want to analyze your data daily, we recommend using the [Power BI data connector](/power-bi/connect-data/desktop-connect-azure-cost-management) to get data for detailed analysis. The connector keeps the reports up to date as more costs accrue.
3232

3333
**Cost Management exports**
3434

3535
You might not need to analyze the data daily. If so, consider using Cost Management's [Exports](./tutorial-improved-exports.md) feature to schedule data exports to an Azure Storage account. Then you can load the data into Power BI as needed, or analyze it in Excel if the file is small enough. Exports are available in the Azure portal or you can configure exports with the [Exports API](/rest/api/cost-management/exports).
3636

37-
**Usage Details API**
37+
**Cost Details API**
3838

39-
Consider using the [Usage Details API](/rest/api/consumption/usageDetails) if you have a small cost data set. Here are recommended best practices:
39+
Consider using the [Cost Details API](/rest/api/cost-management/generate-cost-details-report) if you have a small cost data set. Here are recommended best practices:
4040

4141
- If you want to get the latest cost data, we recommend that you query at most once per day. Reports are refreshed every four hours. If you call more frequently, you'll receive identical data.
42-
- Once you download your cost data for historical invoices, the charges won't change unless you're explicitly notified. We recommend caching your cost data in a queryable store on to prevent repeated calls for identical data.
42+
- Once you download your cost data for historical invoices, the charges aren't expected to change unless you're explicitly notified. We recommend caching your cost data in a queryable store to prevent repeated calls for identical data.
4343
- Chunk your calls into small date ranges to get more manageable files that you can download. For example, we recommend chunking by day or by week if you have large Azure usage files month-to-month.
44-
- If you have scopes with a large amount of usage data (for example a Billing Account), consider placing multiple calls to child scopes so you get more manageable files that you can download.
44+
- If you have scopes with a large amount of cost data (for example a Billing Account), consider placing multiple calls to child scopes so you get more manageable files that you can download.
4545
- If your dataset is more than 2 GB month-to-month, consider using [exports](tutorial-improved-exports.md) as a more scalable solution.
4646

47-
## Automate retrieval with Usage Details API
47+
## Automate retrieval with Cost Details API
4848

49-
The [Usage Details API](/rest/api/consumption/usageDetails) provides an easy way to get raw, unaggregated cost data that corresponds to your Azure bill. The API is useful when your organization needs a programmatic data retrieval solution. Consider using the API if you're looking to analyze smaller cost data sets. However, you should use other solutions identified previously if you have larger datasets. The data in Usage Details is provided on a per meter basis, per day. It's used when calculating your monthly bill. The general availability (GA) version of the APIs is `2019-10-01`. Use `2019-04-01-preview` to access the preview version for reservation and Azure Marketplace purchases with the APIs.
49+
The Cost Details API cables you to programmatically generate and download detailed, unaggregated cost data for your Enterprise Agreement (EA) or Microsoft Customer Agreement (MCA) billing account. Unlike the legacy Usage Details API, the Cost Details API is asynchronous and report-based: you submit a request to generate a report, poll for its completion, and then download the resulting file from a secure URL.
5050

51-
If you want to get large amounts of exported data regularly, see [Retrieve large cost datasets recurringly with exports](ingest-azure-usage-at-scale.md).
51+
> [!IMPORTANT]
52+
> The Cost Details API is only supported for Enterprise Agreement (EA) or Microsoft Customer Agreement (MCA) scopes. For other account types, we suggest using Exports. If you need to download small datasets and you don't want to use Azure Storage, you can also use the Consumption Usage Details API. See instructions on how to do this [here](../automate/get-usage-details-legacy-customer.md)
5253
53-
### Usage Details API suggestions
54+
### How the Cost Details API works
5455

55-
**Request schedule**
56+
1. **Create a report**: Submit a POST request to the Cost Details API specifying the scope, date range, and optional filters (such as meter, resource, or tag).
57+
2. **Poll for status**: The API returns an operation ID. Poll the operation status endpoint until the report is complete.
58+
3. **Download the report**: Once the report is ready, the API provides a secure download URL for the CSV file containing your cost data. The download link is valid for a limited time.
5659

57-
We recommend that you make _no more than one request_ to the Usage Details API per day. For more information about how often cost data is refreshed and how rounding is handled, see [Understand cost management data](./understand-cost-mgt-data.md).
60+
For full details, see [Get small usage datasets on demand](../automate/get-small-usage-datasets-on-demand.md) and the [Cost Details API reference](/rest/api/cost-management/generate-cost-details-report).
5861

59-
**Target top-level scopes without filtering**
62+
## Example: Generate and download a Cost Details report
6063

61-
Use the API to get all the data you need at the highest-level scope available. Wait until all needed data is ingested before doing any filtering, grouping, or aggregated analysis. The API is optimized specifically to provide large amounts of unaggregated raw cost data. To learn more about scopes available in Cost Management, see [Understand and work with scopes](./understand-work-scopes.md). Once you've downloaded the needed data for a scope, use Excel to analyze data further with filters and pivot tables.
64+
To retrieve cost details using the Cost Details API, follow these steps:
6265

63-
### Notes about pricing
66+
### Step 1: Create a report
6467

65-
If you want to reconcile usage and charges with your price sheet or invoice, see [Pricing behavior in cost details](../automate/automation-ingest-usage-details-overview.md#pricing-behavior-in-cost-and-usage-details).
68+
Submit a POST request to start report generation. Replace `{scope}` with your billing account or profile scope.
6669

67-
### A single resource might have multiple records for a single day
68-
69-
Azure resource providers emit usage and charges to the billing system and populate the `Additional Info` field of the usage records. Occasionally, resource providers might emit usage for a given day and stamp the records with different datacenters in the `Additional Info` field of the usage records. It can cause multiple records for a meter/resource to be present in your usage file for a single day. In that situation, you aren't overcharged. The multiple records represent the full cost of the meter for the resource on that day.
70-
71-
## Example Usage Details API requests
70+
```http
71+
POST https://management.azure.com/{scope}/providers/Microsoft.CostManagement/generateCostDetailsReport?api-version=2025-03-01
72+
Content-Type: application/json
7273
73-
The following example requests are used by Microsoft customers to address common scenarios that you might come across.
74+
{
75+
"metric": "ActualCost",
76+
"timePeriod": {
77+
"start": "2025-03-01",
78+
"end": "2025-03-15"
79+
}
80+
}
81+
```
7482

75-
### Get Usage Details for a scope during specific date range
83+
The response includes a `Location` header in the response that contains the polling link to be used in step 2.
7684

77-
The data that's returned by the request corresponds to the date when the usage was received by the billing system. It might include costs from multiple invoices. The call to use varies by your subscription type.
85+
### Step 2: Poll for status
7886

79-
For legacy customers with an Enterprise Agreement (EA) or a pay-as-you-go subscription, use the following call:
87+
Check the status of the report generation using the polling link:
8088

8189
```http
82-
GET https://management.azure.com/{scope}/providers/Microsoft.Consumption/usageDetails?$filter=properties%2FusageStart%20ge%20'2020-02-01'%20and%20properties%2FusageEnd%20le%20'2020-02-29'&$top=1000&api-version=2019-10-01
90+
GET https://management.azure.com/{scope}/providers/Microsoft.CostManagement/generateCostDetailsReport/{operationId}?api-version=2025-03-01
8391
```
8492

85-
For modern customers with a Microsoft Customer Agreement, use the following call:
93+
When the report is ready, the response includes a `blobLink` property.
8694

87-
```http
88-
GET https://management.azure.com/{scope}/providers/Microsoft.Consumption/usageDetails?startDate=2020-08-01&endDate=2020-08-05&$top=1000&api-version=2019-10-01
89-
```
95+
### Step 3: Download the report
96+
97+
Use the `blobLink` to download the CSV file containing your cost details.
9098

9199
> [!NOTE]
92-
> The `$filter` parameter isn't supported by Microsoft Customer Agreements.
100+
> The Cost Details API is asynchronous. You can't retrieve cost details directly with a GET request to `/generateCostDetailsReport`. Always use the report generation workflow described above. For more information, see the [Cost Details API documentation](/rest/api/cost-management/generate-cost-details-report).
93101
94-
### Get amortized cost details
102+
### Best practices for using the Cost Details API
95103

96-
If you need actual costs to show purchases as they're accrued, change the *metric* to `ActualCost` in the following request. To use amortized and actual costs, you must use the `2019-04-01-preview` version. The current API version works the same as the `2019-10-01` version, except for the new type/metric attribute and changed property names. If you have a Microsoft Customer Agreement, your filters are `startDate` and `endDate` in the following example.
104+
- **Request frequency**: We recommend that reports are generated no more than once per day for a given scope and date range. Cost data is refreshed every four hours, but more frequent requests returns the same data and may be throttled.
105+
- **Date range**: For large datasets, limit the date range (for example, generate daily or weekly reports) to keep file sizes manageable.
106+
- **Scope**: Use the highest-level scope available (such as billing account or billing profile) to minimize the number of API calls and ensure data completeness.
107+
- **Data retention**: Download and store reports promptly. The download URL expires after a short period (typically one hour).
97108

98-
```http
99-
GET https://management.azure.com/{scope}/providers/Microsoft.Consumption/usageDetails?metric=AmortizedCost&$filter=properties/usageStart+ge+'2019-04-01'+AND+properties/usageEnd+le+'2019-04-30'&api-version=2019-04-01-preview
100-
```
109+
### Notes about pricing and data
110+
111+
- The Cost Details API provides actual and amortized cost data, including all usage, purchases, and refunds for the selected period.
112+
- The data is unaggregated and suitable for detailed analysis, reconciliation, and integration with other systems.
113+
- For more information about pricing behavior, see [Pricing behavior in cost details](../automate/automation-ingest-usage-details-overview.md#pricing-behavior-in-cost-and-usage-details).
114+
115+
### A single resource might have multiple records for a single day
116+
117+
Azure resource providers might emit usage and charges to the billing system with different attributes (such as datacenter location), resulting in multiple records for a resource on a single day. This behavior is expected and doesn't indicate overcharging; all records together represent the full cost for that resource and day.
101118

102119
## Automate alerts and actions with budgets
103120

@@ -324,4 +341,4 @@ List of remaining quotas.
324341

325342
- [Analyze Azure costs with the Power BI template app](./analyze-cost-data-azure-cost-management-power-bi-template-app.md).
326343
- [Create and manage exported data](./tutorial-improved-exports.md) with Exports.
327-
- Learn more about the [Usage Details API](/rest/api/consumption/usageDetails).
344+
- Learn more about the [Cost Details API](/rest/api/cost-management/generate-cost-details-report).

articles/cost-management-billing/costs/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@
244244
- name: Automation for partners
245245
href: ../automate/partner-automation.md
246246
- name: Automation FAQ
247-
href: ../automate/partner-automation.md
247+
href: ../automate/automation-faq.md
248248
- name: Assign API permissions
249249
items:
250250
- name: Cost Management API permissions

articles/cost-management-billing/index.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ highlightedContent:
3232
url: savings-plan/savings-plan-compute-overview.md
3333
- title: What's new
3434
itemType: whats-new
35-
url: https://azure.microsoft.com/blog/tag/cost-management/
35+
url: https://azure.microsoft.com/blog/product/cost-management/
3636
- title: Costs included in Cost Management
3737
itemType: concept
3838
url: costs/understand-cost-mgt-data.md

0 commit comments

Comments
 (0)