Unused Resources in API

It would be nice to be able to pull unused resources report through the API.

With that feature, we would be able to use it to create an adaptive card in teams and approval to remove or keep the devices. Then, depending on the approval decision, it would go back into Nerdio to clean-up or keep the resources.

3

Comments (2 comments)

Avatar
Kevin Murray

Great post DStephenson, I believe this would have shared value across the board for Nerdio partners.  To better understand the idea, can you clarify a few things.  When it comes to unused resources, would this be strictly for devices (assuming VMs) or would consider things like orphaned managed discs, storage accounts and temp VMs equally as important?  What is the threshold for when something becomes unused?  Activity over N period of time that has gone down to zero?

0
Avatar
DStephenson

Thanks, Kevin Murray.
I post a LOT and never know what is just me thinking out loud vs what is actually a good idea for other partners. 😁

My original thinking was around the Unused Resources Report that's in NMM right now.
I was thinking we could worry about the thresholds and resource types in the API Call similar to how we can set the options for the report in the GUI right now.
We could probably start with the existing unused resources and then add additional resource types over time.
In the grand scheme of things, I was thinking of utilizing it this way:

  • Call the API for unused resources (this is all Nerdio needs to worry about building out)
  • Once the results of the call come back, a PowerAutomate flow would trigger a Teams approval to clean-up resource(s) or leave them
  • If cleaning up, we'd make another call back to the API (Ideally Nerdio, but it could be Azure Graph) to clean-up the resource(s)
  • If leaving them, it would sleep the Flow until the next time it is triggered

0

Please sign in to leave a comment.