77@click .option ('--ids' , '-i' , metavar = 'UUID' , multiple = True , help = 'List of alert IDs (can use short 8-char id)' )
88@click .option ('--query' , '-q' , 'query' , metavar = 'QUERY' , help = 'severity:"warning" AND resource:web' )
99@click .option ('--filter' , '-f' , 'filters' , metavar = 'FILTER' , multiple = True , help = 'KEY=VALUE eg. serverity=warning resource=web' )
10+ @click .option ('--timeout' , metavar = 'SECONDS' , type = int , help = 'Seconds before alert auto-unshelved.' )
1011@click .option ('--text' , help = 'Message associated with status change' )
1112@click .pass_obj
12- def cli (obj , ids , query , filters , text ):
13+ def cli (obj , ids , query , filters , timeout , text ):
1314 """Set alert status to 'shelved'."""
1415 client = obj ['client' ]
1516 if ids :
@@ -24,4 +25,4 @@ def cli(obj, ids, query, filters, text):
2425
2526 with click .progressbar (ids , label = 'Shelving {} alerts' .format (total )) as bar :
2627 for id in bar :
27- client .action (id , action = 'shelve' , text = text or 'status changed using CLI' )
28+ client .action (id , action = 'shelve' , text = text or 'status changed using CLI' , timeout = timeout )
0 commit comments