You need to enable JavaScript to run this app.
文档中心
基础设施管理

基础设施管理

复制全文
下载 pdf
模板管理
UpdateTemplate - 更新模板
复制全文
下载 pdf
UpdateTemplate - 更新模板
更新私有模板;修改模版时创建新版本。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:UpdateTemplate​
要执行的操作,取值:UpdateTemplate。​
​
Version string 必选 示例值:2026-05-01​
API的版本,取值:2026-05-01。​
​
TemplateID string 必选 示例值:tp-01arz3ndektsv4rrffq69g5fav​
模板 ID。​
​
TemplateName string 可选 示例值:MyTemplate​
模板名称,长度为 1 到 128,可包含中文、字母、数字、下划线和短横线。​
​
Description string 可选 示例值:描述​
模板描述,长度不超过 512。​
​
TemplateURL string 可选 示例值:https://download.example/template.zip?signed​
模板来源 URL,支持 HTTP、HTTPS、TOS 对象或 TOS 目录,模板包最大为 5 MB。​
​
TemplatePath string 可选 示例值:env/prod​
包内相对目录,需与 TemplateURL 一起传入。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
TemplateID string 示例值:tp-01arz3ndektsv4rrffq69g5fav​
模板 ID。​
​
TemplateVersion long 示例值:2​
创建或更新后的模板业务版本号。​
​
​
​
请求示例​
​
POST /?Action=UpdateTemplate&Version=2026-05-01 HTTP/1.1​
Host: inframanager.cn-beijing.volcengineapi.com​
Content-Type: application/json; charset=UTF-8​
X-Date: 20261012T112303Z​
X-Content-Sha256: 287e874e******d653b44d21e​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20261012/cn-beijing/inframanager/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
{​
"TemplateID": "tp-01arz3ndektsv4rrffq69g5fav",​
"TemplateURL": "https://download.example/template.zip?signed"​
}​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "20261012192327067044139048673B78",​
"Action": "UpdateTemplate",​
"Version": "2026-05-01",​
"Service": "inframanager",​
"Region": "cn-beijing"​
},​
"Result": {​
"TemplateID": "tp-01arz3ndektsv4rrffq69g5fav",​
"TemplateVersion": 2​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
InvalidParameter​
The specified parameter %q is invalid.​
请求参数不合法。​
400​
InvalidParameter.TemplatePath​
The specified TemplatePath is invalid.​
模板路径不合法。​
400​
InvalidTemplate.Archive​
The template archive is invalid: %s​
模板归档文件不合法。​
400​
InvalidTemplate.Content​
Failed to parse the template: %s​
模板内容解析失败。​
400​
MissingParameter​
The parameter %q is required.​
缺少必填参数。​
400​
OperationFailed.TemplateDownload​
Failed to download the template: %s​
模板下载失败。​
400​
QuotaExceeded.TemplateSize​
The template size exceeds the limit: %s​
模板大小超过限制。​
403​
AccessDenied​
Access to the requested template operation is denied.​
无权访问指定模板或 Module。​
404​
EntityNotFound.Template​
The template %q does not exist.​
模板不存在。​
409​
AlreadyExists.Template​
The template name %q already exists.​
同名模板已存在。​
500​
InternalError​
The request has failed due to an unknown error.​
内部服务错误,请稍后重试。​
​
​
最近更新时间:2026.10.19 21:23:16
这个页面对您有帮助吗?
有用
有用
无用
无用