Associating a Component Based on the Lane ID
Function
This API is used to associate a lane with a component based on the lane ID.
URI
PUT /v3/{project_id}/cas/swimlane-group/{lane_group_id}/swimlane/{lane_id}/instances
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Tenant's project ID. See Obtaining a Project ID. |
lane_group_id |
Yes |
String |
Lane group ID. See Obtaining All Lane Groups. |
lane_id |
Yes |
String |
Lane ID. See Obtaining All Lanes in a Lane Group. |
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
Yes |
String |
Message body type (format). Default value: application/json;charset=utf8. |
X-Auth-Token |
Yes |
String |
API calling can be authenticated using a token or AK/SK. If you use a token, this parameter is mandatory and must be set to the token. For details about how to obtain a token, see Obtaining a User Token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
action |
Yes |
String |
Removes or associates a component.
|
instance_ids |
Yes |
Array of String |
Component instance list. |
Response
Parameter |
Type |
Description |
---|---|---|
id |
String |
Lane ID. |
name |
String |
Lane name. |
swimlane_group_id |
String |
Lane group ID. |
type |
String |
Lane type.
|
tag |
String |
Lane tag, which is used to control traffic routing. |
route_status |
String |
Route status.
|
rule_match_mode |
String |
Mode of matching routing rules. This parameter is valid when gray_release_type is set to CONTENT.
|
rules |
Array of objects |
Routing rules. This parameter is valid when gray_release_type is set to CONTENT. See Table 5. |
weight |
Integer |
Lane traffic weight. Value range: 0–100. This parameter is valid when gray_release_type is set to WEIGHT. |
instances |
Array of objects |
List of components managed in the lane. See Table 6. |
instance_count |
Integer |
Number of components managed in the lane. |
latest_opt |
String |
Previous operation of the lane.
|
release_plan_id |
String |
ID of the release task associated with the previous operation of the lane. |
project_id |
String |
Project ID. |
create_time |
Integer |
Creation time. |
update_time |
Integer |
Update time. |
creator |
String |
Creator. |
Parameter |
Type |
Description |
---|---|---|
type |
String |
Type of dark launch matching rule. Currently, only HEADER is supported, that is, matching by header. |
key |
String |
Key. |
value |
String |
Value. |
condition |
String |
Match condition.
|
Parameter |
Type |
Description |
---|---|---|
id |
String |
Component instance ID. |
name |
String |
Component instance name. |
version |
String |
Component version. |
application_id |
String |
Application ID. |
component_id |
String |
Component ID. |
application_name |
String |
Application name. |
replica |
Integer |
Number of instance replicas. |
Example Request
Associate the lane whose ID is 8f8a5b33-ee1f-4a70-b3a9-c1b179a69fd2 with the component instance whose ID is 887f99d7-4ce5-431d-924f-6a328cb05572.
{ "instance_ids": [ "887f99d7-4ce5-431d-924f-6a328cb05572" ], "action": "ADD" }
Example Response
{ "id": "8f8a5b33-ee1f-4a70-b3a9-c1b179a69fd2", "name": "base", "swimlane_group_id": "5447f910-ab74-4d15-b2ab-dd0945900ce9", "type": "BASE", "tag": "base", "route_status": "ENABLE", "rule_match_mode": null, "project_id": "86a1f7b663b349e89071a3090d9d81f3", "rules": null, "creator": "test_user", "create_time": 1722848532908, "update_time": 1722848532908, "instances": [ { "componentId": "0b582884-1ad0-4183-8d6d-16998f54818f", "id": "887f99d7-4ce5-431d-924f-6a328cb05572", "name": "comp-uh59l7s2", "version": "1.0.0", "application_id": "70502782-4f93-4eda-af19-415bac2d12ae", "application_name": "app-apitest-1o6l", "replica": 0 } ], "instance_count": 1, "weight": 100, "batch_status": null, "latest_opt": null, "release_plan_id": null }
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