In the azure consumption usage details api, what is the difference between the metric types actualcost, usagecost, and amortizedcost?

Solution 1:

Usage excludes reservation and Marketplace purchases. This is a backcompat option.

ActualCost includes all usage and purchases as they would be shown in your invoice. (With the exception of any cost allocation rules that may be setup on your EA or MCA billing account. This doesn't apply to PAYG or CSP.)

AmortizedCost breaks reservations purchases down and allocates them out to the individual resources using the reservation.

From docs:

By default, cost analysis shows all usage and purchase costs as they're accrued and will show on your invoice, also known as Actual cost. Viewing actual cost is ideal for reconciling your invoice. However, purchase spikes in cost can be alarming when you're keeping an eye out for spending anomalies and other changes in cost. To flatten out spikes caused by reservation purchase costs, switch to Amortized cost.

Amortized cost breaks down reservation purchases into daily chunks and spreads them over the duration of the reservation term. For example, instead of seeing a $365 purchase on January 1, you'll see a $1.00 purchase every day from January 1 to December 31. In addition to basic amortization, these costs are also reallocated and associated by using the specific resources that used the reservation. For example, if that $1.00 daily charge was split between two virtual machines, you'd see two $0.50 charges for the day. If part of the reservation isn't utilized for the day, you'd see one $0.50 charge associated with the applicable virtual machine and another $0.50 charge with a charge type of UnusedReservation. Unused reservation costs can be seen only when viewing amortized cost.

https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/quick-acm-cost-analysis?tabs=azure-portal#customize-cost-views

Solution 2:

Usage excludes reservation and Marketplace purchases. This is a backcompat option.

ActualCost includes all usage and purchases as they would be shown in your invoice.

AmortizedCost breaks reservations purchases down and allocates them out to the individual resources using the reservation.