All Products
Search
Document Center

Batch Compute:getApp

Last Updated:May 11, 2018

Method description

Queries a public or private App resource.

Call method

  1. GetAppResponse getApp(String appName) throws ClientException;
  2. GetAppResponse getApp(String appName, String scope) throws ClientException;
  3. GetAppResponse getApp(GetAppRequest req) throws ClientException;

Parameter description

Parameter Type Required Description
appName String Yes Name of the App
scope String No Optional values include Public and Private. If the value is Public, a public App is queried. If the value is Private or not specified, a private App is queried

Response description

  • If the call succeeds, a GetAppResponse instance is returned. You can use getApp() to obtain the App information.

Attributes of App

Attribute Type Description
name String Name of the App
description String Detailed description about the App
creationTime Date Resource creation time
inputParameters Map Input parameter list of the App
outputParameters map Output parameter list of the App
config App.Config Running parameters when the job is submitted

Attributes of App.InputParameterValue

Attribute Type Description
description String Detailed description provided for App users
defaultValue String Default value of the parameter
type String Parameter type

Attributes of App.OutputParameterValue

Attribute Type Description
description String Detailed description provided for App users
type String Parameter type

Attributes of App.Config

Attribute Type Description
resourceType App.ConfigValue Type of the resource
instanceType App.ConfigValue Type of the instance
instanceCount App.ConfigValueInteger Number of instances
minDiskSize App.ConfigValue Minimum size of the system disk (GB)
diskType App.ConfigValue Type of the system disk
maxRetryCount App.ConfigValueInteger Maximum number of retries after an instance fails
timeout App.ConfigValueLong Timeout of an instance, in seconds

Attributes of App.ConfigValue

Attribute Type Description
description String Detailed description provided for App users
defaultValue String Default value of the parameter
overwritable Boolean Specifies whether the default value can be overwritten when a user uses this App to submit a job

Attributes of App.ConfigValueInteger

Attribute Type Description
description String Detailed description provided for App users
defaultValue int Default value of the parameter
overwritable Boolean Specifies whether the default value can be overwritten when a user uses this App to submit a job

Attributes of App.ConfigValueLong

Attribute Type Description
description String Detailed description provided for App users
defaultValue long Default value of the parameter
overwritable Boolean Specifies whether the default value can be overwritten when a user uses this App to submit a job
  • If the call fails, a ClientException is thrown.

Sample code

  1. try{
  2. GetAppResponse getAppResponse = client.getApp("myApp");
  3. App app = GetAppResponse.getApp();
  4. //The method is successfully called.
  5. }catch(ClientException e){
  6. e.printStackTrace();
  7. //The method fails to be called.
  8. }