CreateConfigTemplate_Web应用托管服务_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

流控信息

当前云产品API请求速率暂未透出。

授权信息

当前云产品暂无权限信息透出。

请求语法

POST /pop/v1/wam/configTemplate HTTP/1.1

请求参数

字段名称字段详情
TemplateNamestring

新建模板的名称

示例值:new-template-name
TemplateDescriptionstring

新建模版的描述

示例值:this is an new template
AppIdstring

新建模板所在的应用 ID

示例值:wa-5d1d9d8c85c7f86e2efb****
StackIdstring

技术栈 ID

示例值:ws-6c937c98a9c0296d0c482****
SourceTemplateIdstring

源配置模板的 ID,将会以此模板来创建新的配置模板

示例值:wct-5d1ec2813c940d1bf45b****
SourceEnvIdstring

源环境 ID,指定用于创建模版配置的源环境

示例值:we-5d1dac8e08350d1dd948****
ProfileNamestring

初始化配置类型,可选以下值:展开详情

示例值:HighAvailability
PkgVersionIdstring

部署包版本 ID

示例值:wp-5d1daece08350d1dd948****
OptionSettingsstring

自定义配置项数据,JSON 数组,包含以下字段:展开详情

示例值:[{"path":"resources.ecs.autoScaling", "name":"instanceNum","value":"10"}, {"path":"application.option", "name":"port","value":"8081"}]
RegionIdstring

返回参数

字段名称字段详情
ConfigTemplateobject

配置模板信息

Messagestring

响应消息,若成功请求为 success

示例值:success
RequestIdstring

请求 ID

示例值:7C8AA286-14EA-4713-B81D-859BECF1****
Codestring

响应代码,若成功请求为 OK

示例值:OK

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
400
AppNotExist
A corresponding application was not found based on the application ID.诊断
400
DuplicatedTemplateName
An error occurred while generating an environment configuration template. The specified template name already exists in the application.诊断
400
AppCategoryNotMatchWithStacks
The application type declared in the application does not match the type of the software stack. Please make sure that the types are consistent and then try again.诊断
400
StackContainsNoConfigOption
An error occurred while modifying the configuration. The corresponding software stack does not contain any configuration items.诊断
400
ChangingAReadonlyConfig
An error occurred while modifying the configuration. You cannot modify a read-only configuration.诊断
400
ConfigValueInvalid
An error occurred while resolving the configuration values. Please make sure the value type and constraints is consistent with the declared type. Types currently supported by WebPlus are: String, Integer, List, Boolean, Float, Json.诊断
400
AppPackageOwnedByOthers
The version of the application package used must be consistent with the application to which the environment belongs.诊断
400
ConfigParsingFailed
An error occurred while extracting the corresponding item from the configuration. Please check the configuration and try again.诊断
400
ProfileNameInvalid
The specified cluster type in the template is invalid. Valid values: Default, StandAlone, and HighAvailability.诊断
403
ResourceAuthFailed
The specified resource does not exist or it does not belong to this Alibaba Cloud account.诊断
404
StackNotExists
The declared software stack information does not exist.诊断
404
ConfigOptionNotExists
An error occurred while updating the configuration. The system did not locate the configuration item declared by the key.诊断
404
AppPackageNotExists
An application deployment package is required to create or update a deployment environment. For the first time of using WebPlus, we recommend that you use a sample project.诊断

变更历史

变更时间变更内容概要操作
2022-03-15
新增deprecated

相关示例