Queries the results of interactive commands in a specified cluster.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListInvocationResults

The operation that you want to perform. Set the value to ListInvocationResults.

ClusterId String Yes ehpc-hz-FYUr32****

The ID of the cluster.

CommandId String Yes c-f4682204a89949979d75e76700e05521

The ID of the command.

InvokeRecordStatus String No Finished

The running status of the command that you want to query. Valid values:

  • Finished: The command has finished.
  • Running: The command is running.
  • Failed: The command has failed.
  • Stopped: The command is stopped.
Instance.N.Id String No i-uf65bh2113hlqvyr****

The ID of the Nth ECS instance. This is the instance on which you want to run the command.

Note This parameter specifies the node on which the command is run. If no node is specified, the command will be run on all nodes of the cluster.
PageNumber Integer No 1

The number of the returned page.

Pages start from page 1.

Default value: 1

PageSize Integer No 10

The number of entries returned per page. Valid values: 1 to 50.

Default value: 10

Response parameters

Parameter Type Example Description
InvocationResults Array of InvocationResult

The results of the invocation.

InvocationResult
CommandId String c-f4682204a89949979d75e76700e0****

The ID of the command.

ExitCode Integer 0

The return value of the shell command.

FinishedTime String 2018-08-07T07:01Z

The time at which the task is finished.

InstanceId String i-uf65bh2113hlqvyr****

The ID of the node instance. This is the instance on which the command is run.

InvokeRecordStatus String Finished

The running status of the commands that you want to query. Valid values:

  • Finished: The command has finished.
  • Running: The command is running.
  • Failed: The command has failed.
  • Stopped: The command is stopped.
Message String hello world

View the output result.

Success Boolean true

Indicates whether the command was executed and the results were obtained.

PageNumber Integer 1

The page number of the returned page.

PageSize Integer 10

The number of entries returned per page.

RequestId String 04F0F334-1335-436C-A1D7-6C044FE73368

The ID of the request.

TotalCount Integer 1

The total number of entries.

Examples

Sample requests

https://ehpc.cn-hangzhou.aliyuncs.com/?Action=ListInvocationResults
&ClusterId=ehpc-hz-FYUr32****
&CommandId=c-f4682204a89949979d75e76700e0****
&<Common request parameters>

Sample success responses

XML format

<ListInvocationResultsResponse>
      <RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
      <TotalCount>1</TotalCount>
      <PageNumber>1</PageNumber>
      <PageSize>10</PageSize>
      <InvocationResults>
            <InvocationResult>
                  <CommandId>c-f4682204a89949979d75e76700e0****</CommandId>
                  <Success>true</Success>
                  <InvokeRecordStatus>Finished</InvokeRecordStatus>
                  <FinishedTime>2018-08-07T07:01Z</FinishedTime>
                  <ExitCode>0</ExitCode>
                  <Message>hello world</Message>
                  <InstanceId>i-uf65bh2113hlqvyr****</InstanceId>
            </InvocationResult>
      </InvocationResults>
</ListInvocationResultsResponse>

JSON format

{
    "ListInvocationResultsResponse": {
        "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
        "TotalCount": 1,
        "PageNumber": 1,
        "PageSize": 10,
        "InvocationResults": {
            "InvocationResult": {
                "CommandId": "c-f4682204a89949979d75e76700e0****",
                "Success": true,
                "InvokeRecordStatus": "Finished",
                "FinishedTime": "2018-08-07T07:01Z",
                "ExitCode": 0,
                "Message": "hello world",
                "InstanceId": "i-uf65bh2113hl****"
            }
        }
    }
}

Error codes

HttpCode Error code Error message Description
503 ServiceUnavailable The request has failed due to a temporary failure of the server The error message returned because the request has failed. The server is temporarily unavailable.

For a list of error codes, visit the API Error Center.