Queries a list of serverless jobs based on conditional query filters.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ehpc:ListServerlessJobs |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region ID. You can call ListRegions to query the regions where E-HPC is available. |
cn-hangzhou |
| ClusterId |
string |
Yes |
The cluster ID. You can call ListClusters to query the cluster ID. |
ehpc-hz-FYUr32**** |
| PageNumber |
integer |
No |
The page number. Minimum value: 1. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page. Maximum value: 100. Default value: 20. |
20 |
| JobIds |
array |
No |
The list of serverless job IDs or subtask IDs (for array jobs). |
|
|
string |
No |
The serverless job ID or subtask ID (for array jobs). |
5 |
|
| JobNames |
array |
No |
The list of serverless job names. |
|
|
string |
No |
The serverless job name. |
testjob |
|
| State |
string |
No |
The serverless job status. Valid values:
Default value: All. Valid values:
|
Running |
| StartOrder |
string |
No |
The order in which serverless jobs are sorted by start time. Valid values:
Valid values:
|
Asc |
| SubmitOrder |
string |
No |
The order in which serverless jobs are sorted by submit time. Valid values:
Valid values:
|
Asc |
| SubmitTimeStart |
string |
No |
The earliest job submission timestamp. Note
This parameter is used to query the job list based on the submission time range of serverless jobs. |
1647427667 |
| SubmitTimeEnd |
string |
No |
The latest job submission timestamp. Note
This parameter is used to query the job list based on the submission time range of serverless jobs. |
1659521430 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| TotalCount |
integer |
The total number of entries returned under the current request conditions. |
1 |
| RequestId |
string |
The request ID. |
04F0F334-1335-436C-A1D7-6C044FE7**** |
| PageSize |
integer |
The number of entries per page in Settings for the paged query. This is the paging size. |
20 |
| PageNumber |
integer |
The current page number. |
1 |
| Jobs |
array<object> |
The list of serverless job information. |
|
|
object |
|||
| JobId |
string |
The serverless job ID or subtask ID (for array jobs). |
5 |
| JobName |
string |
The serverless job name. |
testjob |
| State |
string |
The serverless job status. Valid values:
|
Running |
| Priority |
string |
The scheduling priority of the serverless job. Valid values: 0 to 999. A larger value indicates a higher priority. |
9 |
| Queue |
string |
The name of the queue in which the serverless job is run. |
comp |
| User |
string |
The username that is used to run the serverless job. |
testuser |
| SubmitTime |
string |
The submission timestamp of the serverless job. |
1647423718 |
| StartTime |
string |
The start timestamp of the serverless job. |
1647427667 |
| EndTime |
string |
The end timestamp of the serverless job. |
1682128871 |
| IsArrayJob |
boolean |
Indicates whether the job is an array job. Valid values:
|
True |
Examples
Success response
JSON format
{
"TotalCount": 1,
"RequestId": "04F0F334-1335-436C-A1D7-6C044FE7****",
"PageSize": 20,
"PageNumber": 1,
"Jobs": [
{
"JobId": "5",
"JobName": "testjob",
"State": "Running",
"Priority": "9",
"Queue": "comp",
"User": "testuser",
"SubmitTime": "1647423718",
"StartTime": "1647427667",
"EndTime": "1682128871",
"IsArrayJob": true
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParams | The specified parameter %s is invalid. | The specified parameter %s is invalid. |
| 400 | NotEnabled | You have not enabled this service | You have not enabled this service |
| 500 | UnknownError | An unknown error occurred. | An unknown error occurred. |
| 404 | ClusterNotFound | The specified cluster does not exist. | The specified instance does not exist. |
| 404 | ManagerNotFound | The manager nodes do not exist or their status is abnormal. | The manager nodes do not exist or their status is abnormal. |
| 503 | ServiceUnavailable | The request has failed due to a temporary failure of the server | The request has failed due to a temporary failure of the server. |
| 406 | DbError | A database service error occurred. | Database request failed. |
| 406 | EcsError | An error occurred while calling the ECS API operation. | ECS API call error. %s |
| 406 | RedisError | A Redis service error occurred. | Redis request failed. |
| 406 | AliyunError | An Alibaba Cloud product error occurred. | Alibaba Cloud product error. %s |
| 406 | AgentError | The agent service request failed: %s | Operation unsuccessful: %s |
| 407 | NotAuthorized | You are not authorized by RAM for this request. | The request is not authorized by RAM. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.