Queries the executions and execution status of a Cloud Assistant command.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
swas-open:DescribeCommandInvocations | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID. You can call the ListRegions operation to query the most recent region list. | cn-hangzhou |
InstanceId | string | No | The ID of the simple application server. | ace0706b2ac4454d984295a94213**** |
CommandId | string | No | The command ID. You can call the DescribeCommands operation to query all available command IDs. | c-sh02yh0932w**** |
InvokeId | string | No | The execution ID of the command. | t-hz02p9545t6**** |
CommandName | string | No | The command name. If both CommandName and InstanceId are specified, CommandName does not take effect. | testName |
InvocationStatus | string | No | The overall execution state of the command. The value of this parameter depends on the execution status of the command on all the involved instances. Valid values:
Note
The value of the InvokeStatus response parameter is similar to the value of InvocationStatus. We recommend that you ignore InvokeStatus and check the value of InvocationStatus.
| Success |
CommandType | string | No | The command type. Valid values:
| RunPowerShellScript |
PageNumber | string | No | The page number. Pages start from 1. Default value: 1. | 1 |
PageSize | string | No | The number of entries per page. Maximum value: 50. Default value: 10. | 10 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "30637AD6-D977-4833-A54C-CC89483E****",
"TotalCount": 10,
"PageNumber": 1,
"PageSize": 10,
"CommandInvocations": [
{
"InvokeId": "t-hz0373jyzxt****",
"CreationTime": "2023-04-27T10:11:58",
"CommandId": "c-hy0338xh28r****",
"InvocationStatus": "Success",
"CommandName": "testCommandName",
"CommandType": "RunShellScript",
"CommandDescription": "testDescription",
"Username": "root",
"WorkingDir": "c:\\wwwroot",
"Timeout": 60,
"CommandContent": "echo 123",
"Parameters": "{}",
"InvokeInstances": [
{
"InstanceId": "2445f4aecdac4b71ba2c7e3a7ccf****",
"StartTime": "2023-05-09T03:32:24Z",
"FinishTime": "2023-04-03T02:42:29Z",
"InvocationStatus": "Running",
"Output": "OutputMsg",
"ExitCode": 0,
"ErrorInfo": "the specified instance does not exists",
"ErrorCode": "InstanceNotExists"
}
]
}
]
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|