You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cost-management-billing/costs/cost-mgt-best-practices.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ Before you deploy cloud resources, assess the following items:
71
71
- The Azure offer that best meets your needs
72
72
- The resources you plan to use
73
73
- How much they might cost
74
-
- The best way to automate cost tracking and reporting for your environment
74
+
- The services available to track, report and optimize cost, also via leveraging automation
75
75
76
76
Azure provides tools and APIs to assist you in the assessment process. These tools can give you a good idea of the investment required to enable your workloads, and help you automate cost management from the start. Use the [Azure pricing calculator](https://azure.microsoft.com/pricing/calculator) to estimate costs, and consider using the [Cost Management Exports API](/rest/api/cost-management/exports), [Cost Details API](/rest/api/cost-management/generate-cost-details-report), and [Query API](/rest/api/cost-management/query) to automate cost data retrieval and analysis.
77
77
@@ -83,7 +83,7 @@ Azure provides tools and APIs to assist you in the assessment process. These too
83
83
The first step in maximizing your experience within Cost Management is to investigate and decide which Azure offer is best for you. Think about how you plan to use Azure in the future. Also consider how you want your billing model configured. Consider the following questions when making your decision:
84
84
85
85
- How long do I plan to use Azure? Am I testing, or do I plan to build longer-term infrastructure?
86
-
- How do I want to pay for Azure? Should I prepay for a reduced price or get invoiced at the end of the month?
86
+
- How do I want to pay for Azure? Should I prepay or commit to spending a certain amount for a reduced price or get invoiced at the end of the month?
87
87
- Do I need to automate cost tracking, reporting, or budgeting for my workloads?
88
88
89
89
To learn more about the various options, visit [How to buy Azure](https://azure.microsoft.com/pricing/purchase-options/). Several of the most common billing models are identified below.
@@ -198,13 +198,16 @@ For more information, see [Create budgets](tutorial-acm-create-budgets.md) and [
198
198
199
199
### Use tags, management groups, and custom dimensions
200
200
201
-
Emphasize the use of tags, management groups, and custom dimensions for cost allocation and reporting. Cost Management supports filtering and grouping by these attributes, enabling more granular cost tracking and accountability. Use the [Cost Management Dimensions API](/rest/api/cost-management/dimensions) to list and manage available dimensions.
201
+
Emphasize the use of tags, management groups, and custom dimensions for cost allocation and reporting. Cost Analysis supports filtering and grouping by these attributes, enabling more granular cost tracking and accountability. Use the [Cost Management Dimensions API](/rest/api/cost-management/dimensions) to list and manage available dimensions.
202
+
203
+
>[!NOTE]
204
+
> Management groups are not supported for Microsoft Customer Agreement customers.
202
205
203
206
### Leverage benefit recommendations and savings tools
204
207
205
208
Take advantage of Azure's cost-saving programs and recommendations:
206
209
207
-
-**Azure Savings Plan for Compute**: The most flexible savings plan, applying to a broad range of compute services. See [Azure savings plan for compute](../savings-plan/savings-plan-compute-overview.md).
210
+
-**Azure Savings Plans for Compute**: The most flexible savings plan, applying to a broad range of compute services. See [Azure savings plans for compute](../savings-plan/savings-plan-compute-overview.md).
208
211
-**Azure Reservations**: Prepay for one- or three-year terms for VMs or databases to receive significant discounts. See [What are Azure Reservations?](../reservations/save-compute-costs-reservations.md).
209
212
-**Azure Hybrid Benefit**: Use existing Windows Server or SQL Server licenses to save on Azure. See [Azure Hybrid Benefit](https://azure.microsoft.com/pricing/hybrid-benefit/).
210
213
-**Benefit Recommendations API**: Use the [Benefit Recommendations API](/rest/api/cost-management/benefit-recommendations) and [Azure Advisor](/azure/advisor/advisor-overview) to proactively identify savings opportunities, such as reserved instances or savings plans, based on your usage patterns.
Copy file name to clipboardExpand all lines: articles/cost-management-billing/costs/manage-automation.md
+5-28Lines changed: 5 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,14 +39,14 @@ You might not need to analyze the data daily. If so, consider using Cost Managem
39
39
Consider using the [Cost Details API](/rest/api/cost-management/costdetails) if you have a small cost data set. Here are recommended best practices:
40
40
41
41
- 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 to prevent repeated calls for identical data.
42
+
- Once you download your cost data for historical invoices, the charges are not 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.
43
43
- 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
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.
45
45
- If your dataset is more than 2 GB month-to-month, consider using [exports](tutorial-improved-exports.md) as a more scalable solution.
46
46
47
47
## Automate retrieval with Cost Details API
48
48
49
-
The [Cost Details API](/rest/api/cost-management/costdetails) enables you to programmatically generate and download detailed, unaggregated cost data for your 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.
49
+
The [Cost Details API](/rest/api/cost-management/costdetails) enables 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.
50
50
51
51
> [!IMPORTANT]
52
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)
@@ -55,7 +55,7 @@ The [Cost Details API](/rest/api/cost-management/costdetails) enables you to pro
55
55
56
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
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 complete, the API provides a secure download URL for the CSV file containing your cost data. The download link is valid for a limited time.
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.
59
59
60
60
For full details, see [Get small usage datasets on demand](https://learn.microsoft.com/azure/cost-management-billing/automate/get-small-usage-datasets-on-demand) and the [Cost Details API reference](https://learn.microsoft.com/rest/api/cost-management/generate-cost-details-report/create-operation).
61
61
@@ -98,44 +98,21 @@ Use the `downloadUrl` to download the CSV file containing your cost details.
98
98
99
99
### Best practices for using the Cost Details API
100
100
101
-
-**Request frequency**: Generate reports no more than once per day for a given scope and date range. Cost data is refreshed every four hours, but more frequent requests will return the same data and may be throttled.
101
+
-**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 will return the same data and may be throttled.
102
102
-**Date range**: For large datasets, limit the date range (for example, generate daily or weekly reports) to keep file sizes manageable.
103
103
-**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.
104
104
-**Data retention**: Download and store reports promptly. The download URL expires after a short period (typically one hour).
105
-
-**Filtering**: Use filters in the report request to limit data to specific resources, meters, or tags if needed.
106
105
107
106
### Notes about pricing and data
108
107
109
-
- The Cost Details API provides actual and amortized cost data, including all usage, purchases, and adjustments for the selected period.
108
+
- The Cost Details API provides actual and amortized cost data, including all usage, purchases, and refunds for the selected period.
110
109
- The data is unaggregated and suitable for detailed analysis, reconciliation, and integration with other systems.
111
110
- 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).
112
111
113
112
### A single resource might have multiple records for a single day
114
113
115
114
Azure resource providers may 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 is expected and does not indicate overcharging; all records together represent the full cost for that resource and day.
116
115
117
-
## Example Cost Details API requests
118
-
119
-
The following example requests are used by Microsoft customers to address common scenarios that you might come across.
120
-
121
-
### Get Cost Details for a scope during specific date range
122
-
123
-
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.
124
-
125
-
For customers with a Microsoft Customer Agreement, use the following call:
126
-
127
-
```http
128
-
GET https://management.azure.com/{scope}/providers/Microsoft.CostManagement/costDetails?startDate=2024-06-01&endDate=2024-06-30&$top=1000&api-version=2024-05-01
129
-
```
130
-
131
-
### Get amortized cost details
132
-
133
-
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, use the latest API version. Your filters are `startDate` and `endDate` in the following example.
134
-
135
-
```http
136
-
GET https://management.azure.com/{scope}/providers/Microsoft.CostManagement/costDetails?metric=AmortizedCost&startDate=2024-06-01&endDate=2024-06-30&api-version=2024-05-01
137
-
```
138
-
139
116
## Automate alerts and actions with budgets
140
117
141
118
There are two critical components to maximizing the value of your investment in the cloud. One is automatic budget creation. The other is configuring cost-based orchestration in response to budget alerts. There are different ways to automate budget creation. Various alert responses happen when your configured alert thresholds are exceeded.
Copy file name to clipboardExpand all lines: articles/cost-management-billing/manage/cost-management-automation-scenarios.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,7 +114,7 @@ These APIs provide a different view of the same data:
114
114
115
115
- The [Invoice API](/rest/api/billing/2019-10-01-preview/invoices) is for Web Direct customers only. It provides a monthly rollup of your bill based on the aggregate charges for each meter type.
116
116
117
-
- The [Cost Details API](/rest/api/cost-management/generate-cost-details-report) provides a granular view of the usage/cost records for each day. Both Enterprise and Web Direct customers can use it.
117
+
- The [Cost Details API](/rest/api/cost-management/generate-cost-details-report) provides a granular view of the usage/cost records for each day. This is only available to enterprise customers.
118
118
119
119
### What's the difference between the Price Sheet API and the RateCard API?
120
120
These APIs provide similar sets of data but have different audiences:
0 commit comments