CancelAsyncTask
Cancels an asynchronous task.
Try it now
You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples.
Authorization information
The following table describes the authorization information of the API. You can use the Action element in RAM permission 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, or List.
-
Resource type: the resource types that support authorization in the operation. Details are as follows:
- For required resource types, an asterisk (*) is prefixed.
- For operations that do not support resource-level authorization, All Resources is used.
-
Condition key: the condition keys defined by the cloud service itself.
-
Dependent action: other permissions required to successfully perform the operation. The caller must also have the permissions of the dependent actions for the operation to succeed.
| Operation | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| quanmiaolightapp:CancelAsyncTask | create | *All Resources * |
| None |
Request syntax
POST /{workspaceId}/quanmiao/lightapp/cancelAsyncTask HTTP/1.1
Request parameters
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| workspaceId | string | No | llm-xxxxxxx | |
| taskId | string | No | The task ID. | a3d1c2ac-f086-4a21-9069-f5631542f5a2 |
Response parameters
| Name | Type | Description | Example value |
|---|---|---|---|
| object | Schema of Response | ||
| requestId | string | The ID of the request. | 117F5ABE-CF02-5502-9A3F-E56BC9081A64 |
| code | string | The error code. | NoPermission |
| message | string | The error message. | No permission to access the API |
| httpStatusCode | integer | The HTTP response code. | 403 |
| success | boolean | Indicates whether the request was successful. | false |
| data | boolean | Indicates whether the cancellation was successful. | true |
Examples
Success response
JSON format
{
"requestId": "117F5ABE-CF02-5502-9A3F-E56BC9081A64",
"code": "NoPermission",
"message": "无权限访问接口",
"httpStatusCode": 403,
"success": false,
"data": true
}
Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 403 | NoPermission | You are not authorized to perform this action , Please check the assignment of the workspaceId. | Check the assignment of the workspaceId. |
See Error Center for more error codes.