查询对象存储迁移任务详情
更新时间 2026-03-03 17:25:36
最近更新时间: 2026-03-03 17:25:36
接口功能介绍
查询对象存储迁移任务详情
接口约束
支持的线上资源池 :华东1
URI
GET /v4/zms/get-migration-detail
路径参数 无
Query参数
| 参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| regionID | 是 | String | 资源池 ID | 81f7728xxxxx0155d307d5b | |
| migrationID | 是 | String | 迁移任务ID | 111_mig_76f7dc8b012xxxxf6ed082db55d08 |
请求参数
请求头header参数 无
请求体body参数 无
响应参数
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| statusCode | Integer | 返回状态码(800为成功,900为处理中/失败) | 800 | |
| message | String | 状态描述 | SUCCESS | |
| returnObj | Object | 响应对象 | returnObj | |
| description | String | 状态描述,一般为中文 | 成功 | |
| errorCode | String | 业务细分码(仅失败时具有此参数),为product.module.code三段式码 | openapi.userPermission.accessFailed | |
| error | String | 业务细分码(大驼峰形式,仅失败时具有此参数),为 Product.Module.Code 三段式码 | Openapi.UserPermission.AccessFailed |
表 returnObj
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| result | Object | 响应对象 | result |
表 result
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| migrationName | String | 迁移任务名称 | cxx-hkpblz-bbt | |
| migrationID | String | 迁移任务ID | 111_mig_76f7dc8b012xxxxf6ed082db55d08 | |
| migrationStatus | String | 迁移任务当前状态,1.creating:创建中;2.created:已创建;3.create_failed:创建失败|请重新创建任务;4.starting:启动中;5.waiting:排队中;6.executing:迁移中;7.stopping:暂停中;8.stopped:暂停;9.restoring:恢复中;10.agent_lost:代理已失联;11.finished:迁移结束;12.failed:迁移中断;13.finished_error:迁移结束|存在失败对象;14.retrying:重试中;15.deleting:删除中 | waiting | |
| migrationMode | String | 迁移模式,①fully-managed:全托管模式;②semi-managed:半托管模式 | fully-managed | |
| agentName | String | 执行本次迁移任务的代理名称 若当前任务为全托管模式时展示为null; 若当前任务为半托管模式,但是所属代理已被删除时展示为“associated agent has been deleted” | akaka | |
| agentID | String | 执行本次迁移任务的代理ID 若当前任务为全托管任务,或者当前任务虽为半托管任务、但所属代理已被删除时,展示为null | 222_agt_80c60304b992616be45d76402 | |
| agentStatus | String | 执行本次迁移任务的代理状态,①unregistered:未注册;②disconnected:未连接;③connected:已连接;④expired:已失效|请重新创建代理 若当前任务为全托管任务,或者当前任务虽为半托管任务、但所属代理已被删除时,展示为null | unregistered | |
| sourceInfo | Object | 源端信息 | sourceInfo | |
| destinationInfo | Object | 目的端信息 | destinationInfo | |
| storageType | String | 迁移到目的端存储类型,①MATCH_RESOURCE:匹配源端;②STANDARD:标准存储;③STANDARD_IA:低频存储;④GLACIER:归档存储 | MATCH_RESOURCE | |
| aclConf | String | 目的端ACL配置,①match-resource:匹配源端;②private:私有;③public-read:公共读 | match-resource | |
| conflictMode | String | 同名文件处理选项, ①OVERWRITE:同名文件进行覆盖; ②IGNORE:同名文件进行忽略; ③COMPARE:同名文件按最后修改时间(即LastModified)比较,若源端LastModified小于目的端LastModified,则此文件被执行跳过;若源端LastModified大于目的端LastModified,则执行覆盖;若源端与目的端文件LastModified一致,则判断两者的文件大小,大小一致则执行跳过,大小不一致则执行覆盖。 | IGNORE | |
| migrateStartTime | String | 迁移晚于起始时间的对象,该选项会迁移最后修改时间(即LastModified)晚于指定时间的对象 | 1987-01-31 23:59:59 | |
| migrateEndTime | String | 迁移早于终止时间的对象,该选项会迁移最后修改时间(即LastModified)早于指定时间的对象 | 2017-12-31 23:59:59 | |
| taskProgress | Object | 当前任务进度 | taskProgress | |
| regionID | String | 资源池ID | 81f7728xxxxx0155d307d5b |
表 sourceInfo
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| sourceType | String | 迁移源类型,①S3:亚马逊;②OSS:阿里云; ③COS:腾讯云;④ OBS:华为云;⑤ OOS:天翼云⑥ZOS:天翼云对象存储 | ZOS | |
| sourceEndpoint | String | 迁移资源池地址 | http://xxx:8888 | |
| sourceBucket | String | 迁移源桶 | bucket-kpblz | |
| sourceBucketType | String | 源资源池迁移模式,①Bucket:整桶迁移;②Folder:文件夹迁移;③Files:文件迁移;④Prefix:前缀迁移 | Bucket | |
| migrateFolder | Array of Strings | 指定源资源池迁移的文件夹列表,仅当sourceBucketType为Folder时有效,其余场景显示为空列表 | ["folder"] | |
| migrateFiles | Array of Strings | 指定源资源池迁移的文件名列表,仅当sourceBucketType为Files时有效,其余场景显示为空列表 | ["files1","files2"] | |
| migratePrefix | Array of Strings | 指定源资源池迁移的前缀列表,仅当sourceBucketType为Prefix时有效,其余场景显示为空列表 | ["prefix"] |
表 destinationInfo
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| destinationType | String | 目的端类型,目前默认为ZOS | ZOS | |
| destinationEndpoint | String | 目的资源池地址 | http://xxx:8888 | |
| destinationBucket | String | 目的资源池桶 | bucket-haha | |
| destinationPrefix | String | 目的端指定前缀 | test- |
表 taskProgress
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| scannedObjects | Integer | 任务指定的对象总数 | 1 | |
| migrationObjects | Integer | 迁移成功的对象数量 | 2 | |
| ignoredObjects | Integer | 忽略的对象数量 | 3 | |
| failedObjects | Integer | 迁移失败的对象数量 | 4 | |
| migrationSize | Integer | 本次迁移大小,单位B | 5 | |
| totalSize | Integer | 任务迁移总大小,单位B | 6 |
枚举参数
无
请求示例
请求url
GET https://zos-global.ctapi.ctyun.cn/v4/zms/get-migration-detail?regionID=81f7728xxxxx0155d307d5b&migrationID=111_mig_76f7dc8b012xxxxf6ed082db55d08
请求头header
无
请求体body
无
响应示例
{
"returnObj": {
"result": {
"aclConf": "match-resource",
"migrateStartTime": "",
"regionID": "81f7728xxxxx0155d307d5b",
"migrationName": "test111127",
"destinationInfo": {
"destinationEndpoint": "http://xxx:8888",
"destinationBucket": "zmig-bucket3",
"destinationPrefix": "",
"destinationType": "ZOS"
},
"sourceInfo": {
"sourceType": "ZOS",
"sourceEndpoint": "http://xxx:8888",
"sourceBucket": "zmig-bucket2",
"migrateFiles": [],
"sourceBucketType": "Bucket",
"migratePrefix": [],
"migrateFolder": []
},
"taskProgress": {
"migrationSize": null,
"ignoredObjects": null,
"scannedObjects": null,
"totalSize": 0,
"migrationObjects": null,
"failedObjects": null
},
"conflictMode": "IGNORE",
"migrationMode": "semi-managed",
"storageType": "MATCH_RESOURCE",
"migrationStatus": "create_failed",
"agentName": "agent127",
"migrationID": "111_mig_76f7dc8b012xxxxf6ed082db55d08",
"agentStatus": "connected",
"agentID": "222_agt_80c60304b992616be45d76402",
"migrateEndTime": ""
}
},
"message": "SUCCESS",
"description": "成功",
"statusCode": 800
}
状态码
请参考 状态码
错误码
请参考 错误码