Reviewed-by: gtema <artem.goncharov@gmail.com> Co-authored-by: Wang , Deng Ke <wangdengke2@huawei.com> Co-committed-by: Wang , Deng Ke <wangdengke2@huawei.com>
17 KiB
Pausing Tasks in Batches
Function
This API is used to pause tasks in batches.
Constraints
- Migration and synchronization tasks can be paused.
- Only tasks in the FULL_TRANSFER_STARTED, FULL_TRANSFER_FAILED, FULL_TRANSFER_COMPLETE, INCRE_TRANSFER_STARTED or INCRE_TRANSFER_FAILED state can be paused.
URI
POST /v3/{project_id}/jobs/batch-pause-task
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID of a tenant in a region |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
Yes |
String |
The content type. The default value is application/json. |
X-Auth-Token |
Yes |
String |
User token obtained from IAM. |
X-Language |
No |
String |
Request language type Default value: en-us Values:
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
jobs |
Yes |
Array of PauseInfo objects |
The value cannot contain empty objects. The value of job_id must comply with the UUID rule. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
results |
Array of PauseJobResp objects |
List of tasks to be suspended in batches. |
count |
Integer |
Total number. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Task ID. |
status |
String |
Pause result. |
error_code |
String |
Error code, which is optional and indicates the returned information about the failure status. |
error_msg |
String |
Error message, which is optional and indicates the returned information about the failure status. |
Example Request
Example of suspending tasks in batches:
https://{Endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-pause-task
{ "jobs" : [ { "job_id" : "8d0e8e36-a618-490d-8a46-8c61ac9jb502", "pause_mode" : "target" } ] }
Example Response
Status code: 200
OK
{ "results" : [ { "id" : "8d0e8e36-a618-490d-8a46-8c61ac9jb502", "status" : "success" } ], "count" : 1 }
Status Code
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
Error Code
For details, see Error Code.