PUT zstack/v1/template-configurations/{templateUuid}/actions
Authorization: OAuth the-session-uuid
{ "applyTemplateConfig": {}, "systemTags": [], "userTags": [] }
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X PUT -d '{"applyTemplateConfig":{}}' http://localhost:8080/zstack/v1/template-configurations/00000000/actions
名字 | 类型 | 位置 | 描述 | 可选值 | 起始版本 |
---|---|---|---|---|---|
templateUuid | String | url | 模板Uuid | 3.6.0 | |
systemTags (可选) | List | body | 系统标签 | 3.6.0 | |
userTags (可选) | List | body | 用户标签 | 3.6.0 |
{}
,出错时返回的JSON结构包含一个error字段,例如:{ "error": { "code": "SYS.1001", "description": "A message or a operation timeout", "details": "Create VM on KVM timeout after 300s" } }
ApplyTemplateConfigAction action = new ApplyTemplateConfigAction(); action.templateUuid = "00000000"; action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; ApplyTemplateConfigAction.Result res = action.call();
ApplyTemplateConfigAction action = ApplyTemplateConfigAction() action.templateUuid = "00000000" action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" ApplyTemplateConfigAction.Result res = action.call()
GET zstack/v1/template-configurations/templates GET zstack/v1/template-configurations/templates/{uuid}
Authorization: OAuth the-session-uuid
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X GET http://localhost:8080/zstack/v1/template-configurations/templates?
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X GET http://localhost:8080/zstack/v1/template-configurations/templates/8bca97cf1b2030f7b0872191260a4dc5
可查询字段
运行CLI命令行工具,输入QueryGlobalConfigTemplate并按Tab键查看所有可查询字段以及可跨表查询的资源名。
{ "inventories": [ { "uuid": "reservedCapacity", "name": "scenes1", "type": "System", "description": "For scenes1" } ] }
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
error | ErrorCode | 错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error | 3.6.0 |
inventories | List | 详情参考inventories | 3.6.0 |
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
code | String | 错误码号,错误的全局唯一标识,例如SYS.1000, HOST.1001 | 3.6.0 |
description | String | 错误的概要描述 | 3.6.0 |
details | String | 错误的详细信息 | 3.6.0 |
elaboration | String | 保留字段,默认为null | 3.6.0 |
opaque | LinkedHashMap | 保留字段,默认为null | 3.6.0 |
cause | ErrorCode | 根错误,引发当前错误的源错误,若无原错误,该字段为null | 3.6.0 |
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
uuid | String | 资源的UUID,唯一标示该资源 | 3.6.0 |
name | String | 模板名称 | 3.6.0 |
type | String | 模板类型 | 3.6.0 |
description | String | 该模板的描述信息及推荐场景 | 3.6.0 |
QueryGlobalConfigTemplateAction action = new QueryGlobalConfigTemplateAction(); action.conditions = asList(); action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; QueryGlobalConfigTemplateAction.Result res = action.call();
QueryGlobalConfigTemplateAction action = QueryGlobalConfigTemplateAction() action.conditions = [] action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" QueryGlobalConfigTemplateAction.Result res = action.call()
GET zstack/v1/template-configurations/configs GET zstack/v1/template-configurations/configs/{uuid}
Authorization: OAuth the-session-uuid
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X GET http://localhost:8080/zstack/v1/template-configurations/configs?
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X GET http://localhost:8080/zstack/v1/template-configurations/configs/8d81b083dd0b3374af2454ab8d3fb0ef
可查询字段
运行CLI命令行工具,输入QueryTemplateConfig并按Tab键查看所有可查询字段以及可跨表查询的资源名。
{ "inventories": [ { "templateUuid": "0000111122223333", "category": "backupStorage", "name": "reservedCapacity", "defaultValue": "1G", "value": "2G" } ] }
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
error | ErrorCode | 错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error | 3.6.0 |
inventories | List | 详情参考inventories | 3.6.0 |
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
code | String | 错误码号,错误的全局唯一标识,例如SYS.1000, HOST.1001 | 3.6.0 |
description | String | 错误的概要描述 | 3.6.0 |
details | String | 错误的详细信息 | 3.6.0 |
elaboration | String | 保留字段,默认为null | 3.6.0 |
opaque | LinkedHashMap | 保留字段,默认为null | 3.6.0 |
cause | ErrorCode | 根错误,引发当前错误的源错误,若无原错误,该字段为null | 3.6.0 |
名字 | 类型 | 描述 | 起始版本 |
---|---|---|---|
templateUuid | String | 所属模板Uuid | 3.6.0 |
category | String | 配置类型 | 3.6.0 |
name | String | 配置名称 | 3.6.0 |
defaultValue | String | 模板默认值 | 3.6.0 |
value | String | 模板值 | 3.6.0 |
QueryTemplateConfigAction action = new QueryTemplateConfigAction(); action.conditions = asList(); action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; QueryTemplateConfigAction.Result res = action.call();
QueryTemplateConfigAction action = QueryTemplateConfigAction() action.conditions = [] action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" QueryTemplateConfigAction.Result res = action.call()
学习路径
ZStack Cloud 产品学习路径
快速梳理文档,点击相应文本链接,快速跳转到相应文档的页面,学习 ZStack Cloud 产品。
业务咨询:
400-962-2212 转 1售后咨询:
400-962-2212 转 2其他(漏洞提交、投诉举报等)
400-962-2212 转 3业务咨询:
400-962-2212 转 1ZStack学院:
training@zstack.io业务咨询:
400-962-2212 转 1售后咨询:
400-962-2212 转 2其他(漏洞提交、投诉举报等)
400-962-2212 转 3业务咨询:
400-962-2212 转 1售后咨询:
400-962-2212 转 2其他(漏洞提交、投诉举报等)
400-962-2212 转 3业务咨询:
400-962-2212 转 1商务联系:
channel@zstack.io业务咨询:
400-962-2212 转 1商务联系:
channel@zstack.io下载链接已发送至您的邮箱。
如未收到,请查看您的垃圾邮件、订阅邮件、广告邮件。 当您收到电子邮件后,请点击 URL 链接,以完成下载。感谢您使用 ZStack 产品和服务。
成功提交申请。
我们将安排工作人员尽快与您取得联系。感谢您使用 ZStack 产品和服务。
信息提交成功。
我们将安排工作人员尽快与您取得联系,请保持电话畅通。感谢您使用 ZStack 产品和服务。
商务咨询:
400-962-2212 转 1售后咨询:
400-962-2212 转 2商务联系:
sales@zstack.io成功提交申请。
我们将安排工作人员尽快与您取得联系。感谢您使用 ZStack 产品和服务。