python - How to get list of all EBS Snapshots "started" before a certain date? -


I am writing a Python program to get a list of all EBS snapshots in my account (owner = self) "Started (originally created) before a certain date", then do some other actions in that list.

I do not think I can use the filter in the get_all_snapshots () function because it only supports equality, not GT / LT operators, I believe it confirms.

So I think I have to get a list of all of them, then repeat through the list. However, the boto documentation is not clear to me () actually what methods / properties are available on the snapshot object.

Any guidance here?

Get a connection:

  conn = boto.ec2. Get your snapshot:  
  snaps = conn.get_all_snapshots (owner = "self")  

Repeat via the code>

list and see the start_time attribute: Photos [0] .start_time

dir (Snacks [0]) Find all the available features and find other things you need.


Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -