Deleting a Task in the Task Center
Function
This API is used to delete a task in the task center.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
dcs:task:delete
Write
-
-
-
-
URI
DELETE /v2/{project_id}/tasks/{task_id}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. For details, see Obtaining a Project ID. |
| task_id | Yes | String | Background task ID. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| message | No | String | Deletion result. |
Response Parameters
Status code: 200
Background task deleted successfully.
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_msg | String | Definition Error information. Range N/A |
| error_code | String | Definition Error code. Range For details, see Error Codes. |
| error_ext_msg | String | Definition Extended error information. This parameter is not used currently and is not returned. Range N/A |
Status code: 401
| Parameter | Type | Description |
|---|---|---|
| error_msg | String | Definition Error information. Range N/A |
| error_code | String | Definition Error code. Range For details, see Error Codes. |
| error_ext_msg | String | Definition Extended error information. This parameter is not used currently and is not returned. Range N/A |
Status code: 403
| Parameter | Type | Description |
|---|---|---|
| error_msg | String | Definition Error information. Range N/A |
| error_code | String | Definition Error code. Range For details, see Error Codes. |
| error_ext_msg | String | Definition Extended error information. This parameter is not used currently and is not returned. Range N/A |
Status code: 404
| Parameter | Type | Description |
|---|---|---|
| error_msg | String | Definition Error information. Range N/A |
| error_code | String | Definition Error code. Range For details, see Error Codes. |
| error_ext_msg | String | Definition Extended error information. This parameter is not used currently and is not returned. Range N/A |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_msg | String | Definition Error information. Range N/A |
| error_code | String | Definition Error code. Range For details, see Error Codes. |
| error_ext_msg | String | Definition Extended error information. This parameter is not used currently and is not returned. Range N/A |
Example Requests
DELETE https://{dcs_endpoint}/v2/{project_id}/tasks/{task_id} Example Responses
None
Status Codes
| Status Code | Description |
|---|---|
| 200 | Background task deleted successfully. |
| 400 | Invalid request. |
| 401 | Invalid authentication information. |
| 403 | Request rejected. |
| 404 | The requested resource could not be found. |
| 500 | Internal service error. |
Error Codes
See Error Codes.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot