查詢對象存儲遷移任務詳情
更新時間 2025-06-23 16:14:00
最近更新時間: 2025-06-23 16:14:00
分享文章
接口功能介紹
查詢對象存儲遷移任務詳情
接口約束
支持的線上資源池 :華東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 | 遷移資源池地址 | //xxx:8888或//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 | 目的資源池地址 | //xxx:8888或//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 //zos-global.ctapi.daliqc.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": "//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": "//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
}
狀態碼
請參考
錯誤碼
請參考