Queries image synchronization rules created for an instance.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListRepoSyncRule |
The operation that you want to perform. Set the value to ListRepoSyncRule. |
InstanceId | String | Yes | cri-kmsiwlxxdcva**** |
The ID of the instance. |
RegionId | String | Yes | cn-shanghai |
The ID of the region. |
PageNo | Integer | No | 1 |
The number of the page to return. |
PageSize | Integer | No | 30 |
The number of entries to return on each page. |
NamespaceName | String | No | test-namespace |
The name of the namespace to which the source repository belongs. |
RepoName | String | No | test-repo |
The name of the image repository. |
TargetInstanceId | String | No | cri-k77rd2eo9ztt**** |
The ID of the destination instance. |
TargetRegionId | String | No | cn-shenzhen |
The ID of the destination region. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | String | success |
The return value. |
IsSuccess | Boolean | true |
Indicates whether the operation is successful. |
PageNo | Integer | 1 |
The page number of the returned page. |
PageSize | Integer | 30 |
The number of entries returned per page. |
RequestId | String | 838D1602-6D8F-47FB-B60A-656645D2**** |
The ID of the request. |
SyncRules | Array of SyncRules |
The synchronization rules. |
|
CreateTime | Long | 1572604642000 |
The time when the synchronization rule was created. |
CrossUser | Boolean | true |
Indicates whether images are synchronized across accounts. Valid values:
Default value: |
LocalInstanceId | String | cri-kmsiwlxxdcva**** |
The ID of the source instance. |
LocalNamespaceName | String | test |
The namespace name of the source instance. |
LocalRegionId | String | cn-shanghai |
The region ID of the source instance. |
LocalRepoName | String | test-repo-local |
The image repository name of the source instance. |
ModifiedTime | Long | 1572604642000 |
The time when the synchronization rule was modified. |
SyncDirection | String | FROM |
The synchronization direction. Valid values:
|
SyncRuleId | String | crsr-7lph66uloi6h**** |
The ID of the synchronization rule. |
SyncRuleName | String | sync-rule-1 |
The name of the synchronization rule. |
SyncScope | String | NAMESPACE |
The scope of synchronization. Valid values:
|
SyncTrigger | String | PASSIVE |
The policy applied to trigger the synchronization rule. Valid values:
|
TagFilter | String | .* |
The regular expression used to filter image tags. |
TargetInstanceId | String | cri-k77rd2eo9ztt**** |
The ID of the destination instance. |
TargetNamespaceName | String | test |
The namespace name of the destination instance. |
TargetRegionId | String | cn-shenzhen |
The region ID of the destination instance. |
TargetRepoName | String | test-repo-target |
The image repository name of the destination instance. |
TotalCount | Integer | 1 |
The total number of returned entries. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=ListRepoSyncRule
&InstanceId=cri-kmsiwlxxdcva****
&RegionId=cn-shanghai
&<Common request parameters>
Sample success responses
XML
format
<IsSuccess>true</IsSuccess>
<TotalCount>1</TotalCount>
<PageSize>30</PageSize>
<RequestId>838D1602-6D8F-47FB-B60A-656645D2****</RequestId>
<SyncRules>
<LocalInstanceId>cri-kmsiwlxxdcva****</LocalInstanceId>
<SyncScope>NAMESPACE</SyncScope>
<TagFilter>.*</TagFilter>
<CreateTime>1572604642000</CreateTime>
<TargetInstanceId>cri-k77rd2eo9ztt****</TargetInstanceId>
<SyncDirection>FROM</SyncDirection>
<SyncRuleName>sync-rule-1</SyncRuleName>
<LocalRepoName>test-repo-local</LocalRepoName>
<LocalNamespaceName>test</LocalNamespaceName>
<SyncRuleId>crsr-7lph66uloi6h****</SyncRuleId>
<TargetRepoName>test-repo-target</TargetRepoName>
<ModifiedTime>1572604642000</ModifiedTime>
<CrossUser>true</CrossUser>
<SyncTrigger>PASSIVE</SyncTrigger>
<TargetRegionId>cn-shenzhen</TargetRegionId>
<TargetNamespaceName>test</TargetNamespaceName>
<LocalRegionId>cn-shanghai</LocalRegionId>
</SyncRules>
<PageNo>1</PageNo>
<Code>success</Code>
JSON
format
{
"IsSuccess": true,
"TotalCount": 1,
"PageSize": 30,
"RequestId": "838D1602-6D8F-47FB-B60A-656645D2****",
"SyncRules": {
"LocalInstanceId": "cri-kmsiwlxxdcva****",
"SyncScope": "NAMESPACE",
"TagFilter": ".*",
"CreateTime": 1572604642000,
"TargetInstanceId": "cri-k77rd2eo9ztt****",
"SyncDirection": "FROM",
"SyncRuleName": "sync-rule-1",
"LocalRepoName": "test-repo-local",
"LocalNamespaceName": "test",
"SyncRuleId": "crsr-7lph66uloi6h****",
"TargetRepoName": "test-repo-target",
"ModifiedTime": 1572604642000,
"CrossUser": true,
"SyncTrigger": "PASSIVE",
"TargetRegionId": "cn-shenzhen",
"TargetNamespaceName": "test",
"LocalRegionId": "cn-shanghai"
},
"PageNo": 1,
"Code": "success"
}
Error codes
For a list of error codes, visit API Error Center.