Executes a job.
Debugging
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 Resourcesis 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.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| sae:ExecJob | *All Resources * |
| none |
Request syntax
GET /pop/v1/sam/job/execJob HTTP/1.1
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| AppId | string | Yes | The job template ID. | ee1a7a07-abcb-4652-a1d3-2d57f415**** |
| EventId | string | No | 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 |
| Command | string | No | The command that is used to start the image. The command must be an existing executable object in the container. Example: In this example, the Command parameter is set to | echo |
| CommandArgs | string | No | 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:
In the preceding example, the CommandArgs parameter is set to | ["a","b"] |
| Envs | string | No | 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:
| [{"name":"envtmp","value":"0"}] |
| JarStartOptions | string | No | The option settings in the JAR package. The settings are used to start the job. The default startup command is | -Xms4G -Xmx4G |
| JarStartArgs | string | No | The arguments in the JAR package. The arguments are used to start the job. The default startup command is | custom-args |
| WarStartOptions | string | No | 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 |
| Time | string | No | The time at which the job is triggered. Format: | 2023-09-14T14:25:02Z |
| Replicas | string | No | The number of concurrent instances. | 3 |
Response parameters
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 code | Error code | Error message |
|---|---|---|
| 400 | InvalidApplication.NotFound | The current application does not exist. |
| 400 | JobForbidPolicy | You cannot execute new jobs because ongoing jobs exist. |
| 400 | JobSuspend | The job is suspended. |
| 400 | user.indebt | The user has an outstanding payment. |
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|
