Queries the execution results of one or more Cloud Assistant commands on Elastic Compute Service (ECS) instances.
Operation description
DescribeInvocationResults
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:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis 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 |
|---|---|---|---|---|
| ecs:DescribeInvocationResults | get | Command acs:ecs:{#regionId}:{#accountId}:command/{#commandId}Instance acs:ecs:{#regionId}:{#accountId}:instance/{#instanceId} |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| RegionId | string | Yes | $.parameters[11].schema.items.description | cn-hangzhou |
| ResourceGroupId | string | No | $.parameters[11].schema.items.example | rg-bp67acfmxazb4p**** |
| InvokeId | string | No | $.parameters[11].schema.items.enumValueTitles | t-hz0jdfwd9f**** |
| InstanceId | string | No | $.parameters[11].schema.description | i-bp1i7gg30r52z2em**** |
| CommandId | string | No | $.parameters[11].schema.example | c-hz0jdfwcsr**** |
| InvokeRecordStatus | string | No | $.parameters[11].schema.enumValueTitles | Running |
| IncludeHistory | boolean | No | {
"RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE*****",
"Invocation" : {
"InvocationResults" : {
"InvocationResult" : [ {
"Dropped" : 0,
"InvocationStatus" : "Success",
"InstanceId" : "i-bp1i7gg30r52z2em****",
"ExitCode" : 0,
"ErrorInfo" : "the specified instance does not exists",
"StartTime" : "2019-12-20T06:15:55Z",
"Repeats" : 0,
"InvokeRecordStatus" : "Running",
"FinishedTime" : "2019-12-20T06:15:56Z",
"Output" : "MTU6MzA6MDEK",
"CommandId" : "c-hz0jdfwcsr****",
"ErrorCode" : "InstanceNotExists",
"InvokeId" : "t-hz0jdfwd9f****",
"StopTime" : "2020-01-19T09:15:47Z",
"ContainerId":"ab141ddfbacfe02d9dbc25966ed971536124527097398d419a6746873fea****",
"ContainerName":"test-container", | false |
| ContentEncoding | string | No | PlainText | |
| PageNumber | long | No | acs:ecs:{#regionId}:{#accountId}:command/* | 1 |
| PageSize | long | No | acs:ecs:{#regionId}:{#accountId}:instance/* | 1 |
| MaxResults | integer | No | FEATUREecsXZ3H4M | 10 |
| NextToken | string | No | dubbo | AAAAAdDWBF2 |
| Tag | array<object> | No | The region ID of the command. You can call the DescribeRegions operation to query the most recent region list. | |
| object | No | The ID of the resource group. After you set this parameter, command execution results in the specified resource group are queried. | ||
| Value | string | No | The ID of the command task. You can call the DescribeInvocations operation to query the IDs of all command tasks. | TestValue |
| Key | string | No | The ID of the instance. | TestKey |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE*****",
"Invocation": {
"PageSize": 1,
"PageNumber": 1,
"TotalCount": 1,
"NextToken": "AAAAAdDWBF2",
"InvocationResults": {
"InvocationResult": [
{
"Dropped": 0,
"OssOutputDelivery": "oss://testBucket/testPrefix",
"InvocationStatus": "Success",
"InstanceId": "i-bp1i7gg30r52z2em****",
"ExitCode": 0,
"ErrorInfo": "the specified instance does not exists",
"StartTime": "2019-12-20T06:15:55Z",
"Repeats": 0,
"InvokeRecordStatus": "Running",
"FinishedTime": "2019-12-20T06:15:56Z",
"OssOutputUri": "oss://testBucket/testPrefix/output.txt",
"OssOutputStatus": "Finished",
"Username": "test",
"ContainerId": "ab141ddfbacfe02d9dbc25966ed971536124527097398d419a6746873fea****",
"ContainerName": "test-container",
"Output": "MTU6MzA6MDEK",
"Launcher": "python3 -u {{ACS::ScriptFileName|Ext(\".py\")}}",
"CommandId": "c-hz0jdfwcsr****",
"ErrorCode": "InstanceNotExists",
"InvokeId": "t-hz0jdfwd9f****",
"TerminationMode": "ProcessTree",
"Tags": {
"Tag": [
{
"TagKey": "owner",
"TagValue": "zhangsan"
}
]
},
"StopTime": "2020-01-19T09:15:47Z"
}
]
}
}
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | RegionId.ApiNotSupported | The api is not supported in this region. | The API operation cannot be called in the specified region. Check whether the specified RegionId parameter is valid. |
| 400 | NumberExceed.Tags | The Tags parameter number is exceed. | The number of tags exceeds the maximum limit. |
| 400 | Duplicate.TagKey | The Tag.N.Key contain duplicate key. | The specified tag key already exists. Tag keys must be unique. |
| 400 | InvalidTagKey.Malformed | The specified Tag.n.Key is not valid. | The specified Tag.N.Key parameter is invalid. |
| 400 | InvalidTagValue.Malformed | The specified Tag.n.Value is not valid. | The specified tag value is invalid. |
| 400 | MissingParameter.TagKey | You must specify Tag.N.Key. | The tag key is not specified. |
| 400 | InvalidParam.PageNumber | The specified parameter is invalid. | The specified PageNumber parameter is invalid. |
| 400 | InvalidParam.PageSize | The specified parameter is invalid. | The specified PageSize parameter is invalid. |
| 400 | InvalidParameter.NextToken | The specified parameter NextToken is not valid. | The specified parameter NextToken is illegal. |
| 400 | InvalidParameter.MaxResults | The specified parameter MaxResults is not valid. | The specified parameter MaxResults is illegal. |
| 403 | Operation.Forbidden | The operation is not permitted. | The operation is not supported. |
| 404 | InvalidRegionId.NotFound | The RegionId provided does not exist in our records. | The RegionId provided does not exist |
| 500 | InternalError.Dispatch | An error occurred when you dispatched the request. | An error occurred while the request is being sent. Try again later. |
| 500 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | - |
| 500 | InternalError | The request processing has failed due to some unknown error. | An internal error has occurred. Try again later. |
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2024-12-05 | API Description Update. The Error code has changed | View Change Details |
| 2024-08-01 | The Error code has changed. The response structure of the API has changed | View Change Details |
| 2024-05-14 | The Error code has changed. The response structure of the API has changed | View Change Details |
| 2023-12-21 | The Error code has changed. The request parameters of the API has changed. The response structure of the API has changed | View Change Details |
| 2023-05-12 | The Error code has changed | View Change Details |
| 2022-02-25 | The Error code has changed | View Change Details |
