You can call this operation to create a build 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 CreateRepoBuildRule

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

DockerfileLocation String Yes -

The path to Dockerfile.

DockerfileName String Yes Dockerfile

The name of Dockerfile.

ImageTag String Yes 2

The version of the image.

InstanceId String Yes cri-xkx6vujuhay0tqas

The ID of the instance.

PushName String Yes master

The name of the push.

PushType String Yes GIT_BRANCH

The type of the push. Valid values: GIT_TAG and GIT_BRANCH.

RegionId String Yes cn-shanghai

The region where the image repository is deployed.

RepoId String Yes crr-8dz3aedjqlmkrasd

The ID of the image repository.

Response parameters

Parameter Type Example Description
BuildRuleId String crbr-rbfghsymk0qs7aaa

The ID of the build rule that was created.


Sample requests

http(s)://[Endpoint]/? Action=CreateRepoBuildRule
&<Common request parameters>

Sample success responses

XML format


JSON format


Error codes

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