All Products
Search
Document Center

Serverless App Engine:DescribeJob

Last Updated:Mar 17, 2026

You can call DescribeJob to retrieve the configuration of a job template.

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

ID of the job template.

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

JobId

string

No

ID of the job.

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

Response elements

Element

Type

Description

Example

object

Response data.

RequestId

string

ID of the request.

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

Message

string

Additional information about the call result.

success

TraceId

string

ID of the trace. Use this ID to perform term queries on call details.

ac1a0b2215622246421415014e****

Data

object

Information about the job template.

VpcId

string

ID of the VPC.

vpc-2ze0i263cnn311nvj****

ConfigMapMountDesc

array<object>

ConfigMap information.

object

ConfigMap information.

Key

string

Key-value pair in the ConfigMap.

k1

ConfigMapName

string

Name of the ConfigMap.

test

MountPath

string

Mount path in the container.

/tmp

ConfigMapId

integer

ID of the ConfigMap.

1

SecurityGroupId

string

ID of the security group.

sg-wz969ngg2e49q5i4****

Jdk

string

JDK version required by the deployment package. Supported versions include the following:

  • Open JDK 8

  • Open JDK 7

  • Dragonwell 11

  • Dragonwell 8

  • openjdk-8u191-jdk-alpine3.9

  • openjdk-7u201-jdk-alpine3.9

This parameter is not supported when Package Type is Image.

Open JDK 8

ImageUrl

string

Registry address. Required when Package Type is Image.

docker.io/library/nginx:1.14.2

SlsConfigs

string

Configuration for log collection to Simple Log Service (SLS).

  • When SAE automatically creates SLS resources: [{"logDir":"","logType":"stdout"},{"logDir":"/tmp/a.log"}].

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

Parameter descriptions:

  • projectName: Name of the SLS project.

  • logDir: Path of the log file.

  • logType: Type of log. stdout means standard output logs from the container. You can specify only one stdout entry. If you omit this field, SAE collects file-based logs.

  • logstoreName: Name of the SLS Logstore.

  • logtailName: Name of the SLS Logtail. If you omit this field, SAE creates a new Logtail.

If your SLS collection configuration does not change between deployments, omit this parameter. If you no longer need SLS log collection, set this field to an empty string ("").

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

Tags

array<object>

Tag information.

object

Tag information.

Key

string

Tag key.

k1

Value

string

Tag value.

v1

PackageUrl

string

URL of the deployment package. Required when Package Type is 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

Type of the deployment package. Valid values:

  • For Java applications: FatJar, War, and Image.

  • For PHP applications:
    • 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 applications: PythonZip and Image.

War

PreStop

string

Script to run before stopping the container. This script runs just before the container is deleted. Example format: {"exec":{"command":\["cat","/etc/group"\]}}

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

PackageVersion

string

Version number of the deployment package. Required when Package Type is FatJar or War.

1.0

JarStartArgs

string

Startup arguments for JAR packages. Default startup command: $JAVA_HOME/bin/java $JarStartOptions -jar $CATALINA_OPTS "$package_path" $JarStartArgs

start

AppName

string

Name of the job template.

demo-app

AppId

string

ID of the job template.

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

JarStartOptions

string

Startup options for JAR packages. Default startup command: $JAVA_HOME/bin/java $JarStartOptions -jar $CATALINA_OPTS "$package_path" $JarStartArgs

-Dtest=true

Replicas

integer

Number of task instances.

2

Memory

integer

Memory required per instance, in MB. Cannot be zero. Memory and CPU are paired. Supported defined specifications:

  • 1024: Supports CPU of 500 and 1000 milli-cores.

  • 2048: Supports CPU of 500, 1000, and 2000 milli-cores.

  • 4096: Supports CPU of 1000, 2000, and 4000 milli-cores.

  • 8192: Supports CPU of 2000, 4000, and 8000 milli-cores.

  • 12288: Supports CPU of 12000 milli-cores.

  • 16384: Supports CPU of 4000, 8000, and 16000 milli-cores.

  • 24576: Supports CPU of 12000 milli-cores.

  • 32768: Supports CPU of 16000 milli-cores.

  • 65536: Supports CPU of 8000, 16000, and 32000 milli-cores.

  • 131072: Supports CPU of 32000 milli-cores.

2048

PhpConfig

string

Content of the PHP configuration file.

k1=v1

PhpConfigLocation

string

Mount path for the PHP startup configuration. Ensure your PHP server uses this configuration file to start.

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

PostStart

string

Script to run after starting the container. This script runs immediately after the container starts. Example format: {"exec":{"command":\["cat","/etc/group"\]}}

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

TerminationGracePeriodSeconds

integer

Timeout for graceful shutdown, in seconds. Default is 30. Valid range: 1 to 300.

10

CommandArgs

string

Arguments for the image startup command. Format:

["a","b"]

In the Command example, CommandArgs=["abc", ">", "file0"]. The value must be a JSON array string. Omit this field if not needed.

["a","b"]

NamespaceId

string

ID of the namespace.

cn-beijing:test

MountHost

string

Mount target of NAS in the VPC of the job template. Omit this field if the NAS configuration does not change. To clear the NAS configuration, set this field to an empty string ("").

example.com

TomcatConfig

string

Tomcat configuration. Set to "" or "{}" to delete the configuration.

  • port: Port number. Valid range: 1024 to 65535. Ports below 1024 require root privileges. Containers run with admin privileges, so use ports above 1024. Default is 8080.

  • contextPath: Access path. Default is "/" (root directory).

  • maxThreads: Connection pool size. Default is 400.

  • uriEncoding: Encoding format. Valid values: UTF-8, ISO-8859-1, GBK, and GB2312. Default is ISO-8859-1.

  • useBodyEncoding: Whether to use body encoding for URLs. Default is true.

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

RegionId

string

ID of the region.

cn-beijing

VSwitchId

string

ID of the vSwitch.

vsw-2ze559r1z1bpwqxwp****

Cpu

integer

CPU required per instance, in milli-cores. Cannot be zero. Supported defined specifications:

  • 500

  • 1000

  • 2000

  • 4000

  • 8000

  • 16000

  • 32000

1000

Envs

string

Environment variables for the container. You can define them directly or reference configuration items. To reference configuration items, first create a ConfigMap instance. For more information, see CreateConfigMap. Options:

  • Custom configuration
    • name: Name of the environment variable.

    • value: Value of the environment variable.

  • Reference configuration item
    • name: Name of the environment variable. To reference all keys, use sae-sys-configmap-all-<configuration-item-name>, such as sae-sys-configmap-all-test1.

    • valueFrom: Reference type. Set to configMapRef.

    • configMapId: ID of the configuration item.

    • key: Key name. Omit this field to reference all keys.

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

MountDesc

array<object>

Mount description.

object

Mount description.

MountPath

string

Mount path in the container.

/tmp

NasPath

string

Relative path in NAS.

/

CustomHostAlias

string

Custom host mapping inside the container. Options:

  • hostName: Domain name or hostname.

  • ip: IP address.

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

WebContainer

string

Tomcat version required by the deployment package. Supported versions:

  • apache-tomcat-7.0.91

  • apache-tomcat-8.5.42

This parameter is not supported when Package Type is Image.

apache-tomcat-7.0.91

Command

string

Startup command for the image. Must be an executable object in the container. Example:

command:
      - echo
      - abc
      - >
      - file0

Based on this example, Command="echo" and CommandArgs=["abc", ">", "file0"].

echo

WarStartOptions

string

Startup options for WAR packages. Default startup command: java $JAVA_OPTS $CATALINA_OPTS -Options org.apache.catalina.startup.Bootstrap "$@" start.

custom-option

NasId

string

ID of the NAS.

AKSN89**

OssAkId

string

AccessKey ID for OSS read and write operations.

xxxxxx

OssAkSecret

string

AccessKey secret for OSS read and write operations.

xxxxxx

OssMountDescs

array<object>

OSS mount description.

object

OSS mount description.

bucketName

string

Name of the bucket.

oss-bucket

bucketPath

string

Directory or object in OSS. If the directory does not exist, an error occurs.

data/user.data

mountPath

string

Path in the SAE container. If the path exists, it is overwritten. If it does not exist, it is created.

/usr/data/user.data

readOnly

boolean

Whether the container path has read-only access to the mounted resource. Valid values:

  • true: Read-only permission.

  • false: Read and write permission.

true

EdasContainerVersion

string

Runtime environment version for HSF frameworks, such as Ali-Tomcat containers.

3.5.3

Timezone

string

Time zone. Default is Asia/Shanghai.

Asia/Shanghai

AppDescription

string

Description of the job template.

示例应用

AcrInstanceId

string

ID of the ACR Enterprise instance.

cri-xxxxxx

AcrAssumeRoleArn

string

ARN of the RAM role required to pull images across accounts. For more information, see Pull Alibaba Cloud images across accounts and Grant cross-account permissions using RAM roles.

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

ImagePullSecrets

string

ID of the secret.

10

TriggerConfig

string

Trigger configuration for jobs. Configure based on job type.

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

  • Manually triggered node instance: Set type to http. Set config to the HTTP trigger rule. For more information, see Request parameters 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

Concurrency policy for jobs. Valid values:

  • Forbid: Prevent concurrent execution. Do not create a new job until the previous job completes.

  • Allow: Allow concurrent execution.

  • Replace: Replace the previous job with a new one if the previous job has not completed by the scheduled start time.

Allow

Suspend

boolean

Whether to suspend the job template.

false

Timeout

integer

Timeout for the job, in seconds.

3600

BackoffLimit

integer

Maximum number of retries for the job.

3

Slice

boolean

Enable job sharding.

true

SliceEnvs

string

Sharding parameters for the job.

SliceEnvs

RefAppId

string

ID of the referenced job template.

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

RefedAppIds

array

List of IDs of job templates that reference this job template.

string

ID of the job template.

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

PublicWebHookUrls

array

List of public URLs for manually triggered node instances.

string

Public URL.

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

VpcWebHookUrls

array

List of private network URLs for manually triggered node instances.

string

Private network URL.

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

ProgrammingLanguage

string

Programming language used to create the job template. Valid values:

  • java: Java.

  • php: PHP.

  • python: Python.

  • other: Multi-language, such as C++, Go, .NET, and Node.js.

java

NasConfigs

string

Configuration for mounting NAS.

[{"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

Python environment. Supports PYTHON 3.9.15.

PYTHON 3.9.15

PythonModules

string

Custom installation modules. By default, dependencies in requirements.txt at the root directory are installed. If no custom package is specified, list the dependencies to install.

Flask==2.0

BestEffortType

string

ErrorCode

string

Error code. Valid values:

  • Success: No ErrorCode field is returned.

  • Failure: The ErrorCode field is returned. For more information, see the Error codes section in this topic.

Code

string

Status code or POP error code. Valid values:

  • 2xx: Success.

  • 3xx: Redirection.

  • 4xx: Request error.

  • 5xx: Server error.

200

Success

boolean

Indicates whether the job template configuration was retrieved successfully. Valid values:

  • true: Success.

  • false: Failure.

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": "示例应用",
    "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.