PUT zstack/v1/gc-jobs/{uuid}/actions
Authorization: OAuth the-session-uuid
{
"triggerGCJob": {},
"systemTags": [],
"userTags": []
}
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"triggerGCJob":{}}' \
http://localhost:8080/zstack/v1/gc-jobs/1450275537b53cfeba9e6ac79ebadb16/actions
名字 | 类型 | 位置 | 描述 | 可选值 | 起始版本 |
---|---|---|---|---|---|
uuid | String | url | 资源的UUID,唯一标示该资源 | 0.6 | |
systemTags (可选) | List | body | 0.6 | ||
userTags (可选) | List | body | 0.6 |
{
"error": {
"code": "SYS.1001",
"description": "A message or a operation timeout",
"details": "Create VM on KVM timeout after 300s"
}
}
TriggerGCJobAction action = new TriggerGCJobAction();
action.uuid = "ff4eb99f62364bcab4cbcebe4dea7de7";
action.sessionId = "7a51dbf52d5d41b0a877491143b6937a";
TriggerGCJobAction.Result res = action.call();
TriggerGCJobAction action = TriggerGCJobAction()
action.uuid = "a1d1ab14128e4f7398924591915ac65c"
action.sessionId = "6dcc50cb3dc5401b8ce03540a225f623"
TriggerGCJobAction.Result res = action.call()
DELETE zstack/v1/gc-jobs/{uuid}
Authorization: OAuth the-session-uuid
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth ea06449412a24699955ea802430000f3" \
-X DELETE http://localhost:8080/zstack/v1/gc-jobs/3a5d968dd8d743c280888a4973ea71d5
名字 | 类型 | 位置 | 描述 | 可选值 | 起始版本 |
---|---|---|---|---|---|
uuid | String | url | 资源的UUID,唯一标示该资源 | 0.6 | |
systemTags (可选) | List | body | 0.6 | ||
userTags (可选) | List | body | 0.6 |
{
"error": {
"code": "SYS.1001",
"description": "A message or a operation timeout",
"details": "Create VM on KVM timeout after 300s"
}
}
DeleteGCJobAction action = new DeleteGCJobAction();
action.uuid = "6bac0ebceac44a198609b0019c40a8eb";
action.sessionId = "78e46c7bfe0249fe9613223642222085";
DeleteGCJobAction.Result res = action.call();
DeleteGCJobAction action = DeleteGCJobAction()
action.uuid = "42db77385ebf4768bf105011ec8e6aaf"
action.sessionId = "331167c4de264088862128e5043c5a93"
DeleteGCJobAction.Result res = action.call()
GET zstack/v1/gc-jobs
GET zstack/v1/gc-jobs/{uuid}
Authorization: OAuth the-session-uuid
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 8a590138fd064e5b8747e9fa75dd6c63" \
-X GET http://localhost:8080/zstack/v1/gc-jobs?q=name=gc&q=state=Enabled
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 68ab95870cb4460fb9c82360f9ed64b2" \
-X GET http://localhost:8080/zstack/v1/gc-jobs/b41ea820e0bd47d5a028ddb3eb10bb98
可查询字段
运行zstack-cli命令行工具,输入QueryGCJob
并按Tab键查看所有可查询字段以及可跨表查询的资源名。
{
"inventories": [
{
"uuid": "c7606f2ed20b4212aa3d1ce4e00acc1c",
"name": "TestGC",
"type": "TimeBased",
"createDate": "Jun 7, 2017 9:21:16 PM",
"lastOpDate": "Jun 7, 2017 9:21:16 PM"
}
]
}
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
error | ErrorCode | 错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error | 0.6 |
inventories | List | 详情参考inventories | 0.6 |
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
code | String | 错误码号,错误的全局唯一标识,例如SYS.1000, HOST.1001 | 0.6 |
description | String | 错误的概要描述 | 0.6 |
details | String | 错误的详细信息 | 0.6 |
elaboration | String | 保留字段,默认为null | 0.6 |
opaque | LinkedHashMap | 保留字段,默认为null | 0.6 |
cause | ErrorCode | 根错误,引发当前错误的源错误,若无原错误,该字段为null | 0.6 |
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
uuid | String | 资源的UUID,唯一标示该资源 | 0.6 |
name | String | 资源名称 | 0.6 |
runnerClass | String | 0.6 | |
context | String | 0.6 | |
status | String | 0.6 | |
managementNodeUuid | String | 0.6 | |
type | String | 0.6 | |
createDate | Timestamp | 创建时间 | 0.6 |
lastOpDate | Timestamp | 最后一次修改时间 | 0.6 |
QueryGCJobAction action = new QueryGCJobAction();
action.conditions = asList("name=gc","state=Enabled");
action.sessionId = "3b403b588a96471cbee74a19d4a846aa";
QueryGCJobAction.Result res = action.call();
QueryGCJobAction action = QueryGCJobAction()
action.conditions = ["name=gc","state=Enabled"]
action.sessionId = "76af9b84c87f4dcf9aa8f9042a982a6b"
QueryGCJobAction.Result res = action.call()
学习路径
ZStack Cloud 产品学习路径
快速梳理文档,点击相应文本链接,快速跳转到相应文档的页面,学习 ZStack Cloud 产品。
商务咨询:
400-962-2212 转 1售后咨询:
400-962-2212 转 2商务联系:
sales@zstack.io商务咨询:
400-962-2212 转 1商务联系:
channel@zstack.io商务咨询:
400-962-2212 转 1售后咨询:
400-962-2212 转 2商务联系:
sales@zstack.io商务咨询:
400-962-2212 转 1商务联系:
channel@zstack.io商务咨询:
400-962-2212 转 1商务联系:
channel@zstack.io下载链接已发送至您的邮箱。
如未收到,请查看您的垃圾邮件、订阅邮件、广告邮件。 当您收到电子邮件后,请点击 URL 链接,以完成下载。感谢您使用 ZStack 产品和服务。
成功提交申请。
我们将安排工作人员尽快与您取得联系。感谢您使用 ZStack 产品和服务。
立即体验
联系我们
回到顶部
商务咨询:
400-962-2212 转 1售后咨询:
400-962-2212 转 2商务联系:
sales@zstack.io成功提交申请。
我们将安排工作人员尽快与您取得联系。感谢您使用 ZStack 产品和服务。