调用ListCommands查看指定集群内的交互命令列表。

调试

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

请求参数

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

系统规定参数。取值:ListCommands

ClusterId String ehpc-hz-FYUr32****

集群ID。

CommandId String c-f4682204a89949979d75e76700e0****

命令ID。

PageNumber Integer 1

当前页码。

起始值:1

默认值:1

PageSize Integer 10

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

默认值:10

返回数据

名称 类型 示例值 描述
Commands Array of Command

命令列表。

Command
CommandContent String echo "hello world"

命令内容。

CommandId String c-f4682204a89949979d75e76700e0****

命令ID。

Timeout String 3600

超时时间。

WorkingDir String /root

命令工作目录。

PageNumber Integer 1

当前页码。

PageSize Integer 1

本页条数。

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

请求ID。

TotalCount Integer 1

列表条目总数。

示例

请求示例

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

正常返回示例

XML格式

<ListCommandsResponse>
      <RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
      <TotalCount>1</TotalCount>
      <PageNumber>1</PageNumber>
      <PageSize>1</PageSize>
      <Commands>
            <Command>
                  <CommandId>c-f4682204a89949979d75e76700e0****</CommandId>
                  <CommandContent>echo "hello world"</CommandContent>
                  <WorkingDir>/root</WorkingDir>
                  <Timeout>60</Timeout>
            </Command>
      </Commands>
</ListCommandsResponse>

JSON格式

{
    "ListCommandsResponse": {
        "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
        "TotalCount": 1,
        "PageNumber": 1,
        "PageSize": 1,
        "Commands": {
            "Command": {
                "CommandId": "c-f4682204a89949979d75e76700e0****",
                "CommandContent": "echo \"hello world\"",
                "WorkingDir": "/root",
                "Timeout": 60
            }
        }
    }
}

错误码

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

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