Updates the build rule of 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 UpdateRepoBuildRule

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

RegionId String Yes cn-shanghai

The region ID of the image repository.

InstanceId String Yes cri-kmsiwlxxdcva****

The ID of the instance.

RepoId String Yes crr-tquyps22md8p****

The ID of the image repository.

DockerfileLocation String No /

The path to the Dockerfile.

DockerfileName String No Dockerfile

The name of the Dockerfile.

PushType String No GIT_BRANCH

The type of push that triggers the build rule. Valid values:

  • GIT_TAG: tag push
  • GIT_BRANCH: branch push
PushName String No master

The name of the push that triggers the build rule.

ImageTag String No v0.9.5

The tag of the image.

BuildRuleId String Yes crbr-ly77w5i3t31f****

The ID of the repository build rule.

BuildArgs.N String No UserName=Test

Build argument N.

Platforms.N String No linux/amd64

Architecture N for building the repository. Valid values:

  • linux/amd64
  • linux/arm64
  • linux/386
  • linux/arm/v7
  • linux/arm/v6

Default value: linux/amd64

Response parameters

Parameter Type Example Description
Code String success

The return value.

IsSuccess Boolean true

Indicates whether the repository is updated. Valid values:

  • true: The repository is updated.
  • false: The repository fails to be updated.
RequestId String BC648259-91A7-4502-BED3-EDF64361FA83

The ID of the request.

BuildRuleId String crbr-ly77w5i3t31f****

The ID of the repository build rule.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "Code" : "success",
  "IsSuccess" : true,
  "RequestId" : "BC648259-91A7-4502-BED3-EDF64361FA83",
  "BuildRuleId" : "crbr-ly77w5i3t31f****"

Error codes

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