Call ExecJob to run a job.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
sae:ExecJob |
*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 job template ID. |
ee1a7a07-abcb-4652-a1d3-2d57f415**** |
| EventId |
string |
No |
A customizable event ID that ensures idempotency. The system creates only one job for requests that have the same event ID. |
custom |
| Command |
string |
No |
The startup command, which must be an executable that exists in the container. Example:
Based on this example, |
echo |
| CommandArgs |
string |
No |
The arguments for the Command parameter. The value must be a string that represents a JSON array. Format:
In the preceding example for the |
["a","b"] |
| Envs |
string |
No |
The container environment variables. You can specify custom environment variables or reference an existing ConfigMap. For more information about creating a ConfigMap, see CreateConfigMap.
|
[{"name":"envtmp","value":"0"}] |
| JarStartOptions |
string |
No |
Options for starting a job deployed from a JAR package. The default startup command is:
|
-Xms4G -Xmx4G |
| JarStartArgs |
string |
No |
Arguments for starting a job deployed from a JAR package. The default startup command is:
|
custom-args |
| WarStartOptions |
string |
No |
The startup command for a job deployed from a WAR package. Configuration is the same as for an image-based deployment. For more information, see Configure a startup command. |
CATALINA_OPTS=\"$CATALINA_OPTS $Options\" catalina.sh run |
| Time |
string |
No |
The time to trigger the job, specified in the |
2023-09-14T14:25:02Z |
| Replicas |
string |
No |
The number of concurrent instances. |
3 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned data. |
||
| RequestId |
string |
The request ID. |
67DD9A98-9CCC-5BE8-8C9E-B45E72F4**** |
| Message |
string |
The returned message.
|
success |
| TraceId |
string |
The trace ID for retrieving detailed information about the call. |
0b87b7e716575071334387401e**** |
| Data |
object |
The returned data. |
|
| Data |
string |
The job ID. |
manual-3db7a8fa-5d40-4edc-92e4-49d50eab**** |
| Msg |
string |
The returned message.
|
success |
| Success |
string |
Whether the job was successfully executed.
|
true |
| Code |
string |
The HTTP status code or a POP error code.
|
200 |
| ErrorCode |
string |
The error code.
|
|
| Code |
string |
The HTTP status code or a POP error code.
|
200 |
| Success |
boolean |
Indicates whether the request was successful.
|
true |
Examples
Success response
JSON format
{
"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 |
Description |
|---|---|---|---|
| 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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.