Managing Migration Tasks
Function
This API is used to manage migration tasks, including starting, pausing, and synchronizing tasks, uploading logs, and rolling back failed migration tasks.
URI
POST /v3/tasks/{task_id}/action
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
task_id |
Yes |
String |
Specifies the migration task ID. Minimum length: 0 characters Maximum length: 255 characters |
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Specifies the user token. It can be obtained by calling the IAM API (value of X-Subject-Token in the response header). Minimum length: 1 character Maximum length: 16,384 characters |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
operation |
Yes |
String |
Specifies the operation to be performed on the task. The value can be:
|
param |
No |
Map<String,String> |
Specifies the operation parameters. |
Response
None
Example Request
- Clone the target server for the task whose ID is 7a9a9540-ff28-4869-b9e4-855fbe12xxxx.
POST https://{endpoint}/v3/tasks/7a9a9540-ff28-4869-b9e4-855fbe12e83b/action { "operation" : "clone_test" }
- Launch the target server for the task whose ID is 7a9a9540-ff28-4869-b9e4-855fbe12xxxx.
POST https://{endpoint}/v3/tasks/7a9a9540-ff28-4869-b9e4-855fbe12xxxx/action { "operation" : "test" }
- Start the task whose ID is 7a9a9540-ff28-4869-b9e4-855fbe12xxxx.
POST https://{endpoint}/v3/tasks/7a9a9540-ff28-4869-b9e4-855fbe12xxxx/action { "operation" : "start" }
- Roll back the failed synchronization task whose ID is 7a9a9540-ff28-4869-b9e4-855fbe12xxxx.
POST https://{endpoint}/v3/tasks/7a9a9540-ff28-4869-b9e4-855fbe12xxxx/action { "operation" : "sync_failed_rollback" }
- Pause the task whose ID is 7a9a9540-ff28-4869-b9e4-855fbe12xxxx.
POST https://{endpoint}/v3/tasks/7a9a9540-ff28-4869-b9e4-855fbe12xxxx/action { "operation" : "stop" }
- Restart the finished task whose ID is 7a9a9540-ff28-4869-b9e4-855fbe12xxxx.
POST https://{endpoint}/v3/tasks/7a9a9540-ff28-4869-b9e4-855fbe12xxxx/action { "operation" : "restart" }
- Upload the logs of the task whose ID is 7a9a9540-ff28-4869-b9e4-855fbe12xxxx.
POST https://{endpoint}/v3/tasks/7a9a9540-ff28-4869-b9e4-855fbe12xxxx/action { "operation" : "collect_log", "params" : { "bucket" : "sms" } }
Example Response
None
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
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