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

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

describeClusterInstances

描述属于集群的实例。

请求语法

GET /v3/clusters/{clusterName}/instances { "nextToken": "string", "nodeType": "string", "queueName": "string", "region": "string" }

请求正文

clusterName

集群的名称。

类型:字符串

必需:是

nextToken

用于分页请求的令牌。

类型:字符串

必需:否

nodeType

按节点类型筛选实例。

类型:字符串

有效值:HeadNodeComputeNodeLoginNode

必需:否

queueName

按队列名称筛选实例。

类型:字符串

必需:否

region

集群所在的 Amazon Web Services 区域。

类型:字符串

必需:否

响应语法

{ "nextToken": "string", "instances": [ { "instanceId": "string", "instanceType": "string", "launchTime": "2019-08-24T14:15:22Z", "privateIpAddress": "string", "publicIpAddress": "string", "state": "pending", "nodeType": "HeadNode", "queueName": "string" } ] }

响应正文

instances

集群实例列表。

instanceId

EC2 实例 ID。

类型:字符串

instanceType

EC2 实例类型。

类型:字符串

launchTime

启动 EC2 实例的时间。

类型:日期时间

nodeType

节点类型。

类型:字符串

有效值:HeadNodeComputeNodeLoginNode

publicIpAddress

集群公共 IP 地址。

类型:字符串

queueName

EC2 实例支持其中节点的队列的名称。

类型:字符串

state

节点 EC2 实例状态。

类型:字符串

有效值:pending | running | shutting-down | terminated | stopping | stopped

nextToken

用于分页请求的令牌。

类型:字符串

示例

Python

请求

$ describe_cluster_instances(cluster_name_3x)

200 响应

{ 'instances': [ { 'instance_id': 'i-abcdef01234567890', 'instance_type': 't2.micro', 'launch_time': datetime.datetime(2022, 3, 30, 14, 2, 7, tzinfo=tzlocal()), 'node_type': 'HeadNode', 'private_ip_address': '192.0.2.5', 'public_ip_address': '198.51.100.180', 'state': 'running' } ] }