Queries the running details of commands.
Description
- After you run a command, the command may not succeed or deliver the expected results. You can call this operation to query the actual execution results.
- You can query the execution information that is generated within the last two weeks. Up to 100,000 lines of execution information can be retained.
Request parameter
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | DescribeInvocations |
The operation that you want to perform. Set the value to DescribeInvocations. |
| RegionId | String | Yes | cn-hangzhou |
The region ID of the simple application server. You can call the ListRegions operation to query the most recent region list. |
| InstanceId | String | Yes | 3a658ca270df4df39f22e289b338**** |
The ID of the simple application server. |
| PageNumber | Integer | No | 1 |
The 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. Maximum value: 50. Default value: 10 |
| InvokeStatus | String | No | Finished |
The status of the command. Valid values:
|
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| RequestId | String | 30637AD6-D977-4833-A54C-CC89483E**** |
The ID of the request. |
| Invocations | Array of Invocation |
Running records of commands. |
|
| CreationTime | String | 2022-07-11T06:37:16Z |
The time when the command was created. |
| InvocationStatus | String | Success |
The status of the command. Valid values:
|
| CommandType | String | RunShellScript |
The type of the command. Valid values:
|
| CommandContent | String | bHM= |
The content of the command, which is Base64-encoded. |
| Parameters | Map |
The custom parameters in the command. If no custom parameter exists in the command, the default value is {}. |
|
| InvokeStatus | String | Finished |
The status of the command. Valid values:
|
| InvokeId | String | t-hz02p9545t6**** |
The ID of the command task. |
| CommandName | String | testname |
The name of the command. |
| PageSize | Integer | 10 |
The number of entries returned per page. |
| PageNumber | Integer | 1 |
The page number of the returned page. |
| TotalCount | Integer | 10 |
The total number of commands. |
Examples
Sample requests
http(s)://swas.cn-hangzhou.aliyuncs.com/?Action=DescribeInvocations
&RegionId=cn-hangzhou
&InstanceId=3a658ca270df4df39f22e289b338****
&PageNumber=1
&PageSize=10
&InvokeStatus=Finished
&<Common request parameters>Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeInvocationsResponse>
<RequestId>30637AD6-D977-4833-A54C-CC89483E****</RequestId>
<Invocations>
<CreationTime>2022-07-11T06:37:16Z</CreationTime>
<InvocationStatus>Success</InvocationStatus>
<CommandType>RunShellScript</CommandType>
<CommandContent>bHM=</CommandContent>
<InvokeStatus>Finished</InvokeStatus>
<InvokeId>t-hz02p9545t6****</InvokeId>
<CommandName>testname</CommandName>
</Invocations>
<PageSize>10</PageSize>
<PageNumber>1</PageNumber>
<TotalCount>10</TotalCount>
</DescribeInvocationsResponse>JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "30637AD6-D977-4833-A54C-CC89483E****",
"Invocations" : [ {
"CreationTime" : "2022-07-11T06:37:16Z",
"InvocationStatus" : "Success",
"CommandType" : "RunShellScript",
"CommandContent" : "bHM=",
"InvokeStatus" : "Finished",
"InvokeId" : "t-hz02p9545t6****",
"CommandName" : "testname"
} ],
"PageSize" : 10,
"PageNumber" : 1,
"TotalCount" : 10
}Error codes
For a list of error codes, visit the API Error Center.