Azure price sheet api not returning the savings plan price details

132 Views Asked by At

I am using the below api to get Azure custom discounted prices:-

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/pricesheets/default?api-version=2023-05-01

I need to get the discounted unitPrice as well as the discounted savingsPlan prices for 1 year and 3 years which is applicable to my subscription. I am able to get the unit price, but the json response is always showing savingsPlan as null as shown below:-

{
    "billingPeriodId": "xxxxxxxxxxx",
    "meterId": "xxxxxxxxxxx",
    "unitOfMeasure": "1 Hour",
    "includedQuantity": 0,
    "partNumber": "xxxxxxxxxxx",
    "unitPrice": 30.05,
    "currencyCode": "USD",
    "offerId": "MS-AZR-0017P",
    "meterDetails": null,
    "savingsPlan": null
}

In the documentation provided at Price Sheet - Get it shows the below sample response which contains savingsPlan details, but am not able to get that in the json response.

"savingsPlan": {
          "term": "P3Y",
          "effectivePrice": 0.002,
          "marketPrice": 0.00328
        }

I tried using "$expand=savingsPlan", and "$expand=pricesheets/savingsPlan" while calling api, but still it is returning savingsPlan as null.

Is there any way to get the discounted savingsPlan details as in the above sample api response for 1 year and 3 years using the same api?

0

There are 0 best solutions below