All Products
Search
Document Center

Container Registry:GetRepoSyncTask

Last Updated:Mar 01, 2024

Queries an image synchronization task 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:GetRepositorySyncRead
  • 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
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

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

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.