Updates the source code repository that is bound to the image repository.

Debugging

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 UpdateRepoSourceCodeRepo

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

CodeRepoName String Yes repo

The name of the source code repository.

CodeRepoNamespaceName String Yes namespace

The namespace to which the source code repository belongs.

CodeRepoType String Yes GITHUB

The type of the code hosting platform. Valid values: GITHUB, GITLAB, GITEE, CODEUP, and CODE.

InstanceId String Yes cri-shac42yvqzvq****

The ID of the Container Registry Enterprise Edition instance.

RegionId String Yes cn-hangzhou

The region ID of the Container Registry Enterprise Edition instance.

RepoId String Yes crr-gzsrlevmvoa****

The ID of the image repository.

AutoBuild String No true

Specifies whether to enable Automatically Build Images When Code Changes. Valid values:

  • true: Images are automatically built when code changes.
  • false: Images are not automatically built when code changes.
OverseaBuild String No false

Specifies whether to enable Build With Servers Deployed Outside Mainland China. Valid values:

  • true: Enable Build With Servers Deployed Outside Mainland China.
  • false: Do not enable Build With Servers Deployed Outside Mainland China.
DisableCacheBuild String No false

Specifies whether to disable Build Cache. Valid values:

  • true: Disable Build Cache.
  • false: Enable Build Cache.
CodeRepoId String No crr-cp7d6sget5r****

The ID of the source code repository.

Response parameters

Parameter Type Example Description
Code String 200

The return code.

IsSuccess Boolean true

Indicates whether the operation is successful.

RequestId String F56D589D-AF7F-4900-BA46-62C780AC2C10

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=UpdateRepoSourceCodeRepo
&CodeRepoName=repo
&CodeRepoNamespaceName=namespace
&CodeRepoType=GITHUB
&InstanceId=cri-shac42yvqzvq****
&RegionId=cn-hangzhou
&RepoId=crr-gzsrlevmvoa****
&<Common request parameters>

Sample success responses

XML format

<IsSuccess>true</IsSuccess>
<RequestId>F56D589D-AF7F-4900-BA46-62C780AC2C10</RequestId>
<Code>200</Code>

JSON format

{
    "IsSuccess": true,
    "RequestId": "F56D589D-AF7F-4900-BA46-62C780AC2C10",
    "Code": 200
}

Error codes

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