Creates an image synchronization rule for a repository.


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 CreateRepoSyncRule

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

InstanceId String Yes cri-hpdfkc6utbaqi5ab

The ID of the source instance.

NamespaceName String Yes ns1

The name of the source namespace.

RegionId String Yes cn-shanghai

The ID of the region where the source instance resides.

RepoName String Yes repo1

The name of the source repository.

SyncRuleName String Yes Rule

The name of the synchronization rule.

SyncScope String Yes REPO

The scope that the synchronization rule applies. Valid values: REPO and NAMESPACE.

SyncTrigger String Yes PASSIVE

The policy configured to trigger the synchronization rule. Valid values: INITIATIVE and PASSIVE.

TagFilter String Yes . *

The regular expression used to filter image tags for synchronization in the source repository.

TargetInstanceId String Yes cri-ibxs3piklys3sraa

The ID of the target instance.

TargetNamespaceName String Yes ns1

The name of the target namespace.

TargetRegionId String Yes cn-shanghai

The ID of the region where the target instance resides.

TargetRepoName String Yes repo1

The name of the target repository.

Response parameters

Parameter Type Example Description
IsSuccess Boolean true

Indicates whether the operation is successful.

Code String success

The code returned for the request.

RequestId String 8F8A0BA6-7F06-4BAE-B147-10BD6A258BF4

The ID of the request.

SyncRuleId String crsr-gk5p2ns1kznsqtgk

The ID of the synchronization rule.


Sample requests

http(s)://[Endpoint]/? Action=CreateRepoSyncRule
&TagFilter=. *
&<Common request parameters>

Sample success responses

JSON format


XML format


Error codes

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