• 沒有找到結果。

接口约束

● TERMINATED migration_typ

5.6.4 查询迁移任务详情

响应示例

状态码: 200

删除数据迁移任务成功。

{ "task_id_list" : [ "2fb6b7e2-5eb8-4380-9d60-ce8d12b19aca" ] }

状态码

状态码 描述

200 删除数据迁移任务成功。

400 非法请求。

401 认证信息非法。

403 请求被拒绝访问。

404 所请求的资源不存在。

500 内部服务错误。

错误码

请参见错误码。

5.6.4 查询迁移任务详情

功能介绍

查询迁移任务详情。

调试

您可以在API Explorer中调试该接口,并获取该接口关联的CLI示例: hcloud DCS ShowMigrationTask。

URI

GET /v2/{project_id}/migration-task/{task_id}

5-161 路径参数

参数 是否必选 参数类型 描述

project_id 是 String 项目ID。

参数 是否必选 参数类型 描述

task_id 是 String 任务ID。

请求参数

响应参数

状态码: 200

5-162 响应 Body 参数

参数 参数类型 描述

task_id String 迁移任务ID。

task_name String 迁移任务名称。

description String 迁移任务描述。

status String 迁移任务状态,这个字段的值包括:SUCCESS, FAILED, MIGRATING,TERMINATED。

枚举值:

● SUCCESS

● FAILED

● MIGRATING

● TERMINATED migration_typ

e String 迁移任务类型,包括备份文件导入和在线迁移两种

类型。

枚举值:

● backupfile_import

● online_migration migration_me

thod String 迁移方式,包括全量迁移和增量迁移两种类型。

枚举值:

● full_amount_migration

● incremental_migration ecs_tenant_pri

vate_ip String 迁移机租户侧私有IP,与目的/源redis私有IP处于 同VPC,可将此IP加入白名单

backup_files BackupFilesB

ody object 备份文件导入场景的备份文件列表。

参数 参数类型 描述

network_type String 网络类型,包括vpc和vpn两种类型。

枚举值:

● vpc

● vpn source_instan

ce SourceInstan

ceBody object 源Redis信息。在线迁移场景需要填写。

target_instanc

e TargetInstan

ceBody object 目标Redis信息。

created_at String 迁移任务创建时间。

updated_at String 迁移任务完成时间。

5-163 BackupFilesBody

参数 参数类型 描述

file_source String 数据来源,包含OBS桶和备份记录两种类型。

枚举值:

● self_build_obs

● backup_record bucket_name String OBS桶名。

files Array of Files

objects 导入的备份文件文件列表,数据来源为OBS桶时 必须填写。

backup_id String 备份记录ID,数据来源为备份记录时必须填写

5-164 Files

参数 参数类型 描述

file_name String 备份文件名。

size String 文件大小(单位:Byte)。

update_at String 文件最后修改时间(格式YYYY-MM-DD HH:MM:SS)。

5-165 SourceInstanceBody

参数 参数类型 描述

addrs String Redis实例名称(source_instance信息中填写)。

password String Redis密码,如果设置了密码,则必须填写。

5-166 TargetInstanceBody

参数 参数类型 描述

id String Redis实例ID(target_instance信息中必须填 写)。

name String Redis实例名称(target_instance信息中填写)。

password String Redis密码,如果设置了密码,则必须填写。

状态码: 400

5-167 响应 Body 参数

参数 参数类型 描述

error_msg String 错误信息

最大长度:1024 error_code String 错误码

最大长度:9

error_ext_msg String 扩展错误信息(暂未使用,赋值为null) 最大长度:1024

状态码: 401

5-168 响应 Body 参数

参数 参数类型 描述

error_msg String 错误信息

最大长度:1024 error_code String 错误码

最大长度:9

error_ext_msg String 扩展错误信息(暂未使用,赋值为null) 最大长度:1024

状态码: 403

5-169 响应 Body 参数

参数 参数类型 描述

error_msg String 错误信息

最大长度:1024 error_code String 错误码

最大长度:9

error_ext_msg String 扩展错误信息(暂未使用,赋值为null) 最大长度:1024

状态码: 404

5-170 响应 Body 参数

参数 参数类型 描述

error_msg String 错误信息

最大长度:1024 error_code String 错误码

最大长度:9

error_ext_msg String 扩展错误信息(暂未使用,赋值为null) 最大长度:1024

状态码: 500

5-171 响应 Body 参数

参数 参数类型 描述

error_msg String 错误信息

最大长度:1024 error_code String 错误码

最大长度:9

error_ext_msg String 扩展错误信息(暂未使用,赋值为null) 最大长度:1024

请求示例

GET https://dcs.cn-south-1.myhuaweicloud.com/v2/254d2280acb74d36a8b839746bcd7352 /migration-task/

a276c1ffa0a54c2597fc824b917db317

响应示例

状态码: 200

查询迁移任务详情成功。

{ "task_name" : "migration1",

"task_id" : "a276c1ffa0a54c2597fc824b917db317", "status" : "MIGRATING",

"migrate_type" : "incremental_migration", "network_type" : "vpc",

"source_instance" : { "ip" : "192.168.1.2:6379"

}, "target_instance" : {

"id" : "86157b69-8a62-47f9-8c55-fa6ddc8927ee", "name" : "test-instance"

}, "created_at" : "2019/10/22 14:44:30", "updated_at" : "2019/10/22 18:00:00"

}

状态码

状态码 描述

200 查询迁移任务详情成功。

400 非法请求。

401 认证信息非法。

403 请求被拒绝访问。

404 所请求的资源不存在。

500 内部服务错误。

错误码

请参见错误码。

相關文件