All Products
Search
Document Center

Container Registry:GetRepoSyncTask

Last Updated:Aug 07, 2026

Queries a repository synchronization task.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

cr:GetRepositorySync

get

*Repository

acs:cr:{#regionId}:{#accountId}:repository/{#instanceid}

None None

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The instance ID.

cri-sgedpenzw80e****

SyncTaskId

string

Yes

The synchronization task ID.

rst-zxjkiv5oil6f****

Response elements

Element

Type

Description

Example

object

SyncRuleId

string

The synchronization rule ID.

crsr-cllro6ho3wne****

Progress

integer

The synchronization progress. Valid values:

  • 0: The synchronization has just started or failed.

  • 1: The synchronization succeeded.

1

RequestId

string

The request ID.

A6DEF8B0-5D45-46D6-867D-8C7FF0966B07

SyncedSize

integer

The synchronized size, in bytes.

23655489

TaskStatus

string

The task status. Valid values:

PENDING: The synchronization is pending.

SYNCHRONIZING: The synchronization is in progress.

SUCCESS: The synchronization succeeded.

ERROR: The synchronization failed.

CANCELED: The synchronization task is canceled.

SUCCESS

SyncTransAccelerate

boolean

Indicates whether transfer acceleration is enabled for synchronization.

true

CrossUser

boolean

Indicates whether the synchronization is cross-account.

true

SyncTaskId

string

The synchronization task ID.

rst-zxjkiv5oil6f****

SyncBatchTaskId

string

The synchronization batch task ID.

a9434731-95ef-4087-9cf4-369c8e90****

Code

string

The return value.

success

IsSuccess

boolean

Indicates whether the request is successful.

true

TaskTrigger

string

The trigger type of the synchronization task. Valid values:

PASSIVE: The synchronization task is automatically triggered.

INITIATIVE: The synchronization task is manually triggered.

PASSIVE

ImageFrom

object

The source image.

RepoNamespaceName

string

The namespace name.

test

InstanceId

string

The instance ID.

cri-sgedpenzw80e****

ImageTag

string

The image tag.

master

RepoName

string

The repository name.

test

RegionId

string

The region.

cn-shanghai

ImageTo

object

The destination image.

RepoNamespaceName

string

The namespace name.

test

InstanceId

string

The instance ID.

cri-leqzomz5vijc****

ImageTag

string

The image tag.

master

RepoName

string

The repository name.

test

RegionId

string

The region.

eu-west-1

LayerTasks

array<object>

The list of image layer synchronization tasks.

object

The list of image layer synchronization tasks.

TaskStatus

string

The task status.

SUCCESS

Digest

string

The image digest value.

sha256:36fb85fcb5e919cb60e782397a6be04201868fe7b38ef7669fc01caec1c8fc4e

SyncedSize

integer

The synchronized size.

23655489

Size

integer

The size.

23655489

SyncLayerTaskId

string

The synchronization layer task ID.

rslt-074x4q20fx2d****

ArtifactDigest

string

The digest value of the artifact.

sha256:36fb85fcb5e919cb60e782397a6be04201868fe7b38ef7669fc01caec1c8fc4e

TaskIssue

string

The task failure information.

Note

When the synchronization task fails, this field returns information about the failure.

Valid values:

  • OSS_POLICY_UNAUTHORIZED :

    The ACR service is not granted the required OSS permissions.

  • TAG_CONFLICT :

    The destination repository contains an image with the same tag and image version immutability is enabled.

  • UNSUPPORTED_FORMAT :

    The manifest or config format of the image to be synchronized is not supported.

  • INTERNAL_ERROR :

    The synchronization task failed due to an internal server error.

  • NETWORK_ERROR :

    The synchronization task failed due to a network error.

  • DATA_LENGTH_EXCEEDED :

    The image manifest or config exceeds the length limit.

  • ARTIFACT_DIGEST_CHANGED_ERROR :

    The image was overwritten during synchronization.

NETWORK_ERROR

Priority

integer

The execution priority of the synchronization task. Synchronization tasks are executed in descending order of priority. Tasks with the same priority are executed in random order.

Valid values: 1 to 5.

Default value: 3.

3

Examples

Success response

JSON format

{
  "SyncRuleId": "crsr-cllro6ho3wne****",
  "Progress": 1,
  "RequestId": "A6DEF8B0-5D45-46D6-867D-8C7FF0966B07",
  "SyncedSize": 23655489,
  "TaskStatus": "SUCCESS",
  "SyncTransAccelerate": true,
  "CrossUser": true,
  "SyncTaskId": "rst-zxjkiv5oil6f****",
  "SyncBatchTaskId": "a9434731-95ef-4087-9cf4-369c8e90****",
  "Code": "success",
  "IsSuccess": true,
  "TaskTrigger": "null",
  "ImageFrom": {
    "RepoNamespaceName": "test",
    "InstanceId": "cri-sgedpenzw80e****",
    "ImageTag": "master",
    "RepoName": "test",
    "RegionId": "cn-shanghai"
  },
  "ImageTo": {
    "RepoNamespaceName": "test",
    "InstanceId": "cri-leqzomz5vijc****",
    "ImageTag": "master",
    "RepoName": "test",
    "RegionId": "eu-west-1"
  },
  "LayerTasks": [
    {
      "TaskStatus": "SUCCESS",
      "Digest": "sha256:36fb85fcb5e919cb60e782397a6be04201868fe7b38ef7669fc01caec1c8fc4e",
      "SyncedSize": 23655489,
      "Size": 23655489,
      "SyncLayerTaskId": "rslt-074x4q20fx2d****",
      "ArtifactDigest": "sha256:36fb85fcb5e919cb60e782397a6be04201868fe7b38ef7669fc01caec1c8fc4e"
    }
  ],
  "TaskIssue": "NETWORK_ERROR",
  "Priority": 3
}

Error codes

HTTP status code

Error code

Error message

Description

500 SystemError Unknown error.
403 NoPrivilege Access denied for this user.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.