Suppose we have this schema:
CREATE TABLE Test (
ID INT64 NOT NULL,
Msg STRING(100),
Data JSON
) PRIMARY KEY(id);
{ | |
"executions": [ | |
{ | |
"id": 132, | |
"status": "succeeded", | |
"project": "TEST-Sylvain", | |
"executionType": "user", | |
"user": "sthirard", | |
"date-started": { | |
"unixtime": 1560946609000, |
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"os" | |
) | |
func main() { |
delete_old_versions: | |
aws ecs list-task-definitions --sort=DESC \ | |
| grep -Eo $(YourSrvc)':[0-9]+' \ | |
| tail -n +2 \ | |
| while read v; do aws ecs deregister-task-definition --task-definition=$$v; done |