azure - 如何在azure python sdk中获取早于某个时间段的快照

标签 azure

我正在使用 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/

相关文章:

Azure 辅助角色还是 Web 应用程序?

azure - 用户 $Skip 和 $Count

c# - 如何向 Azure C# SecretClient 提供凭据 (DefaultAzureCredential)?它似乎忽略凭据和 RBAC 并抛出 403

c# - Azure Functions .NET Core 中的 EF Core 2.0 连接字符串

azure - 流量管理器的 Terraform 脚本抛出未知错误

azure 防火墙如何取消链接和删除

azure - 我可以备份存储在 Azure 托管实例中的服务主 key 吗?

powershell - 在 TFS 服务器上运行 Powershell 脚本以发布到 Azure

azure - 部署槽在 azure 的 ASE 中不起作用

azure - 如何在 GitHub Actions 工作流程中取消屏蔽 `az account get-access-token` 的值(例如 accessToken)?