查询镜像迁移规则
更新时间:2026-06-09
接口描述
查询镜像迁移规则。
API Explorer
去调试
您可以在 API Explorer 中直接运行该接口,免去您计算签名的困扰。运行成功后,API Explorer 可以自动生成 SDK 代码示例。
请求结构
Plain Text
1GET /v1/instances/{instanceId}/replications?policyName={policyName}&pageNo={pageNo}&pageSize={pageSize} HTTP/1.1
2Host: ccr.bd.baidubce.com
3Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
| 参数名称 | 类型 | 是否必需 | 参数位置 | 描述 |
|---|---|---|---|---|
| instanceId | String | 是 | URL参数 | 实例ID |
| policyName | String | 否 | Query参数 | 镜像迁移规则名称,支持模糊查询 |
| pageNo | Integer | 否 | Query参数 | 当前页,默认为1 |
| pageSize | Integer | 否 | Query参数 | 每页记录数,默认为10 |
响应头域
除公共头域外,无其它特殊头域。
响应参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| total | Integer | 镜像迁移规则总数 |
| pageNo | Integer | 当前页 |
| pageSize | Integer | 每页记录数 |
| items | List<ReplicationPolicyResult> | 镜像迁移规则对象列表 |
请求示例
Plain Text
1GET /v1/instances/ccr-4k74gw7d/replications HTTP/1.1
2Host: ccr.bd.baidubce.com
3Authorization: bce-auth-v1/123456/2022-08-01T08:26:41Z/1800/host/0a859ce949951fe15a4eb6874a9765f9e8a6f7147f206cf47e270c34c862b8c6
响应示例
Plain Text
1HTTP/1.1 200 OK
2Content-Type: application/json; charset=utf-8
3Date: Fri, 05 Aug 2022 07:23:56 GMT
4X-Bce-Gateway-Region: BJ
5X-Bce-Request-Id: 228e31d4-f8fa-46d6-be36-e4fec9f10aed
6
7{
8 "total": 1,
9 "pageNo": 1,
10 "pageSize": 10,
11 "items": [
12 {
13 "creationTime": "2022-08-11T12:01:12.108Z",
14 "deletion": false,
15 "description": "",
16 "destProjectName": "ns-test",
17 "destRegistry": {
18 "creationTime": "0001-01-01T00:00:00.000Z",
19 "credential": {
20 "accessKey": "",
21 "accessSecret": "*****",
22 "type": "secret"
23 },
24 "description": "",
25 "id": 0,
26 "insecure": true,
27 "name": "Local",
28 "status": "healthy",
29 "type": "harbor",
30 "updateTime": "0001-01-01T00:00:00.000Z",
31 "url": "http://ccr-test-harbor-core:80",
32 "region": ""
33 },
34 "enabled": true,
35 "filters": [
36 {
37 "type": "name",
38 "value": "my-public/prepare"
39 },
40 {
41 "type": "tag",
42 "value": "1.0"
43 }
44 ],
45 "id": 1,
46 "name": "migrate1",
47 "override": false,
48 "srcRegistry": {
49 "creationTime": "2022-08-11T12:00:08.397Z",
50 "credential": {
51 "accessKey": "100e5554da9b46e589b4c71dcc0d858f",
52 "accessSecret": "*****",
53 "type": "basic"
54 },
55 "description": "",
56 "id": 1,
57 "insecure": false,
58 "name": "Local",
59 "status": "healthy",
60 "type": "harbor",
61 "updateTime": "2022-08-11T12:00:08.397Z",
62 "url": "https://registry.baidubce.com",
63 "region": "com"
64 },
65 "trigger": {
66 "triggerSettings": null,
67 "type": "manual"
68 },
69 "updateTime": "2022-08-12T08:19:52.212Z",
70 "executionTimes": 3
71 }
72 ]
73}
评价此篇文章
