调用ListRepoSyncRule查询仓库同步规则列表。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String ListRepoSyncRule

系统规定参数。取值:ListRepoSyncRule。

InstanceId String cri-kmsiwlxxdcva****

实例ID

RegionId String cn-shanghai

地区ID

PageNo Integer 1

页号

PageSize Integer 30

页大小

NamespaceName String test-namespace

命名空间名称

RepoName String test-repo

镜像仓库名称

TargetInstanceId String cri-k77rd2eo9ztt****

目标实例ID

TargetRegionId String cn-shenzhen

目标地区ID

返回数据

名称 类型 示例值 描述
Code String success

返回值

IsSuccess Boolean true

是否成功

PageNo Integer 1

页号

PageSize Integer 30

页大小

RequestId String 838D1602-6D8F-47FB-B60A-656645D2****

请求ID

SyncRules Array of SyncRules

同步规则列表

CreateTime Long 1572604642000

创建时间

CrossUser Boolean true

是否为跨账号同步镜像,取值:

  • true:跨账号同步镜像
  • false:同账号同步镜像

默认值:false

LocalInstanceId String cri-kmsiwlxxdcva****

源实例ID

LocalNamespaceName String test

源实例命名空间名称

LocalRegionId String cn-shanghai

源实例区域ID

LocalRepoName String test-repo-local

源实例仓库名称

ModifiedTime Long 1572604642000

修改时间

SyncDirection String FROM

同步方向,取值:

  • FROM:源实例同步到目标实例
  • TO:目标实例同步到源实例
SyncRuleId String crsr-7lph66uloi6h****

同步规则ID

SyncRuleName String sync-rule-1

同步规则名称

SyncScope String NAMESPACE

同步范围,取值:

  • NAMESPACE:按照命名空间同步
  • REPO:按照镜像仓库同步
SyncTrigger String PASSIVE

触发策略,取值:

  • INITIATIVE:主动触发
  • PASSIVE:被动触发
TagFilter String .*

TAG过滤规则

TargetInstanceId String cri-k77rd2eo9ztt****

目标实例ID

TargetNamespaceName String test

目标实例命名空间名称

TargetRegionId String cn-shenzhen

目标实例地区ID

TargetRepoName String test-repo-target

目标实例仓库名称

TotalCount Integer 1

总数量

示例

请求示例

http(s)://[Endpoint]/?Action=ListRepoSyncRule
&InstanceId=cri-kmsiwlxxdcva****
&RegionId=cn-shanghai
&<公共请求参数>

正常返回示例

XML格式

<IsSuccess>true</IsSuccess>
<TotalCount>1</TotalCount>
<PageSize>30</PageSize>
<RequestId>838D1602-6D8F-47FB-B60A-656645D2****</RequestId>
<SyncRules>
    <LocalInstanceId>cri-kmsiwlxxdcva****</LocalInstanceId>
    <SyncScope>NAMESPACE</SyncScope>
    <TagFilter>.*</TagFilter>
    <CreateTime>1572604642000</CreateTime>
    <TargetInstanceId>cri-k77rd2eo9ztt****</TargetInstanceId>
    <SyncDirection>FROM</SyncDirection>
    <SyncRuleName>sync-rule-1</SyncRuleName>
    <LocalRepoName>test-repo-local</LocalRepoName>
    <LocalNamespaceName>test</LocalNamespaceName>
    <SyncRuleId>crsr-7lph66uloi6h****</SyncRuleId>
    <TargetRepoName>test-repo-target</TargetRepoName>
    <ModifiedTime>1572604642000</ModifiedTime>
    <CrossUser>true</CrossUser>
    <SyncTrigger>PASSIVE</SyncTrigger>
    <TargetRegionId>cn-shenzhen</TargetRegionId>
    <TargetNamespaceName>test</TargetNamespaceName>
    <LocalRegionId>cn-shanghai</LocalRegionId>
</SyncRules>
<PageNo>1</PageNo>
<Code>success</Code>

JSON格式

{
    "IsSuccess": true,
    "TotalCount": 1,
    "PageSize": 30,
    "RequestId": "838D1602-6D8F-47FB-B60A-656645D2****",
    "SyncRules": {
        "LocalInstanceId": "cri-kmsiwlxxdcva****",
        "SyncScope": "NAMESPACE",
        "TagFilter": ".*",
        "CreateTime": 1572604642000,
        "TargetInstanceId": "cri-k77rd2eo9ztt****",
        "SyncDirection": "FROM",
        "SyncRuleName": "sync-rule-1",
        "LocalRepoName": "test-repo-local",
        "LocalNamespaceName": "test",
        "SyncRuleId": "crsr-7lph66uloi6h****",
        "TargetRepoName": "test-repo-target",
        "ModifiedTime": 1572604642000,
        "CrossUser": true,
        "SyncTrigger": "PASSIVE",
        "TargetRegionId": "cn-shenzhen",
        "TargetNamespaceName": "test",
        "LocalRegionId": "cn-shanghai"
    },
    "PageNo": 1,
    "Code": "success"
}

错误码

访问错误中心查看更多错误码。