tencent cloud

文档反馈

CancelTask

最后更新时间:2022-07-25 15:47:30

1. API Description

Domain name for API request: vm.tencentcloudapi.com.

This API is used to cancel a moderation task. It will return the TaskId of the task after the task is canceled successfully.

Default API request rate limit: 20 requests/sec.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
This document describes the parameters for Signature V1. It's recommended to use the V3 signature, which provides higher security. Note that for Signature V3, the common parameters need to be placed in the HTTP Header. See details.

Parameter Name Required Type Description
Action Yes String Common parameter. The value used for this API: CancelTask.
Version Yes String Common parameter. The value used for this API: 2020-12-29.
Region No String Common parameter. This parameter is not required for this API.
TaskId Yes String This field indicates the task ID (in the Results parameter) returned after a video moderation task is created. It is used to identify the moderation task to be canceled.

3. Output Parameters

Parameter Name Type Description
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Canceling task

This example shows you how to cancel a task.

Input Example

POST / HTTP/1.1
Host: vm.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CancelTask
<Common request parameters>

{
    "TaskId": "task-video-XwxJtbkKXWgCt8AZ"
}

Output Example

{
  "Response": {
    "RequestId": "c933aca1-90d2-4ab8-b045-f1b08069d76f"
  }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
DryRunOperation DryRun Operation. It means that the request would have succeeded, but the DryRun parameter was used.
FailedOperation The operation failed.
InvalidParameter The parameter is incorrect.
InvalidParameterValue The parameter value is incorrect.
LimitExceeded The quota limit is exceeded.
MissingParameter The parameter is missing.
OperationDenied The operation was denied.
RequestLimitExceeded The number of requests exceeds the frequency limit.
ResourceInUse The resource is in use.
ResourceInsufficient The resource is insufficient.
ResourceNotFound The resource does not exist.
ResourceUnavailable The resource is unavailable.
ResourcesSoldOut The resources have been sold out.
UnauthorizedOperation The operation is unauthorized.
UnknownParameter The parameter is unknown.
UnsupportedOperation The operation is not supported.