Azure Recommendations API, differentiating affected VM

Ivan Zeljkovic 60 Reputation points
2023-08-24T15:39:34.52+00:00

Hi there,

I'm using the Azure Recommendations API, and I notice that it does not seem to differentiate which VM the recommendation is for in the return JSON.

For example:

Recommendation: Consider virtual machine reserved instance to save over your on-demand costs

Impacted Value: Just my subscription ID

VM Profile: Standard_B1ms

Region: germanywestcentral

For the above recommendation, I have 3 rows. How would I be capable of identifying the exact VM affected?

This may be a knowledge gap, but wouldn't it be possible for me to have several VMs of the same profile in the given region? If not, then this would be a simple solution.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,476 questions
Azure Advisor
Azure Advisor
An Azure personalized recommendation engine that helps users follow best practices to optimize Azure deployments.
50 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Olga Os - MSFT 5,841 Reputation points Microsoft Employee
    2023-08-31T21:41:31.1166667+00:00

    Hello Ivan Zeljkovic,

    Welcome to the MS Q&A Forum.

    I assume you are using the Azure Consumption Reservation Recommendation API command.

    Reservation purchase recommendations are calculated by analyzing your hourly usage data of Virtual Machine Resources over last 7, 30, and 60 days. Azure calculates what your costs would have been if you had a reservation and compares it with your actual pay-as-you-go costs incurred over the time duration in overall based on your organization's usage (including past data).

    You could also review Recommendations in the Azure portal on Purchase reservations blade or in Azure Advisor.

    If you would like to get the list of VMs which are using the specific VM size at this specific moment, you can simply use Azure Portal VMs blade and filter by the size parameter

    User's image

    Reference:

    Hope above answers your question and concern. Let me know if you need additional assistance. If the answer was helpful, please accept it and complete the quality survey so that others can find a solution.

    Sincerely,
    Olga Os.

    0 comments No comments