Azure Consumption API Parameters

121 views Asked by At

This is a segment of Azure consumption API result for my azure account. I am stuck in the understanding of "usageQuantity": 0.000000100582838 parameter(whether it's a CPU ultilization or something else). Is there a brief explanation of this parameter ? how can I verify its value from my azure account?

 { 
    "id": "/subscriptions/*****/providers/Microsoft.Billing/billingPeriods/202302/providers/Microsoft.Consumption/usageDetails/****",
      "name": "****",
            "type": "Microsoft.Consumption/usageDetails",
            "tags": null,
            "properties": {
                "billingPeriodId": "/subscriptions/****/providers/Microsoft.Billing/billingPeriods/202302",
                "usageStart": "2023-02-02T00:00:00.0000000Z",
                "usageEnd": "2023-02-02T23:59:59.0000000Z",
                "instanceId": "/subscriptions/****/resourceGroups/powerbi_dashboard/providers/Microsoft.Compute/virtualMachines/sample-instance",
                "instanceName": "sample-instance",
                "instanceLocation": "Asia",
                "meterId": "941a7a91-f0b4-4c70-be0f-d87ea6ff09ee",
                "usageQuantity": 0.000000100582838,
                "pretaxCost": 0.000000631774907,
                "currency": "INR",
                "isEstimated": false,
                "subscriptionGuid": "****",
                "subscriptionName": "Basic Subscription",
                "product": "",
                "consumedService": "Microsoft.Compute",
                "partNumber": "",
                "resourceGuid": "****",
                "offerId": "MS-AZR-0044P",
                "chargesBilledSeparately": false,
                "meterDetails": null
            }
2

There are 2 answers

2
John On

The usageQuantity property will be different per resource type. I can see you are using a Virtual Machine.

Usage for a VM is based on the total compute hours for that size VM.

we bill for each minute the VM ran for a given hour

For Compute Hour usage, there is a meter for each VM Size + OS (Windows, Non-Windows) + Region.

https://learn.microsoft.com/en-us/azure/virtual-machines/vm-usage

You can see your start and end times are only a minute hence the value is extremely low.