ListCommandInvocationResults
Queries the execution results of commands delivered by RunAppInstanceCommand in persistent sessions, including the execution status, start and end times, and command output.
Operation description
Call this operation to query the execution results of a command invocation (InvocationId) across persistent sessions. This allows you to track the execution status and obtain the command output. The InvocationId is the command execution ID returned when you call RunAppInstanceCommand to deliver a command.
Currently, only WuyingServer is supported for ProductType. You must specify at least one of AppInstanceGroupIds and AppInstanceGroupId. If both are specified, AppInstanceGroupIds takes precedence. When AppInstanceGroupIds is specified, you can pass up to 200 delivery group IDs, and these delivery groups must be in the same region. If any delivery group does not exist, a delivery group not found error is returned. If the delivery groups are in different regions, a region mismatch error is returned. When only AppInstanceGroupId is specified, the command execution results under this delivery group are queried.
You can use AppInstancePersistentIds to query the execution results of only specified persistent sessions. When AppInstanceGroupIds is specified, only persistent sessions that belong to these delivery groups are retained. If no matching persistent sessions are found, an empty list is returned and TotalCount is 0. For pagination, use PageNumber and PageSize. MaxResults and NextToken do not take effect currently.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
appstreaming:ListCommandInvocationResults |
get |
*All Resource
|
None | None |
Request syntax
GET HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProductType |
string |
Yes |
The product type. Currently, only WuyingServer is supported. If you pass other values, a parameter error is returned. |
WuyingServer |
| AppInstanceGroupId |
string |
No |
The delivery group ID. Queries the command execution results under this delivery group. This parameter is required when AppInstanceGroupIds is not specified. If both are specified, AppInstanceGroupIds takes precedence and this parameter does not take effect. |
ws-0bxls9m9arax6**** |
| AppInstanceGroupIds |
array |
No |
The list of delivery group IDs. You can specify up to 200 IDs, and all delivery groups must be in the same region. When specified, this parameter takes precedence over AppInstanceGroupId and queries the command execution results of all persistent sessions under these delivery groups. The list cannot contain null values. |
|
|
string |
No |
The delivery group ID. |
ws-0bxls9m9arax6**** |
|
| AppInstancePersistentIds |
array |
No |
The list of persistent session IDs. You can specify up to 100 IDs to query the command execution results of only the specified persistent sessions. When AppInstanceGroupIds is specified, only persistent sessions that belong to these delivery groups are retained. If no matching persistent sessions are found, an empty list is returned. |
|
|
string |
No |
The persistent session ID. |
p-0cc7s3mw2fg4j**** |
|
| InvocationId |
string |
Yes |
The command execution ID, which is the InvocationId returned when RunAppInstanceCommand is called to deliver a command. |
t-0bxls9m9ara**** |
| PageSize |
integer |
No |
The number of entries to return on each page. Default value: 200. |
20 |
| PageNumber |
integer |
No |
The page number of the query results to return. This parameter is used together with PageSize for paging. If this parameter is not passed, the default value is 0, which indicates the first page. |
1 |
| MaxResults |
integer |
No |
This parameter does not take effect in the current version and does not affect the query results if passed. Use PageNumber and PageSize for pagination. |
20 |
| NextToken |
string |
No |
This parameter does not take effect in the current version and does not affect the query results if passed. Use PageNumber and PageSize for pagination. |
AAAAAV3MpHK1AP0pfERHZN5pu6kDw2Ml**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response for querying command execution results, which includes the request ID, the list of command execution results, and the total number of query results. |
||
| RequestId |
string |
The request ID. |
1CBAFFAB-B697-4049-A9B1-67E1FC5F**** |
| TotalCount |
integer |
The total number of query results. If no records meet the conditions, 0 is returned. |
15 |
| PageSize |
integer |
The number of query results on each page. In the current version, this field always returns 0 and does not echo echo request parameter PageSize. Refer to echo request parameter for the actual value. |
0 |
| PageNumber |
integer |
The current page number of the query results. In the current version, this field always returns 0 and does not echo echo request parameter PageNumber. Refer to echo request parameter for the actual value. |
0 |
| CommandInvocationResultModel |
array<object> |
The list of command execution results. Each element corresponds to an execution record on a persistent session. If no records meet the conditions, an empty array is returned. |
|
|
object |
|||
| InvocationId |
string |
The command execution ID, which is the same as the InvocationId request parameter. |
t-0bxls9m9ara**** |
| AppInstanceGroupId |
string |
The ID of the delivery group to which the persistent session that executed the command belongs. |
ws-0bxls9m9arax6**** |
| AppInstancePersistentId |
string |
The ID of the persistent session that executed the command. |
p-0cc7s3mw2fg4j**** |
| AppInstanceId |
string |
The instance ID of the application that executed the command. |
ai-azn3kmwruh1vl**** |
| Output |
string |
The output content generated by the command execution in raw text. If the command has not finished or has no output, an empty string is returned. |
hello world |
| StartTime |
string |
The time when the command started to execute. The time is displayed in UTC and follows the RFC 3339 standard in the yyyy-MM-ddTHH:mm:ssZ format. If the command has not started to execute, an empty string is returned. |
2026-11-10T08:49:24Z |
| FinishTime |
string |
The time when the command finished executing. The time is displayed in UTC and follows the RFC 3339 standard in the yyyy-MM-ddTHH:mm:ssZ format. If the command has not finished executing, an empty string is returned. |
2026-11-10T08:49:30Z |
| InvocationStatus |
string |
The execution status of the command on the persistent session, such as Pending (waiting for execution), Running (executing), Success (executed successfully), and Timeout (execution timed out). |
Success |
| MaxResults |
integer |
This field is not returned in the current version. Use PageNumber, PageSize, and TotalCount for pagination. |
20 |
| NextToken |
string |
This field is not returned in the current version. Use PageNumber, PageSize, and TotalCount for pagination. |
AAAAAV3MpHK1AP0pfERHZN5pu6kDw2Ml**** |
Examples
Success response
JSON format
{
"RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****",
"TotalCount": 15,
"PageSize": 0,
"PageNumber": 0,
"CommandInvocationResultModel": [
{
"InvocationId": "t-0bxls9m9ara****",
"AppInstanceGroupId": "ws-0bxls9m9arax6****",
"AppInstancePersistentId": "p-0cc7s3mw2fg4j****",
"AppInstanceId": "ai-azn3kmwruh1vl****",
"Output": "hello world",
"StartTime": "2026-11-10T08:49:24Z",
"FinishTime": "2026-11-10T08:49:30Z",
"InvocationStatus": "Success"
}
],
"MaxResults": 20,
"NextToken": "AAAAAV3MpHK1AP0pfERHZN5pu6kDw2Ml****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.