All Products
Search
Document Center

Container Registry:ListRepoSyncTask

Last Updated:Apr 18, 2023

Queries image synchronization tasks in an instance.

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 keyAssociation operation
cr:GetRepositorySyncRead
  • CR
    acs:cr:{#regionId}:{#accountId}:repository/{#instanceid}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the instance.

cri-kmsiwlxxdcva****
RepoNamespaceNamestringNo

The name of the namespace to which the image repository belongs.

ns
RepoNamestringNo

The name of the repository.

test
TagstringNo

The version of the image.

nginx
PageNointegerNo

The number of the page to return.

1
PageSizeintegerNo

The number of entries to return on each page.

30
SyncRecordIdstringNo

The ID of a synchronization task record.

crsr-7lph66uloi6h****

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

7640819A-FB5B-4E25-A227-97717F62****
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
TotalCountstring

The total number of returned entries.

1
SyncTasksarray

A list of synchronization tasks for the source instance.

object
ModifedTimelong

The time when the task was last modified.

1572839133000
SyncRuleIdstring

The ID of the synchronization rule.

crsr-7lph66uloi6h****
SyncTaskIdstring

The ID of the synchronization task.

rst-4kfd7fk6pohk****
TaskStatusstring

The status of the task. Valid values:

SUCCESS
CreateTimelong

The time when the task was created.

1572839126000
SyncBatchTaskIdstring

The ID of the synchronization task in which multiple image layers are synchronized at a time.

15DEEB56-9271-4FDD-AC4D-C3A5CC2C****
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
SyncTransAccelerateboolean

Indicates whether synchronization transfer is accelerated.

true
TaskTriggerstring

The policy that is applied to trigger the synchronization rule.

PASSIVE
ImageFromobject

The source address of the image.

RepoNamespaceNamestring

The name of the namespace to which the repository belongs.

test
InstanceIdstring

The ID of the instance.

cri-kmsiwlxxdcva****
ImageTagstring

The tag of the image.

v0.1
RepoNamestring

The name of the image repository.

test
RegionIdstring

The ID of the region.

cn-shanghai
ImageToobject

The destination address of the image.

RepoNamespaceNamestring

The name of the namespace to which the repository belongs.

test
InstanceIdstring

The ID of the instance.

cri-k77rd2eo9zttneqo
ImageTagstring

The tag of the image.

v0.1
RepoNamestring

The name of the image repository.

test
RegionIdstring

The ID of the region.

cn-shenzhen

Examples

Sample success responses

JSONformat

{
  "RequestId": "7640819A-FB5B-4E25-A227-97717F62****",
  "Code": "success",
  "PageNo": 1,
  "IsSuccess": true,
  "PageSize": 30,
  "TotalCount": "1",
  "SyncTasks": [
    {
      "ModifedTime": 1572839133000,
      "SyncRuleId": "crsr-7lph66uloi6h****",
      "SyncTaskId": "rst-4kfd7fk6pohk****",
      "TaskStatus": "SUCCESS",
      "CreateTime": 1572839126000,
      "SyncBatchTaskId": "15DEEB56-9271-4FDD-AC4D-C3A5CC2C****",
      "CrossUser": true,
      "SyncTransAccelerate": true,
      "TaskTrigger": "PASSIVE",
      "ImageFrom": {
        "RepoNamespaceName": "test",
        "InstanceId": "cri-kmsiwlxxdcva****",
        "ImageTag": "v0.1",
        "RepoName": "test",
        "RegionId": "cn-shanghai"
      },
      "ImageTo": {
        "RepoNamespaceName": "test",
        "InstanceId": "cri-k77rd2eo9zttneqo",
        "ImageTag": "v0.1",
        "RepoName": "test",
        "RegionId": "cn-shenzhen"
      },
      "CustomLink": 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.