All Products
Search
Document Center

Serverless App Engine:CreateOrUpdateSwimmingLane

Last Updated:Dec 17, 2025

Creates or updates a lane.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
sae:CreateOrUpdateSwimmingLanecreate
*All Resources
*
    none
none

Request syntax

POST /pop/v1/cas/gray/createOrUpdateSwimmingLane HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
LaneIdlongNo

The ID of the lane.

13857
LaneNamestringNo

The name of the lane.

test
LaneTagstringNo

The tag of the lane.

{"alicloud.service.tag":"g1"}
GroupIdlongNo

The ID of the lane group to which the lane belongs.

b2a8a925-477a-eswa-b823-d5e22500****
NamespaceIdstringNo

The namespace ID.

cn-beijing:test
CanaryModelintegerNo

Full-link Grayscale Mode:

  • 0: The request is routed based on the content of the request.
  • 1: routing based on percentages
0
EnablebooleanNo

Lane Status

  • true: enabled
  • false: disabled
true
AppEntryRuleobjectNo

The route configuration of the gateway.

Note This parameter is required if the gateway entry of the lane group is Java.
PathsarrayNo

The matched request path.

stringNo

The request path.

/A
PercentageintegerNo

The traffic ratio. Valid values: 0 to 100.

50
ConditionJoinerstringNo

Logical connectors between conditions:

  • AND: All conditions are met at the same time.
  • OR: Any condition is met.
AND
Conditionsarray<object>No

The conditions that trigger circuit breaking.

objectNo

Item

TypestringNo

The parameter type. Valid values:

  • header
  • param
  • Cookie: forwards requests based on cookies.
Header
NamestringNo

The parameter name.

t
ConditionstringNo

Matching Rule:

  • The exact match. The condition is met if the traffic value and the condition value are exactly the same.
  • The exact match. The condition is met if the traffic value and the condition value are exactly the same.
  • The inclusive match. The condition is met if the traffic value is included in the specified list.
  • The percentage match. Principle: The condition is met if 'hash(get(key)) % 100 < value'.
  • Regular match: a regular expression match. The condition is met when the match is based on regular expression rules.
==
ValuestringNo

The match value of the condition.

g1
IndependentPercentageEnablebooleanNo

Whether to enable proportional grayscale.

  • true: enabled. After you enable this parameter, you must configure the PercentageByPath.
  • false: disables the service.
true
PercentageByPathobjectNo

The traffic configuration.

integerNo

Configure the traffic ratio for the configured path, ranging from 1 to 100.

50
MseGatewayEntryRuleobjectNo

The route configuration of the MSE gateway.

Note If the EntryAppType is set to apig or mse-gw, it is required.
RouteIdsarrayNo

The ID of the route.

longNo

The ID of the gateway route. Call the ListGatewayRoute to obtain.

78830
PercentageintegerNo

The percentage of traffic replication. Valid values: 0 to 100.

100
ConditionJoinerstringNo

Logical connectors between conditions:

  • AND: All conditions are met at the same time.
  • OR: Any condition is met.
AND
Conditionsarray<object>No

Routing Condition

objectNo

Configure routing conditions.

TypestringNo

The parameter type. Valid values:

  • header
  • param
  • Cookie: forwards requests based on cookies.
header
NamestringNo

The parameter name.

test
ConditionstringNo

The matching rule.

  • ==: exact match.
  • ! =: exact match.
  • in: contains matches.
  • Percentage: Percentage matching.
  • Regular matching: specifies whether a regular expression is used to search for the original string.
==
ValuestringNo

The match value of the condition.

g1
IndependentPercentageEnablebooleanNo

Whether to enable proportional grayscale.

  • true: Enabled. After you enable this parameter, you must configure the PercentageByPath.
  • false: Disabled.
true
PercentageByRouteobjectNo

The traffic configuration.

integerNo

Valid values: 1 to 100

100

Response parameters

ParameterTypeDescriptionExample
object

Created or updated swimlane results.

RequestIdstring

The ID of the request.

91F93257-7A4A-4BD3-9A7E-2F6EAE6D****
Messagestring

The message returned. Value description:

  • If the request was successful, a success message is returned.
  • An error code is returned if the request failed.
success
TraceIdstring

The ID of the trace. The ID is used to query the details of a request.

0a98a02315955564772843261e****
Dataobject

The returned information.

LaneIdlong

The ID of the lane.

22318
ErrorCodestring

The status code. Value values:

  • If the request was successful, ErrorCode is not returned.
  • If the request failed, ErrorCode is returned. For more information, see Error codes in this topic.
Codestring

The HTTP status code or the error code. Valid values:

  • 2xx: Success.
  • 3xx: Redirection.
  • 4xx: Request error.
  • 5xx: Server error.
200
Successboolean

Whether the creation or update was successful. Valid values:

  • true: created.
  • false: failed to create.
true

Examples

Sample success responses

JSONformat

{
  "RequestId": "91F93257-7A4A-4BD3-9A7E-2F6EAE6D****",
  "Message": "success",
  "TraceId": "0a98a02315955564772843261e****",
  "Data": {
    "LaneId": 22318
  },
  "ErrorCode": "",
  "Code": 200,
  "Success": true
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameter.NotEmptyYou must specify the parameter %s.-
400InvalidParameter.ObviouslyThe specified parameter is invalid {%s}.-
400InvalidParameter.WithMessageThe parameter is invalid {%s}: %s-
400MseGatewayRule.CreateFailedCreate MSE Gateway rule failed.Failed to create an MSE microservices gateway route.
400InternalApiErrorAn exception occurred when calling mse:%s, error message: %s.-

For a list of error codes, visit the Service error codes.