Queries an image synchronization task in an instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetRepoSyncTask

The operation that you want to perform. Set the value to GetRepoSyncTask.

InstanceId String Yes cri-sgedpenzw80e****

The ID of the instance.

RegionId String Yes cn-shanghai

The ID of the region.

SyncTaskId String Yes rst-zxjkiv5oil6f****

The ID of the synchronization task.

Response parameters

Parameter Type Example Description
Code String success

The return value.

ImageFrom Struct

The source address of the image.

ImageTag String master

The tag of the image.

InstanceId String cri-sgedpenzw80e****

The ID of the instance.

RegionId String cn-shanghai

The ID of the region.

RepoName String test

The name of the repository.

RepoNamespaceName String test

The name of the namespace.

ImageTo Struct

The destination address of the image.

ImageTag String master

The tag of the image.

InstanceId String cri-leqzomz5vijc****

The ID of the instance.

RegionId String eu-west-1

The ID of the region.

RepoName String test

The name of the repository.

RepoNamespaceName String test

The name of the namespace.

IsSuccess Boolean true

Indicates whether the operation is successful.

LayerTasks Array of LayerTasks

The synchronization tasks for the image layer.

ArtifactDigest String sha256:36fb85fcb5e919cb60e782397a6be04201868fe7b38ef7669fc01caec1c8fc4e

The digest of the artifact.

Digest String sha256:36fb85fcb5e919cb60e782397a6be04201868fe7b38ef7669fc01caec1c8fc4e

The digest of the image layer.

Size Long 23655489

The size of the image.

SyncLayerTaskId String rslt-074x4q20fx2d****

The ID of the synchronization task for the image layer.

SyncedSize Long 23655489

The size of the image layer that is synchronized.

TaskStatus String SUCCESS

The status of the synchronization task.

Progress Long 1

The synchronization progress. Valid values:

  • 0: Synchronization starts or synchronization failed.
  • 1: Synchronization is successful.
RequestId String A6DEF8B0-5D45-46D6-867D-8C7FF0966B07

The ID of the request.

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

The ID of the batch synchronization task.

SyncRuleId String crsr-cllro6ho3wne****

The ID of the synchronization rule.

SyncTaskId String rst-zxjkiv5oil6f****

The ID of the synchronization task.

SyncedSize Long 23655489

The size of the image layer that is synchronized.

TaskStatus String SUCCESS

The status of the synchronization task.

TaskTrigger String null

The policy that is used to trigger the synchronization task.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetRepoSyncTask
&InstanceId=cri-sgedpenzw80e****
&RegionId=cn-shanghai
&SyncTaskId=rst-zxjkiv5oil6f****
&<Common request parameters>

Sample success responses

XML format

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

JSON format

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

Error codes

For a list of error codes, visit the API Error Center.