ExecJob
Executes a job.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
sae:ExecJob |
create |
*All Resource
|
None | None |
Request syntax
GET /pop/v1/sam/job/execJob HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| AppId |
string |
Yes |
The ID of the job template. |
ee1a7a07-abcb-4652-a1d3-2d57f415**** |
| EventId |
string |
No |
The event ID. This parameter is user-defined and used for idempotence. Only one job is created for the same event ID. |
custom |
| Command |
string |
No |
The image startup command. The command must be an executable object that exists in the container. Example:
Based on the preceding example, Command="echo" and CommandArgs=["abc", ">", "file0"]. |
echo |
| CommandArgs |
string |
No |
The arguments for the image startup command. These are the arguments required by the Command startup command. Format:
In the preceding example, CommandArgs=["abc", ">", "file0"]. The ["abc", ">", "file0"] part must be converted to a string in JSON array format. If this parameter is not required, leave it empty. |
["a","b"] |
| Envs |
string |
No |
The environment variables for the container. You can customize environment variables or reference configuration items. To reference a configuration item, you must first create a ConfigMap instance. For more information, see CreateConfigMap. Valid values:
|
[{"name":"envtmp","value":"0"}] |
| JarStartOptions |
string |
No |
The startup options for the JAR package job. Default job startup command:
|
-Xms4G -Xmx4G |
| JarStartArgs |
string |
No |
The startup arguments for the JAR package job. Default job startup command:
|
custom-args |
| WarStartOptions |
string |
No |
The startup command for the WAR package deployment job. The configuration procedure is the same as that for the image deployment startup command. For more information, see Configure a startup command. |
CATALINA_OPTS=\"$CATALINA_OPTS $Options\" catalina.sh run |
| Time |
string |
No |
The time when the job is triggered. Format: |
2023-09-14T14:25:02Z |
| Replicas |
string |
No |
The number of concurrent instances for the job. |
3 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response data. |
||
| Code |
string |
The HTTP status code or POP error code. Valid values:
|
200 |
| Data |
object |
The returned data. |
|
| Code |
string |
The HTTP status code or POP error code. Valid values:
|
200 |
| Data |
string |
The job ID. |
manual-3db7a8fa-5d40-4edc-92e4-49d50eab**** |
| Msg |
string |
The additional information. Valid values:
|
success |
| Success |
string |
Indicates whether the job was executed successfully. Valid values:
|
true |
| ErrorCode |
string |
The error code. Valid values:
|
InvalidApplication.NotFound |
| Message |
string |
The additional information. Valid values:
|
success |
| RequestId |
string |
The request ID. |
67DD9A98-9CCC-5BE8-8C9E-B45E72F4**** |
| Success |
boolean |
Indicates whether the job was executed successfully. Valid values:
|
true |
| TraceId |
string |
The trace ID, which is used to precisely query call information. |
0b87b7e716575071334387401e**** |
Examples
Success response
JSON format
{
"Code": "200",
"Data": {
"Code": "200",
"Data": "manual-3db7a8fa-5d40-4edc-92e4-49d50eab****",
"Msg": "success",
"Success": "true"
},
"ErrorCode": "InvalidApplication.NotFound",
"Message": "success",
"RequestId": "67DD9A98-9CCC-5BE8-8C9E-B45E72F4****",
"Success": true,
"TraceId": "0b87b7e716575071334387401e****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidApplication.NotFound | The current application does not exist. | The current application cannot be found. |
| 400 | JobForbidPolicy | You cannot execute new jobs because ongoing jobs exist. | A task is being executed. The new task cannot be executed based on the concurrency policy. |
| 400 | JobSuspend | The job is suspended. | The task has been stopped. Enable the task before executing it. |
| 400 | user.indebt | The user has an outstanding payment. | The current user has an overdue payment. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.