调用ListClusters查询账号中当前地域拥有的集群列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ListClusters |
系统规定参数。取值:ListClusters。 |
PageNumber | Integer | 否 | 1 |
显示的页码,起始值为1。 |
PageSize | Integer | 否 | 10 |
每页显示的条数。取值范围:1~50 默认值:10 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
PageSize | Integer | 1 |
本页条数。 |
RequestId | String | 04F0F334-1335-436C-A1D7-6C044FE73368 |
请求ID。 |
PageNumber | Integer | 1 |
当前页码。 |
TotalCount | Integer | 1 |
列表条目总数。 |
Clusters | Array of ClusterInfoSimple |
集群详细信息。 |
|
ClusterInfoSimple | |||
VpcId | String | vpc-b3f3edefefeep0760yju**** |
VPC ID。 |
Status | String | running |
集群状态。可能值:
|
CreateTime | String | 2020-10-30T07:39:20.000Z |
集群创建时间。 |
IsComputeEss | Boolean | false |
是否启用弹性伸缩组。可能值:
|
ComputeSpotStrategy | String | NoSpot |
计算节点竞价策略。可能值:
|
AccountType | String | nis |
账户服务器类型。可能值:
|
Count | Integer | 3 |
集群计算节点数目。 |
EhpcVersion | String | 1.0.0 |
EHPC版本。 |
Description | String | clusterdescription |
集群描述。 |
BaseOsTag | String | CentOS_7.2_64 |
基础镜像操作系统标签,仅管控节点使用。 |
Name | String | test |
集群名称。 |
ImageId | String | wi_1607_x64_dtc_zh_40G_alibase**** |
镜像ID。 |
ComputeSpotPriceLimit | Float | 0.034 |
计算节点下ECS实例的每小时最高价格。返回值最多保留小数点后3位。 |
SchedulerType | String | pbs |
调度服务器类型。可能值:
|
DeployMode | String | Standard |
集群部署模式。可能值:
|
NodeSuffix | String | name |
主机后缀名。 |
ImageOwnerAlias | String | system |
镜像类型。可能值:
|
OsTag | String | CentOS_7.2_64 |
操作系统镜像标签。 |
NodePrefix | String | test |
主机前缀名。 |
InstanceType | String | ecs.n1.tiny |
计算节点实例规格。 |
RegionId | String | cn-hangzhou |
地域ID。 |
InstanceChargeType | String | PostPaid |
集群实例付费类型。可能值:
|
VSwitchId | String | vsw-bp1lfcjbfb099rrjn**** |
交换机ID。 |
ZoneId | String | cn-hangzhou-c |
可用区ID。 |
LoginNodes | String | {"Id": "i-bp13x4is8pvdhws7e****"} |
登录节点列表。 |
Id | String | ehpc-hz-jeJki6**** |
集群ID。 |
Location | String | PublicCloud |
集群所在位置。可能值:
|
ClientVersion | String | 1.0.64 |
集群客户端版本。 |
Managers | Object |
管理节点信息。 |
|
OperatingCount | Integer | 1 |
操作进行中的节点数量,包括初始化、安装中、释放中等状态的节点。 |
ExceptionCount | Integer | 0 |
异常节点数。 |
StoppedCount | Integer | 0 |
停止节点数。 |
Total | Integer | 2 |
总管理节点数目。 |
NormalCount | Integer | 1 |
正常节点数。 |
Computes | Object |
计算节点信息。 |
|
OperatingCount | Integer | 1 |
操作进行中的节点数量,包括初始化、安装中、释放中等状态的节点。 |
ExceptionCount | Integer | 0 |
异常节点数。 |
StoppedCount | Integer | 0 |
停止节点数。 |
Total | Integer | 2 |
总节点数。 |
NormalCount | Integer | 1 |
正常节点数。 |
TotalResources | Object |
集群资源总量。 |
|
Gpu | Integer | 0 |
GPU资源。单位:卡。 |
Cpu | Integer | 1 |
CPU资源。单位:核。 |
Memory | Integer | 1024 |
内存大小。单位为MiB。 |
UsedResources | Object |
集群资源使用量。 |
|
Gpu | Integer | 0 |
GPU资源。单位:卡。 |
Cpu | Integer | 1 |
CPU资源。单位:核。 |
Memory | Integer | 1024 |
内存大小。单位为MiB。 |
HasPlugin | Boolean | false |
集群是否使用了插件。取值范围:
默认值:false |
示例
请求示例
https://ehpc.cn-hangzhou.aliyuncs.com/?Action=ListClusters
&<公共请求参数>
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<ListClustersResponse>
<PageSize>1</PageSize>
<RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
<PageNumber>1</PageNumber>
<TotalCount>1</TotalCount>
<Clusters>
<VpcId>vpc-b3f3edefefeep0760yju****</VpcId>
<Status>running</Status>
<CreateTime>2020-10-30T07:39:20.000Z</CreateTime>
<IsComputeEss>false</IsComputeEss>
<ComputeSpotStrategy>NoSpot</ComputeSpotStrategy>
<AccountType>nis</AccountType>
<Count>3</Count>
<EhpcVersion>1.0.0</EhpcVersion>
<Description>clusterdescription</Description>
<BaseOsTag>CentOS_7.2_64</BaseOsTag>
<Name>test</Name>
<ImageId>wi_1607_x64_dtc_zh_40G_alibase****</ImageId>
<ComputeSpotPriceLimit>0.034</ComputeSpotPriceLimit>
<SchedulerType>pbs</SchedulerType>
<DeployMode>Standard</DeployMode>
<NodeSuffix>name</NodeSuffix>
<ImageOwnerAlias>system</ImageOwnerAlias>
<OsTag>CentOS_7.2_64</OsTag>
<NodePrefix>test</NodePrefix>
<InstanceType>ecs.n1.tiny</InstanceType>
<RegionId>cn-hangzhou</RegionId>
<InstanceChargeType>PostPaid</InstanceChargeType>
<VSwitchId>vsw-bp1lfcjbfb099rrjn****</VSwitchId>
<ZoneId>cn-hangzhou-c</ZoneId>
<LoginNodes>{"Id": "i-bp13x4is8pvdhws7e****"}</LoginNodes>
<Id>ehpc-hz-jeJki6****</Id>
<Location>PublicCloud</Location>
<ClientVersion>1.0.64</ClientVersion>
<Managers>
<OperatingCount>1</OperatingCount>
<ExceptionCount>0</ExceptionCount>
<StoppedCount>0</StoppedCount>
<Total>2</Total>
<NormalCount>1</NormalCount>
</Managers>
<Computes>
<OperatingCount>1</OperatingCount>
<ExceptionCount>0</ExceptionCount>
<StoppedCount>0</StoppedCount>
<Total>2</Total>
<NormalCount>1</NormalCount>
</Computes>
<TotalResources>
<Gpu>0</Gpu>
<Cpu>1</Cpu>
<Memory>1024</Memory>
</TotalResources>
<UsedResources>
<Gpu>0</Gpu>
<Cpu>1</Cpu>
<Memory>1024</Memory>
</UsedResources>
<HasPlugin>false</HasPlugin>
</Clusters>
</ListClustersResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"PageSize" : 1,
"RequestId" : "04F0F334-1335-436C-A1D7-6C044FE73368",
"PageNumber" : 1,
"TotalCount" : 1,
"Clusters" : [ {
"VpcId" : "vpc-b3f3edefefeep0760yju****",
"Status" : "running",
"CreateTime" : "2020-10-30T07:39:20.000Z",
"IsComputeEss" : false,
"ComputeSpotStrategy" : "NoSpot",
"AccountType" : "nis",
"Count" : 3,
"EhpcVersion" : "1.0.0",
"Description" : "clusterdescription",
"BaseOsTag" : "CentOS_7.2_64",
"Name" : "test",
"ImageId" : "wi_1607_x64_dtc_zh_40G_alibase****",
"ComputeSpotPriceLimit" : 0.034,
"SchedulerType" : "pbs",
"DeployMode" : "Standard",
"NodeSuffix" : "name",
"ImageOwnerAlias" : "system",
"OsTag" : "CentOS_7.2_64",
"NodePrefix" : "test",
"InstanceType" : "ecs.n1.tiny",
"RegionId" : "cn-hangzhou",
"InstanceChargeType" : "PostPaid",
"VSwitchId" : "vsw-bp1lfcjbfb099rrjn****",
"ZoneId" : "cn-hangzhou-c",
"LoginNodes" : "{\"Id\": \"i-bp13x4is8pvdhws7e****\"}",
"Id" : "ehpc-hz-jeJki6****",
"Location" : "PublicCloud",
"ClientVersion" : "1.0.64",
"Managers" : {
"OperatingCount" : 1,
"ExceptionCount" : 0,
"StoppedCount" : 0,
"Total" : 2,
"NormalCount" : 1
},
"Computes" : {
"OperatingCount" : 1,
"ExceptionCount" : 0,
"StoppedCount" : 0,
"Total" : 2,
"NormalCount" : 1
},
"TotalResources" : {
"Gpu" : 0,
"Cpu" : 1,
"Memory" : 1024
},
"UsedResources" : {
"Gpu" : 0,
"Cpu" : 1,
"Memory" : 1024
},
"HasPlugin" : false
} ]
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidParams | The specified parameter %s is invalid. | 无效的参数:%s |
404 | ImageNotFound | The specified image does not exist. | 指定的镜像不存在,请您检查该参数是否正确。 |
406 | AgentError | The agent service request failed. | 集群侧命令运行失败 |
406 | DbError | A database service error occurred. | 数据库请求失败 |
406 | AliyunError | An Alibaba Cloud product error occurred. | 阿里云产品错误 |
406 | EcsError | An error occurred while calling the ECS API operation. | ECS API调用出错 |
407 | NotAuthorized | You are not authorized by RAM for this request. | 此请求未获得RAM授权 |
407 | EntityNotExist.Role | The role does not exist. | 当前角色不存在 |
500 | UnknownError | An unknown error occurred. | 未知错误,请检查相关参数是否合理,检查后稍后重试。 |
503 | ServiceUnavailable | The request has failed due to a temporary failure of the server | 请求失败,服务暂时不可用 |
访问错误中心查看更多错误码。