Modifying the Gateway Route Configuration of a Lane Group Based on the Lane Group ID
Function
This API is used to modify the gateway route configuration of a lane group based on the lane group ID.
URI
PUT /v3/{project_id}/cas/swimlane-group/{lane_group_id}/route
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. |
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 |
---|---|---|---|
gray_release_type |
Yes |
String |
Dark launch type of the lane group.
|
swimlanes |
Yes |
Array of objects |
List of lanes. See Table 4. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
rule_match_mode |
Yes |
String |
Mode of matching routing rules. This parameter is valid when gray_release_type is set to CONTENT.
|
rules |
Yes |
Array of objects |
Routing rules. This parameter is valid when gray_release_type is set to CONTENT. See Table 5. |
weight |
Yes |
Integer |
Lane traffic weight. Value range: 0–100. This parameter is valid when gray_release_type is set to WEIGHT. |
Response
Parameter |
Type |
Description |
---|---|---|
id |
String |
Lane group ID. |
name |
String |
Lane group name. |
description |
String |
Lane group description. |
creator |
String |
Creator. |
project_id |
String |
Project ID. |
gray_release_type |
String |
Dark launch type of the lane group.
|
engine_ids |
Array of String |
Engine IDs of the gateway's target services. |
gateways |
Array of objects |
List of target services. See Table 7. |
swimlane_count |
Integer |
Number of lanes. |
swimlanes |
Array of objects |
List of lanes. See Table 9. |
create_time |
Integer |
Creation time. |
update_time |
Integer |
Update time. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Gateway ID. |
name |
String |
Gateway name. |
engine_id |
String |
ID of the engine used by the target service source. |
target_services |
Array of objects |
List of target services in the gateway service management. See Table 8. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Target service ID. |
name |
String |
Target service name. |
host |
String |
Host information of the target service. The host information consists of the microservice name after the target service is connected to the engine, the microservice environment name, the microservice application name, and the type of the engine to which the microservice is connected. They are separated by periods (.). For example, unit-controller.testing.test-application.servicecomb. unit-controller indicates the name of the microservice connected to the engine. testing indicates the name of the environment where the unit-controller microservice is located. test-application indicates the name of the application to which the unit-controller microservice belongs. servicecomb indicates that the unit-controller microservice is connected to the ServiceComb engine. |
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. ALL: matches all rules. ANY: matches any rule. 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 10. |
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 11. |
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. |
status |
String |
Instance status. |
engine_id |
String |
ID of the engine associated with the component. |
runtime_stack |
Object |
Runtime system. See Table 12. |
replica |
Integer |
Number of instance replicas. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Technology stack name. |
type |
String |
Technology stack type. Value: Java, Tomcat, Nodejs, Php, Docker, or Python. When deploy_mode is set to virtualmachine, only Java, Tomcat, and Node.js are supported. When deploy_mode is set to container, all of the preceding types are supported. |
version |
String |
Technology stack version. |
deploy_mode |
String |
Deployment mode.
|
Example Request
Modify the gateway route configuration of the lane group whose ID is ba1ca687-1895-4fc3-88ca-9db02ce2a14e.
{ "gray_release_type": "WEIGHT", "swimlanes": [ { "id": "1cd0cb71-5d5d-41a0-8b05-f7ed53400cf7", "weight": 50 }, { "id": "414dccf2-3c15-47c2-8479-0337a5ccc4d9", "weight": 50 } ] }
Example Response
{ "gateways": [ { "id": "71949725-9c8f-483a-a05f-74d33ff1613e", "name": "microGateway-cy8bhr", "target_services": [ { "id": "8177d237-b912-4167-a90d-33c603610d0b", "host": "provider..demo-java-chassis-cse-v2.servicecomb", "name": "provider", "engine_id": "d68a5ca7-b5b6-4917-a464-0adef94b8067", "engine_type": "servicecomb" } ], "engine_id": "d68a5ca7-b5b6-4917-a464-0adef94b8067" } ], "id": "ba1ca687-1895-4fc3-88ca-9db02ce2a14e", "name": "test", "gray_release_type": "WEIGHT", "description": "test-descption", "project_id": "578ac30b81034b89a7255b3af26db9c9", "creator": "test_user", "create_time": 1726623793113, "update_time": 1726623793113, "swimlanes": [ { "id": "1cd0cb71-5d5d-41a0-8b05-f7ed53400cf7", "name": "base", "swimlane_group_id": "ba1ca687-1895-4fc3-88ca-9db02ce2a14e", "type": "BASE", "tag": "base", "route_status": "ENABLE", "rule_match_mode": null, "project_id": "578ac30b81034b89a7255b3af26db9c9", "rules": null, "creator": "test_user", "create_time": 1726626094346, "update_time": 1726626094346, "instances": [ { "componentId": "c14f17b7-ac44-4738-8b57-4be7eff7a956", "environmentId": "d1b623d9-3350-4777-8979-5b4b571ca518", "id": "5fd78836-301e-4750-bdc9-be8a9e43b19a", "name": "weater-beta", "version": "2024.0914.17114", "application_id": "69993ce9-e468-3349-acb8-a30b85b17de5", "application_name": "weathermap", "status": "RUNNING", "engine_id": "d68a5ca7-b5b6-4917-a464-0adef94b8067", "runtime_stack": { "id": "656d9392-658f-4c2c-bb4f-3702a1169267", "url": "openjdk-{arch}:8-1.3.8", "type": "Java", "name": "OpenJDK8", "deploy_mode": "container", "app_spec_name": "", "version": "1.3.8", "status": "Supported", "release_note": "Fixed some security issues and bugs.", "spec": { "os": "EulerOS 2.9.8", "sdk": "OpenJDK-8u411", "digest": null }, "parameters": null, "system": null }, "replica": 1 } ], "instance_count": 1, "weight": 50, "batch_status": null, "latest_opt": null, "release_plan_id": null }, { "id": "414dccf2-3c15-47c2-8479-0337a5ccc4d9", "name": "gray", "swimlane_group_id": "ba1ca687-1895-4fc3-88ca-9db02ce2a14e", "type": "GRAY", "tag": "gray", "route_status": "ENABLE", "rule_match_mode": null, "project_id": "578ac30b81034b89a7255b3af26db9c9", "rules": null, "creator": "test_user", "create_time": 1726627610327, "update_time": 1726627610327, "instances": null, "instance_count": 0, "weight": 50, "batch_status": null, "latest_opt": null, "release_plan_id": null } ], "swimlane_count": 2, "engine_ids": [ "d68a5ca7-b5b6-4917-a464-0adef94b8067" ] }
Status Code
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
404 |
Not Found |
500 |
Internal Server Error |
Error Code
The error code format is SVCSTG.00100.[Error_ID], for example, SVCSTG.00100400. For details, see ServiceStage 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