Queries the result of an interactive command in a 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.

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

CommandId String Yes c-hz01v8x80o3****

The ID of the command.

You can call the ListCommands operation to query the command ID.

InvokeRecordStatus String No Finished

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

  • Finished
  • Running
  • Failed
  • Stopped
Instance.N.Id String No i-uf65bh2113hlqvyr****

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

Note The Instance.N.Id parameter specifies the node on which the command is run. If it is not specified, the command is run on all nodes of the cluster.
PageNumber Integer No 1

The number of the page to return.

Page numbers start from 1.

Default value: 1

PageSize Integer No 10

The number of entries to return on each page. Valid values: 1 to 50.

Default value: 10

Response parameters

Parameter Type Example Description
InvocationResults Array of InvocationResult

The result of the command.

InvocationResult
CommandId String c-hz01v8x80o3****

The ID of the command.

ExitCode Integer 0

The exit code.

FinishedTime String 2021-09-06T09:14:56Z

The time at which the command entered the Finished state.

InstanceId String i-uf65bh2113hlqvyr****

The ID of the node on which the command was run.

InvokeRecordStatus String Finished

The status of the command. Valid values:

  • Finished
  • Running
  • Failed
  • Stopped
Message String hello world

The output result.

Success Boolean true

Indicates whether the command was run and its result was 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 returned entries.

Examples

Sample requests

https://ehpc.cn-hangzhou.aliyuncs.com/?Action=ListInvocationResults
&ClusterId=ehpc-hz-FYUr32****
&CommandId=c-hz01v8x80o3****
&<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-hz01v8x80o3****</CommandId>
                  <Success>true</Success>
                  <InvokeRecordStatus>Finished</InvokeRecordStatus>
                  <FinishedTime>2021-09-06T09:14:56Z</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-hz01v8x80o3****",
                "Success": true,
                "InvokeRecordStatus": "Finished",
                "FinishedTime": "2021-09-06T09:14:56Z",
                "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 service is temporarily unavailable.

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