删除定时任务(DeleteSchedulerJob)
API请求
URLs
DELETE zstack/v1/scheduler/jobs/{uuid}
Headers
Authorization: OAuth the-session-uuid
Curl示例
curl -H "Content-Type: application/json" \
-H "Authorization: OAuth c9b798cf05f44047b9f79f4f66e0e960" \
-X DELETE http://localhost:8080/zstack/v1/scheduler/jobs/1ae34aa114424c45ab5af9f9be7af8c1?
参数列表
名字 | 类型 | 位置 | 描述 | 可选值 | 起始版本 |
---|---|---|---|---|---|
uuid | String | url | 资源的UUID,唯一标示该资源 | 2.1 | |
deleteMode (可选) | String | body | 2.1 | ||
systemTags (可选) | List | body | 2.1 | ||
userTags (可选) | List | body | 2.1 |
API返回
该API成功时返回一个空的JSON结构{},出错时返回的JSON结构包含一个error字段,例如:
{
"error": {
"code": "SYS.1001",
"description": "A message or a operation timeout",
"details": "Create VM on KVM timeout after 300s"
}
}
SDK示例
Java
SDK
DeleteSchedulerJobAction action = new DeleteSchedulerJobAction();
action.uuid = "8730c7093939498c9bea46f84435cced";
action.deleteMode = "Permissive";
action.sessionId = "be23055450334fb9add5e0e9031cf238";
DeleteSchedulerJobAction.Result res = action.call();
Python
SDK
DeleteSchedulerJobAction action = DeleteSchedulerJobAction()
action.uuid = "8a723f909a94473fab6cfb41fb34077f"
action.deleteMode = "Permissive"
action.sessionId = "4e0af23135a7446b90fe40c911f5e946"
DeleteSchedulerJobAction.Result res = action.call()