All Products
Search
Document Center

Serverless App Engine:DescribeJob

Last Updated:Apr 22, 2026

Calls the DescribeJob API to retrieve job template configuration.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

sae:DescribeJob

get

*All Resource

*

None None

Request syntax

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

Request parameters

Parameter

Type

Required

Description

Example

AppId

string

Yes

The job template ID.

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

JobId

string

No

The job ID.

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

Response elements

Element

Type

Description

Example

object

The data returned.

RequestId

string

The request ID.

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

Message

string

Additional information about the call result.

success

TraceId

string

The trace ID used to query the details of a request.

ac1a0b2215622246421415014e****

Data

object

The job template information.

VpcId

string

The VPC ID.

vpc-2ze0i263cnn311nvj****

ConfigMapMountDesc

array<object>

The information about the mounted ConfigMap.

object

The ConfigMap information.

Key

string

The key of the key-value pair in the ConfigMap.

k1

ConfigMapName

string

The name of the ConfigMap.

test

MountPath

string

The container mount path.

/tmp

ConfigMapId

integer

The ConfigMap ID.

1

SecurityGroupId

string

The security group ID.

sg-wz969ngg2e49q5i4****

Jdk

string

The JDK version that the deployment package requires. 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 applicable if Package Type is set to Image.

Open JDK 8

ImageUrl

string

The image URL. This parameter is required if Package Type is set to Image.

docker.io/library/nginx:1.14.2

SlsConfigs

string

The configuration for collecting logs to Log Service (SLS).

  • Use an SLS resource that SAE automatically creates: [{"logDir":"","logType":"stdout"},{"logDir":"/tmp/a.log"}].

  • Use a custom SLS resource: [{"projectName":"test-sls","logType":"stdout","logDir":"","logstoreName":"sae","logtailName":""},{"projectName":"test","logDir":"/tmp/a.log","logstoreName":"sae","logtailName":""}].

The parameters are described as follows:

  • projectName: The name of the SLS project.

  • logDir: The log path.

  • logType: The log type. stdout specifies the container's standard output logs. You can specify only one log of the stdout type. If this parameter is omitted, file logs are collected.

  • logstoreName: The name of the Logstore in SLS.

  • logtailName: The name of the Logtail configuration in SLS. If you do not specify this parameter, a new Logtail configuration is created.

You can omit this parameter if the Log Service configuration is unchanged during redeployment. To disable log collection, set this parameter to an empty string ("").

[{"logDir":"","logType":"stdout"},{"logDir":"/tmp/a.log"}]

Tags

array<object>

The tags of the job template.

object

The tag information.

Key

string

The tag key.

k1

Value

string

The tag value.

v1

PackageUrl

string

The URL of the package. This parameter is required if Package Type 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

PackageType

string

The type of the job package. Valid values:

  • For Java deployments, FatJar, War, and Image are supported.

  • For PHP deployments, the following package types are supported:
    • 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

  • For Python deployments, PythonZip and Image are supported.

War

PreStop

string

The script to execute before the container stops. This script runs before the system deletes the container. Example: {"exec":{"command":["cat","/etc/group"]}}

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

PackageVersion

string

The version of the package. This parameter is required if Package Type is set to FatJar or War.

1.0

JarStartArgs

string

The arguments for the startup of a JAR package. The default startup command is $JAVA_HOME/bin/java $JarStartOptions -jar $CATALINA_OPTS "$package_path" $JarStartArgs.

start

AppName

string

The name of the job template.

demo-app

AppId

string

The ID of the job template.

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

JarStartOptions

string

The options for the startup of a JAR package. The default startup command is $JAVA_HOME/bin/java $JarStartOptions -jar $CATALINA_OPTS "$package_path" $JarStartArgs.

-Dtest=true

Replicas

integer

The number of job instances.

2

Memory

integer

The memory required by each instance, in MB. This value cannot be 0. CPU and memory resources are allocated in fixed ratios. The following combinations are supported:

  • 1024: corresponds to 500 millicores and 1,000 millicores.

  • 2048: corresponds to 500, 1,000, and 2,000 millicores.

  • 4096: corresponds to 1,000, 2,000, and 4,000 millicores.

  • 8192: corresponds to 2,000, 4,000, and 8,000 millicores.

  • 12288: corresponds to 12,000 millicores.

  • 16384: corresponds to 4,000, 8,000, and 16,000 millicores.

  • 24576: corresponds to 12,000 millicores.

  • 32768: corresponds to 16,000 millicores.

  • 65536: corresponds to 8,000, 16,000, and 32,000 millicores.

  • 131072: corresponds to 32,000 millicores.

2048

PhpConfig

string

The content of the PHP configuration file.

k1=v1

PhpConfigLocation

string

The mount path of the PHP job startup configuration. Make sure that the PHP server uses this configuration to start.

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

PostStart

string

The script to execute after the container starts. This script runs immediately after the system creates the container. Example: {"exec":{"command":["cat","/etc/group"]}}

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

TerminationGracePeriodSeconds

integer

The timeout for a graceful stop, in seconds. Default: 30. Valid values: 1 to 300.

10

CommandArgs

string

The arguments of the image startup command. The arguments are passed to the Command parameter. Format:

["a","b"]

In the example of the Command parameter, CommandArgs=["abc", ">", "file0"]. In this case, ["abc", ">", "file0"] must be converted to a string in the format of a JSON array. If this parameter is not specified, you do not need to configure it.

["a","b"]

NamespaceId

string

The namespace ID.

cn-beijing:test

MountHost

string

The mount target of the Apsara File Storage NAS file system in the job template's VPC. You can omit this parameter if the NAS configuration is unchanged during redeployment. To clear the NAS configuration, set this parameter to an empty string ("").

example.com

TomcatConfig

string

The Tomcat file configuration. To delete the configuration, set this parameter to "" or "{}".

  • port: The port number. Valid values: 1024 to 65535. Ports below 1024 are reserved. If you do not specify a port, the default value is 8080.

  • contextPath: The access path. Default value: /.

  • maxThreads: The maximum number of connections in the connection pool. Default value: 400.

  • uriEncoding: The URI encoding scheme for Tomcat. Valid values: UTF-8, ISO-8859-1, GBK, and GB2312. If you do not specify this parameter, the default value ISO-8859-1 is used.

  • useBodyEncodingForUri: Specifies whether to use the character encoding from the request body for the URI. Default value: true.

{"port":8080,"contextPath":"/","maxThreads":400,"uriEncoding":"ISO-8859-1","useBodyEncodingForUri":true}

RegionId

string

The region ID.

cn-beijing

VSwitchId

string

The vSwitch ID.

vsw-2ze559r1z1bpwqxwp****

Cpu

integer

The number of CPU cores that are required by each instance. Unit: millicores. This parameter cannot be set to 0. Only the following fixed specifications are supported:

  • 500

  • 1000

  • 2000

  • 4000

  • 8000

  • 16000

  • 32000

1000

Envs

string

The container environment variables. You can define custom variables or reference a ConfigMap. To reference a ConfigMap, you must first create a ConfigMap. For more information, see CreateConfigMap. The following formats are supported:

  • Define custom variables
    • 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 a single key or all keys. To reference all keys, enter sae-sys-configmap-all-<ConfigMap name>, for example, sae-sys-configmap-all-test1.

    • valueFrom: The source of the environment variable. Set the value to configMapRef.

    • configMapId: The ID of the ConfigMap.

    • key: The key of the key-value pair. If you reference all keys in the ConfigMap, you do not need to specify this parameter.

[{"name":"TEST_ENV_KEY","value":"TEST_ENV_VAR"}]

MountDesc

array<object>

The mount description.

object

The mount description.

MountPath

string

The container mount path.

/tmp

NasPath

string

The directory in the Apsara File Storage NAS file system.

/

CustomHostAlias

string

The custom host mapping in the container. The parameters are described as follows:

  • hostName: The domain name or hostname.

  • ip: The IP address.

[{"hostName":"test.host.name","ip":"0.0.0.0"}]

WebContainer

string

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

  • apache-tomcat-7.0.91

  • apache-tomcat-8.5.42

This parameter is not supported when Package Type is set to Image.

apache-tomcat-7.0.91

Command

string

The image startup command. The command must be an executable that exists in the container. Example:

command:
      - echo
      - abc
      - >
      - file0

In this example, Command="echo", CommandArgs=["abc", ">", "file0"].

echo

WarStartOptions

string

