

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

# describeCluster
<a name="describe-cluster"></a>

获取有关现有集群的详细信息。

**Topics**
+ [

## 请求语法
](#describe-cluster-request)
+ [

## 请求正文
](#describe-cluster-request-body)
+ [

## 响应语法
](#describe-cluster-response)
+ [

## 响应正文
](#describe-cluster-response-body)
+ [

## 示例
](#describe-cluster-example)

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

```
GET /v3/clusters/{clusterName}
{
  "region": "string"
}
```

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

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

**区域**  
 Amazon Web Services 区域 集群所在的。  
类型：字符串  
必需：否

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

**注意**  
`failureReason`已更改为`failures`从 3.5.0 Amazon ParallelCluster 版本开始。

```
{
  "clusterName": "string",
  "region": "string",
  "version": "string",
  "cloudFormationStackStatus": "CREATE_IN_PROGRESS",
  "clusterStatus": "CREATE_IN_PROGRESS",
  "scheduler": {
    "type": "string",
    "metadata": {
      "name": "string",
      "version": "string"
    }
  },
  "cloudformationStackArn": "string",
  "creationTime": "2019-08-24T14:15:22Z",
  "lastUpdatedTime": "2019-08-24T14:15:22Z",
  "clusterConfiguration": {
    "url": "string"
  },
  "computeFleetStatus": "START_REQUESTED",
  "tags": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "headNode": {
    "instanceId": "string",
    "instanceType": "string",
    "launchTime": "2019-08-24T14:15:22Z",
    "privateIpAddress": "string",
    "publicIpAddress": "string",
    "state": "pending"
  },
  "failures": [
    {
      "failureCode": "string",
      "failureReason": "string"
    }
  ],
  "loginNodes": {      
    "status": "string",
    "address": "string",
    "poolName": "string",
    "scheme": "string",
    "healthyNodes": integer,
    "unhealthyNodes": integer
  }
}
```

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

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

**cloudformationStackArn**  
主 CloudFormation 堆栈的亚马逊资源名称 (ARN)。  
类型：字符串

**cloudformationStackStatus**  
堆 CloudFormation 栈状态。  
类型：字符串  
有效值：`CREATE_IN_PROGRESS | CREATE_FAILED | CREATE_COMPLETE | ROLLBACK_IN_PROGRESS | ROLLBACK_FAILED | ROLLBACK_COMPLETE | DELETE_IN_PROGRESS | DELETE_FAILED | DELETE_COMPLETE | UPDATE_IN_PROGRESS | UPDATE_COMPLETE_CLEANUP_IN_PROGRESS | UPDATE_COMPLETE | UPDATE_ROLLBACK_IN_PROGRESS | UPDATE_ROLLBACK_FAILED | UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS | UPDATE_ROLLBACK_COMPLETE`

**clusterConfiguration**    
**url**  
集群配置文件的 URL。  
类型：字符串

**clusterStatus**  
集群状态。  
类型：字符串  
有效值：`CREATE_IN_PROGRESS | CREATE_FAILED | CREATE_COMPLETE | DELETE_IN_PROGRESS | DELETE_FAILED | DELETE_COMPLETE | UPDATE_IN_PROGRESS | UPDATE_COMPLETE | UPDATE_FAILED`

**computeFleetStatus**  
计算实例集状态。  
类型：字符串  
有效值：`START_REQUESTED | STARTING | RUNNING | PROTECTED | STOP_REQUESTED | STOPPING | STOPPED | UNKNOWN | ENABLED | DISABLED`

**creationTime**  
创建集群时的时间戳。  
类型：日期时间

**lastUpdatedTime**  
上次更新集群时的时间戳。  
类型：日期时间

**区域**  
 Amazon Web Services 区域 在其中创建集群。  
类型：字符串

**tags**  
与集群关联的标签的列表。    
**key**  
标签名称。  
类型：字符串  
**tag**  
标签值。  
类型：字符串

**version**  
用于创建集群的 Amazon ParallelCluster 版本。  
类型：字符串

**failures**  
集群堆栈处于 `CREATE_FAILED` 状态时的故障列表。    
**failureCode**  
集群堆栈处于 `CREATE_FAILED` 状态时的故障代码。  
类型：字符串  
**failureReason**  
集群堆栈处于 `CREATE_FAILED` 状态时的故障原因。  
类型：字符串

**head\$1node**  
集群头节点。    
**instanceId**  
亚马逊 EC2 实例 ID。  
类型：字符串  
**instanceType**  
Amazon EC2 实例类型。  
类型：字符串  
**launchTime**  
Amazon EC2 实例的启动时间。  
类型：日期时间  
**privateIpAddress**  
集群私有 IP 地址。  
类型：字符串  
**publicIpAddress**  
集群公共 IP 地址。  
类型：字符串  
**状态**  
头节点实例状态。  
类型：字符串  
有效值：`pending | running | shutting-down | terminated | stopping | stopped`

**scheduler**    
**metadata**  
调度器元数据。    
**名称**  
调度器的名称。  
类型：字符串  
**version**  
调度器版本。  
类型：字符串

**loginNodes**    
status  
登录节点状态。  
类型：字符串  
有效值：`PENDING | FAILED | ACTIVE`  
address  
登录节点地址。  
类型：字符串  
poolName  
登录节点池名称。  
类型：字符串  
scheme  
登录节点方案。  
类型：字符串  
healthyNodes  
健康节点的数量。  
类型：整数  
unhealthyNodes  
不正常节点数。  
类型：整数

**type**  
调度器类型。  
类型：字符串

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

------
#### [ Python ]

**请求**

```
$ describe_cluster(cluster_name_3x)
```

**200 响应**

```
{
  "cloud_formation_stack_status": "CREATE_COMPLETE",
  "cloudformation_stack_arn": "arn:aws:cloudformation:us-east-1:123456789012:stack/cluster_name_3x/16b49540-aee5-11ec-8e18-0ac1d712b241",
  "cluster_configuration": {
    "url": "https://parallelcluster-...."
  },
  "cluster_name": "cluster_name_3x",
  "cluster_status": "CREATE_COMPLETE",
  "compute_fleet_status": "RUNNING",
  "creation_time": datetime.datetime(2022, 3, 28, 22, 19, 9, 661000, tzinfo=tzlocal()),
  "head_node": {
    "instance_id": "i-abcdef01234567890",
    "instance_type": "t2.micro",
    "launch_time": datetime.datetime(2022, 3, 28, 22, 21, 56, tzinfo=tzlocal()),
    "private_ip_address": "172.31.56.3",
    "public_ip_address": "107.23.100.164",
    "state": "running"
  },
  "last_updated_time": datetime.datetime(2022, 3, 28, 22, 19, 9, 661000, tzinfo=tzlocal()),
  "region": "us-east-1",
  "tags": [
    {
      "key": "parallelcluster:version", "value": "3.2.1"
    }
  ],
  "version": "3.2.1"
}
```

------