Obtaining Jobs in a Dedicated Resource Pool
Function
This API is used to obtain jobs in a dedicated resource pool.
URI
GET /v2/{project_id}/pools/{pool_name}/workloads
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID and Name. Minimum: 32 Maximum: 36 |
pool_name |
Yes |
String |
Namespace to which a job belongs |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
type |
No |
String |
Service type of a job. Options: |
status |
No |
String |
Job status. Options: |
sort |
No |
String |
Sorting field. Options: |
ascend |
No |
Boolean |
Whether the results are sorted in ascending order |
offset |
No |
String |
Start position for pagination query |
limit |
No |
Integer |
Maximum number of records on each page. If this parameter is left blank or set to 0, 500 records are returned by default. A maximum of 500 records are allowed on each page. |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
apiVersion |
String |
API version. Options: |
kind |
String |
Resource type. Options: |
items |
Array of Workload objects |
Job list |
Parameter |
Type |
Description |
---|---|---|
apiVersion |
String |
Resource version. Options: |
kind |
String |
Resource type. Options: |
type |
String |
Service type of a job. Options: |
namespace |
String |
Name of the resource pool to which a job belongs |
name |
String |
Job name |
jobName |
String |
Upper-layer service job name |
uid |
String |
Job UID |
jobUUID |
String |
Upper-layer service job ID |
flavor |
String |
Job specifications |
status |
String |
Job status |
resourceRequirement |
resourceRequirement object |
Number of resources requested for running a job |
priority |
String |
Job priority |
runningDuration |
Integer |
Running duration of a job |
pendingDuration |
Integer |
Queuing duration of a job |
pendingPosition |
Integer |
Queuing position of a job |
createTime |
Integer |
Job creation time |
gvk |
String |
GVK of a job |
hostIps |
String |
IP addresses of the nodes where a job is running. The values are separated with commas (,). |
Parameter |
Type |
Description |
---|---|---|
cpu |
String |
CPU usage |
memory |
String |
Memory usage |
nvidia.com/gpu |
String |
GPU usage |
huawei.com/ascend-310 |
String |
Ascend D310 usage |
huawei.com/ascend-1980 |
String |
Ascend snt9 usage |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code Minimum: 8 Maximum: 36 |
error_msg |
String |
Error message Minimum: 2 Maximum: 512 |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code Minimum: 8 Maximum: 36 |
error_msg |
String |
Error message Minimum: 2 Maximum: 512 |
Example Requests
None
Example Responses
Status code: 400
Bad request
{ "error_code" : "ModelArts.50004000", "error_msg" : "Bad request." }
Status code: 404
Not found
{ "error_code" : "ModelArts.50015001", "error_msg" : "Pool {name} not found." }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad request |
404 |
Not found |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.