All Products
Search
Document Center

Enterprise Distributed Application Service:InsertSwimmingLane

Last Updated:Jan 08, 2024

Creates a lane.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Debug

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

POST /pop/v5/trafficmgnt/swimming_lanes

Request parameters

ParameterTypeRequiredDescriptionExample
LogicalRegionIdstringYes

The ID of the custom namespace. The ID is in the physical region ID:custom namespace identifier format. Example: cn-hangzhou:test.

cn-beijing:test
NamestringYes

The name of the lane.

test1
TagstringYes

The tag.

tag
GroupIdlongYes

The ID of the lane group.

95
EntryRulesstringYes

The throttling conditions.

[{"priority":1,"path":"/traffic","condition":"AND","restItems":[{"type":"header","name":"testheader","value":"testvalue","cond":"==","operator":"rawvalue"}]}]
EnableRulesbooleanNo

Specifies whether to enable the throttling rule.

true
AppInfosstringNo

The information about applications related to the lane.

[{"appId":"f72deaac-26ba-429a-948d-5fa47c4a****"},{"appId":"5049d2c8-f997-4fc9-92a2-153506a6****"}]

Response parameters

ParameterTypeDescriptionExample
object

The object data that is returned.

Codeinteger

The HTTP status code that is returned.

200
Messagestring

The additional information that is returned.

success
RequestIdstring

The ID of the request.

75972A87-5682-5277-ADA7-DA2A01BE****
Dataobject

The data that is returned.

NamespaceIdstring

The ID of the namespace.

cn-beijing:test
GroupIdlong

The ID of the lane group.

95
EntryRulestring

The throttling rule for the lane.

priority: the priority of the throttling rule for the lane. Valid values: 1 to 100.

path: the path that is matched by the throttling rule for the lane.

restItems: conditions to be met.

condition: the relationship among the conditions to be met.

  • AND: all conditions
  • OR: one of the conditions

restItems.type: the type of the rule. Valid values:

  • header: matches by request header.
  • cookie: matches by request cookie.
  • param: matches by request parameters.

restItems.name: the key that matches the rule.

restItems.value: the value that matches the rule.

restItems.cond: the condition that matches the rule. Valid values:

  • "==": The parameter value is equal to the value that you enter in the Value field.
  • "!=": The parameter value is not equal to the value that you enter in the Value field.
  • ">": The parameter value is greater than the value that you enter in the Value field.
  • "<": The parameter value is less than the value that you enter in the Value field.
  • ">=": The parameter value is greater than or equal to the value that you enter in the Value field.
  • "<=": The parameter value is less than or equal to the value that you enter in the Value field.
  • "in": The parameter value is within the values that you enter in the Value field.

restItems.operator: the type of the value. Valid values:

  • rawvalue: the initial value
  • mod: the reminder obtained by performing modulo operation
  • list: the value from the list
[{\"condition\":\"AND\",\"enable\":false,\"path\":\"/traffic\",\"priority\":1,\"restItems\":[{\"cond\":\"==\",\"datum\":\"testvalue\",\"name\":\"testheader\",\"operator\":\"rawvalue\",\"type\":\"header\",\"value\":\"testvalue\"}]}]
AppInfosstring

The applications that are associated with lanes.

[{"appId":"9dcba109-ee9f-4e67-8916-41 *******"}]
Tagstring

The tag of the lane.

8202e09
Namestring

The name of the lane.

test1
Idlong

The ID of the lane.

88
SwimmingLaneAppRelationShipListobject []

The association relationships between lanes and applications.

AppNamestring

The name of the application.

test-app
Rulesstring

The association rule.

dubbo
LaneIdlong

The ID of the lane.

88
AppIdstring

The ID of the application.

bd170895-096c-4944-9007-d4582c77****

Examples

Sample success responses

JSONformat

{
  "Code": 200,
  "Message": "success",
  "RequestId": "75972A87-5682-5277-ADA7-DA2A01BE****",
  "Data": {
    "NamespaceId": "cn-beijing:test",
    "GroupId": 95,
    "EntryRule": "[{\\\"condition\\\":\\\"AND\\\",\\\"enable\\\":false,\\\"path\\\":\\\"/traffic\\\",\\\"priority\\\":1,\\\"restItems\\\":[{\\\"cond\\\":\\\"==\\\",\\\"datum\\\":\\\"testvalue\\\",\\\"name\\\":\\\"testheader\\\",\\\"operator\\\":\\\"rawvalue\\\",\\\"type\\\":\\\"header\\\",\\\"value\\\":\\\"testvalue\\\"}]}]",
    "AppInfos": "[{\"appId\":\"9dcba109-ee9f-4e67-8916-41\n*******\"}]",
    "Tag": "8202e09",
    "Name": "test1",
    "Id": 88,
    "SwimmingLaneAppRelationShipList": [
      {
        "AppName": "test-app",
        "Rules": "dubbo",
        "LaneId": 88,
        "AppId": "bd170895-096c-4944-9007-d4582c77****"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
605Edas.errorcode.ParameterInvalid.PointedParameter.messageThe value of parameter {0} is invalid.Invalid parameters: {0}

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