1. 接口描述
本接口(DescribeComputeEnv)用于查询计算环境的详细信息。
接口请求域名:batch.api.qcloud.com
2. 输入参数
名称 | 类型 | 是否必选 | 描述 |
---|---|---|---|
Version | String | 是 | API版本号 |
EnvId | String | 是 | 计算环境唯一标识 |
3. 输出参数
名称 | 类型 | 描述 |
---|---|---|
EnvId | String | 计算环境ID |
EnvName | String | 计算环境名称 |
EnvType | String | 计算环境类型 |
DesiredComputeNodeCount | Integer | 计算节点期望个数 |
Placement | Placement object | 位置信息 |
CreateTime | String | 计算环境创建时间 |
NextAction | String | 下一步动作,”DELETING“表示即将删除 |
ComputeNodeSet | array of ComputeNode objects | 计算节点信息 |
ComputeNodeMetrics | ComputeNodeMetrics object | 计算节点统计指标 |
ComputeNode
名称 | 类型 | 描述 |
---|---|---|
ComputeNodeId | String | 计算节点ID |
ComputeNodeInstanceId | String | 计算节点实例ID,对于CVM场景,即为CVM的InstanceId |
ComputeNodeState | String | 计算节点状态 |
PrivateIpAddresses | array of Strings | 计算节点内网IP列表 |
PublicIpAddresses | array of Strings | 计算节点公网IP列表 |
Cpu | Integer | CPU核数 |
Mem | Integer | 内存容量,单位GiB |
ResourceCreatedTime | String | 资源创建完成时间 |
TaskInstanceNumAvailable | Integer | 计算节点运行 TaskInstance 可用容量。0表示计算节点忙碌。 |
AgentVersion | String | Batch Agent 版本 |
ComputeNodeMetrics
名称 | 类型 | 描述 |
---|---|---|
SubmittedCount | String | 已经完成提交的计算节点数量 |
CreatingCount | String | 创建中的计算节点数量 |
CreationFailedCount | String | 创建失败的计算节点数量 |
CreatedCount | String | 完成创建的计算节点数量 |
RunningCount | String | 运行中的计算节点数量 |
DeletingCount | String | 销毁中的计算节点数量 |
AbnormalCount | String | 异常的计算节点数量 |
# 输出参数示例
{
"Response": {
"EnvId": "env-gzah9akx",
"ComputeNodeMetrics": {
"CreatedCount": 0,
"DeletingCount": 0,
"CreationFailedCount": 0,
"SubmittedCount": 0,
"CreatingCount": 0,
"AbnormalCount": 0,
"RunningCount": 2
},
"EnvType": "MANAGED",
"EnvName": "test compute env",
"Placement": {
"Zone": "ap-guangzhou-2"
},
"ComputeNodeSet": [
{
"ComputeNodeId": "node-aq7dgzsk",
"ComputeNodeState": "RUNNING",
"Mem": 2,
"ResourceCreatedTime": "2017-11-21T03:52:05Z",
"ComputeNodeInstanceId": "ins-p3zo9wle",
"AgentVersion": "1.0.4",
"TaskInstanceNumAvailable": 1,
"Cpu": 1
},
{
"ComputeNodeId": "node-glzgyd3w",
"ComputeNodeState": "RUNNING",
"Mem": 2,
"ResourceCreatedTime": "2017-11-21T03:52:05Z",
"ComputeNodeInstanceId": "ins-2yvobvb6",
"AgentVersion": "1.0.4",
"TaskInstanceNumAvailable": 1,
"Cpu": 1
}
],
"CreateTime": "2017-11-21T03:51:27Z",
"RequestId": "3864fbdb-bd36-417b-a792-814c6820c3a6"
}
}
4. 错误码
错误码 | 描述 |
---|---|
ComputeEnvNotFound | 指定计算环境不存在。 |
InvalidBatchEnvId.Malformed | 非法的计算环境ID格式。 |
InternalServerError | 内部服务错误。 |