CancelAsyncTask
Cancels pending asynchronous tasks.
Debug
You can run this API directly in OpenAPI Explorer, saving you from computing signatures. After the call succeeds, OpenAPI Explorer can automatically generate SDK code examples.
Authorization information
The following table describes the authorization information of this API. You can use it in the Action element of RAM policy statements to grant RAM users or RAM roles the permission to call this API. Details are as follows:
-
Operation: the specific permission point.
-
Access level: the access level of each operation. Valid values: Write, Read, and List.
-
Resource type: the resource types that support authorization in the operation. Details are as follows:
- Required resource types are marked with an asterisk (*) before them.
- For operations that do not support resource-level authorization,
All Resourcesis used.
-
Condition key: the condition keys defined by the cloud service itself.
-
Related operation: other permissions required to successfully perform the operation. The caller must have the permissions of related operations at the same time for the operation to succeed.
| Operation | Access level | Resource type | Condition key | Related operation |
|---|---|---|---|---|
| aimiaobi:CancelAsyncTask | update | *All resources * |
| None |
Request parameters
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| AgentKey | string | Yes | The unique identifier of the workspace: AgentKey | c160c841c8e54295bf2f441432785944_p_efm |
| TaskId | string | No | The unique ID of the task Note By default, you do not need to specify TaskId. The system automatically generates it. If subsequent tasks use the same TaskId, the tasks belong to the same conversation group. | 3f7045e099474ba28ceca1b4eb6d6e21 |
Response elements
| Name | Type | Description | Example value |
|---|---|---|---|
| object | Indicates whether the task was canceled successfully. | ||
| Code | string | The status code. | successful |
| Data | boolean | The business data. | true |
| HttpStatusCode | integer | The HTTP status code. | 200 |
| Message | string | A description of the error. | successful |
| RequestId | string | The unique ID of the request. | FB698445-61DA-5361-BF73-1C5F1157E888 |
| Success | boolean | Indicates whether the request was successful. A value of true indicates that the request was successful. A value of false indicates that the request failed. | True |
Examples
Success response
JSON format
{
"Code": "successful",
"Data": true,
"HttpStatusCode": 200,
"Message": "successful",
"RequestId": "FB698445-61DA-5361-BF73-1C5F1157E888",
"Success": true
}
Error codes
Visit the Error Center to view more error codes.