繁体   English   中英

使用 Python SDK 在 Azure 中创建虚拟机的用户名

[英]Username that created the Virtual Machine in Azure using Python SDK

我想知道是否有办法获取在 Azure 上创建虚拟机的用户名。 我可以使用活动日志查找启动虚拟机的用户名,但那里的日志仅保留 90 天。 因此,如果我想访问从今天起 90 天之前创建的 VM 的这些数据,我无法查找它。

有没有办法使用MonitorManagementClient或任何其他 class 来获取此类详细信息,而不管它们的最后访问日期如何?

默认情况下,记录仅存储 90 天 您不能 go 进一步返回,因为这些记录不再存在。 If you would like them stored longer, go into the diagnostic settings in Azure Monitor and have them streamed to Azure Storage or Log Analytics as well as Azure Monitor. 请记住,您必须为存储中的数据付费。 这对旧数据没有帮助,但它可以让您从这里开始更长时间地保留数据。

在此处输入图像描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM