All Products
Search
Document Center

Serverless App Engine:ExecJob

更新时间:Jan 12, 2026

Executes a job.

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:ExecJob
*All Resources
*
    none
none

Request syntax

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

Request parameters

ParameterTypeRequiredDescriptionExample
AppIdstringYes

The job template ID.

ee1a7a07-abcb-4652-a1d3-2d57f415****
EventIdstringNo

The event ID. This is a user-defined parameter used for idempotency so that only one job is created for the same event ID.

custom
CommandstringNo

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
CommandArgsstringNo

The parameters of the image startup command. The CommandArgs parameter specifies the parameters that are required for the Command parameter. The name must meet the following format requirements:

["a","b"]

In the preceding 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. This parameter is optional.

["a","b"]
EnvsstringNo

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:

  • Configure custom environment variables

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

    • name: the name of the environment variable. You can reference one or all keys. If you want 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 ConfigMap ID.
    • key: the key. If you want to reference all keys, do not configure this parameter.
[{"name":"envtmp","value":"0"}]
JarStartOptionsstringNo

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" $JarStartArg.

-Xms4G -Xmx4G
JarStartArgsstringNo

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.

custom-args
WarStartOptionsstringNo

The startup command of the WAR package. For information about how to configure the startup command, see Configure a startup command.

CATALINA_OPTS=\"$CATALINA_OPTS $Options\" catalina.sh run
TimestringNo

The time at which the job is triggered. Format: yyyy-MM-dd'T'HH:mm:ss'Z'.

2023-09-14T14:25:02Z
ReplicasstringNo

The number of concurrent instances.

3

Response parameters

ParameterTypeDescriptionExample
object

The response.

RequestIdstring

The request ID.

67DD9A98-9CCC-5BE8-8C9E-B45E72F4****
Messagestring

The returned message. Valid values:

  • success: If the call is successful, success is returned.
  • An error code: If the call fails, an error code is returned.
success
TraceIdstring

The ID of the trace. This parameter is used to query the exact call information.

0b87b7e716575071334387401e****
Dataobject

The returned data.

Datastring

The job ID.

manual-3db7a8fa-5d40-4edc-92e4-49d50eab****
Msgstring

The returned message. Valid values:

  • success: If the call is successful, success is returned.
  • An error code: If the call fails, an error code is returned.
success
Successstring

Indicates whether the request was successful. Valid values:

  • true
  • false
true
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
ErrorCodestring

The error code. Valid values:

  • If the call is successful, the ErrorCode parameter is not returned.
  • If the call fails, the ErrorCode parameter is returned. For more information, see the Error codes section in this topic.
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 request was successful. Valid values:

  • true
  • false
true

Examples

Sample success responses

JSONformat

{
  "RequestId": "67DD9A98-9CCC-5BE8-8C9E-B45E72F4****",
  "Message": "success",
  "TraceId": "0b87b7e716575071334387401e****",
  "Data": {
    "Data": "manual-3db7a8fa-5d40-4edc-92e4-49d50eab****",
    "Msg": "success",
    "Success": true,
    "Code": 200
  },
  "ErrorCode": "",
  "Code": 200,
  "Success": true
}

Error codes

HTTP status codeError codeError message
400InvalidApplication.NotFoundThe current application does not exist.
400JobForbidPolicyYou cannot execute new jobs because ongoing jobs exist.
400JobSuspendThe job is suspended.
400user.indebtThe user has an outstanding payment.

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

Change history

Change timeSummary of changesOperation
No change history