aws ecs list-container-instances
Returns a list of container instances in a specified cluster. AWS CLI reference
1 example 5 options Its page in the AWS CLI reference
Examples
To list the container instances in a cluster
The following list-container-instances example lists all of the available container instances in a cluster.
aws ecs list-container-instances --cluster MyClusterIdentify--clusterThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instances to list.Its output
{
"containerInstanceArns": [
"arn:aws:ecs:us-west-2:123456789012:container-instance/MyCluster/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
"arn:aws:ecs:us-west-2:123456789012:container-instance/MyCluster/a1b2c3d4-5678-90ab-cdef-EXAMPLE22222"
]
}For more information, see Amazon EC2 container instances for Amazon ECS in the Amazon ECS Developer Guide.
Options
--clusterThe short name or full Amazon Resource Name (ARN) of the cluster that hosts the container instances to list.--filterYou can filter the results of a ListContainerInstances operation with cluster query language statements.--max-resultsThe maximum number of container instance results that ListContainerInstances returned in paginated output.--next-tokenThe nextToken value returned from a ListContainerInstances request indicating that more results are available to fulfill the request and further calls are needed.--statusFilters the container instances by status.