Creates a 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.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
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
edas:ManageTraffic |
create |
*All Resource
|
None | None |
Request syntax
POST /pop/v5/trafficmgnt/swimming_lanes HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| LogicalRegionId |
string |
Yes |
The ID of the custom namespace. The ID is in the |
cn-beijing:test |
| Name |
string |
Yes |
The name of the lane. |
test1 |
| Tag |
string |
Yes |
The tag. |
tag |
| GroupId |
integer |
Yes |
The ID of the lane group. |
95 |
| EntryRules |
string |
Yes |
The throttling conditions. |
[{"priority":1,"path":"/traffic","condition":"AND","restItems":[{"type":"header","name":"testheader","value":"testvalue","cond":"==","operator":"rawvalue"}]}] |
| EnableRules |
boolean |
No |
Whether to enable the throttling rule. |
true |
| AppInfos |
string |
No |
Information about applications associated with the lane. |
[{"appId":"f72deaac-26ba-429a-948d-5fa47c4a****"},{"appId":"5049d2c8-f997-4fc9-92a2-153506a6****"}] |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned object. |
||
| Code |
integer |
The HTTP status code. |
200 |
| Message |
string |
Additional information. |
success |
| RequestId |
string |
The ID of the request. |
75972A87-5682-5277-ADA7-DA2A01BE**** |
| Data |
object |
The returned data. |
|
| NamespaceId |
string |
The ID of the namespace. |
cn-beijing:test |
| GroupId |
integer |
The ID of the lane group. |
95 |
| EntryRule |
string |
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.
restItems.type: the type of the rule. Valid values:
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:
restItems.operator: the type of the value. Valid values:
|
[{\"condition\":\"AND\",\"enable\":false,\"path\":\"/traffic\",\"priority\":1,\"restItems\":[{\"cond\":\"==\",\"datum\":\"testvalue\",\"name\":\"testheader\",\"operator\":\"rawvalue\",\"type\":\"header\",\"value\":\"testvalue\"}]}] |
| AppInfos |
string |
Applications associated with the lane. |
[{"appId":"9dcba109-ee9f-4e67-8916-41 *******"}] |
| Tag |
string |
The tag of the lane. |
8202e09 |
| Name |
string |
The name of the lane. |
test1 |
| Id |
integer |
The ID of the lane. |
88 |
| SwimmingLaneAppRelationShipList |
array<object> |
Associations between lanes and applications. |
|
|
object |
The returned object. |
||
| AppName |
string |
The name of the application. |
test-app |
| Rules |
string |
The association rule. |
dubbo |
| LaneId |
integer |
The ID of the lane. |
88 |
| AppId |
string |
The ID of the application. |
bd170895-096c-4944-9007-d4582c77**** |
Examples
Success response
JSON format
{
"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 code |
Error code |
Error message |
Description |
|---|---|---|---|
| 605 | Edas.errorcode.ParameterInvalid.PointedParameter.message | The value of parameter {0} is invalid. |
See Error CodesError Codes for a complete list.
Release notes
See Release NotesRelease Notes for a complete list.