全部产品
Search
文档中心

批量计算:获取App列表

更新时间:Apr 12, 2018

描述

列举app资源,支持公共App和私有App。

请求

  1. GET /apps?Scope={Scope}&Marker={Marker}&MaxItemCount={MaxItemCount}

请求参数

Query Parameters

参数名称 类型 必选 描述
Scope string 可以为Public或Private。如果为Public,那么代表查询公共App;如果为Private或者不指定,那么代表查询私有App
Marker string 用于分页查询的Marker。默认值:空
MaxItemCount number 此次查询的条目数量。必须为整数,不能大于100,不能小于1。默认值:50

返回

返回状态码

  1. HTTP/1.1 200 OK

返回消息体

  1. {
  2. "Items": [
  3. {
  4. "Name": string,
  5. "Description": string,
  6. "CreationTime": string,
  7. "InputParameters": {
  8. string: {
  9. "Description": string,
  10. "Type": string,
  11. "Default": string
  12. },
  13. ...
  14. },
  15. "OutputParameters": {
  16. string: {
  17. "Description": string,
  18. "Type": string,
  19. "Default": string
  20. },
  21. ...
  22. },
  23. // begin union
  24. // only one of the following can be specified:
  25. "Docker": {
  26. "Image": string,
  27. "RegistryOSSPath": string
  28. },
  29. "VM": {
  30. "ECSImageId": string
  31. },
  32. // end union
  33. "CommandLine": string,
  34. "EnvVars": {
  35. string: string,
  36. ...
  37. },
  38. "Daemonize": boolean,
  39. "Config": {
  40. "ResourceType": {
  41. "Description": string,
  42. "Default": string,
  43. "Overwritable": boolean
  44. },
  45. "InstanceType": {
  46. "Description": string,
  47. "Default": string,
  48. "Overwritable": boolean
  49. },
  50. "InstanceCount": {
  51. "Description": string,
  52. "Default": number,
  53. "Overwritable": boolean
  54. },
  55. "MinDiskSize": {
  56. "Description": string,
  57. "Default": number,
  58. "Overwritable": boolean
  59. },
  60. "DiskType": {
  61. "Description": string,
  62. "Default": string,
  63. "Overwritable": boolean
  64. },
  65. "MaxRetryCount": {
  66. "Description": string,
  67. "Default": number,
  68. "Overwritable": boolean
  69. },
  70. "Timeout": {
  71. "Description": string,
  72. "Default": number,
  73. "Overwritable": boolean
  74. }
  75. }
  76. }
  77. ],
  78. "NextMarker": string
  79. }

响应参数

参数名称 类型 描述
Items object(App)[] 符合查询条件的资源列表
NextMarker string 用于下一次进行分页查询的Marker

App

参数名称 类型 描述
Name string 应用名称
Description string 应用的详细描述
CreationTime 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 参数默认值

OutputParameter

参数名称 类型 描述
Description string 参数描述
Type string 参数类型
Default string 参数默认值

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提交作业时,是否可以覆盖掉默认值

示例

请求示例

  1. GET /apps?Scope=Public HTTP/1.1

返回示例

  1. HTTP/1.1 200 OK
  2. {
  3. "Items": [
  4. {
  5. "Config": {
  6. "DiskType": {
  7. "Default": "cloud_efficiency",
  8. "Description": "",
  9. "Overwritable": true},
  10. "InstanceCount": {
  11. "Default": 1,
  12. "Description": "",
  13. "Overwritable": true},
  14. "InstanceType": {
  15. "Default": "",
  16. "Description": "",
  17. "Overwritable": true},
  18. "MaxRetryCount": {
  19. "Default": 0,
  20. "Description": "",
  21. "Overwritable": true},
  22. "MinDiskSize": {
  23. "Default": 40,
  24. "Description": "",
  25. "Overwritable": true},
  26. "ResourceType": {
  27. "Default": "OnDemand",
  28. "Description": "",
  29. "Overwritable": true},
  30. "Timeout": {
  31. "Default": 86400,
  32. "Description": "",
  33. "Overwritable": true}},
  34. "CreationTime": "2017-08-14T07:10:41.281465Z",
  35. "Description": "app description",
  36. "InputParameters": {
  37. "inputFile": {
  38. "Default": null,
  39. "Description": "",
  40. "Type": "String"}},
  41. "Name": "myapp",
  42. "OutputParameters": {
  43. "outputFile": {
  44. "Default": null,
  45. "Description": "",
  46. "Type": "String"}},
  47. "OwnerId": 123456
  48. }
  49. ],
  50. "NextMarker": ""
  51. }