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. Obtain this ID by calling the CreateCodeSource, GetCodeSource, or ListCodeSources operations. |
code-202********** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| DisplayName |
string |
No |
The name of the code configuration. |
MyCodeSource1 |
| Description |
string |
No |
The description of the code configuration. |
用于XX的训练代码 |
| CodeRepo |
string |
No |
The URL 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 to access the code repository. |
demo-user |
| CodeRepoAccessToken |
string |
No |
The access token for the username. |
*** |
| MountPath |
string |
No |
The default mount path. |
/root/code/code-source-1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response body. |
||
| RequestId |
string |
The ID of 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.