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

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

describeCluster

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

请求语法

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

请求正文

clusterName

集群的名称。

类型:字符串

必需:是

region

集群所在的 Amazon Web Services 区域。

类型:字符串

必需:否

响应语法

注意

从 Amazon ParallelCluster 版本 3.5.0 开始,failureReason 更改为了 failures

{ "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", "scheme": "string", "healthyNodes": integer, "unhealthyNodes": integer } }

响应正文

clusterName

集群的名称。

类型:字符串

cloudformationStackArn

主 CloudFormation 堆栈的 Amazon 资源名称 (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

上次更新集群时的时间戳。

类型:日期时间

region

在其中创建集群的 Amazon Web Services 区域。

类型:字符串

tags

与集群关联的标签的列表。

key

标签名称。

类型:字符串

tag

标签值。

类型:字符串

version

用于创建集群的 Amazon ParallelCluster 版本。

类型:字符串

failures

集群堆栈处于 CREATE_FAILED 状态时的故障列表。

failureCode

集群堆栈处于 CREATE_FAILED 状态时的故障代码。

类型:字符串

failureReason

集群堆栈处于 CREATE_FAILED 状态时的故障原因。

类型:字符串

head_node

集群头节点。

instanceId

EC2 实例 ID。

类型:字符串

instanceType

EC2 实例类型。

类型:字符串

launchTime

启动 EC2 实例的时间。

类型:日期时间

privateIpAddress

集群私有 IP 地址。

类型:字符串

publicIpAddress

集群公共 IP 地址。

类型:字符串

state

头节点实例状态。

类型:字符串

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

scheduler
metadata

调度器元数据。

name

调度器的名称。

类型:字符串

version

调度器版本。

类型:字符串

loginNodes
status

登录节点状态。

类型:字符串

有效值:PENDING | FAILED | ACTIVE

address

登录节点地址。

类型:字符串

scheme

登录节点方案。

类型:字符串

scheme

正常节点数。

类型:整数

scheme

不正常节点数。

类型:整数

type

调度器类型。

类型:字符串

示例

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' }