Queries image build rules for a repository.
Debugging
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-kmsiwlxxdcvaduwb |
The ID of the instance. |
RegionId | String | Yes | cn-shanghai |
The ID of the region where the instance resides. |
RepoId | String | Yes | crr-tquyps22md8purzx |
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 |
---|---|---|---|
IsSuccess | Boolean | true |
Indicates whether the operation is successful. |
Code | String | success |
The code returned for the request. |
RequestId | String | 42D782C8-E8F6-4A32-BEA0-6A6AC854C22A |
The ID of the request. |
PageNo | Integer | 1 |
The page number of the returned page. |
PageSize | Integer | 30 |
The number of entries returned per page. |
TotalCount | String | 1 |
The total number of entries returned. |
BuildRules | Array |
A list of image build rules. |
|
BuildRuleId | String | crbr-khys0nd3asbeemlv |
The ID of the image build rule. |
DockerfileLocation | String | / |
The directory of the Dockerfile. |
DockerfileName | String | Dockerfile |
The name of the Dockerfile. |
PushType | String | GIT_BRANCH |
The version type of the Git repository where the Dockerfile resides. Valid values: GIT_TAG and GIT_BRANCH. |
PushName | String | v0.1 |
The version number of the Git repository where the Dockerfile resides. |
ImageTag | String | v0.1 |
The tag of the image. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=ListRepoBuildRule
&InstanceId=cri-kmsiwlxxdcvaduwb
&RegionId=cn-shanghai
&RepoId=crr-tquyps22md8purzx
&PageNo=1
&PageSize=30
&<Common request parameters>
Sample success responses
JSON
format
{
"IsSuccess":true,
"TotalCount":1,
"PageSize":30,
"RequestId":"42D782C8-E8F6-4A32-BEA0-6A6AC854C22A",
"BuildRules":[
{
"PushType":"GIT_BRANCH",
"BuildRuleId":"crbr-khys0nd3asbeemlv",
"ImageTag":"v0.1",
"PushName":"v0.1",
"DockerfileLocation":"/",
"DockerfileName":"Dockerfile"
}
],
"PageNo":1,
"Code":"success"
}
XML
format
<IsSuccess>true</IsSuccess>
<TotalCount>1</TotalCount>
<PageSize>30</PageSize>
<RequestId>42D782C8-E8F6-4A32-BEA0-6A6AC854C22A</RequestId>
<BuildRules>
<PushType>GIT_BRANCH</PushType>
<BuildRuleId>crbr-khys0nd3asbeemlv</BuildRuleId>
<ImageTag>v0.1</ImageTag>
<PushName>v0.1</PushName>
<DockerfileLocation>/</DockerfileLocation>
<DockerfileName>Dockerfile</DockerfileName>
</BuildRules>
<PageNo>1</PageNo>
<Code>success</Code>
Error codes
For a list of error codes, visit the API Error Center.