繁体   English   中英

为什么我在 aws ecs 命令中看不到我的集群详细信息?

[英]Why I can't see my cluster details in aws ecs command?

我运行这个命令: aws ecs describe-clusters输出这个结果:

{                                                                             
    "clusters": [],                                                           
    "failures": [                                                             
        {                                                                     
            "reason": "MISSING",                                              
            "arn": "arn:aws:ecs:us-east-2:---------:cluster/default"       
        }                                                                     
    ]                                                                         
}                                                                             

但在https://us-east-2.console.aws.amazon.com/ecs/home?region=us-east-2#/clusters我有一个集群。

在此处输入图片说明

为什么我在 aws ecs 命令中看不到我的集群详细信息?

如果你不传递集群的参数,那么它会返回上面的错误

= 例如

aws ecs describe-clusters --clusters name-of-the-cluster

您还必须传递集群的名称。

例如

aws ecs describe-clusters --clusters "name-of-your-cluster"

{
    "clusters": [
        {
            "status": "ACTIVE", 
            "statistics": [], 
            "tags": [], 
            "clusterName": "xxxx", 
            "registeredContainerInstancesCount": 1, 
            "pendingTasksCount": 0, 
            "runningTasksCount": 2, 
            "activeServicesCount": 1, 
            "clusterArn": "arn:aws:ecs:ap-south-1:xxxxx"
        }
    ], 
    "failures": []
}

参考: https : //docs.aws.amazon.com/cli/latest/reference/ecs/describe-clusters.html

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM