调用CreateApplication创建一个边缘应用服务,实现容器(虚拟设备)、裸金属或虚机的边缘服务托管。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ens:CreateApplication |
create |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| Template |
string |
是 |
边缘应用模版,Json 格式的字符串,包含:
|
{\"appMetaData\":{ \"appName\":\"nginx\", \"clusterName\":\"poc\", \"appType\":\"Common\", \"description\":\"测试服务\" }, \"resourceAttribute\":{ \"resourceType\":\"\", \"instanceSpec\":\"ens.sn1.tiny\", \"systemDiskSize\":20, \"dataDiskSize\":0, \"bandwithOut\":10, \"areaLevel\":\"National\", \"netSecurityStrategy\":null, \"initConfig\":null }, \"resourceSelector\":[ { \"count\":1 } ], \"workload\":[ { \"podCount\":1, \"serviceConfig\":null, \"name\":\"nginx\", \"podSpec\":{ \"containers\":[ { \"name\":\"android\", \"image\":\"edge-registry.alicdn.com/test/nginx\" } ] }, \"count\":1 } ]} |
| Timeout |
integer |
否 |
异步处理的超时时间。单位秒,默认 1800。 |
1800 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| AppId |
string |
创建成功生成的应用 ID,是用户边缘应用服务的唯一标识。 |
d0639abf-789a-4527-b420-031d2cd9ad9b |
| RequestId |
string |
请求 ID。 |
CEF72CEB-54B6-4AE8-B225-F876FF7BA984 |
示例
正常返回示例
JSON格式
{
"AppId": "d0639abf-789a-4527-b420-031d2cd9ad9b",
"RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | MissingParameter | The input parameter that is mandatory for processing this request is not supplied. | |
| 400 | NoPermission | Permission denied. | |
| 400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. | |
| 400 | InvalidParameter | The errorMessage is %s. Please check it again. | |
| 400 | ens.interface.error | An error occurred while calling the API. | |
| 400 | CallInterface | Call Interface Happen Error. | 接口调用出错。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。