Queries image build rules of 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 ListRepoBuildRule

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

InstanceId String Yes cri-kmsiwlxxdcva****

The ID of the Container Registry instance.

RegionId String Yes cn-shanghai

The ID of the region.

RepoId String Yes crr-tquyps22md8****

The ID of the repository.

PageNo Integer No 1

The number of the page to return.

PageSize Integer No 30

The number of entries to return on each page.

Response parameters

Parameter Type Example Description
BuildRules Array of BuildRules

The list of image build rules.

BuildArgs List http_proxy=

The build parameters.

BuildRuleId String crbr-khys0nd3asbe****

The ID of the image build rule.

DockerfileLocation String /

The directory of the Dockerfile.

DockerfileName String Dockerfile

The name of the Dockerfile.

ImageTag String v0.1

The tag of the image.

Platforms List linux/amd64

The operating system and platform of the image.

PushName String v0.1

The name of the push that triggers the build rule.

PushType String GIT_BRANCH

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

  • GIT_BRANCH: branch push
  • GIT_TAG: tag push
Code String success

The return value.

IsSuccess Boolean true

Indicates whether the API call is successful. Valid values:

  • true: successful
  • false: failed
PageNo Integer 1

The page number of the returned page.

PageSize Integer 30

The number of entries returned on each page.

RequestId String 42D782C8-E8F6-4A32-BEA0-6A6AC854C22A

The ID of the request.

TotalCount String 1

The total number of returned entries.


Sample requests

&<Common request parameters>

Sample success responses

XML format

    <BuildArgs>http_proxy= </BuildArgs>

JSON format

    "IsSuccess": true,
    "TotalCount": 1,
    "PageSize": 30,
    "RequestId": "42D782C8-E8F6-4A32-BEA0-6A6AC854C22A",
    "BuildRules": {
        "PushType": "GIT_BRANCH",
        "ImageTag": "v0.1",
        "BuildRuleId": "crbr-khys0nd3asbe****",
        "PushName": "v0.1",
        "DockerfileLocation": "/",
        "DockerfileName": "Dockerfile",
        "BuildArgs": "http_proxy=",
        "Platforms": "linux/amd64"
    "PageNo": 1,
    "Code": "success"

Error codes

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