且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何查找特定用户创建的所有VM?

更新时间:2023-11-27 23:04:28

没有很好的方法来实现这一目标.我们确实对此功能有用户反馈建议

https://feedback.azure.com/forums/281804-azure-resource-manager/suggestions/12469968-how-to-identify-who-created-the-virtual-machine-or

使用每个资源的活动日志有时可以为您提供创建VM的用户

https://docs.microsoft.com/zh-CN -us/azure/监视和诊断/监视概述活动日志

话虽如此,它只记录90天的数据.因此,如果资源是在90天后创建的,则数据将不再可用.

就目前而言,我建议您使用Azure中的标记系统.这样,您可以标记任何资源及其所属/创建者,以便轻松查询它们.

https://docs.microsoft.com/en -us/azure/azure-resource-manager/resource-group-using-tags


Hello,

is there any way I can find all VMs (or in general objects ...) created by particular user ?

Thanks

There is not a great way of achieving this. We do have a user feedback suggestion on this feature 

https://feedback.azure.com/forums/281804-azure-resource-manager/suggestions/12469968-how-to-identify-who-created-the-virtual-machine-or

Using the activity log of each resource can sometimes give you the user who created the VM

https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-overview-activity-logs

That being said, it only logs 90 days worth of data. So if the resource was created past 90 days the data is no longer available. 

For now, I would suggest you utilize the tagging system in Azure. That way you can tag any resources and who they belong to/ were create by so you can easily query them. 

https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-using-tags