All Products
Search
Document Center

Microservices Engine:CreateOrUpdateSwimmingLane

Last Updated:Oct 16, 2025

Creates or updates an end-to-end canary release swimming lane.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

mse:CreateOrUpdateSwimmingLane

create

*GovernanceNamespace

acs:mse:{#regionId}:{#accountId}:namespace/{#Namespace}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region.

cn-beijing

Namespace

string

No

The name of the MSE namespace.

default

Id

integer

No

The primary key ID. Set the value to -1 to create a swimming lane. Set the value to a number greater than 0 to modify a specific swimming lane.

-1

Name

string

Yes

The name of the swimming lane.

gray

Tag

string

No

The tag.

gray

Enable

boolean

No

Specifies whether to enable the swimming lane.

true

GroupId

integer

No

The ID of the swimming lane group.

115

EnableRules

boolean

No

Specifies whether to configure a routing rule for the swimming lane. You do not need to configure a routing rule for an Ingress.

false

PathIndependentPercentageEnable

boolean

No

This parameter is deprecated. This parameter is a configuration item for Java gateways and is used for path-based routing by percentage.

false

EntryRules

array<object>

No

The collection of swimming lane rules.

array<object>

No

The swimming lane rule.

Paths

array

No

The list of paths.

string

No

The path.

/

Condition

string

No

Specifies how to combine the RestItems to form the final condition.

AND

RestItems

array<object>

No

The list of matching rules.

object

No

The RESTful matching information.

Type

string

No

The matching type.

header

Name

string

No

The name.

x-mse-tag

Operator

string

No

The operator.

rawvalue

NameList

array

No

The list of matching rules.

string

No

The name.

test

Datum

string

No

The value.

x

Cond

string

No

The matching operator.

==

Divisor

integer

No

The divisor.

10

Remainder

integer

No

The remainder.

10

Rate

integer

No

The percentage.

30

Value

string

No

The value.

gray

Priority

integer

No

The priority.

1

EntryRule deprecated

string

No

A JSON string.

[{"Priority":1,"Paths":[],"Condition":"AND","RestItems":[{"Type":"param","Name":"name","Value":"xiaoming","Cond":"==","Operator":"rawvalue"}]}]

GatewaySwimmingLaneRouteJson

object

No

The gateway routing information. This parameter is used when you use a cloud-native gateway as the ingress.

GatewayId

integer

No

The gateway ID.

1

GatewayUniqueId

string

No

The unique ID of the gateway.

gw-84efde2ee1464260bdb17a5b****

RouteIdList

array

No

The list of route IDs.

integer

No

The route ID.

1

CanaryModel

integer

No

The end-to-end canary release mode:

  • 0: Route by request content.

  • 1: Route by percentage.

0

Conditions

array<object>

No

The list of matching conditions.

object

No

The condition item.

Name

string

No

The parameter name.

name

Value

string

No

The parameter value.

xiaoming

Type

string

No

The parameter type:

  • header: Header

  • param: Parameter

header

Cond

string

No

If you use an earlier version of end-to-end canary release (swimversion is 0, which uses tag-based routing and canary routing), the following values are supported:

  • PRE: prefix match

  • REGULAR: regular expression match

  • EQUAL: exact match

If you use a later version of end-to-end canary release (swimversion is 1 or 2, which uses single-service routing), the following values are supported:

  • PRE: prefix match

  • regexp: regular expression match

  • ==

  • !=

  • list: in

  • %: percentage

The later version of end-to-end canary release provides the same features as the earlier version but delivers higher performance and allows for easier configurations. Migrate to the later version.

PRE

Percentage

integer

No

The traffic percentage. This parameter is used for routing by percentage. Valid values: 0 to 100.

30

RouteIndependentPercentageEnable

boolean

No

This parameter is deprecated. This parameter is used to specify percentage-based settings for routing when you use an MSE cloud-native gateway as the ingress.

RouteIndependentPercentageList

array<object>

No

This parameter is deprecated. The list of routes for which canary release by percentage is independently configured.

object

No

The list of routes and percentages.

RouteId

integer

No

The route ID.

111

Percentage

integer

No

The traffic percentage. This parameter is used for routing by percentage. Valid values: 0 to 100.

50

Condition

string

No

AND: All canary release conditions must be met. OR: Any of the canary release conditions can be met.

AND

AcceptLanguage

string

No

The language of the response. Valid values: zh (default): Chinese, en: English.

zh

Response elements

Element

Type

Description

Example

object

RestResult

RequestId

string

The request ID.

EE5C32A1-BC0E-4B79-817C-103E4EDF****

Success

boolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.

  • false: The request failed.

true

Code

integer

The code is used for synchronization with the Success parameter.

200

ErrorCode

string

The error code.

mse-100-000

HttpStatusCode

integer

The HTTP status code.

200

Message

string

The returned message.

请求处理成功

Data

object

The data overview.

{}

name

string

The name of the swimming lane.

test

id

integer

The ID of the swimming lane.

94765

tag

string

The tag that corresponds to the swimming lane.

release

status

integer

The status of the swimming lane.

0

enable

boolean

Indicates whether the swimming lane is enabled.

true

regionId

string

The region where the application resides.

cn-beijing

groupId

integer

The ID of the swimming lane group.

72586

entryRule

string

The rule for the ingress application.

{}

entryRules

array<object>

The rule name.

array<object>

The details of the rule for the ingress application.

paths

array

The list of paths.

string

The path.

/

path

string

The path of the code group.

/adump/wxb/prod

condition

string

The condition.

AND

restItems

array<object>

The list of RESTful matching rules.

object

The RESTful matching rule.

type

string

The matching type.

cookie

name

string

The name.

test

operator

string

The operator.

rawvalue

nameList

array

The list of names.

string

The name.

test

datum

string

The value.

x

cond

string

The matching operator.

==

divisor

integer

The divisor.

10

remainder

integer

The remainder.

10

rate

integer

The percentage

30

value

string

Value

9

enableRules

boolean

Indicates whether the rule is enabled.

true

gmtCreate

string

The time when the swimming lane was created.

1545726028000

gmtModified

string

The time when the swimming lane was updated.

1565701886000

gatewaySwimmingLaneRouteJson

string

The routing rule of the MSE gateway.

{}

pathIndependentPercentageEnable

boolean

This parameter is deprecated. This parameter is used when a Java gateway is the ingress. It specifies whether to enable canary release by path percentage.

false

Examples

Success response

JSON format

{
  "RequestId": "EE5C32A1-BC0E-4B79-817C-103E4EDF****",
  "Success": true,
  "Code": 200,
  "ErrorCode": "mse-100-000",
  "HttpStatusCode": 200,
  "Message": "请求处理成功",
  "Data": {
    "name": "test",
    "id": 94765,
    "tag": "release",
    "status": 0,
    "enable": true,
    "regionId": "cn-beijing",
    "groupId": 72586,
    "entryRule": "{}",
    "entryRules": [
      {
        "paths": [
          "/"
        ],
        "path": "/adump/wxb/prod",
        "condition": "AND",
        "restItems": [
          {
            "type": "cookie",
            "name": "test",
            "operator": "rawvalue",
            "nameList": [
              "test"
            ],
            "datum": "x",
            "cond": "==",
            "divisor": 10,
            "remainder": 10,
            "rate": 30,
            "value": "9"
          }
        ]
      }
    ],
    "enableRules": true,
    "gmtCreate": "1545726028000",
    "gmtModified": "1565701886000",
    "gatewaySwimmingLaneRouteJson": "{}",
    "pathIndependentPercentageEnable": false
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 IllegalRequest Invalid request:%s Invalid request: %s
400 InvalidParameter Parameter error:%s Request parameter error: %s
500 InternalError Console error. Try again later:%s Console error. Try again later: %s
403 NoPermission You are not authorized to perform this operation:%s You do not have the permission to use this interface:%s
404 NotFound Not found:%s The resource does not exist:%s

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.