获取定时器任务列表
基本信息
Action
DescribeSchedulerTasks
Path
/iaas
Method
GET
请求参数
此接口除公共参数外,还包含以下参数。关于公共参数的更多信息,请参见前文内容。
| 参数名 | 类型 | 是否必须 | 描述 |
|---|---|---|---|
owner |
String |
否 |
资源的所有者 |
scheduler |
String |
是 |
定时器id |
返回数据
此接口除公共返回参数外,还包含以下返回参数。关于公共返回参数的更多信息,请参见前文内容。
| 参数名 | 类型 | 是否必须 | 描述 |
|---|---|---|---|
scheduler_task_set |
Array |
否 |
定时器任务详情列表 |
scheduler_task_set.console_id |
String |
否 |
Console ID |
scheduler_task_set.create_time |
String |
否 |
创建时间 |
scheduler_task_set.owner |
String |
否 |
所有者 |
scheduler_task_set.resources |
Array |
否 |
资源列表 |
scheduler_task_set.root_user_id |
String |
否 |
资源主账户id |
scheduler_task_set.scheduler_id |
String |
否 |
定时器id |
scheduler_task_set.scheduler_task_id |
String |
否 |
定时器任务id |
scheduler_task_set.scheduler_task_name |
String |
否 |
定时器任务名称 |
scheduler_task_set.status |
String |
否 |
任务状态 |
scheduler_task_set.status_time |
String |
否 |
任务状态时间 |
scheduler_task_set.task_params |
Object |
否 |
任务参数 |
scheduler_task_set.task_params.resources |
Array |
否 |
否 |
scheduler_task_set.task_params.scheduler |
String |
否 |
否 |
scheduler_task_set.task_script |
String |
否 |
任务脚本 |
scheduler_task_set.task_type |
String |
否 |
任务类型 |
scheduler_task_set.update_time |
String |
否 |
更新时间 |
total_count |
Integer |
否 |
总数 |
请求示例
{
"action": "DescribeSchedulerTasks",
"limit": 10,
"offset": 0,
"owner": "usr-BnnisHWR",
"scheduler": "schd-0g60lk75",
"zone": "testing"
}
返回示例
{
"action": "DescribeSchedulerTasksResponse",
"ret_code": 0,
"scheduler_task_set": [
{
"console_id": "testingcloud",
"create_time": "2023-07-05T00:41:51Z",
"owner": "usr-BnnisHWR",
"resources": [
{
"resource_id": "i-g1l5c926",
"resource_name": "rtr-0eqsosdc",
"resource_type": "instance"
}
],
"root_user_id": "usr-BnnisHWR",
"scheduler_id": "schd-0g60lk75",
"scheduler_task_id": "st-vy8dwhzo",
"scheduler_task_name": "a",
"status": "active",
"status_time": "2023-07-05T00:41:51Z",
"task_params": {
"resources": [
"i-g1l5c926"
],
"scheduler": "schd-0g60lk75"
},
"task_script": "",
"task_type": "restart_instances",
"update_time": "2023-07-05T00:41:51Z"
}
],
"total_count": 1,
"trace_id": "EFgCkR2N"
}