Queries image synchronization tasks in an image repository.
Debugging
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 Resourcesis 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.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| cr:GetRepositorySync | get | *Repository acs:cr:{#regionId}:{#accountId}:repository/{#instanceid} |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| InstanceId | string | Yes | The instance ID. | cri-kmsiwlxxdcva**** |
| RepoNamespaceName | string | No | The name of the namespace to which the repository belongs. | ns |
| RepoName | string | No | The repository name. | test |
| Tag | string | No | The image tag. | nginx |
| PageNo | integer | No | The page number. | 1 |
| PageSize | integer | No | The number of entries per page. | 30 |
| SyncRecordId | string | No | The ID of the synchronization task record, which is the same as SyncBatchTaskId in the response. Note
If an image meets multiple synchronization rules and multiple synchronization tasks are generated for the image, these synchronization tasks use the same SyncBatchTaskId.
| crsr-7lph66uloi6h**** |
Response parameters
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,
"TaskIssue": "NETWORK_ERROR"
}
]
}Error codes
| HTTP status code | Error code | Error message |
|---|---|---|
| 403 | NoPrivilege | Access denied for this user. |
| 500 | SystemError | Unknown error. |
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2024-11-25 | The Error code has changed. The response structure of the API has changed | View Change Details |
