Difference between revisions of "Aws ecs list-services"

From wikieduonline
Jump to navigation Jump to search
Line 5: Line 5:
 
  [[aws ecs]] list-services --cluster [[your-cluster]]
 
  [[aws ecs]] list-services --cluster [[your-cluster]]
  
  aws ecs list-services --cluster [[your-cluster]] | grep YOUR-TEXT | grep . |  cut -d":" -f6- | cut -d'"' -f1
+
  aws ecs list-services --cluster [[your-cluster]] | grep YOUR-TEXT | grep . |  cut -d":" -f6- | cut -d'"' -f1 | cut -d"/" -f3
  
 
  aws ecs list-services
 
  aws ecs list-services
Line 12: Line 12:
  
 
Stop services:
 
Stop services:
  [[for]] SERVICES in $(aws ecs list-services --cluster [[your-cluster]] | grep YOUR-TEXT | grep . |  cut -d":" -f6- | cut -d'"' -f1); do
+
  [[for]] SERVICES in $(aws ecs list-services --cluster [[your-cluster]] | grep YOUR-TEXT | grep . |  cut -d":" -f6- | cut -d'"' -f1 | cut -d"/" -f3); do
 
  [[aws ecs update-service --cluster]] [[your-cluster]] --service $SERVICES [[--desired-count]] 0; done
 
  [[aws ecs update-service --cluster]] [[your-cluster]] --service $SERVICES [[--desired-count]] 0; done
  

Revision as of 10:26, 21 March 2023

Advertising: