Updating a Microservice
Function
This API is used to update a microservice.
Calling Method
For details, see Calling APIs.
URI
PUT /v2/{cloudProjectId}/component/{componentId}/update
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
cloudProjectId |
Yes |
String |
Project ID. |
componentId |
Yes |
String |
Microservice ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
desc |
Yes |
String |
Description. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
id |
String |
Definition: Microservice ID. Value range: The value consists of 32 characters, including digits and letters. |
name |
String |
Definition: Microservice name. Value range: N/A |
type |
String |
Definition: Microservice type. Value range: N/A |
description |
String |
Definition: Microservice description. Value range: N/A |
status |
String |
Definition: Microservice status. Value range: N/A |
parent_id |
String |
Definition: Parent ID. Value range: N/A |
cloud_project_id |
String |
Definition: Project ID. Value range: The value consists of 32 characters, including digits and letters. |
repos |
Array of ComponentRepoVO objects |
Definition: Microservice code repository. Value range: N/A |
is_followed |
Boolean |
Definition: Whether the component is added to favorites. Value range:
|
creator_id |
String |
Definition: Creator ID. Value range: The value consists of 32 characters, including digits and letters. |
creator_name |
String |
Definition: Creator name. Value range: N/A |
create_time |
String |
Definition: Creation time. Value range: N/A |
updater_id |
String |
Definition: Updater ID. Value range: The value consists of 32 characters, including digits and letters. |
updater_name |
String |
Definition: Updater name. Value range: N/A |
update_time |
String |
Definition: Update time. Value range: N/A |
Parameter |
Type |
Description |
---|---|---|
type |
String |
Definition: Repository type. Value range: N/A |
repo_id |
String |
Definition: Repo ID. Value range: N/A |
http_url |
String |
Definition: HTTP address of the repository. Value range: N/A |
git_url |
String |
Definition: GIT address of the repository. Value range: N/A |
branch |
String |
Definition: Branch. Value range: N/A |
language |
String |
Definition: Language. Value range: N/A |
endpoint_id |
String |
Definition: Endpoint ID. Value range: N/A |
Example Requests
PUT https://{endpoint}/v2/2d09f712e9504b61b034cc8f40e475a8/component/f7ced2341b204d2b82c607c6f0de5b4a/update { "desc" : "1122" }
Example Responses
Status code: 200
Response body for updating a microservice.
{ "id" : "f7ced2341b204d2b82c607c6f0de5b4a", "name" : "11", "type" : "microservice", "description" : "1122", "status" : "active", "parent_id" : null, "cloud_project_id" : "2d09f712e9504b61b034cc8f40e475a8", "repos" : [ { "type" : "codehub", "repo_id" : "804934", "http_url" : "https://codehub.devcloud.{region}.huaweicloud.com/LmhTest00001/maven.git", "git_url" : "git@codehub.devcloud.{region}.huaweicloud.com:LmhTest00001/maven.git", "branch" : "master", "language" : "python", "endpoint_id" : "" } ], "is_followed" : null, "creator_id" : "05d8ca972f114765a8984795a8aa4d41", "creator_name" : "p_test_north5", "create_time" : "1709260209", "updater_id" : "05d8ca972f114765a8984795a8aa4d41", "updater_name" : "p_test_north5", "update_time" : "1719318901" }
Status Codes
Status Code |
Description |
---|---|
200 |
Response body for updating a microservice. |
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