You can call this operation to query the execution results of one or more Cloud Assistant commands on ECS instances.
Description
- After you run a command, it may not succeed. You can call this operation to query the actual execution results.
- You can query the execution information within the last two weeks. A maximum of 100,000 pieces of execution information can be retained.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeInvocationResults |
The operation that you want to perform. Set the value to DescribeInvocationResults. |
RegionId | String | Yes | cn-hangzhou |
The region ID of the command. You can call the DescribeRegions operation to query the most recent region list. |
InvokeId | String | No | t-hz0jdfwd9f**** |
The ID of the execution. You can call the DescribeInvocations operation to query the execution IDs. |
InstanceId | String | No | i-bp1i7gg30r52z2em**** |
The ID of the instance. |
CommandId | String | No | c-hz0jdfwcsr**** |
The ID of the command. |
InvokeRecordStatus | String | No | Running |
The execution status of the command. Valid values:
|
IncludeHistory | Boolean | No | false |
Specifies whether to return the historical records of scheduled invocations. Valid values:
Default value: false. |
ContentEncoding | String | No | PlainText |
Specifies the encoding method of the
Default value: Base64. |
PageNumber | Long | No | 1 |
The number of the page to return. Pages start from page 1. Default value: 1. |
PageSize | Long | No | 1 |
The number of entries to return on each page. Maximum value: 50. Default value: 10. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Invocation | Struct |
The collection of command execution results. |
|
InvocationResults | Array |
Details about the command execution results. |
|
InvocationResult | |||
CommandId | String | c-hz0jdfwcsr**** |
The ID of the command. |
Dropped | Integer | 0 |
The size of truncated and discarded text when the size of text in the |
ErrorCode | String | InstanceNotExists |
The code for the cause why the command fails to be sent or executed. Valid values:
|
ErrorInfo | String | the specified instance does not exists |
The detailed cause why a command fails to be sent or executed . Valid values:
|
ExitCode | Long | 0 |
The exit code of the command execution.
|
FinishedTime | String | 2019-12-20T06:15:56Z |
The time when the command execution was complete. If an execution times out, the completion time of the execution is subject to the value of the TimedOut parameter specified in the CreateCommand operation. |
InstanceId | String | i-bp1i7gg30r52z2em**** |
The ID of the instance. |
InvocationStatus | String | Success |
The command execution status on a single instance. Valid values:
|
InvokeId | String | t-hz0jdfwd9f**** |
The ID of the command execution. |
InvokeRecordStatus | String | Running |
The execution status of the command. |
Output | String | MTU6MzA6MDEK |
The output of the command execution. |
Repeats | Integer | 0 |
The number of executions on this instance.
|
StartTime | String | 2019-12-20T06:15:55Z |
The time when the command started to be executed in the instance. |
StopTime | String | 2020-01-19T09:15:47Z |
The time when you called the |
PageNumber | Long | 1 |
The page number of the returned page. |
PageSize | Long | 1 |
The number of entries returned per page. |
TotalCount | Long | 1 |
The total number of commands. |
RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
The ID of the request. |
Examples
Sample requests
https://ecs.aliyuncs.com/?Action=DescribeInvocationResults
&RegionId=cn-hangzhou
&InstanceId=i-bp1i7gg30r52z2em****
&PageNumber=1
&PageSize=1
&<Common request parameters>
Sample success responses
XML
format
<DescribeInvocationResultsResponse>
<RequestId>F416C43A-6581-4138-9503-4FBBC4EA1BB7</RequestId>
<Invocation>
<InvocationResults>
<InvocationResult>
<Dropped>0</Dropped>
<InvocationStatus>Failed</InvocationStatus>
<InstanceId>i-bp1i7gg30r52z2em****</InstanceId>
<ExitCode>1</ExitCode>
<ErrorInfo>the command execution exit code is not zero. </ErrorInfo>
<StartTime>2020-05-11T09:01:40Z</StartTime>
<Repeats>1</Repeats>
<InvokeRecordStatus>Finished</InvokeRecordStatus>
<FinishedTime>2020-05-11T09:01:41Z</FinishedTime>
<Output></Output>
<CommandId>c-hz0jdfwcsr****</CommandId>
<ErrorCode>ExitCodeNonzero</ErrorCode>
<InvokeId>t-hz0jdfwd9f****</InvokeId>
<StopTime></StopTime>
</InvocationResult>
</InvocationResults>
<TotalCount>5</TotalCount>
<PageSize>1</PageSize>
<PageNumber>1</PageNumber>
</Invocation>
</DescribeInvocationResultsResponse>
JSON
format
{
"RequestId": "F416C43A-6581-4138-9503-4FBBC4EA1BB7",
"Invocation": {
"InvocationResults": {
"InvocationResult": [
{
"Dropped": 0,
"InvocationStatus": "Failed",
"InstanceId": "i-bp1i7gg30r52z2em****",
"ExitCode": 1,
"ErrorInfo": "the command execution exit code is not zero.",
"StartTime": "2020-05-11T09:01:40Z",
"Repeats": 1,
"InvokeRecordStatus": "Finished",
"FinishedTime": "2020-05-11T09:01:41Z",
"Output": "",
"CommandId": "c-hz0jdfwcsr****",
"ErrorCode": "ExitCodeNonzero",
"InvokeId": "t-hz0jdfwd9f****",
"StopTime": ""
}
]
},
"TotalCount": 5,
"PageSize": 1,
"PageNumber": 1
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
500 | InternalError.Dispatch | An error occurred when you dispatched the request. | The error message returned because an error occurred when the request was being sent. Try again later. |
403 | InvalidParam.PageNumber | The specified parameter is invalid. | The error message returned because the specified PageNumber parameter is invalid. |
403 | InvalidParam.PageSize | The specified parameter is invalid. | The error message returned because the specified PageSize parameter is invalid. |
For a list of error codes, visit the API Error Center.