1. 接口描述
本接口(DescribeComputeEnvActivities)用于查询计算环境的活动信息。
接口请求域名:batch.api.qcloud.com
2. 输入参数
名称 | 类型 | 是否必选 | 描述 |
---|---|---|---|
Version | String | 是 | API版本号 |
EnvId | String | 是 | 计算环境唯一标识 |
Filters.N | Array of Filter objects | 否 | 过滤条件,详见过滤条件表。 |
Offset | Integer | 否 | 偏移量,默认为0。 |
Limit | Integer | 否 | 返回数量,默认为20,最大值为100。 |
Filter
名称 | 类型 | 是否必选 | 描述 |
---|---|---|---|
Name | String | 是 | 过滤键的名称 |
Values.N | array of Strings | 是 | 若干个过滤值 |
过滤条件表
名称 | 类型 | 是否必选 | 描述 |
---|---|---|---|
compute-node-id | String | 否 | 计算节点标识 |
3. 输出参数
名称 | 类型 | 描述 |
---|---|---|
TotalCount | Integer | 活动数量 |
ActivitySet | array of Activity objects | 活动列表 |
Activity
名称 | 类型 | 描述 |
---|---|---|
ActivityId | String | 活动ID |
ComputeNodeId | String | 计算节点ID |
ComputeNodeActivityType | String | 计算节点活动类型,创建或者销毁 |
EnvId | String | 计算环境ID |
Cause | String | 起因 |
ActivityState | String | 活动状态 |
StateReason | String | 状态原因 |
StartTime | String | 活动开始时间 |
EndTime | String | 活动结束时间 |
# 输出参数示例
{
"Response": {
"TotalCount": 2,
"ActivitySet": [
{
"ComputeNodeId": "node-2lde8by0",
"EnvId": "env-fbg68d77",
"ActivityState": "SUCCEED",
"ActivityId": "act-jy67r2fn",
"StartTime": "2017-12-25T03:25:26Z",
"StateReason": "",
"EndTime": "2017-12-25T03:25:55Z",
"Cause": "ModifyComputeEnv: increase the capacity from 0 to 2",
"ComputeNodeActivityType": "CREATE_COMPUTE_NODE"
},
{
"ComputeNodeId": "node-1j578yqk",
"EnvId": "env-fbg68d77",
"ActivityState": "SUCCEED",
"ActivityId": "act-7mqjkaqb",
"StartTime": "2017-12-25T03:25:26Z",
"StateReason": "",
"EndTime": "2017-12-25T03:25:55Z",
"Cause": "ModifyComputeEnv: increase the capacity from 0 to 2",
"ComputeNodeActivityType": "CREATE_COMPUTE_NODE"
}
],
"RequestId": "cd6d7983-9840-4df0-bbda-01df67e346fe"
}
}
4. 错误码
错误码 | 描述 |
---|---|
ComputeEnvNotFound | 指定计算环境不存在。 |
InvalidBatchEnvId.Malformed | 非法的计算环境ID格式。 |
InvalidBatchComputeNodeId.Malformed | 非法的计算节点格式。 |
UnsupportedParams | 过滤条件不支持。 |
InternalServerError | 内部服务错误。 |