方法说明
查询一个app资源,支持公共App和私有App(getApp)。
调用方法
GetAppResponse getApp(String appName) throws ClientException;GetAppResponse getApp(String appName, String scope) throws ClientException;GetAppResponse getApp(GetAppRequest req) throws ClientException;
参数说明
| 参数 |
类型 |
必选 |
说明 |
| appName |
String |
是 |
App名称。 |
| scope |
String |
否 |
可以为Public或Private。如果为Public,那么代表查询公共App;如果为Private或者不指定,那么代表查询私有App。 |
返回值说明
- 调用成功后返回一个GetAppResponse实例, 通过getApp()得到App。
App 的属性
| 参数名称 |
类型 |
描述 |
| name |
String |
应用名称 |
| description |
String |
应用的详细描述 |
| creationTime |
Date |
资源创建时间 |
| inputParameters |
Map<String, App.InputParameterValue> |
该应用的输入参数列表 |
| outputParameters |
map<string, App.OutputParameterValue> |
该应用的输出参数列表 |
| config |
App.Config |
提交作业时的运行时参数 |
| 参数名称 |
类型 |
描述 |
| description |
string |
给APP使用者的详细描述 |
| defaultValue |
string |
参数默认值 |
| type |
String |
参数类型 |
App.OutputParameterValue 的属性
| 参数名称 |
类型 |
描述 |
| description |
string |
给APP使用者的详细描述 |
| type |
String |
参数类型 |
App.Config 的属性
| 参数名称 |
类型 |
描述 |
| resourceType |
App.ConfigValue |
资源类型 |
| instanceType |
App.ConfigValue |
实例类型 |
| instanceCount |
App.ConfigValueInteger |
实例个数 |
| minDiskSize |
App.ConfigValue |
最小系统磁盘大小(GB) |
| diskType |
App.ConfigValue |
系统磁盘类型 |
| maxRetryCount |
App.ConfigValueInteger |
某个Instance失败后,最大重试次数 |
| timeout |
App.ConfigValueLong |
Instance的运行时超时时间,单位为秒 |
App.ConfigValue 的属性
| 参数名称 |
类型 |
描述 |
| description |
string |
给APP使用者的详细描述 |
| defaultValue |
string |
参数默认值 |
| overwritable |
boolean |
用户使用该APP提交作业时,是否可以覆盖掉默认值 |
App.ConfigValueInteger 的属性
| 参数名称 |
类型 |
描述 |
| description |
string |
给APP使用者的详细描述 |
| defaultValue |
int |
参数默认值 |
| overwritable |
boolean |
用户使用该APP提交作业时,是否可以覆盖掉默认值 |
App.ConfigValueLong 的属性
| 参数名称 |
类型 |
描述 |
| description |
string |
给APP使用者的详细描述 |
| defaultValue |
long |
参数默认值 |
| overwritable |
boolean |
用户使用该APP提交作业时,是否可以覆盖掉默认值 |
- 调用失败后,抛出异常: ClientException。
代码示例
try{ GetAppResponse getAppResponse = client.getApp("myApp"); App app = GetAppResponse.getApp(); //调用成功}catch(ClientException e){ e.printStackTrace(); //调用失败}