Limit "list running instances" API to "since X hours ago"
Summary
As an Insights user interested in "tethering", I want to know what instances are running in my account(s) and have been running since a specified time so I can make some decision about tethering.
This builds on the work from #540 (closed) to allow Dan to say "give me currently running instances that have been running for the last 8 hours".
Acceptance Criteria
-
Verify an argument exists on the list instances API that filters on a time stamp -
Verify that if an instance last started before that time and is "now" running, it is included in output. -
Verify that if an instance last started after that time and is "now" running, it is NOT included in output. -
Verify that if an instance has never run, it is NOT included in output. - the timestamp is UTC/GMT/Zulu
-
Assumptions and Questions
- Do we want a number input of seconds like "running since at least 28800 seconds (8 hours) ago"?
- Nope.
- Or do we want a datetime like "running since 2019-01-01T12:23:45"?
- Yes, please!
- Maybe we change the new
running=True
argument torunning_since=28800
so we don't proliferate unnecessary filters since the previous would no longer be used in isolation?- Yes, let us delete/replace the old
running=True
argument. - Let us use something like
running_since=2019-01-01T12:23:45
- Yes, let us delete/replace the old
Edited by werwty