All Products
Search
Document Center

Cloud Control API:CancelTask

Last Updated:Mar 06, 2025

Calls this operation to cancel a specified asynchronous task.

Operation description

Only tasks that are in the Pending or Running state can be canceled.

You can call the CancelTask operation to cancel a Cloud Control API task, but the tasks that have been started in the downstream Alibaba Cloud services cannot be canceled.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

PUT /api/v1/tasks/{taskId}/operation/cancel HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
taskIdstringYes

The ID of the task.

task-433aead756057fff2913e7ce5****

Response parameters

ParameterTypeDescriptionExample
object

The returned data.

requestIdstring

The ID of a request.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3****

Examples

Sample success responses

JSONformat

{
  "requestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-07-04The internal configuration of the API is changed, but the call is not affectedView Change Details