UpdateCodeSource
Updates a code configuration.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
paicodesource:UpdateCodeSource |
update |
*All Resource
|
None | None |
Request syntax
PUT /api/v1/codesources/{CodeSourceId} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| CodeSourceId |
string |
Yes |
The ID of the code configuration. You can obtain the ID by calling the CreateCodeSource, GetCodeSource, or ListCodeSources operation. |
code-202********** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request struct. |
|
| DisplayName |
string |
No |
The name of the code configuration. |
MyCodeSource1 |
| Description |
string |
No |
The description of the code configuration. |
Training code for XX |
| CodeRepo |
string |
No |
The address of the code repository. |
https://code.aliyun.com/****** |
| CodeBranch |
string |
No |
The name of the code branch. |
dev |
| CodeCommit |
string |
No |
The commit ID of the code. |
3a6***** |
| CodeRepoUserName |
string |
No |
The username used to access the code repository. |
demo-user |
| CodeRepoAccessToken |
string |
No |
The access token corresponding to the username. |
RAT01******** |
| MountPath |
string |
No |
The default mount path. |
/root/code/code-source-1 |
| CloneType |
integer |
No |
The clone mode. Valid values:
|
0 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response struct. |
||
| RequestId |
string |
The request ID, which is a unique identifier generated by Alibaba Cloud for the request. |
40325405-579C-4D82**** |
| CodeSourceId |
string |
The ID of the code configuration. |
code-20******** |
Examples
Success response
JSON format
{
"RequestId": "40325405-579C-4D82****",
"CodeSourceId": "code-20********"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.