接口功能介绍
查询对象存储迁移任务详情
接口约束
支持的线上资源池 :华东1
URI
GET /v4/zms/get-migration-detail
路径参数
无
Query参数
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
regionID | 是 | String | 资源池 ID | ||
migrationID | 是 | String | 迁移任务ID |
请求参数
请求头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 | xxx | |
migrationStatus | String | 迁移任务当前状态,①waiting:排队中;②executing:迁移中;③stopped:暂停;④finished:迁移结束;⑤failed:迁移中断;⑥finished_error:迁移结束 | 存在失败对象 | waiting |
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 | xxx |
表 sourceInfo
参数 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|
sourceType | String | 迁移源类型,①S3:亚马逊;②OSS:阿里云; ③COS:腾讯云;④ OBS:华为云;⑤ OOS:天翼云⑥ZOS:天翼云对象存储 | ZOS | |
sourceEndpoint | String | 迁移资源池地址 | http://xxx:8888或https://xxx | |
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或https://xxx | |
destinationBucket | String | 目的资源池桶 | bucket-haha |
表 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=81f772866xxxxc810800155d307d5b&migrationID=111_mig_53f2d001xxx7ba69a85df7f95ebb7
请求头header
无
请求体body
无
响应示例
{
"returnObj": {
"result": {
"migrateStartTime": "1987-01-31 23:59:59",
"destinationInfo": {
"destinationEndpoint": "http://xxxx",
"destinationBucket": "bucket-xxxx",
"destinationType": "ZOS"
},
"storageType": "STANDARD",
"migrationStatus": "finished",
"migrationID": "222_mig_a0d60xxxxxxdbeb0213362217328",
"migrateEndTime": "2017-12-31 23:59:59",
"aclConf": "match-resource",
"regionID": "81f772866xxxx800155d307d5b",
"sourceInfo": {
"sourceType": "ZOS",
"sourceEndpoint": "http://xxx",
"sourceBucket": "bucket-xxx",
"migrateFiles": [],
"sourceBucketType": "Bucket",
"migratePrefix": [],
"migrateFolder": []
},
"taskProgress": {
"migrationSize": 0,
"ignoredObjects": 89894,
"scannedObjects": 89894,
"totalSize": 0,
"migrationObjects": 0,
"failedObjects": 0
},
"conflictMode": "IGNORE",
"migrationName": "KBuBxsSxxxxdo3S_"
}
},
"details": "",
"message": "SUCCESS",
"description": "成功",
"statusCode": 800
}
状态码
请参考 状态码
错误码
请参考 错误码