Queries the invocation result of a cloud assistant command, that is, the actual Output
information of a specified ECS instance.
Description
After you use the DescribeInvocations interface to check the command invocation status and the returned InvokeStatus
is Finished
, it indicates that the command process is Finished, but not necessarily is as effective as expected. You need to check the Output
parameter in DescribeInvocationResults to get the specific invocation result. The actual output result is the valid version.
Request parameters
Name | Type | Required | Description |
---|---|---|---|
Action | String | Yes | The name of this interface. Value: DescribeInvocationResults. |
RegionId | String | Yes | The regional ID. For more information, see DescribeRegions. |
CommandId | String | No | Command ID. For more information, call DescribeRegions to obtain the latest region list. |
InstanceId | String | No | Instance ID. |
InvokeId | String | No | Invocation ID of a command process. You can use the DescribeInvocations API to check all the InvokeId . |
InvokeRecordStatus | String | No | The status of the command process you want to query. Optional values:
|
PageNumber | Integer | No | Current page number. Start value: 1. |
PageSize | Default value: 1. | No | The number of rows per page for multi-page display. Maximum value: 50. Default value: 10. |
Response parameters
Name | Type | Description |
---|---|---|
TotalCount | Integer | Total number of commands. |
Pagenumber | Integer | Page number of the query result. |
Pagesize | Integer | The number of rows per page. |
InvocationResults | Array | Command invocation result set (InvocationResultSetType). |
Name | Type | Description |
---|---|---|
Invocationresult | Array | Invocation result type on the instance (InvocationResultType). Only one entry of result are returned for one-time invocation. |
Name | Type | Description |
---|---|---|
CommandId | String | Command ID. |
InvokeId | String | Invocation ID. |
InstanceId | String | Instance ID. |
FinishedTime | String | Time of command process completion. If a command process times out, the time of completion for the command process is based on CreateCommand TimedOut . |
Invokerecordstatus | String | Invocation status of the command process. Optional values:
|
Output | String | The actual result after the command process completion. The output content is transmitted in the Base64-encoded format. |
Exitcode | Integer | The exit code of the command process:
|
Examples
https://ecs.aliyuncs.com/?Action=DescribeInvocationResults
&RegionId=cn-hangzhou
&<Common Request Parameters>
XML format
<DescribeInvocationResultsResponse>
<TotalCount>5</TotalCount>
<PageNumber>1</PageNumber>
<PageSize>5</PageSize>
<Invocationresults>
<Invocationresult>
<FinishedTime>2018-01-05 15:45:02</FinishedTime>
<Invokerecordstatus> finished </invokerecordstatus>
<InstanceId>i-uf614fhehhzmxxxxxxxx</InstanceId>
<InvokeId>t-001937b74e2a4242891fc789xxxxxxxx</InvokeId>
<Output>MTU6NDU6MDEK</Output>
<CommandId>c-6b0fb9d72adc421abab462abxxxxxxxx</CommandId>
<ExitCode>0</ExitCode>
</InvocationResult>
<InvocationResult>
<FinishedTime>2018-01-05 15:40:02</FinishedTime>
<InvokeRecordStatus>finished</InvokeRecordStatus>
<InstanceId>i-uf614fhehhzmxxxxxxxx</InstanceId>
<InvokeId>t-a8935b93739442e59ed621a6xxxxxxxx</InvokeId>
<Output> </Output>
<CommandId>c-e67505b2be3e477dae94c0f0xxxxxxxx</CommandId>
<ExitCode>0</ExitCode>
</InvocationResult>
<InvocationResult>
<FinishedTime>2018-01-05 15:30:02</FinishedTime>
<InvokeRecordStatus>finished</InvokeRecordStatus>
<InstanceId>i-uf614fhehhzmxxxxxxxx</InstanceId>
<InvokeId>t-001937b74e2a4242891fc78xxxxxxxx</InvokeId>
<Output>MTU6MzA6MDEK</Output>
<CommandId>c-6b0fb9d72adc421abab462abxxxxxxxx</CommandId>
<ExitCode>0</ExitCode>
</InvocationResult>
<InvocationResult>
<FinishedTime>2018-01-05 15:20:02</FinishedTime>
<InvokeRecordStatus>finished</InvokeRecordStatus>
<InstanceId>i-uf614fhehhzmxxxxxxxx</InstanceId>
<InvokeId>t-a8935b93739442e59ed621a6xxxxxxxx</InvokeId>
<Output> </Output>
<CommandId>c-e67505b2be3e477dae94c0f0xxxxxxxx</CommandId>
<Exitcode> 0 </exitcode>
</InvocationResult>
<InvocationResult>
<FinishedTime>2018-01-05 15:15:02</FinishedTime>
<InvokeRecordStatus>finished</InvokeRecordStatus>
<InstanceId>i-uf614fhehhzmxxxxxxxx</InstanceId>
<InvokeId>t-001937b74e2a4242891fc789xxxxxxxx</InvokeId>
<Output>MTU6MTU6MDEK</Output>
<CommandId>c-6b0fb9d72adc421abab462abxxxxxxxx</CommandId>
<ExitCode>0</ExitCode>
</InvocationResult>
</InvocationResults>
<RequestId>567FA138-6026-47C6-A299-5D50xxxxxxxx</RequestId>
</DescribeInvocationResultsResponse>
JSON format
{
"Invocation": {
"TotalCount": 5,
"PageNumber": 1,
"InvocationResults": {
"InvocationResult": [
{
"FinishedTime": "2018-01-05 15:45:02",
"InvokeRecordStatus": "finished",
"InstanceId": "i-uf614fhehhzmxxxxxxxx",
"InvokeId": "t-001937b74e2a4242891fc789xxxxxxxx",
"Output": "MTU6NDU6MDEK",
"CommandId": "c-6b0fb9d72adc421abab462abxxxxxxxx",
"ExitCode": 0
},
{
"FinishedTime": "2018-01-05 15:40:02",
"InvokeRecordStatus": "finished",
"InstanceId": "i-uf614fhehhzmxxxxxxxx",
"InvokeId": "t-a8935b93739442e59ed621a6xxxxxxxx",
"Output": "",
"CommandId": "c-e67505b2be3e477dae94c0f0xxxxxxxx",
"ExitCode": 0
},
{
"FinishedTime": "2018-01-05 15:30:02",
"InvokeRecordStatus": "finished",
"InstanceId": "i-uf614fhehhzmxxxxxxxx",
"InvokeId": "t-001937b74e2a4242891fc78xxxxxxxx",
"Output": "MTU6MzA6MDEK",
"CommandId": "c-6b0fb9d72adc421abab462abxxxxxxxx",
"ExitCode": 0
},
{
"FinishedTime": "2018-01-05 15:20:02",
"InvokeRecordStatus": "finished",
"InstanceId": "i-uf614fhehhzmd3zj4k74",
"InvokeId": "t-a8935b93739442e59ed621a6xxxxxxxx",
"Output": "",
"CommandId": "c-e67505b2be3e477dae94c0f0xxxxxxxx",
"ExitCode": 0
},
{
"FinishedTime": "2018-01-05 15:15:02",
"InvokeRecordStatus": "finished",
"InstanceId": "i-uf614fhehhzmd3zj4k74",
"InvokeId": "t-001937b74e2a4242891fc789xxxxxxxx",
"Output": "MTU6MTU6MDEK",
"CommandId": "c-6b0fb9d72adc421abab462abxxxxxxxx",
"ExitCode": 0
}
]
},
"PageSize": 5
},
"RequestId": "567FA138-6026-47C6-A299-5D50xxxxxxxx"
}
XML format
<Error>
<RequestId>540CFF28-407A-40B5-B6A5-74Bxxxxxxxxx</RequestId>
<HostId>ecs.aliyuncs.com</HostId>
<Code>MissingParameter.RegionId</Code>
<Message>The input parameter “RegionId” that is mandatory for processing this request is not supplied.</Message>
</Error>
JSON format
{
"RequestId": "540CFF28-407A-40B5-B6A5-74Bxxxxxxxxx",
"HostId": "ecs.aliyuncs.com"
"Code": "MissingParameter.RegionId"
"Message": "The input parameter “RegionId” that is mandatory for processing this request is not supplied."
}
Error codes
Error codes specific to this interface are as follows. For more information, see API Error Center.
Error code | Error message | HTTP status code | Meaning |
---|---|---|---|
MissingParameter.RegionId | The input parameter “RegionId” that is mandatory for processing this request is not supplied. | 400 | You must specify the required parameter RegionId , or you cannot use the resources in the RegionId . |
InvalidRegionId.NotFound | The RegionId provided does not exist in our items. | 404 | The specified RegionId does not exist. |
InternalError.Dispatch | An internal error occurred when dispatch the request. | 500 | Internal error. Please try again later. |