pcluster describe-cluster-instances - Amazon ParallelCluster
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

pcluster describe-cluster-instances

描述集群中的实例。

pcluster describe-cluster-instances [-h] --cluster-name CLUSTER_NAME [--debug] [--next-token NEXT_TOKEN] [--node-type {HeadNode,ComputeNode,LoginNode}] [--query QUERY] [--queue-name QUEUE_NAME] [--region REGION]

命名的参数

-h, --help

显示 pcluster describe-cluster-instances 的帮助文本。

--cluster-name, -n CLUSTER_NAME

指定集群的名称。

--debug

启用调试日志记录。

--next-token NEXT_TOKEN

指定用于分页请求的令牌。

--node-type {HeadNode,ComputeNode,LoginNode}

指定要列出的节点类型。支持的值为 HeadNodeComputeNodeLoginNode。如果未指定此参数,则描述 HeadNodeComputeNodeLoginNode 实例。

--query QUERY

指定要对输出执行的 JMESPath 查询。

--queue-name QUEUE_NAME

指定要列出的队列的名称。如果未指定此参数,则描述所有队列中的实例。

--region, -r REGION

指定 Amazon Web Services 区域 要使用的。 Amazon Web Services 区域 必须使用AWS_DEFAULT_REGION环境变量、~/.aws/config文件[default]部分中的region设置或--region参数来指定。

使用 Amazon ParallelCluster 版本 3.1.4 的示例:

$ pcluster describe-cluster-instances -n cluster-v3 { "instances": [ { "launchTime": "2022-07-12T17:22:21.000Z", "instanceId": "i-1234567890abcdef0", "publicIpAddress": "198.51.100.44", "instanceType": "t2.micro", "state": "running", "nodeType": "HeadNode", "privateIpAddress": "192.0.2.0.196" }, { "launchTime": "2022-07-12T17:37:42.000Z", "instanceId": "i-021345abcdef6789", "queueName": "queue1", "publicIpAddress": "198.51.100.44", "instanceType": "t2.micro", "state": "pending", "nodeType": "ComputeNode", "privateIpAddress": "192.0.2.0.196" } ] }