獲取跨區域復制規則(2022.12.15后開放使用)
更新時間 2025-06-11 14:55:21
最近更新時間: 2025-06-11 14:55:21
分享文章
接口介紹
獲取某個存儲空間已設置的數據復制規則
接口約束
支持的線上資源池:上海32<->杭州2、上海7<->杭州2
URI
GET /v4/oss/get-bucket-replication
請求參數
請求 Query 參數
| 參數 | 是否必填 | 參數類型 | 說明 | 示例 |
|---|---|---|---|---|
| bucket | 是 | String | 桶名 | bucket1 |
| regionID | 是 | String | 區域 ID | 332232eb-63aa-465e-9028-52e5123866f0 |
| page | 否 | Integer | 頁碼,默認值為 1 | 1 |
| pageNo | 否 | Integer | 頁碼,若與參數 page 同時存在,以 pageNo 為準。默認值為 1 | 1 |
| pageSize | 否 | Integer | 頁大小,取值范圍 1~50,默認為10 | 30 |
響應參數
| 參數 | 參數類型 | 說明 | 示例 |
|---|---|---|---|
| statusCode | Integer | 返回碼 取值范圍:800 成功 |
800 |
| message | String | 狀態描述 | SUCCESS |
| description | String | 狀態描述,一般為中文 | 成功 |
| returnObj | Object | 響應對象 | 見下級對象 |
| errorCode | String | 業務細分碼(僅失敗時具有此參數),為product.module.code三段式碼 | openapi.userPermission.accessFailed |
表 returnObj
| 參數 | 參數類型 | 說明 | 示例 |
|---|---|---|---|
| result | Array of Objects | 規則詳情的數組 | 見下級對象 |
| currentCount | Integer | 當前頁數量 | 1 |
| totalCount | Integer | 總數 | 1 |
表 result
| 參數 | 參數類型 | 說明 | 示例 |
|---|---|---|---|
| fuid | String | 同步規則ID | 5c9744ca-f3b6-11ec-ad4e-00505689ac50 |
| targetRegionID | String | 目標區域ID | 22f08348-ebbf-11ec-b70d-00505689ac50 |
| targetRegionName | String | 目標區域名稱 | 貴州公測私有云 |
| targetBucket | String | 目標桶 | bucket-324d |
| prefixes | Array of String | 桶前綴 | ["nn_", "mm_"] |
| plot | Boolean | 同步策略, 同步時是否允許刪除 | true |
| history | Boolean | 是否同步歷史數據 | true |
| progress | Float | 同步進度 | 10.0 |
| lastUpdate | String | ISO-8601 格式的日期字符串。若為空字符串 "",表示未同步過。 | 2022-06-26T10:57:32Z |
請求示例
GET //zos-global.ctapi.daliqc.cn/v4/oss/get-bucket-replication?bucket=bucket1®ionID=332232eb-63aa-465e-9028-52e5123866f0
響應示例
{
"returnObj": {
"result": [
{
"fuid": "5c9744ca-f3b6-11ec-ad4e-00505689ac50",
"targetRegionID": "22f08348-ebbf-11ec-b70d-00505689ac50",
"targetRegionName": "貴州公測私有云",
"targetBucket": "bucket-324d",
"prefixes": [
"nn_",
"mm_"
],
"plot": true,
"history": true,
"progress": 10.0,
"lastUpdate": "2022-06-26T10:57:32Z"
}
],
"currentCount": 1,
"totalCount": 1
},
"message": "SUCCESS",
"description": "成功",
"statusCode": 800
}
狀態碼
| 狀態碼 | 描述 |
|---|---|
| 800 | 表示請求成功。 |
| 900 | 表示請求失敗。 |
錯誤碼
errorCode 枚舉值,見錯誤碼總表