调用ListInvocationResults查看指定集群内交互命令的运行结果。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String ListInvocationResults

系统规定参数。取值:ListInvocationResults

ClusterId String ehpc-hz-FYUr32****

集群ID。

CommandId String c-f4682204a89949979d75e76700e05521

命令ID。

InvokeRecordStatus String Finished

需要查询的命令的运行状态。取值范围:

  • Finished:已结束
  • Running:运行中
  • Failed:运行失败
  • Stopped:已停止
Instance.N.Id String i-uf65bh2113hlqvyr****

第N个执行命令的目标节点实例ID。

说明 用于限定执行范围,不指定则默认在集群所有节点上执行。
PageNumber Integer 1

当前页码。

起始值:1

默认值:1

PageSize Integer 10

每页显示的行数。取值范围:1~50

默认值:10

返回数据

名称 类型 示例值 描述
InvocationResults Array of InvocationResult

执行结果信息。

InvocationResult
CommandId String c-f4682204a89949979d75e76700e0****

命令ID。

ExitCode Integer 0

Shell命令返回值。

FinishedTime String 2018-08-07T07:01Z

完成时间。

InstanceId String i-uf65bh2113hlqvyr****

执行命令的节点实例ID。

InvokeRecordStatus String Finished

查询的命令的运行状态。可能值:

  • Finished:已结束
  • Running:运行中
  • Failed:运行失败
  • Stopped:已停止
Message String hello world

输出结果。

Success Boolean true

执行命令并获取结果的过程是否成功。

PageNumber Integer 1

显示的页码。

PageSize Integer 10

每页显示的行数。

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

请求ID。

TotalCount Integer 1

列表条目总数。

示例

请求示例

https://ehpc.cn-hangzhou.aliyuncs.com/?Action=ListInvocationResults
&ClusterId=ehpc-hz-FYUr32****
&CommandId=c-f4682204a89949979d75e76700e0****
&<公共请求参数>

正常返回示例

XML格式

<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格式

{
    "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****"
            }
        }
    }
}

错误码

HttpCode 错误码 错误信息 描述
503 ServiceUnavailable The request has failed due to a temporary failure of the server 请求失败,服务暂时不可用

访问错误中心查看更多错误码。