The options for the startup of a WAR package. The default startup command is java $JAVA_OPTS $CATALINA_OPTS -Options org.apache.catalina.startup.Bootstrap "$@" start.

custom-option

NasId

string

The ID of the Apsara File Storage NAS file system.

AKSN89**

OssAkId

string

The AccessKey ID for accessing Object Storage Service (OSS) buckets.

xxxxxx

OssAkSecret

string

The AccessKey secret for accessing OSS buckets.

xxxxxx

OssMountDescs

array<object>

The description of the mounted OSS bucket.

object

The description of the mounted OSS bucket.

bucketName

string

The bucket name.

oss-bucket

bucketPath

string

The directory or object that you created in the OSS bucket. An exception is returned if the specified mount directory does not exist.

data/user.data

mountPath

string

The path in your SAE container. If the path exists, it is overwritten. If the path does not exist, a new path is created.

/usr/data/user.data

readOnly

boolean

Specifies whether the container has read-only access to the mounted resources. Valid values:

  • true: The path has read-only permissions.

  • false: The path has read and write permissions.

true

EdasContainerVersion

string

The version of the runtime environment in the HSF framework, such as an Ali-Tomcat container.

3.5.3

Timezone

string

The time zone. Default value: Asia/Shanghai.

Asia/Shanghai

AppDescription

string

The description of the job template.

Sample application

AcrInstanceId

string

The ID of the Container Registry (ACR) Enterprise Edition instance.

cri-xxxxxx

AcrAssumeRoleArn

string

The ARN of the RAM role that is required 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

ImagePullSecrets

string

The ID of the Secret.

10

TriggerConfig

string

The job trigger configuration. The configuration varies based on the job type.

  • Scheduled task: Set type to time, config to a Cron expression, and timezone to a specific time zone. Example: {"type":"time","config":"0 1 */1 * ?","timezone":"GMT+8:00"}

  • One-time task: Set type to http, and for config, specify the HTTP trigger rules. 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"}

ConcurrencyPolicy

string

The concurrency policy for the job. Valid values:

  • Forbid: Forbids concurrent runs. A new job is not created if the previous one has not completed.

  • Allow: Allows concurrent runs.

  • Replace: If the previous job has not completed, the new job replaces it.

Allow

Suspend

boolean

Specifies whether to suspend the job template.

false

Timeout

integer

The timeout period for the job. Unit: seconds.

3600

BackoffLimit

integer

The maximum number of retries for a failed job.

3

Slice

boolean

Specifies whether to enable job sharding.

true

SliceEnvs

string

The parameters for job sharding.

SliceEnvs

RefAppId

string

The ID of the referenced job template.

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

RefedAppIds

array

The IDs of job templates that reference this template.

string

The job template ID.

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

PublicWebHookUrls

array

The list of public request URLs for the one-time task.

string

The public URL.

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

VpcWebHookUrls

array

The list of private request URLs for the one-time task.

string

The private URL.

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

ProgrammingLanguage

string

The programming language that is used for the job template. Valid values:

  • java: Java

  • php: PHP

  • python: Python

  • other: Other languages, such as C++, Go, .NET, and Node.js.

java

NasConfigs

string

The configuration for mounting an Apsara File Storage 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"}]

Python

string

The Python environment. PYTHON 3.9.15 is supported.

PYTHON 3.9.15

PythonModules

string

The Python module dependencies to install. By default, SAE installs dependencies from a requirements.txt file in the package's root directory. Use this parameter to specify dependencies if a requirements.txt file is not present or to add extra modules.

Flask==2.0

BestEffortType

string

The Best-Effort policy.

ErrorCode

string

The error code.

  • The ErrorCode parameter is returned only if the request fails.

  • For a list of possible ErrorCode values, see the Error codes section in this topic.

Code

string

The HTTP status code or POP error code. Valid values:

  • 2xx: The request was successful.

  • 3xx: The request was redirected.

  • 4xx: A request error occurred.

  • 5xx: A server error occurred.

200

Success

boolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.

  • false: The request failed.

true

Examples

Success response

JSON format

{
  "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.0",
    "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",
    "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",
    "BestEffortType": ""
  },
  "ErrorCode": "",
  "Code": "200",
  "Success": true
}

Error codes

HTTP status code

Error code

Error message

Description

404 InvalidAppId.NotFound The specified AppId does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.