调用ListClusters查询账号中当前地域拥有的集群列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ehpc:ListClusters |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| PageNumber |
integer |
否 |
显示的页码,起始值为 1。 |
1 |
| PageSize |
integer |
否 |
每页显示的条数。取值范围:1~50 默认值:10 |
10 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| PageSize |
integer |
本页条数。 |
1 |
| RequestId |
string |
请求 ID。 |
04F0F334-1335-436C-A1D7-6C044FE73368 |
| PageNumber |
integer |
当前页码。 |
1 |
| TotalCount |
integer |
列表条目总数。 |
1 |
| Clusters |
object |
||
| ClusterInfoSimple |
array<object> |
集群详细信息。 |
|
|
array<object> |
|||
| VpcId |
string |
VPC ID。 |
vpc-b3f3edefefeep0760yju**** |
| Status |
string |
集群状态。可能值:
|
running |
| CreateTime |
string |
集群创建时间。时间格式为 ISO 8601,使用 UTC 时区。 |
2020-10-30T07:39:20.000Z |
| IsComputeEss |
boolean |
是否启用弹性伸缩组。可能值:
|
false |
| ComputeSpotStrategy |
string |
计算节点竞价策略。可能值:
|
NoSpot |
| AccountType |
string |
账户服务器类型。可能值:
|
nis |
| Count |
integer |
集群计算节点数目。 |
3 |
| EhpcVersion |
string |
EHPC 版本。 |
1.0.0 |
| Description |
string |
集群描述。 |
clusterdescription |
| BaseOsTag |
string |
基础镜像操作系统标签,仅管控节点使用。 |
CentOS_7.2_64 |
| Name |
string |
集群名称。 |
test |
| ImageId |
string |
镜像 ID。 |
wi_1607_x64_dtc_zh_40G_alibase**** |
| ComputeSpotPriceLimit |
number |
计算节点下 ECS 实例的每小时最高价格。返回值最多保留小数点后 3 位。 |
0.034 |
| 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 |
地域 ID。 |
cn-hangzhou |
| InstanceChargeType |
string |
集群实例付费类型。可能值:
|
PostPaid |
| VSwitchId |
string |
交换机 ID。 |
vsw-bp1lfcjbfb099rrjn**** |
| ZoneId |
string |
可用区 ID。 |
cn-hangzhou-c |
| LoginNodes |
string |
登录节点列表。 |
{"Id": "i-bp13x4is8pvdhws7e****"} |
| Id |
string |
集群 ID。 |
ehpc-hz-jeJki6**** |
| Location |
string |
集群所在位置。可能值:
|
PublicCloud |
| ClientVersion |
string |
集群客户端版本。 |
1.0.64 |
| ResourceGroupId |
string |
资源组 ID。您可以调用 ListResourceGroups 查询资源组 ID。 |
rg-acfmxazb4ph**** |
| 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 |
GPU 资源。单位:卡。 |
0 |
| Cpu |
integer |
CPU 资源。单位:核。 |
1 |
| Memory |
integer |
内存大小。单位为 MiB。 |
1024 |
| UsedResources |
object |
集群资源使用量。 |
|
| Gpu |
integer |
GPU 资源。单位:卡。 |
0 |
| Cpu |
integer |
CPU 资源。单位:核。 |
1 |
| Memory |
integer |
内存大小。单位为 MiB。 |
1024 |
| HasPlugin |
boolean |
集群是否使用了插件。取值范围:
默认值:false |
false |
示例
正常返回示例
JSON格式
{
"PageSize": 1,
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
"PageNumber": 1,
"TotalCount": 1,
"Clusters": {
"ClusterInfoSimple": [
{
"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",
"ResourceGroupId": "rg-acfmxazb4ph****",
"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
}
]
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidParams | The specified parameter %s is invalid. | 指定的参数 %s 无效。 |
| 500 | UnknownError | An unknown error occurred. | 未知错误 |
| 404 | ImageNotFound | The specified image does not exist. | 指定的镜像不存在,请您检查该参数是否正确。 |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server | 请求失败,服务暂时不可用 |
| 406 | AgentError | The agent service request failed. | 集群侧命令运行失败。%s |
| 406 | DbError | A database service error occurred. | 数据库请求失败 |
| 406 | AliyunError | An Alibaba Cloud product error occurred. | 阿里云产品错误。%s |
| 406 | EcsError | An error occurred while calling the ECS API operation. | ECS API调用出错. %s |
| 407 | NotAuthorized | You are not authorized by RAM for this request. | 此请求未获得RAM授权 |
| 407 | EntityNotExist.Role | The role does not exist. | 当前角色不存在 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。