Queries image synchronization rules created for an instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListRepoSyncRule

The operation that you want to perform. Set the value to ListRepoSyncRule.

InstanceId String Yes cri-kmsiwlxxdcvaduwb

The ID of the source instance.

RegionId String Yes cn-shanghai

The ID of the region where the source instance resides.

PageNo Integer No 1

The number of the page to return.

PageSize Integer No 30

The number of entries to return on each page.

NamespaceName String No test-namespace

The name of the source namespace.

RepoName String No test-repo

The name of the source repository.

TargetInstanceId String No cri-k77rd2eo9zttneqo

The ID of the destination instance.

TargetRegionId String No cn-shenzhen

The ID of the region where the destination instance resides.

Response parameters

Parameter Type Example Description
Code String success

The return value.

IsSuccess Boolean true

Indicates whether the operation is successful.

PageNo Integer 1

The number of the returned page.

PageSize Integer 30

The number of entries returned on each page.

RequestId String 838D1602-6D8F-47FB-B60A-656645D274FB

The ID of the request.

SyncRules Array N/A

The synchronization rules.

CreateTime Long 1572604642000

The time when the synchronization rule was created.

LocalInstanceId String cri-kmsiwlxxdcvaduwb

The ID of the source instance.

LocalNamespaceName String test

The name of the source namespace.

LocalRegionId String cn-shanghai

The ID of the region where the source instance resides.

LocalRepoName String test-repo-local

The name of the source repository.

ModifiedTime Long 1572604642000

The time when the synchronization rule was modified.

SyncDirection String FROM

The synchronization direction. Valid values: FROM and TO.

SyncRuleId String crsr-7lph66uloi6h97d8

The ID of the synchronization rule.

SyncRuleName String sync-rule-1

The name of the synchronization rule.

SyncScope String NAMESPACE

The scope to which the synchronization rule applies. Valid values: NAMESPECE and REPO.

SyncTrigger String PASSIVE

The policy applied to trigger the synchronization rule.

TagFilter String . *

The regular expression used to filter image tags.

TargetInstanceId String cri-k77rd2eo9zttneqo

The ID of the destination instance.

TargetNamespaceName String test

The name of the destination namespace.

TargetRegionId String cn-shenzhen

The ID of the region where the destination instance resides.

TargetRepoName String test-repo-target

The name of the destination repository.

TotalCount Integer 1

The total number of returned entries.

Examples

Sample requests

http(s)://[Endpoint]/? Action=ListRepoSyncRule
&InstanceId=cri-kmsiwlxxdcvaduwb
&RegionId=cn-shanghai
&PageNo=1
&PageSize=30
&TargetInstanceId=cri-k77rd2eo9zttneqo
&TargetRegionId=cn-shenzhen
&<Common request parameters>

Sample success responses

XML format

<IsSuccess>true</IsSuccess>
<TotalCount>1</TotalCount>
<PageSize>30</PageSize>
<RequestId>77FEAA2E-3007-4A15-AD64-FF0DA0365FD3</RequestId>
<SyncRules>
    <LocalInstanceId>cri-kmsiwlxxdcvaduwb</LocalInstanceId>
    <SyncScope>NAMESPACE</SyncScope>
    <TagFilter>. *</TagFilter>
    <CreateTime>1572604642000</CreateTime>
    <TargetInstanceId>cri-k77rd2eo9zttneqo</TargetInstanceId>
    <SyncDirection>FROM</SyncDirection>
    <SyncRuleName>sync-rule-1</SyncRuleName>
    <SyncRuleId>crsr-7lph66uloi6h97d8</SyncRuleId>
    <LocalNamespaceName>test</LocalNamespaceName>
    <ModifiedTime>1572604642000</ModifiedTime>
    <SyncTrigger>PASSIVE</SyncTrigger>
    <TargetRegionId>cn-shenzhen</TargetRegionId>
    <TargetNamespaceName>test</TargetNamespaceName>
    <LocalRegionId>cn-shanghai</LocalRegionId>
</SyncRules>
<PageNo>1</PageNo>
<Code>success</Code>

JSON format

{
    "IsSuccess":true,
    "TotalCount":1,
    "PageSize":30,
    "RequestId":"77FEAA2E-3007-4A15-AD64-FF0DA0365FD3",
    "SyncRules":[
        {
            "LocalInstanceId":"cri-kmsiwlxxdcvaduwb",
            "SyncScope":"NAMESPACE",
            "TagFilter":". *",
            "CreateTime":1572604642000,
            "TargetInstanceId":"cri-k77rd2eo9zttneqo",
            "SyncDirection":"FROM",
            "SyncRuleName":"sync-rule-1",
            "SyncRuleId":"crsr-7lph66uloi6h97d8",
            "LocalNamespaceName":"test",
            "ModifiedTime":1572604642000,
            "SyncTrigger":"PASSIVE",
            "TargetRegionId":"cn-shenzhen",
            "TargetNamespaceName":"test",
            "LocalRegionId":"cn-shanghai"
        }
    ],
    "PageNo":1,
    "Code":"success"
}

Error codes

For a list of error codes, visit the API Error Center.