Help Center/ ServiceStage/ API Reference/ Application Management V3 APIs/ Lane Group/ Modify a Lane Group Based on the Lane Group ID.
Updated on 2024-10-16 GMT+08:00

Modify a Lane Group Based on the Lane Group ID.

Function

This API is used to modify a lane group based on the lane group ID.

URI

PUT /v3/{project_id}/cas/swimlane-group/{lane_group_id}

Table 1 Path parameter

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

Table 2 Request header parameters

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.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

name

Yes

String

Lane group name.

The value contains 2 to 64 characters consisting of letters, digits, hyphens (-), and underscores (_). It starts with a letter and ends with a letter or digit.

gateways

Yes

Array of objects

List of gateways associated with a lane group, indicating the ingress of full-link traffic. See Table 4.

description

No

String

Lane group description.

The value can contain up to 128 characters.

Table 4 gateways

Parameter

Mandatory

Type

Description

engine_id

Yes

String

ID of the engine used by the target service source.

id

Yes

String

Gateway ID.

name

Yes

String

Gateway name.

target_services

Yes

Array of objects

List of target services in the gateway service management. See Table 5.

Table 5 target_services

Parameter

Mandatory

Type

Description

host

Yes

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.

name

No

String

Target service name.

id

Yes

String

Target service ID.

engine_id

Yes

String

Engine ID.

engine_type

Yes

String

Engine type.

  • servicecomb
  • nacos: registry/configuration center

Response

Table 6 Response parameters

Parameter

Type

Description

id

String

Lane group ID.

name

String

Lane group name.

description

String

Lane group description.

creator

String

Creator.

project_id

String

Tenant's project ID.

gray_release_type

String

Dark launch type.

  • WEIGHT: full-link dark launch based on the traffic ratio.
  • CONTENT: full-link dark launch based on content.

gateway_engine_ids

Array of String

Engine IDs of the gateway's target services.

gateways

Array of objects

List of target services. See Table gateways.

create_time

Integer

Creation time.

update_time

Integer

Update time.

swimlanes

Array of objects

List of lanes. See Table 9.

Table 7 gateways

Parameter

Mandatory

Type

Description

engine_id

Yes

String

ID of the engine used by the target service source.

id

Yes

String

Gateway ID.

name

Yes

String

Gateway name.

target_services

Yes

Array of objects

List of target services in the gateway service management. See Table 8.

Table 8 target_services

Parameter

Type

Description

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.

name

String

Target service name.

id

String

Target service ID.

engine_id

String

Engine ID.

engine_type

String

Engine type.

  • servicecomb
  • nacos: registry/configuration center
Table 9 swimlanes

Parameter

Type

Description

id

String

Lane ID.

name

String

Lane name.

swimlane_group_id

String

Lane group ID.

type

String

Lane type.

  • BASE: baseline lane.
  • GRAY: dark launch lane.

tag

String

Lane tag, which is used to control traffic routing.

route_status

String

Route status.

  • ENABLE
  • DISABLED

rule_match_mode

String

Mode of matching routing rules. This parameter is valid only when gray_release_type is set to CONTENT.

  • ALL: matches all rules.
  • ANY: matches any rule.

rules

Array of objects

Routing rules. This parameter is valid only 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.

  • CLONE
  • UPGRADE
  • ROLLBACK
  • CREATE

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.

Table 10 rules

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.

  • EXACT
  • PREFIX
  • REGEX
Table 11 instances

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.

Table 12 runtime_stack

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.

  • container
  • virtualmachine

Example Request

Modify the name, description, traffic ingress gateway, and target service of the lane group whose ID is ba1ca687-1895-4fc3-88ca-9db02ce2a14e.

{
    "name": "test",
    "description": "test-descption",
    "gateways": [
        {
            "id": "71949725-9c8f-483a-a05f-74d33ff1613e",
            "name": "microGateway-cy8bhr",
            "engine_id": "d68a5ca7-b5b6-4917-a464-0adef94b8067",
            "target_services": [
                {
                    "id": "8177d237-b912-4167-a90d-33c603610d0b",
                    "host": "provider..demo-java-chassis-cse-v2.servicecomb",
                    "name": "provider",
                    "engine_type": "servicecomb",
                    "engine_id": "d68a5ca7-b5b6-4917-a464-0adef94b8067"
                }
            ]
        }
    ]
}

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": 100,
            "batch_status": null,
            "latest_opt": null,
            "release_plan_id": null
        }
    ],
    "swimlane_count": 1,
    "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.