All Products
Search
Document Center

Batch Compute:ListInstances

Last Updated:Feb 17, 2023

Request syntax

GET /jobs/{Id}/tasks/{TaskName}/instances?Marker={Marker}&MaxItemCount={MaxItemCount}

Attribute description

Attribute

Type

Required

Description

Id

string

Yes

ID of a job.

TaskName

string

Yes

ID of a task.

Marker

String

No

Start resource ID of the current page.

MaxItemCount

int

No

Maximum number of actually returned resources.

Response

Success

The 200 status code and the following instance list information are returned:

{
    "NextMarker": "",
    "Items":[{
        "InstanceId": 0,
        "State": "Running",
        "StartTime": "2016-11-01T15:25:03.020203Z",
        "EndTime": "",
        "RetryCount": 30,
        "Progress": 0,
        "StderrRedirectPath": "oss://bucket/tests/a44c0ad8-a003-11e6-8f8e-fefec0a80e06/logs/stderr.job-0000000058184218000008150000000D.task.0",
      "StdoutRedirectPath": "oss://bucket/tests/a44c0ad8-a003-11e6-8f8e-fefec0a80e06/logs/stdout.job-0000000058184218000008150000000D.task.0",
        "Result": {
            "ExitCode": 0,
            "ErrorCode": "",
            "ErrorMessage": "",
            "Detail": ""
        }
    }]
}

Attribute description

Attribute

Type

Description

NextMarker

string

Start resource ID on the next page. This value is blank in the last page.

Items

array

List of resources.

Error codes

Error code

Error message

Status code

Syntax

InvalidResource.NotFound

Specified resource is not found.

404

The user requested resource does not exist.

InvalidMaxItemCount

Specified parameter MaxItemCount is not valid. Its type must be integer.

400

MaxItemCount must be an integer.

InvalidMaxItemCount

Specified parameter MaxItemCount is not valid. It must be in [0, 100].

400

The MaxItemCount value must be in the range of [0, 100].