描述
查询一个app资源某个版本的信息,包括参数信息和具体命令行等实现信息,仅支持私有App查询(GetAppDetail)。
请求方法
GET /apps/{AppName}?Detail=True&Qualifier={Qualifier}
参数说明
| 参数名称 | 类型 | 必选 | 描述 |
|---|---|---|---|
| AppName | string | 是 | App名称 |
| Qualifier | string | 否 | App资源的别名或版本号。如果没有指定该参数,那么代表查询最新版本的信息。 |
返回信息
返回状态码
HTTP/1.1 200 OK
返回消息体
{"Name": string,"Description": string,"InputParameters": {string: {"Description": string,"Type": string,"Default": string,"LocalPath": string},...},"OutputParameters": {string: {"Description": string,"Type": string,"LocalPath": string},...},// begin union// only one of the following can be specified:"Docker": {"Image": string,"RegistryOSSPath": string},"VM": {"ECSImageId": string},// end union"CommandLine": string,"EnvVars": {string: string,...},"Daemonize": boolean,"Config": {"ResourceType": {"Description": string,"Default": string,"Overwritable": boolean},"InstanceType": {"Description": string,"Default": string,"Overwritable": boolean},"InstanceCount": {"Description": string,"Default": number,"Overwritable": boolean},"MinDiskSize": {"Description": string,"Default": number,"Overwritable": boolean},"DiskType": {"Description": string,"Default": string,"Overwritable": boolean},"MaxRetryCount": {"Description": string,"Default": number,"Overwritable": boolean},"Timeout": {"Description": string,"Default": number,"Overwritable": boolean}}}
返回参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| Name | string | 应用名称 |
| Description | string | 应用的详细描述 |
| InputParameters | map<string, object(InputParameter)> | 该应用的输入参数列表 |
| OutputParameters | map<string, object(OutputParameter)> | 该应用的输出参数列表 |
| Docker | object(Docker) | Docker镜像有关配置 |
| VM | object(VM) | ECS虚拟机相关配置 |
| CommandLine | string | 执行应用时的命令行 |
| EnvVars | map<string, string> | 环境变量 |
| Daemonize | boolean | 应用在执行时,是否每次都要重新启动 |
| Config | object(Config) | 提交作业时的运行时参数 |
InputParameter
| 参数名称 | 类型 | 描述 |
|---|---|---|
| Description | string | 参数描述 |
| Type | string | 参数类型 |
| Default | string | 参数默认值 |
| LocalPath | string | LocalPath不为空说明该参数是OSS上的一个文件或者目录。在计算分析时,系统会将该参数值指定的OSS文件或者目录映射为本地LocalPath指定的文件或者目录。仅支持使用UTF-8编码。如果是目录,则必须以/结尾 |
OutputParameter
| 参数名称 | 类型 | 描述 |
|---|---|---|
| Description | string | 参数描述 |
| Type | string | 参数类型 |
| LocalPath | string | LocalPath不为空说明该参数是OSS上的一个文件或者目录。在计算分析时,系统会将本地LocalPath指定的文件或者目录映射为该参数值指定的OSS文件或者目录。仅支持使用UTF-8编码。如果是目录,则必须以/结尾 |
Docker
| 参数名称 | 类型 | 描述 |
|---|---|---|
| Image | string | Docker镜像 |
| RegistryOSSPath | string | docker registry storage在OSS上的根目录 |
VM
| 参数名称 | 类型 | 描述 |
|---|---|---|
| ECSImageId | string | ECS镜像Id |
Config
| 参数名称 | 类型 | 描述 |
|---|---|---|
| ResourceType | object(ResourceType) | 资源类型 |
| InstanceType | object(InstanceType) | 实例类型 |
| InstanceCount | object(InstanceCount) | 实例数量 |
| MinDiskSize | object(MinDiskSize) | 最小磁盘大小(GB) |
| DiskType | object(DiskType) | 磁盘类型 |
| MaxRetryCount | object(MaxRetryCount) | 某个Instance失败后,最大重试次数 |
| Timeout | object(Timeout) | Instance的运行时超时时间,单位为秒 |
ResourceType
| 参数名称 | 类型 | 描述 |
|---|---|---|
| Description | string | 给APP使用者的详细描述 |
| Default | string | 参数默认值 |
| Overwritable | boolean | 用户使用该APP提交作业时,是否可以覆盖掉默认值 |
InstanceType
| 参数名称 | 类型 | 描述 |
|---|---|---|
| Description | string | 给APP使用者的详细描述 |
| Default | string | 参数默认值 |
| Overwritable | boolean | 用户使用该APP提交作业时,是否可以覆盖掉默认值 |
InstanceCount
| 参数名称 | 类型 | 描述 |
|---|---|---|
| Description | string | 给APP使用者的详细描述 |
| Default | number | 参数默认值 |
| Overwritable | boolean | 用户使用该APP提交作业时,是否可以覆盖掉默认值 |
MinDiskSize
| 参数名称 | 类型 | 描述 |
|---|---|---|
| Description | string | 给APP使用者的详细描述 |
| Default | number | 参数默认值 |
| Overwritable | boolean | 用户使用该APP提交作业时,是否可以覆盖掉默认值 |
DiskType
| 参数名称 | 类型 | 描述 |
|---|---|---|
| Description | string | 给APP使用者的详细描述 |
| Default | string | 参数默认值 |
| Overwritable | boolean | 用户使用该APP提交作业时,是否可以覆盖掉默认值 |
MaxRetryCount
| 参数名称 | 类型 | 描述 |
|---|---|---|
| Description | string | 给APP使用者的详细描述 |
| Default | number | 参数默认值 |
| Overwritable | boolean | 用户使用该APP提交作业时,是否可以覆盖掉默认值 |
Timeout
| 参数名称 | 类型 | 描述 |
|---|---|---|
| Description | string | 给APP使用者的详细描述 |
| Default | number | 参数默认值 |
| Overwritable | boolean | 用户使用该APP提交作业时,是否可以覆盖掉默认值 |
示例
请求示例
GET /apps/myapp?Detail=True&Qualifier=1 HTTP/1.1
返回示例
HTTP/1.1 200 OK{"CommandLine": "cat ${inputFile} > ${outputFile} ","Config": {"DiskType": {"Default": "cloud_efficiency","Description": "","Overwritable": true},"InstanceCount": {"Default": 1,"Description": "","Overwritable": true},"InstanceType": {"Default": "","Description": "","Overwritable": true},"MaxRetryCount": {"Default": 0,"Description": "","Overwritable": true},"MinDiskSize": {"Default": 40,"Description": "","Overwritable": true},"ResourceType": {"Default": "OnDemand","Description": "","Overwritable": true},"Timeout": {"Default": 86400,"Description": "","Overwritable": true}},"Daemonize": false,"Description": "app description","Docker": {"Image": "myimage","RegistryOSSPath": "oss://bucket/registry"},"EnvVars": {},"InputParameters": {"inputFile": {"Default": null,"Description": "","LocalPath": "/tmp/inputFile","Type": "String"}},"Name": "myapp","OutputParameters": {"outputFile": {"Description": "","LocalPath": "/tmp/outputFile","Type": "String"}}}