Difference between revisions of "Aws ecs list-services"
Jump to navigation
Jump to search
(Created page with "{{lowercase}} == See also == * {{aws ecs}} * {{AWS ECS}} Category:AWS") |
|||
(27 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{lowercase}} | {{lowercase}} | ||
+ | https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/list-services.html | ||
+ | |||
+ | [[aws ecs]] list-services --cluster [[your-cluster]] | ||
+ | |||
+ | aws ecs list-services --cluster your-cluster | grep arn | cut -d'"' -f2 | cut -d "/" -f2 | ||
+ | |||
+ | |||
+ | aws ecs list-services --cluster [[your-cluster]] | grep . | cut -d":" -f6- | cut -d'"' -f1 | cut -d"/" -f3 | ||
+ | |||
+ | aws ecs list-services --cluster [[your-cluster]] | grep YOUR-TEXT | grep . | cut -d":" -f6- | cut -d'"' -f1 | cut -d"/" -f3 | ||
+ | |||
+ | aws ecs list-services | ||
+ | An error occurred (ClusterNotFoundException) when calling the ListServices operation: Cluster not found. | ||
+ | |||
+ | List all services: | ||
+ | {{list all services}} | ||
+ | |||
+ | Stop all services from a cluster: | ||
+ | {{stop_all_services_from_a_cluster}} | ||
+ | |||
+ | == Related == | ||
+ | * <code>[[aws ecs create-service]]</code> | ||
+ | * <code>[[aws ecs list-clusters]]</code> | ||
+ | * <code>[[aws ecs describe-services]]</code> | ||
+ | * <code>[[aws ecs update-service]]</code> | ||
== See also == | == See also == | ||
* {{aws ecs}} | * {{aws ecs}} | ||
− | |||
[[Category:AWS]] | [[Category:AWS]] |
Latest revision as of 09:43, 27 April 2023
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/list-services.html
aws ecs list-services --cluster your-cluster
aws ecs list-services --cluster your-cluster | grep arn | cut -d'"' -f2 | cut -d "/" -f2
aws ecs list-services --cluster your-cluster | grep . | cut -d":" -f6- | cut -d'"' -f1 | cut -d"/" -f3
aws ecs list-services --cluster your-cluster | grep YOUR-TEXT | grep . | cut -d":" -f6- | cut -d'"' -f1 | cut -d"/" -f3
aws ecs list-services An error occurred (ClusterNotFoundException) when calling the ListServices operation: Cluster not found.
List all services:
for CLUSTER in $(aws ecs list-clusters | grep arn | cut -d'"' -f2 | cut -d "/" -f2); do aws ecs list-services --cluster $CLUSTER | grep arn | cut -d'"' -f2 | cut -d "/" -f3 done
Stop all services from a cluster:
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
Related[edit]
See also[edit]
Advertising: