All Products
Search
Document Center

Container Registry:ListRepoSyncRule

Last Updated:Dec 16, 2025

Queries image synchronization rules of a repository.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
cr:ListSyncRuleget
*Repository
acs:cr:{#regionId}:{#accountId}:repository/{#Instanceid}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the instance.

cri-kmsiwlxxdcva****
PageNointegerNo

The number of the page to return.

1
PageSizeintegerNo

The number of entries to return on each page.

30
NamespaceNamestringNo

The name of the namespace.

test-namespace
RepoNamestringNo

The name of the image repository.

test-repo
TargetInstanceIdstringNo

The ID of the destination instance.

cri-k77rd2eo9ztt****
TargetRegionIdstringNo

The region ID of the destination instance.

cn-shenzhen

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

838D1602-6D8F-47FB-B60A-656645D2****
Codestring

The return value.

success
PageNointeger

The page number.

1
IsSuccessboolean

Indicates whether the request is successful.

true
PageSizeinteger

The number of entries per page.

30
TotalCountinteger

The total number of entries returned.

1
SyncRulesarray<object>

The queried synchronization rules.

SyncRulesobject
SyncTriggerstring

The policy that is applied to trigger the synchronization rule. Valid values:

  • INITIATIVE: The synchronization rule is positively triggered.
  • PASSIVE: The synchronization rule is passively triggered.
PASSIVE
CreateTimelong

The time when the synchronization rule was created.

1572604642000
LocalRegionIdstring

The region ID of the source instance.

cn-shanghai
SyncScopestring

The synchronization scope. Valid values:

  • NAMESPACE: synchronizes the image tags in a namespace that meet the synchronization rule.
  • REPO: synchronizes the image tags in an image repository that meet the synchronization rule.
NAMESPACE
RepoNameFilterstring

The regular expression that is used to filter repositories.

Note This parameter is valid only when SyncScope is set to NAMESPACE.
.*
TagFilterstring

The regular expression that is used to filter image tags.

.*
TargetNamespaceNamestring

The name of the namespace in the destination instance.

test
TargetInstanceIdstring

The ID of the destination instance.

cri-k77rd2eo9ztt****
TargetRepoNamestring

The name of the repository in the destination instance.

test-repo-target
SyncRuleIdstring

The ID of the synchronization rule.

crsr-7lph66uloi6h****
ModifiedTimelong

The time when the synchronization rule was last modified.

1572604642000
SyncRuleNamestring

The name of the synchronization rule.

sync-rule-1
TargetRegionIdstring

The region ID of the destination instance.

cn-shenzhen
LocalInstanceIdstring

The ID of the source instance.

cri-kmsiwlxxdcva****
LocalNamespaceNamestring

The name of the namespace in the source instance.

test
LocalRepoNamestring

The name of the repository in the source instance.

test-repo-local
SyncDirectionstring

The synchronization direction. Valid values:

  • FROM: Images are synchronized from the source instance to the destination instance.
  • TO: Images are synchronized from the destination instance to the source instance.
FROM
CrossUserboolean

Indicates whether the synchronization is performed across Alibaba Cloud accounts. Valid values:

  • true: Images are synchronized across Alibaba Cloud accounts.
  • false: Images are synchronized within the same Alibaba Cloud account.

Default value: false.

true

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError message
403NoPrivilegeAccess denied for this user.
500SystemErrorUnknown error.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2025-11-24API Description Update. The Error code has changedView Change Details
2024-12-24The Error code has changed. The response structure of the API has changedView Change Details