我正在使用 azure python API,我已经创建了快照。我的问题是是否有任何 azure python API 可以获取超过 X 个月的快照。我已经检查过 Azure 快照 API,但没有获得任何 API 来获取超过 X 个月的快照。
最佳答案
没有这样的api,同样得到here的反馈:
Snapshot list operation dont have that feature.
You can use Azure Resource Graph to achieve that.
For example a query like this "where type =~ 'Microsoft.Compute/snapshots'|where properties.timeCreated < now(-7d)|project name,properties.timeCreated"
returns all the snapshots older than 7 days.
您还可以获取所有快照,然后使用条件“创建时间 > 3 个月”进行过滤
关于azure - 如何在azure python sdk中获取早于某个时间段的快照,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54366148/