Creates an image synchronization rule for an image 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 to which 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.

TargetInstanceId String Yes cri-ibxs3piklys3sraa

The ID of the destination instance.

TargetNamespaceName String Yes ns1

The name of the destination namespace.

TargetRegionId String Yes cn-shanghai

The ID of the region where the destination instance resides.

TargetRepoName String Yes repo1

The name of the destination repository.

Response parameters

Parameter Type Example Description
Code String success

The return value.

IsSuccess Boolean true

Indicates whether the operation is successful.

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

XML format


JSON format


Error codes

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