CreateAppEnv_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.

接口说明

  • 选择从已有环境或配置模板快速创建一个部署环境,使用两种方式创建环境时,将使用所选择环境或配置模板的部署包版本来部署新环境。
  • 若不指定已有环境或配置模板,则必须指定技术栈 ID 和部署包版本 ID。
  • 若同时指定源环境 ID,配置模板 ID 与技术栈 ID 中的多个参数,将依照源环境 ID,配置模板 ID,技术栈 ID 的优先级顺序来创建新环境。
  • 此 API 被调用后若非模拟变更,则将返回此次创建的变更 ID,可以使用此 ID 查询变更信息。

流控信息

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

授权信息

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

请求语法

POST /pop/v1/wam/appEnv HTTP/1.1

请求参数

字段名称字段详情
EnvNamestring

环境名称

示例值:envTest
EnvDescriptionstring

环境描述信息

示例值:this is an env
StackIdstring

环境使用的技术栈 ID,若指定了源环境 ID 或配置模板 ID,此参数将被忽略,否则必须指定此参数

示例值:ws-6c937c98a9c0296d0c48*****
AppIdstring

应用 ID

示例值:wa-6c937c98a9c0296d0c48*****
PkgVersionIdstring

部署包版本 ID

示例值:wp-6c937c98a9c0296d0c48*****
OptionSettingsstring

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

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

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

示例值:HighAvailability
SourceEnvIdstring

源环境 ID,新创建的环境将克隆此环境的技术栈,配置项和部署包版本。

示例值:we-6c937c98a9c0296d0c48*****
TemplateIdstring

源模版 ID

示例值:wct-5d1c0a5d913567334af*****
DryRunboolean

是否模拟变更展开详情

示例值:false
ExtraPropertiesstring
RegionIdstring

返回参数

字段名称字段详情
Messagestring

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

示例值:success
RequestIdstring

请求 ID

示例值:8D69F3C4-EA43-49D5-875A-0893BF5*****
EnvChangeDetailobject

环境变更信息

Codestring

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

示例值:OK

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
404
ConfigOptionNotExists
An error occurred while updating the configuration. The system did not locate the configuration item declared by the key.诊断
500
ResourceAuthFailed
The specified resource does not exist or it does not belong to this Alibaba Cloud account.诊断
500
EnvCreateFailed
An error occurred while creating an environment.诊断
500
OSSDisabled
You have not activated the OSS service and cannot use the WebPlus service. Please go to the OSS console (https://oss.console.aliyun.com) to activate OSS and try again.诊断
500
OSSApiCallFailed
When initializing applications, updating configurations, or destroying applications, WebPlus attempts to communicate with OSS through API communication. An OSS service throw error occurred. The bucket or the file does not exist.诊断
500
StackNotExists
The declared software stack information does not exist.诊断
500
AppNotExist
A corresponding application was not found based on the application ID.诊断
500
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.诊断
500
StackContainsNoConfigOption
An error occurred while modifying the configuration. The corresponding software stack does not contain any configuration items.诊断
500
ChangingAReadonlyConfig
An error occurred while modifying the configuration. You cannot modify a read-only configuration.诊断
500
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.诊断
500
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.诊断
500
AppPackageOwnedByOthers
The version of the deployment package used must be consistent with the application to which the environment belongs.诊断

变更历史

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

相关示例