

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

# describeClusterInstances
<a name="describe-cluster-instances"></a>

描述属于集群的实例。

**Topics**
+ [请求语法](#describe-cluster-instances-request)
+ [请求正文](#describe-cluster-instances-request-body)
+ [响应语法](#describe-cluster-instances-response)
+ [响应正文](#describe-cluster-instances-response-body)
+ [示例](#describe-cluster-instances-example)

## 请求语法
<a name="describe-cluster-instances-request"></a>

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

## 请求正文
<a name="describe-cluster-instances-request-body"></a>

**clusterName**  
集群的名称。  
类型：字符串。  
必需：是

**nextToken**  
用于获取下一组结果的令牌。  
类型：字符串  
必需：否

**nodeType**  
按节点类型筛选实例。  
类型：字符串  
有效值：`HeadNode`、`ComputeNode`、`LoginNode`  
必需：否

**queueName**  
按队列名称筛选实例。  
类型：字符串  
必需：否

**region**  
 AWS 区域 集群所在的。  
类型：字符串  
必需：否

## 响应语法
<a name="describe-cluster-instances-response"></a>

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

## 响应正文
<a name="describe-cluster-instances-response-body"></a>

**instances**  
集群实例列表。    
**instanceId**  
亚马逊 EC2 实例 ID。  
类型：字符串  
**instanceType**  
Amazon EC2 实例类型。  
类型：字符串  
**launchTime**  
Amazon EC2 实例的启动时间。  
类型：日期时间  
**nodeType**  
节点类型。  
类型：字符串  
有效值：`HeadNode`、`ComputeNode`、`LoginNode`  
**publicIpAddress**  
集群公共 IP 地址。  
类型：字符串  
**queueName**  
Amazon EC2 实例支持节点的队列名称。  
类型：字符串  
**状态**  
节点 Amazon EC2 实例状态。  
类型：字符串  
有效值：`pending | running | shutting-down | terminated | stopping | stopped`

**nextToken**  
用于检索下一组结果的令牌，没有更多结果时为 `null`。  
类型：字符串

## 示例
<a name="describe-cluster-instances-example"></a>

------
#### [ 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"
    }
  ]
}
```

------