获取App列表
更新时间:
ListApps
描述
列举 App资源,支持公共 App 和私有 App。
请求语法
请求行:
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 |
请求数据:无
成功
响应行:
HTTP/1.1 200 OK
响应数据:
{"Items": [{"Name": "test-copy","Description": "Copy input file to output file","CommandLine": "cp -rf ${inputFile} ${outputFile}","Daemonize": false,"EnvVars": {"env-k3": "env-v3","env-k5": "env-v5"},"InputParameters": {"inputFile": {"Default": "","Type": "String","Description": "Input param","LocalPath": "/tmp/infile/"}},"OutputParameters": {"outputFile": {"Default": null,"Type": "String","Description": "Output param","LocalPath": "/tmp/outfile/"}},"VM": {"ECSImageId": "img-centos"},"Docker": {"Image": "ubuntu:14.04","RegistryOSSPath": "oss://bucket/registry"},"Config": {"InstanceCount": {"Default": 1,"Description": "Instance count","Overwritable": true},"ResourceType": {"Default": "OnDemand","Description": "Resource type","Overwritable": true},"DiskType": {"Default": "cloud_efficiency","Description": "Disk type","Overwritable": true},"MaxRetryCount": {"Default": 1,"Description": "Max retry count","Overwritable": true},"Timeout": {"Default": 1000,"Description": "Time out","Overwritable": true},"MinDiskSize": {"Default": 40,"Description": "Min Disk size","Overwritable": true},"InstanceType": {"Default": "ecs.sn2ne.large","Description": "Instance type","Overwritable": true}}}],"NextMarker": "PythonSdkTest"}
响应参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| 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提交作业时,是否可以覆盖掉默认值 |
错误
该文章对您有帮助吗?