Queries the 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 ListCommands

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

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

The ID of the cluster.

CommandId String No c-f4682204a89949979d75e76700e0****

The ID of the command.

PageNumber Integer No 1

The page number of the page to return.

Pages start from page 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
Commands Array of Command

The list of commands.

Command
CommandContent String echo "hello world"

The content of the command.

CommandId String c-f4682204a89949979d75e76700e0****

The ID of the command.

Timeout String 3600

The timeout period.

WorkingDir String /root

The working directory of the command.

PageNumber Integer 1

The page number of the returned page.

PageSize Integer 1

The number of entries that are 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=ListCommands
&ClusterId=ehpc-hz-FYUr32****
&<Common request parameters>

Sample success responses

XML format

<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 format

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

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.