All Products
Search
Document Center

Container Registry:GetRepoSyncTask

Last Updated:Dec 16, 2025

Queries an image synchronization task in an instance.

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:GetRepositorySyncget
*Repository
acs:cr:{#regionId}:{#accountId}:repository/{#instanceid}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The ID of the instance.

cri-sgedpenzw80e****
SyncTaskIdstringYes

The ID of the synchronization task.

rst-zxjkiv5oil6f****

Response parameters

ParameterTypeDescriptionExample
object
SyncRuleIdstring

The ID of the synchronization rule.

crsr-cllro6ho3wne****
Progresslong

The synchronization progress. Valid values:

  • 0: The synchronization starts or failed.
  • 1: The synchronization is successful.
1
RequestIdstring

The ID of the request.

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

The size of the image layer that is synchronized. Unit: bytes.

23655489
TaskStatusstring

The status of the task. Valid values:

SUCCESS
SyncTransAccelerateboolean

Indicates whether transfer acceleration is enabled in the synchronization process.

true
CrossUserboolean

Indicates whether the synchronization task is performed across Alibaba Cloud accounts.

true
SyncTaskIdstring

The ID of the synchronization task.

rst-zxjkiv5oil6f****
SyncBatchTaskIdstring

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

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

The return value.

success
IsSuccessboolean

Indicates whether the request is successful.

true
TaskTriggerstring

The policy that is used to trigger the synchronization task.

null
ImageFromobject

The source address of the image.

RepoNamespaceNamestring

The name of the namespace.

test
InstanceIdstring

The ID of the instance.

cri-sgedpenzw80e****
ImageTagstring

The tag of the image.

master
RepoNamestring

The name of the image repository.

test
RegionIdstring

The region ID.

cn-shanghai
ImageToobject

The destination address of the image.

RepoNamespaceNamestring

The name of the namespace.

test
InstanceIdstring

The ID of the instance.

cri-leqzomz5vijc****
ImageTagstring

The tag of the image.

master
RepoNamestring

The name of the image repository.

test
RegionIdstring

The region ID.

eu-west-1
LayerTasksarray<object>

The synchronization tasks for the image layer.

LayerTasksobject

The synchronization tasks for the image layer.

TaskStatusstring

The status of the synchronization task. Valid values:

SUCCESS
Digeststring

The digest of the image layer.

sha256:36fb85fcb5e919cb60e782397a6be04201868fe7b38ef7669fc01caec1c8fc4e
SyncedSizelong

The size of the image layer that is synchronized.

23655489
Sizelong

The size of synchronized image layers.

23655489
SyncLayerTaskIdstring

The ID of the synchronization task for the image layer.

rslt-074x4q20fx2d****
ArtifactDigeststring

The digest of the artifact.

sha256:36fb85fcb5e919cb60e782397a6be04201868fe7b38ef7669fc01caec1c8fc4e
TaskIssuestring

The error message that is returned if the synchronization task fails.

Note The system uses this parameter to return an error message if the synchronization task fails.

Valid values:

  • OSS_POLICY_UNAUTHORIZED: Container Registry is not granted permissions to use Object Storage Service (OSS).
  • TAG_CONFLICT: The destination repository contains an image that has the same tag as the source image, and image tag immutability is enabled for the destination repository.
  • UNSUPPORTED_FORMAT: The manifest and config formats of the image to be synchronized are not supported.
  • INTERNAL_ERROR: The synchronization task failed due to internal issues on the server.
  • NETWORK_ERROR: The synchronization task failed due to unstable network connection.
  • DATA_LENGTH_EXCEEDED: The manifest or config of the image is oversized.
NETWORK_ERROR

Examples

Sample success responses

JSONformat

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

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
2024-11-25The Error code has changed. The response structure of the API has changedView Change Details