文档

获取App列表

ListApps

描述

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

请求语法

请求行:

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

请求方法 GET,请求资源为 apps,请求参数为:

参数名称 类型 必选 描述
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": "test-copy",
  5. "Description": "Copy input file to output file",
  6. "CommandLine": "cp -rf ${inputFile} ${outputFile}",
  7. "Daemonize": false,
  8. "EnvVars": {
  9. "env-k3": "env-v3",
  10. "env-k5": "env-v5"
  11. },
  12. "InputParameters": {
  13. "inputFile": {
  14. "Default": "",
  15. "Type": "String",
  16. "Description": "Input param",
  17. "LocalPath": "/tmp/infile/"
  18. }
  19. },
  20. "OutputParameters": {
  21. "outputFile": {
  22. "Default": null,
  23. "Type": "String",
  24. "Description": "Output param",
  25. "LocalPath": "/tmp/outfile/"
  26. }
  27. },
  28. "VM": {
  29. "ECSImageId": "img-centos"
  30. },
  31. "Docker": {
  32. "Image": "ubuntu:14.04",
  33. "RegistryOSSPath": "oss://bucket/registry"
  34. },
  35. "Config": {
  36. "InstanceCount": {
  37. "Default": 1,
  38. "Description": "Instance count",
  39. "Overwritable": true
  40. },
  41. "ResourceType": {
  42. "Default": "OnDemand",
  43. "Description": "Resource type",
  44. "Overwritable": true
  45. },
  46. "DiskType": {
  47. "Default": "cloud_efficiency",
  48. "Description": "Disk type",
  49. "Overwritable": true
  50. },
  51. "MaxRetryCount": {
  52. "Default": 1,
  53. "Description": "Max retry count",
  54. "Overwritable": true
  55. },
  56. "Timeout": {
  57. "Default": 1000,
  58. "Description": "Time out",
  59. "Overwritable": true
  60. },
  61. "MinDiskSize": {
  62. "Default": 40,
  63. "Description": "Min Disk size",
  64. "Overwritable": true
  65. },
  66. "InstanceType": {
  67. "Default": "ecs.sn2ne.large",
  68. "Description": "Instance type",
  69. "Overwritable": true
  70. }
  71. }
  72. }
  73. ],
  74. "NextMarker": "PythonSdkTest"
  75. }

响应参数

参数名称 类型 描述
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提交作业时,是否可以覆盖掉默认值

错误

  • 本页导读 (0)
文档反馈