获取跨区域复制规则(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 https://zos-global.ctapi.ctyun.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 枚举值,见错误码总表