All Products
Search
Document Center

Elastic High Performance Computing:ListServerlessJobs

Last Updated:Mar 18, 2025

Queries the list of serverless jobs based on filter conditions.

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

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

The region ID. You can call the ListRegions operation to query the list of regions where E-HPC is supported.

cn-hangzhou
ClusterIdstringYes

The ID of the E-HPC cluster.

You can call the ListClusters operation to query the cluster ID.

ehpc-hz-FYUr32****
PageNumberlongNo

The page number. Pages start from page 1. Default value: 1.

1
PageSizelongNo

The number of entries per page. Maximum value: 100. Default value: 20.

20
JobIdsarrayNo

The list of serverless job IDs or subtask IDs (array jobs).

stringNo

The ID of the serverless job or subtask (array job).

5,10_1
JobNamesarrayNo

The names of the serverless jobs.

stringNo

The name of the serverless job.

testjob
StatestringNo

The status of the serverless job. Valid values:

  • All
  • Pending
  • Running
  • Succeeded
  • Canceled
  • Failed

Default value: All.

Running
StartOrderstringNo

Specifies whether to sort the serverless jobs by the job start time. Valid values:

  • Asc: ascending order.
  • Desc: descending order.
Asc
SubmitOrderstringNo

Specifies whether to sort the serverless jobs by the job submission time. Valid values:

  • Asc: ascending order.
  • Desc: descending order.
asc
SubmitTimeStartstringNo

The earliest time at which the job is submitted.

Note You can use this parameter to query the job list based on the job submission time.
1647427667
SubmitTimeEndstringNo

The latest time at which the job is submitted.

Note You can use this parameter to query the job list based on the job submission time.
1659521430

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

TotalCountinteger

The total number of entries returned.

1
RequestIdstring

The request ID.

04F0F334-1335-436C-A1D7-6C044FE7****
PageSizelong

The number of entries returned per page.

20
PageNumberlong

The page number returned.

1
Jobsarray<object>

The list of serverless jobs.

JobInfoobject

The list of serverless jobs.

JobIdstring

The ID of the serverless job or the subtask (array job).

5
JobNamestring

The name of the serverless job.

testjob
Statestring

The status of the serverless job. Valid values:

  • Pending
  • Initing
  • Running
  • Succeeded
  • Canceled
  • Failed
Running
Prioritystring

The scheduling priority of the serverless job. Valid values are 0 to 999. A greater value indicates a higher priority.

9
Queuestring

The name of the queue in which the serverless job is run.

comp
Userstring

The username that is used to run the serverless job.

testuser
SubmitTimestring

The time at which the serverless job is submitted.

1647423718
StartTimestring

The time at which the serverless job started.

1647427667
EndTimestring

The time at which the serverless job ended.

1682128871
IsArrayJobboolean

Indicates whether the job is an array job. Valid values:

  • True: yes
  • False: no
True

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400InvalidParamsThe specified parameter %s is invalid.The specified parameter %s is invalid.
400NotEnabledYou have not enabled this serviceYou have not enabled this service
404ClusterNotFoundThe specified cluster does not exist.The specified instance does not exist.
404ManagerNotFoundThe manager nodes do not exist or their status is abnormal.The manager nodes do not exist or their status is abnormal.
406DbErrorA database service error occurred.Database request failed.
406EcsErrorAn error occurred while calling the ECS API operation.ECS API call error. %s
406RedisErrorA Redis service error occurred.Redis request failed.
406AliyunErrorAn Alibaba Cloud product error occurred.Alibaba Cloud product error. %s
406AgentErrorThe agent service request failed: %sOperation unsuccessful: %s
407NotAuthorizedYou are not authorized by RAM for this request.The request is not authorized by RAM.
500UnknownErrorAn unknown error occurred.An unknown error occurred.
503ServiceUnavailableThe request has failed due to a temporary failure of the serverThe request has failed due to a temporary failure of the server.

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

Change history

Change timeSummary of changesOperation
2023-07-21The Error code has changedView Change Details
2023-07-17The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedView Change Details