Stopping a Data Migration Task
Function
This API is used to stop a data migration task.
URI
POST /v2/{project_id}/migration-task/{task_id}/stop
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition: Project ID. For details, see Obtaining a Project ID. Constraints: N/A Range: N/A Default Value: N/A |
|
task_id |
Yes |
String |
Definition: ID of the data migration task. Constraints: N/A Range: N/A Default Value: N/A |
Request Parameters
None
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
task_id |
String |
Definition: Migration task ID. Range: N/A |
|
task_name |
String |
Definition: Name of the migration task. Range: N/A |
|
description |
String |
Definition: Description of the migration task. Range: N/A |
|
status |
String |
Definition Status of the migration task. Range
|
|
migration_type |
String |
Definition Description of the migration task. Range
|
|
migration_method |
String |
Definition: Type of the migration. Range:
|
|
ecs_tenant_private_ip |
String |
Definition: Private IP address of the migration ECS on the tenant side. This IP address can be added to the whitelist if it is in the same VPC as the private IP address of the target or source Redis. Range: N/A |
|
backup_files |
BackupFilesRespBody object |
Definition: Backup files to be imported when the migration mode is backup file import. |
|
network_type |
String |
Definition: Network type. The value can be vpc or vpn. Range:
|
|
source_instance |
SourceInstanceRespBody object |
Definition: Source Redis information. |
|
target_instance |
TargetInstanceRespBody object |
Definition: Target Redis instance information. |
|
created_at |
String |
Definition: Time when the migration task is created. Range: N/A |
|
updated_at |
String |
Definition: Time when the migration task is complete. Range: N/A |
|
released_at |
String |
Definition: Time when the migration ECS is released. Range: N/A |
|
version |
String |
Definition: Version of the migration ECS. Range: N/A |
|
resume_mode |
String |
Definition: Data migration mode. Range:
|
|
supported_features |
Array of strings |
Definition: Supported features. Range: N/A |
|
tenant_vpc_id |
String |
Definition: VPC ID. Range: N/A |
|
tenant_subnet_id |
String |
Definition: Subnet ID. Range: N/A |
|
tenant_security_group_id |
String |
Definition: Security group ID. Range: N/A |
|
bandwidth_limit_mb |
String |
Definition: Maximum bandwidth. Range: N/A |
|
task_status |
String |
Definition: Task status. EXCHANGING is returned only when IP addresses are being switched. Range: EXCHANGING: IP addresses are being switched. |
|
Parameter |
Type |
Description |
|---|---|---|
|
file_source |
String |
Definition: Data source, which can be an OBS bucket or a backup record. Range:
|
|
bucket_name |
String |
Definition: OBS bucket name. Range: N/A |
|
files |
Array of FilesResp objects |
Definition: List of backup files to be imported. |
|
backup_id |
String |
Definition: Backup record ID. Range: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
file_name |
String |
Definition: Name of a backup file. Range: N/A |
|
size |
String |
Definition: File size in bytes. Range: N/A |
|
update_at |
String |
Definition: Time when the file is last modified. The format is YYYY-MM-DD HH:MM:SS. Range: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
addrs |
String |
Definition: IP address and domain name of the Redis instance. Range: N/A |
|
password |
String |
Definition: Redis password. Range: N/A |
|
id |
String |
Definition: Redis instance ID. Range: N/A |
|
ip |
String |
Definition: Redis IP address. Range: N/A |
|
port |
String |
Definition: Redis port. Range: N/A |
|
name |
String |
Definition: Redis name. Range: N/A |
|
proxy_multi_db |
Boolean |
Definition: Indicates whether multi-DB is enabled for Proxy Cluster DCS instances. Range:
|
|
db |
String |
Definition: Redis database. Range: 0–255 |
|
withProxy |
Boolean |
Definition: Indicates whether proxy nodes are available. Range:
|
|
Parameter |
Type |
Description |
|---|---|---|
|
addrs |
String |
Definition: Source Redis address (specified in the source_instance parameter). Range: N/A |
|
password |
String |
Definition: Redis password. Range: N/A |
|
id |
String |
Definition: Redis instance ID. Range: N/A |
|
ip |
String |
Definition: Redis IP address. Range: N/A |
|
port |
String |
Definition: Redis port. Range: N/A |
|
name |
String |
Definition: Redis name. Range: N/A |
|
proxy_multi_db |
Boolean |
Definition: Indicates whether multi-DB is enabled for Proxy Cluster DCS instances. Range:
|
|
db |
String |
Definition: Redis database. Range: 0–255 |
|
withProxy |
Boolean |
Definition: Indicates whether proxy nodes are available. Range:
|
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_msg |
String |
Parameter description: Error message. Value range: N/A. |
|
error_code |
String |
Parameter description: Error code. Value range: For details, see Error Codes. |
|
error_ext_msg |
String |
Parameter description: Extended error information. This parameter is not used currently and is set to null. Value range: N/A. |
Status code: 401
|
Parameter |
Type |
Description |
|---|---|---|
|
error_msg |
String |
Parameter description: Error message. Value range: N/A. |
|
error_code |
String |
Parameter description: Error code. Value range: For details, see Error Codes. |
|
error_ext_msg |
String |
Parameter description: Extended error information. This parameter is not used currently and is set to null. Value range: N/A. |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error_msg |
String |
Parameter description: Error message. Value range: N/A. |
|
error_code |
String |
Parameter description: Error code. Value range: For details, see Error Codes. |
|
error_ext_msg |
String |
Parameter description: Extended error information. This parameter is not used currently and is set to null. Value range: N/A. |
Status code: 404
|
Parameter |
Type |
Description |
|---|---|---|
|
error_msg |
String |
Parameter description: Error message. Value range: N/A. |
|
error_code |
String |
Parameter description: Error code. Value range: For details, see Error Codes. |
|
error_ext_msg |
String |
Parameter description: Extended error information. This parameter is not used currently and is set to null. Value range: N/A. |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_msg |
String |
Parameter description: Error message. Value range: N/A. |
|
error_code |
String |
Parameter description: Error code. Value range: For details, see Error Codes. |
|
error_ext_msg |
String |
Parameter description: Extended error information. This parameter is not used currently and is set to null. Value range: N/A. |
Example Requests
POST https://{dcs_endpoint}/v2/666486c2d9b948c1bbea57e714d744fa/migration-task/2fb6b7e2-5eb8-4380-9d60-ce8d12b19aca/stop
Example Responses
Status code: 200
Data migration task stopped successfully.
{
"task_name" : "migration1",
"task_id" : "a276c1ffa0a54c2597fc824b917db317",
"status" : "TERMINATING",
"migration_type" : "incremental_migration",
"network_type" : "vpc",
"source_instance" : {
"addrs" : "192.168.1.2:6379",
"id" : "86157b69-8a62-47f9-8c55-fa6ddc8927e1",
"name" : "dcs-test",
"ip" : "192.168.1.2",
"port" : "6379",
"proxy_multi_db" : false,
"password" : "DCStest123",
"db" : "0"
},
"target_instance" : {
"addrs" : "192.168.1.2:6379",
"id" : "86157b69-8a62-47f9-8c55-fa6ddc8927ee",
"name" : "test-instance",
"ip" : "192.168.1.2",
"port" : "6379",
"proxy_multi_db" : false,
"password" : "DCStest123",
"db" : "0"
},
"created_at" : "2019/10/22 14:44:30",
"updated_at" : "2019/10/22 18:00:00"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Data migration task stopped successfully. |
|
400 |
Invalid request. |
|
401 |
Invalid authentication information. |
|
403 |
The request is rejected. |
|
404 |
The requested resource is not found. |
|
500 |
Internal service error. |
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