上一主题: info 方法(template 对象)下一主题: destroy 方法(template 对象)


rename 方法(template 对象)
说明

重命名应用模板

语法
/api/v2/template/rename?template=template&new_name=new-template&vdc=controller-name 
参数
模板

要重命名的模板的名称

new_name

模板的新名称

vdc

目标虚拟数据中心的名称

事务类型

同步

请求类型

GET

示例

将名为 TWiki_r4 的模板重命名为 TWiki_r5。

GET http://192.168.123.200/api/v2/template/rename?template=TWiki_r4&new_name=TWiki_r5&vdc=mygrid 
样例输出
XML:
<opt></opt>
JSON:
{} 
HTTP 错误代码
404

未找到实体 vdc mygrid。 -WS_API 应用中没有配置指定的 VDC 名称。

400.4

缺少必需参数 (template)。 -请求中缺少参数 template=template

400.4

缺少必需参数 (new_name)。 -请求中缺少参数 new_name=new-name

404.1

未找到实体-权限被拒绝-应用 VDS_CentOS_r1 不存在。