All Products
Search
Document Center

Container Registry:ListRepoSyncRule

Last Updated:Mar 01, 2024

Queries image replication rules of a repository.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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:
    • The required resource types are displayed in bold characters.
    • 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:ListSyncRuleRead
  • 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 ID of the request.

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

The return value.

success
PageNointeger

The page number of the returned page.

1
IsSuccessboolean

Indicates whether the request is successful.

true
PageSizeinteger

The number of entries returned per page.

30
TotalCountinteger

The total number of returned entries.

1
SyncRulesobject []

The synchronization rules.

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
TagFilterstring

The regular expression that is used to filter image tags.

.*
TargetNamespaceNamestring

The namespace name of the destination instance.

test
TargetRepoNamestring

The image repository name of the destination instance.

test-repo-target
TargetInstanceIdstring

The ID of the destination instance.

cri-k77rd2eo9ztt****
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****
CrossUserboolean

Indicates whether images are synchronized 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
LocalNamespaceNamestring

The namespace name of the source instance.

test
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
LocalRepoNamestring

The image repository name of the source instance.

test-repo-local

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",
      "TagFilter": ".*",
      "TargetNamespaceName": "test",
      "TargetRepoName": "test-repo-target",
      "TargetInstanceId": "cri-k77rd2eo9ztt****",
      "SyncRuleId": "crsr-7lph66uloi6h****",
      "ModifiedTime": 1572604642000,
      "SyncRuleName": "sync-rule-1",
      "TargetRegionId": "cn-shenzhen",
      "LocalInstanceId": "cri-kmsiwlxxdcva****",
      "CrossUser": true,
      "LocalNamespaceName": "test",
      "SyncDirection": "FROM",
      "LocalRepoName": "test-repo-local"
    }
  ]
}

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.