AWS博托获取快照的时间段快照、时间段、AWS

2023-09-11 09:39:32 作者:文艺小痞子

我使用AWS和使用博托拉动快照(以下简称Python接口亚马逊网络服务)。我使用 conn.get_all_snapshots拉的所有快照(),但我只想要获取必要的数据。我使用日历查看快照,所以这将是非常有益的,如果我只能当月我查看内拉快照。

I'm using AWS and pulling snapshots using boto ("The Python interface to Amazon Web Services"). I'm pulling all snapshots using conn.get_all_snapshots(), but I only want to retrieve the necessary data. I'm using a calendar to view the snapshots, so it would be very helpful if I could only pull the snapshots within the current month I'm viewing.

有没有限制(可能是过滤器)我可以把在 conn.get_all_snapshots()只检索一个月内快照?

Is there a restriction (maybe a filter) I can put on the conn.get_all_snapshots() to only retrieve the snapshots within the month?

下面是博托文档,如果必要的: http://boto.readthedocs.org /en/latest/ref/ec2.html

Here are boto docs if necessary: http://boto.readthedocs.org/en/latest/ref/ec2.html

推荐答案

我不知道任何方式做到这一点。在EC2 API允许你筛选基于快照的ID或通过各种过滤器,例如状态进度的结果。甚至还有过滤器创建时但遗憾的是没有办法来指定范围的时候,让它在与返回的一切。而且也没有办法使用< > 在过滤器查询操作符

I'm not aware of any way to do this. The EC2 API allows you to filter results based on snapshot ID's or by various filters such as status or progress. There is even a filter for create-time but unfortunately there is no way to specify a range of times and have it return everything in between. And there is no way to use < or > operators in the filter query.