Amazon EC2 Container Service
开发人员指南 (API Version 2014-11-13)
AWS 服务或AWS文档中描述的功能,可能因地区/位置而异。点 击 Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

ecs-cli ps

说明

列出 ECS 群集中运行的所有容器。

语法

ecs-cli ps [--cluster cluster_name] [--region region] [--help]

选项

名称 描述

--cluster, -c cluster_name

Specifies the ECS cluster name to use. Defaults to the cluster configured using the configure command.

Type: String

Required: No

--region, -r region

Specifies the AWS region to use. Defaults to the cluster configured using the configure command.

Type: String

Required: No

--help, -h

显示指定命令的帮助文本。

必需:否

示例

示例

此示例显示正在集群中运行的容器。

Copy
ecs-cli ps

输出:

Name                                            State    Ports                     TaskDefinition
595deba7-16a1-4aaf-9b27-e152eba03ccc/wordpress  RUNNING  52.33.62.24:80->80/tcp    ecscompose-hello-world:3
595deba7-16a1-4aaf-9b27-e152eba03ccc/mysql      RUNNING                            ecscompose-hello-world:3
7fc0a2a4-9202-47d2-8b06-4463286b63de/mysql      RUNNING                            ecscompose-hello-world:3
7fc0a2a4-9202-47d2-8b06-4463286b63de/wordpress  RUNNING  52.32.232.166:80->80/tcp  ecscompose-hello-world:3

本页内容: