All Products
Search
Document Center

Serverless App Engine:DescribeJob

Last Updated:Dec 26, 2025

Queries the configurations of a job template.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
sae:DescribeJobget
*All Resources
*
    none
none

Request syntax

GET /pop/v1/sam/job/describeJob HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
AppIdstringYes

The ID of the job template.

7171a6ca-d1cd-4928-8642-7d5cfe69****
JobIdstringNo

The job ID.

event-b798157b-40a2-4388-b578-71fb897103**-**

Response parameters

ParameterTypeDescriptionExample
object

The returned data.

RequestIdstring

The request ID.

01CF26C7-00A3-4AA6-BA76-7E95F2A3****
Messagestring

The returned message.

success
TraceIdstring

The trace ID that is used to query the details of the request.

ac1a0b2215622246421415014e****
Dataobject

The information of the job template.

VpcIdstring

The ID of the virtual private cloud (VPC).

vpc-2ze0i263cnn311nvj****
ConfigMapMountDescarray<object>

The details of the ConfigMap.

ConfigMapMountDescobject

The details of the ConfigMap.

Keystring

The key-value pair that is stored in the ConfigMap.

k1
ConfigMapNamestring

The ConfigMap name.

test
MountPathstring

The path on which the ConfigMap is mounted.

/tmp
ConfigMapIdlong

The ConfigMap ID.

1
SecurityGroupIdstring

The ID of the security group.

sg-wz969ngg2e49q5i4****
Jdkstring

The version of the Java Development Kit (JDK) on which the deployment package of the application depends. The following versions are supported:

  • Open JDK 8
  • Open JDK 7
  • Dragonwell 11
  • Dragonwell 8
  • openjdk-8u191-jdk-alpine3.9
  • openjdk-7u201-jdk-alpine3.9

This parameter is not returned if PackageType is set to Image.

Open JDK 8
ImageUrlstring

The URL of the image. This parameter is returned only if PackageType is set to Image.

docker.io/library/nginx:1.14.2
SlsConfigsstring

The logging configurations of Log Service.

  • To use Log Service resources that are automatically created by SAE, set this parameter to [{"logDir":"","logType":"stdout"},{"logDir":"/tmp/a.log"}].
  • To use custom Log Service resources, set this parameter to [{"projectName":"test-sls","logType":"stdout","logDir":"","logstoreName":"sae","logtailName":""},{"projectName":"test","logDir":"/tmp/a.log","logstoreName":"sae","logtailName":""}].

Parameter description:

  • projectName: the name of the Log Service project.
  • logDir: the path in which logs are stored.
  • logType: the log type. stdout: the standard output (stdout) log of the container. Only one stdout value for this parameter can be specified. If this parameter is not configured, file logs are collected.
  • logstoreName: the name of the Logstore in Log Service.
  • logtailName: the name of the Logtail in Log Service. If this parameter is not configured, a new Logtail is created.

If you do not need to modify the logging configurations when you deploy the application, configure SlsConfigs only in the first request. If you no longer need to use Log Service, leave SlsConfigs empty in the request.

[{"logDir":"","logType":"stdout"},{"logDir":"/tmp/a.log"}]
Tagsarray<object>

The tags.

Tagobject

The information about the tag.

Keystring

The tag key.

k1
Valuestring

The tag value.

v1
PackageUrlstring

The URL of the deployment package. This parameter is returned only if PackageType is set to FatJar or War.

https://edas-bj.oss-cn-beijing.aliyuncs.com/apps/K8s_APP_ID/d4c97c37-aba3-403e-ae1e-6f7d8742****/hello-sae.war
PackageTypestring

The type of the deployment package. Valid values:

  • If you deploy a Java job template, you can set this parameter to FatJar, War, or Image.

  • If you deploy a PHP job template, the following types are available:

    • PhpZip
    • IMAGE_PHP_5_4
    • IMAGE_PHP_5_4_ALPINE
    • IMAGE_PHP_5_5
    • IMAGE_PHP_5_5_ALPINE
    • IMAGE_PHP_5_6
    • IMAGE_PHP_5_6_ALPINE
    • IMAGE_PHP_7_0
    • IMAGE_PHP_7_0_ALPINE
    • IMAGE_PHP_7_1
    • IMAGE_PHP_7_1_ALPINE
    • IMAGE_PHP_7_2
    • IMAGE_PHP_7_2_ALPINE
    • IMAGE_PHP_7_3
    • IMAGE_PHP_7_3_ALPINE
  • If you deploy a Python job template, you can set this parameter to PythonZip or Image.

War
PreStopstring

The script that is run before the container is stopped. Example: {"exec":{"command":\["cat","/etc/group"\]}}

{"exec":{"command":["cat","/etc/group"]}}
PackageVersionstring

The version of the deployment package. This parameter is required only if PackageType is set to FatJar or War.

1.0
JarStartArgsstring

The arguments in the JAR package. The arguments are used to start the job. The default startup command is $JAVA_HOME/bin/java $JarStartOptions -jar $CATALINA_OPTS "$package_path" $JarStartArgs.

start
AppNamestring

The name of the job template.

demo-app
AppIdstring

The ID of the job template.

7171a6ca-d1cd-4928-8642-7d5cfe69****
JarStartOptionsstring

The option settings in the JAR package. The settings are used to start the job. The default startup command is $JAVA_HOME/bin/java $JarStartOptions -jar $CATALINA_OPTS "$package_path" $JarStartArgs.

-Dtest=true
Replicasinteger

The number of job instances.

2
Memoryinteger

The size of memory that is required by each instance. Unit: MB. This parameter cannot be set to 0. The values of this parameter correspond to the values of the Cpu parameter:

  • This parameter is set to 1024 if the Cpu parameter is set to 500 or 1000.
  • This parameter is set to 2048 if the Cpu parameter is set to 500, 1000, or 2000.
  • This parameter is set to 4096 if the Cpu parameter is set to 1000, 2000, or 4000.
  • This parameter is set to 8192 if the Cpu parameter is set to 2000, 4000, or 8000.
  • This parameter is set to 12288 if the Cpu parameter is set to 12000.
  • This parameter is set to 16384 if the Cpu parameter is set to 4000, 8000, or 16000.
  • This parameter is set to 24567 if the Cpu parameter is set to 12000.
  • This parameter is set to 32768 if the Cpu parameter is set to 16000.
  • This parameter is set to 65536 if the Cpu parameter is set to 8000, 16000, or 32000.
  • This parameter is set to 131072 if the Cpu parameter is set to 32000.
2048
PhpConfigstring

The details of the PHP configuration file.

k1=v1
PhpConfigLocationstring

The path on which the PHP configuration file for job startup is mounted. Make sure that the PHP server uses this configuration file during the startup.

/usr/local/etc/php/php.ini
PostStartstring

The script that is run immediately after the container is started. Example: {"exec":{"command":\["cat","/etc/group"\]}}

{"exec":{"command":["cat","/etc/group"]}}
TerminationGracePeriodSecondsinteger

The timeout period for a graceful shutdown. Default value: 30. Unit: seconds. Valid values: 1 to 300.

10
CommandArgsstring

The arguments of the image startup command. This parameter contains the arguments that are required for Command. Format:

["a","b"]

In the preceding Command example, the CommandArgs parameter is set to CommandArgs=["abc", ">", "file0"]. The data type of ["abc", ">", "file0"] must be an array of strings in the JSON format. If this parameter does not exist in the Command parameter, you do not need to configure it.

["a","b"]
NamespaceIdstring

The namespace ID.

cn-beijing:test
MountHoststring

The mount target of the Apsara File Storage NAS (NAS) file system in the virtual private cloud (VPC) where the job template is deployed. If you do not need to modify the NAS configurations when you deploy the job template, configure the MountHost parameter only in the first request. You do not need to include this parameter in subsequent requests. If you no longer need to use NAS, leave the MountHost parameter empty in the request.

example.com
TomcatConfigstring

The Tomcat configuration. If you want to delete the configuration, set this parameter to {} or leave this parameter empty. Parameter description:

  • port: the port number. Valid values: 1024 to 65535. The root permissions are required to perform operations on ports whose number is smaller than 1024. Enter a value that ranges from 1025 to 65535 because the container has only the admin permissions. If this parameter is not configured, the default value 8080 is used.
  • contextPath: the path. Default value: /. The value indicates the root directory.
  • maxThreads: the maximum number of connections in the connection pool. Default value: 400.
  • uriEncoding: the URI encoding scheme in the Tomcat container. Valid values: UTF-8, ISO-8859-1, GBK, and GB2312. If this parameter is not configured, the default value ISO-8859-1 is used.
  • useBodyEncoding: indicates whether to use the encoding scheme that is specified by BodyEncoding for URL. Default value: true.
{"port":8080,"contextPath":"/","maxThreads":400,"uriEncoding":"ISO-8859-1","useBodyEncodingForUri":true}
RegionIdstring

The region ID.

cn-beijing
VSwitchIdstring

The vSwitch ID.

vsw-2ze559r1z1bpwqxwp****
Cpuinteger

The CPU specifications required for each instance. Unit: millicore. This parameter cannot be set to 0. Valid values:

  • 500
  • 1000
  • 2000
  • 4000
  • 8000
  • 16000
  • 32000
1000
Envsstring

The environment variables. You can configure custom environment variables or reference a ConfigMap. If you want to reference a ConfigMap, you must first create a ConfigMap. For more information, see CreateConfigMap . Valid values:

  • Custom configuration

    • name: the name of the environment variable.
    • value: the value of the environment variable.
  • Reference a ConfigMap

    • name: the name of the environment variable. You can reference one or all keys. To reference all keys, specify sae-sys-configmap-all-<ConfigMap name>. Example: sae-sys-configmap-all-test1.
    • valueFrom: the reference of the environment variable. Set the value to configMapRef.
    • configMapId: the ID of the ConfigMap.
    • key: the key. If you want to reference all keys, you do not need to configure this parameter.
[{"name":"TEST_ENV_KEY","value":"TEST_ENV_VAR"}]
MountDescarray<object>

The details of the mounted NAS file system.

MountDescobject

The details of the mounted NAS file system.

MountPathstring

The path on which the NAS file system is mounted.

/tmp
NasPathstring

The directory in the NAS file system.

/
CustomHostAliasstring

The custom mapping between the hostname and IP address in the container. Valid values:

  • hostName: the domain name or hostname.
  • ip: the IP address.
[{"hostName":"test.host.name","ip":"0.0.0.0"}]
WebContainerstring

The version of the Tomcat container on which the deployment package depends. The following versions are supported:

  • apache-tomcat-7.0.91
  • apache-tomcat-8.5.42

This parameter is not returned if PackageType is set to Image.

apache-tomcat-7.0.91
Commandstring

The command that is used to start the image. The command must be an existing executable object in the container. Example:

command:
      - echo
      - abc
      - >
      - file0

In this example, the Command parameter is set to Command="echo", CommandArgs=["abc", ">", "file0"].

echo
WarStartOptionsstring

The option settings in the WAR package. The settings are used to start the job. The default startup command is java $JAVA_OPTS $CATALINA_OPTS -Options org.apache.catalina.startup.Bootstrap "$@" start.

custom-option
NasIdstring

The ID of the NAS file system.

AKSN89**
OssAkIdstring

The AccessKey ID that is used to read data from and write data to Object Storage Service (OSS).

xxxxxx
OssAkSecretstring

The AccessKey secret that is used to read data from and write data to OSS.

xxxxxx
OssMountDescsarray<object>

The description of mounted OSS buckets.

ossMountDescobject

The description of the mounted OSS bucket.

bucketNamestring

The name of the bucket.

oss-bucket
bucketPathstring

The directory or object in OSS. If the specified directory or object does not exist, an error is returned.

data/user.data
mountPathstring

The path of the container in SAE. The parameter value that you specified overwrites the original value. If the specified path does not exist, SAE automatically creates the path.

/usr/data/user.data
readOnlyboolean

Indicates whether the job template can use the container directory to read data from or write data to resources in the directory of the OSS bucket. Valid values:

  • true: The job template has the read-only permissions.
  • false: The job template has the read and write permissions.
true
EdasContainerVersionstring

The version of the container, such as Ali-Tomcat, in which a job that is developed based on High-speed Service Framework (HSF) is deployed.

3.5.3
Timezonestring

The time zone. Default value: Asia/Shanghai.

Asia/Shanghai
AppDescriptionstring

The description of the job template.

Sample application
AcrInstanceIdstring

The ID of the Container Registry Enterprise Edition instance.

cri-xxxxxx
AcrAssumeRoleArnstring

The Alibaba Cloud Resource Name (ARN) of the RAM role that is used to pull images across accounts. For more information, see Pull images across Alibaba Cloud accounts and Grant permissions across Alibaba Cloud accounts by using a RAM role.

acs:ram::123456789012****:role/adminrole
ImagePullSecretsstring

The ID of the corresponding secret.

10
TriggerConfigstring

The trigger configuration. This parameter is configured based on the job type.

  • Scheduled job: Set type to time, config to a specific CRON expression, and timezone to a specified time zone.

Example: {"type":"time","config":"0 1 */1 * ?","timezone":"GMT+8:00"}

  • One-time job: Set type to http and configure a specific HTTP trigger rule for config. For more information, see SourceHttpEventParameters .

Example: {"type":"http","config":{"type":"HTTPS","method",["GET"],"ip":[],"referer":[],"securityConfig":"none"}}

{"type":"time","config":"0 1 */1 * ?","timezone":"GMT+8:00"}
ConcurrencyPolicystring

The concurrency policy of the job. Valid values:

  • Forbid: Concurrent running is prohibited. If the previous job is not completed, no new job is created.
  • Allow: Concurrent running is allowed.
  • Replace: If the previous job is not completed when the time to create a new job is reached, the new job replaces the previous job.
Allow
Suspendboolean

Indicates whether the job template is suspended.

false
Timeoutlong

The timeout period of the job. Unit: seconds.

3600
BackoffLimitlong

The number of times that the job was retried.

3
Sliceboolean

Indicates whether job sharding is enabled.

true
SliceEnvsstring

The parameters of job sharding.

SliceEnvs
RefAppIdstring

The ID of the job template that you reference.

7171a6ca-d1cd-4928-8642-7d5cfe69****
RefedAppIdsarray

The IDs of the referenced job templates.

appIdstring

The ID of the job template.

8621a6ca-d1cd-4928-8642-7d5cfe69****
PublicWebHookUrlsarray

The Internet request URLs of one-time jobs.

publicWebHookUrlstring

The Internet URL.

http://***/webhook/putEvents?token=***
VpcWebHookUrlsarray

The internal request URLs for one-time jobs.

vpcWebHookUrlstring

The internal URL

http://***/webhook/putEvents?token=***
ProgrammingLanguagestring

The programming language in which the job template is created. Valid values:

  • java: Java
  • php: PHP
  • python: Python
  • other: other programming languages, such as C++, Go, .NET, and Node.js
java
NasConfigsstring

The configurations for mounting the NAS file system.

[{"mountPath":"/test1","readOnly":false,"nasId":"nasId1","mountDomain":"nasId1.cn-shenzhen.nas.aliyuncs.com","nasPath":"/test1"},{"nasId":"nasId2","mountDomain":"nasId2.cn-shenzhen.nas.aliyuncs.com","readOnly":false,"nasPath":"/test2","mountPath":"/test2"}]
Pythonstring

The Python environment. PYTHON 3.9.15 is supported.

PYTHON 3.9.15
PythonModulesstring

The configurations for installing custom module dependencies. By default, the dependencies defined by the requirements.txt file in the root directory are installed. If no software package is configured, you can specify dependencies based on your business requirements.

Flask==2.0
ErrorCodestring

The error code returned. Take note of the following rules:

  • If the call is successful, ErrorCode is not returned.
  • If the call fails, ErrorCode is returned. For more information, see the "Error codes" section in this topic.
Null
Codestring

The HTTP status code. Valid values:

  • 2xx: The call was successful.
  • 3xx: The call was redirected.
  • 4xx: The call failed.
  • 5xx: A server error occurred.
200
Successboolean

Indicates whether the configurations of the job template were obtained. Valid values:

  • true: The configurations were obtained.
  • false: The configurations failed to be obtained.
true

Examples

Sample success responses

JSONformat

{
  "RequestId": "01CF26C7-00A3-4AA6-BA76-7E95F2A3****",
  "Message": "success",
  "TraceId": "ac1a0b2215622246421415014e****",
  "Data": {
    "VpcId": "vpc-2ze0i263cnn311nvj****",
    "ConfigMapMountDesc": [
      {
        "Key": "k1",
        "ConfigMapName": "test",
        "MountPath": "/tmp",
        "ConfigMapId": 1
      }
    ],
    "SecurityGroupId": "sg-wz969ngg2e49q5i4****",
    "Jdk": "Open JDK 8",
    "ImageUrl": "docker.io/library/nginx:1.14.2",
    "SlsConfigs": [
      {
        "logDir": "",
        "logType": "stdout"
      },
      {
        "logDir": "/tmp/a.log"
      }
    ],
    "Tags": [
      {
        "Key": "k1",
        "Value": "v1"
      }
    ],
    "PackageUrl": "https://edas-bj.oss-cn-beijing.aliyuncs.com/apps/K8s_APP_ID/d4c97c37-aba3-403e-ae1e-6f7d8742****/hello-sae.war",
    "PackageType": "War",
    "PreStop": {
      "exec": {
        "command": [
          "cat",
          "/etc/group"
        ]
      }
    },
    "PackageVersion": 1,
    "JarStartArgs": "start",
    "AppName": "demo-app",
    "AppId": "7171a6ca-d1cd-4928-8642-7d5cfe69****",
    "JarStartOptions": "-Dtest=true",
    "Replicas": 2,
    "Memory": 2048,
    "PhpConfig": "k1=v1",
    "PhpConfigLocation": "/usr/local/etc/php/php.ini",
    "PostStart": {
      "exec": {
        "command": [
          "cat",
          "/etc/group"
        ]
      }
    },
    "TerminationGracePeriodSeconds": 10,
    "CommandArgs": [
      "a",
      "b"
    ],
    "NamespaceId": "cn-beijing:test",
    "MountHost": "example.com",
    "TomcatConfig": {
      "port": 8080,
      "contextPath": "/",
      "maxThreads": 400,
      "uriEncoding": "ISO-8859-1",
      "useBodyEncodingForUri": true
    },
    "RegionId": "cn-beijing",
    "VSwitchId": "vsw-2ze559r1z1bpwqxwp****",
    "Cpu": 1000,
    "Envs": [
      {
        "name": "TEST_ENV_KEY",
        "value": "TEST_ENV_VAR"
      }
    ],
    "MountDesc": [
      {
        "MountPath": "/tmp",
        "NasPath": "/"
      }
    ],
    "CustomHostAlias": [
      {
        "hostName": "test.host.name",
        "ip": "0.0.0.0"
      }
    ],
    "WebContainer": "apache-tomcat-7.0.91",
    "Command": "echo",
    "WarStartOptions": "custom-option",
    "NasId": "AKSN89**",
    "OssAkId": "xxxxxx",
    "OssAkSecret": "xxxxxx",
    "OssMountDescs": [
      {
        "bucketName": "oss-bucket",
        "bucketPath": "data/user.data",
        "mountPath": "/usr/data/user.data",
        "readOnly": true
      }
    ],
    "EdasContainerVersion": "3.5.3",
    "Timezone": "Asia/Shanghai",
    "AppDescription": "Sample application\n",
    "AcrInstanceId": "cri-xxxxxx",
    "AcrAssumeRoleArn": "acs:ram::123456789012****:role/adminrole",
    "ImagePullSecrets": 10,
    "TriggerConfig": {
      "type": "time",
      "config": "0 1 */1 * ?",
      "timezone": "GMT+8:00"
    },
    "ConcurrencyPolicy": "Allow",
    "Suspend": false,
    "Timeout": 3600,
    "BackoffLimit": 3,
    "Slice": true,
    "SliceEnvs": "SliceEnvs",
    "RefAppId": "7171a6ca-d1cd-4928-8642-7d5cfe69****",
    "RefedAppIds": [
      "8621a6ca-d1cd-4928-8642-7d5cfe69****"
    ],
    "PublicWebHookUrls": [
      "http://***/webhook/putEvents?token=***"
    ],
    "VpcWebHookUrls": [
      "http://***/webhook/putEvents?token=***"
    ],
    "ProgrammingLanguage": "java",
    "NasConfigs": [
      {
        "mountPath": "/test1",
        "readOnly": false,
        "nasId": "nasId1",
        "mountDomain": "nasId1.cn-shenzhen.nas.aliyuncs.com",
        "nasPath": "/test1"
      },
      {
        "nasId": "nasId2",
        "mountDomain": "nasId2.cn-shenzhen.nas.aliyuncs.com",
        "readOnly": false,
        "nasPath": "/test2",
        "mountPath": "/test2"
      }
    ],
    "Python": "PYTHON 3.9.15",
    "PythonModules": "Flask==2.0"
  },
  "ErrorCode": "Null\n",
  "Code": 200,
  "Success": true
}

Error codes

HTTP status codeError codeError message
404InvalidAppId.NotFoundThe specified AppId does not exist.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2025-09-08The Error code has changed. The response structure of the API has changedView Change Details