Updating a Repository Source
Function
This API is used to update a repository source.
URI
PUT /v1/configsets/repos/{repoid}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
repoid |
Yes |
String |
Repository ID |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
No |
String |
Identity authentication information. Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
name |
No |
String |
Repository Name |
|
namespace |
No |
String |
Namespace |
|
repoType |
No |
String |
Repository type, including Bucket, HelmChart, GitRepository and HelmRepository. Currently, only GitRepository is supported |
|
gitRepositorySpec |
No |
GitRepositorySpec object |
Git repository information |
|
secretInfo |
No |
SecretInfo object |
Authentication information for accessing the repository |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
url |
No |
String |
Git repository address |
|
ref |
No |
GitRepositoryRef object |
Git reference to be parsed and checked out |
|
secretRef |
No |
LocalObjectReference object |
Secret that contains authentication information |
|
interval |
No |
String |
Interval for periodically checking repository updates. For example, 1m indicates 1 minute. |
|
timeout |
No |
String |
Timeout duration for Git operations (such as clone). The default value is 60 seconds. |
Response Parameters
Status code: 200
Repository source updated
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
- |
String |
- |
Status code: 409
|
Parameter |
Type |
Description |
|---|---|---|
|
- |
String |
- |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
- |
String |
- |
Example Requests
Updating a repository source
PUT https://ucs.myhuaweicloud.com/v1/configsets/repos/{repoid}
{
"name" : "lwj-repo-0406",
"namespace" : "default",
"gitRepositorySpec" : {
"url" : "https://github.com/wangyuan249/podinfo",
"ref" : {
"branch" : "master"
},
"interval" : "1m",
"timeout" : "1m"
}
}
Example Responses
Status code: 200
Repository source updated
{ }
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Repository source updated |
|
400 |
Client request error. The server could not execute the request. |
|
409 |
There was a request conflict. |
|
500 |
Internal server error |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot