Monitoring and automating infrastructure operations

When a user initiates an operation on the Azure Portal, it is given with a RequestId to keep track of its status, in case it's needed. In the Managing the Storage service recipe, we saw how to use that RequestId to check the status of a request, but we might need to ask Azure for a list of every operation in a specific timeframe.

Going back to the ManagementClient class, which manages infrastructure services, we can use the ListOperations() method to obtain a complete list of the operation history against the platform; this is initiated by us or someone else who has the rights to the subscription.

For each operation, we can track:

  • The operation name
  • Who made it (the e-mail address) and from where ...

Get Microsoft Azure Development Cookbook Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.