Starting or Stopping Tasks
Function
This API is used to start or stop tasks.
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
codeartsperftest:cpts:executePerfTestTask
Write
cpts *
g:ResourceTag/<tag-key>
-
-
URI
POST /v1/{project_id}/test-suites/{test_suit_id}/tasks/batch-update-task-status
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
test_suit_id |
Yes |
Integer |
Project ID. |
|
project_id |
Yes |
String |
Project ID. For details, see Method of obtaining instructions. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
type |
No |
Integer |
Type. (0: old edition task; 1: new edition task) |
|
project_id |
Yes |
Integer |
Project ID. |
|
task_id_list |
Yes |
Array of integers |
Task ID list. |
|
cluster_id |
Yes |
Integer |
Resource group ID. |
|
cluster_type |
Yes |
String |
Resource group type (shared-cluster-internet: shared resource group; private-cluster: private resource group). |
|
without_package |
No |
Integer |
Whether to use the pay-per-use billing mode when the VUM of the package is insufficient. The value is fixed at 0 in the current edition. |
|
network_info |
No |
NetworkInfo object |
Network information. |
|
status |
Yes |
Integer |
Status (9: task started; 2: task stopped). |
|
enterprise_project_id |
No |
String |
Enterprise project ID. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
code |
String |
Status code. |
|
message |
String |
Response. |
|
extend |
Object |
Extended field. |
|
result |
Array of result objects |
Response object for starting or stopping tasks. |
Example Requests
Starting tasks in batches and using the shared resource group. The task ID set can be 1 or 2.
/v1/{project_id}/test-suites/{test_suit_id}/tasks/batch-update-task-status
{
"enterprise_project_id" : "0",
"type" : 1,
"status" : 9,
"without_package" : 0,
"project_id" : 1,
"cluster_id" : 0,
"cluster_type" : "shared-cluster-internet",
"network_info" : {
"network_type" : "internet"
},
"task_id_list" : [ 1, 2 ]
}
Example Responses
None
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Response object for starting or stopping tasks. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank 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