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 namespace to which the source repository belongs.

RepoName String No test-repo

The name of the source repository.

TargetInstanceId String No cri-k77rd2eo9zttneqo

The ID of the target instance.

TargetRegionId String No cn-shenzhen

The ID of the region where the target instance resides.

Response parameters

Parameter Type Example Description
IsSuccess Boolean true

Indicates whether the operation is successful.

Code String success

The code returned for the request.

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

The ID of the request.

PageNo Integer 1

The page number of the returned page.

PageSize Integer 30

The number of entries returned per page.

TotalCount Integer 1

The total number of entries returned.

SyncRules Array

A list of synchronization rules.

SyncRuleId String crsr-7lph66uloi6h97d8

The ID of the synchronization rule.

LocalRegionId String cn-shanghai

The ID of the region where the source instance resides.

LocalInstanceId String cri-kmsiwlxxdcvaduwb

The ID of the source instance.

LocalNamespaceName String test

The name of the source namespace.

LocalRepoName String test-repo-local

The name of the source repository.

TargetRegionId String cn-shenzhen

The ID of the region where the target instance resides.

TargetInstanceId String cri-k77rd2eo9zttneqo

The ID of the target instance.

TargetNamespaceName String test

The name of the target namespace.

TargetRepoName String test-repo-target

The name of the target repository.

TagFilter String . *

The regular expression used to filter image tags for synchronization in the source repository.

SyncScope String NAMESPACE

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

SyncDirection String FROM

Indicates the source and target address configured for the synchronization rule.

CreateTime Long 1572604642000

The time when the synchronization rule was created.

ModifiedTime Long 1572604642000

The time when the synchronization rule was modified.

SyncRuleName String sync-rule-1

The name of the synchronization rule.

SyncTrigger String PASSIVE

The policy applied to trigger the synchronization rule.

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

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"
}

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>

Error codes

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